Clock battery backup

Nagging hardware related question? Post here!
Post Reply
prime
Trump Card
Posts: 192
Joined: Fri Feb 18, 2011 8:58 pm

Clock battery backup

Post by prime »

Hi all,

I'm a little bit unsure of how the battery backup for the ZX8302's clock is supposed to work, it looks like the battery should be connected with +ve to pin 40 and -ve to gnd.

However on the Issue 5 & 6 QL schematics pin 40 is connected to +5v by a link D22 on the PCB, measuring this with a multimeter reveals this to be a dead short, presumably a wire link.

Surely this will mean that the battery will try and power everything connected to the +5V line ? Or is it a case of that link must be cut if the battery is fitted ? I checked with the QIMI instructions but they seemed to say nothing about this.

Cheers.

Phill.


User avatar
belg4rion67
Trump Card
Posts: 189
Joined: Sun Feb 20, 2011 6:15 pm
Location: Milan - Italy

Re: Clock battery backup

Post by belg4rion67 »

hi, I've made some experiment about possible connection of a battery for clock backup and these are results:
- if you bent pin 40 out of dil socket and link it to a battery +ve (from 3.7 to 5 volt) clock is backuped and so you can see after a power cycle that it is saved....but
- randomly, after a reset or even in power cycle, clock registers assume a random value so it gives an erroneus date.
- I've replicated the circuit part of qimi ( a pnp transistor, some resistors and 2 logic gates) that force reset input of zx8302 down for a bit time during power on; in this way clock value rest solid!

see this:
https://www.dropbox.com/sh/w9597y2uam4p ... Jll5SCUtma
First picture is diy circuit, the second one wires links on ql pcb


Only original hardware! :)
User avatar
1024MAK
Super Gold Card
Posts: 592
Joined: Sun Dec 11, 2011 1:16 am
Location: Looking forward to summer in Somerset, UK...

Re: Clock battery backup

Post by 1024MAK »

I did a little bit of searching on the subject of a battery backed real time clock.

Sinclair did intend to include a battery backed RTC. However, it was discovered that during reset, the clock registers were sometimes corrupted.

It seems that rather than use time and resources on this when they had other things to sort out, instead they dropped this feature. Hence no battery connections on the latter issue PCBs (assuming that say, an issue 1 PCB even had the battery connections).

So, What should you have for battery back-up?

Well here are typical battery back-up circuits:

For Ni-Cad batteries (designed for this application) you need:-

Code: Select all

For a Ni-Cad or Ni-Mh back-up battery
       
        diode
+5V -----|>|----+-----+--- to Vcc pin
                |     |
               |ˉ|    |
             R | |   === 100nF
               |_|    |
                |     |
               to    GND
              Bat+    

Bat- connects to GND
The value of the resistor, R, must limit the charging current to the continuous trickle charging rate that is specified by the battery manufacturer [ typically 0.03 CA where CA is the nominal capacity (C) in ampères (A) ].
A typical battery for a RTC would be a 3 cell 3.6V 150mAh type. The nominal capacity for a battery made by Varta is given as 140mAh. So doing the calculations gives a trickle charge current of 4.2mA.

R = ( 5V - 3.6V ) / 4.2mA = 330 Ω

For a non-rechargeable battery, e.g. if using a CR2032 lithium coin cell:-

Code: Select all

For a non-rechargeable battery back-up battery,
e.g. if using a CR2032 lithium coin cell.
       
         D1
+5V -----|>|-------+--- to Vcc pin
                   |
      +-----|>|----+
      |     D2     |
     |ˉ|           |
   R | |          === 100nF
     |_|           |
      |            |
     to           GND
    Bat+ 
The resistor in this circuit must be provided to limit an unintended charging current in the event of a failure of diode D2 (the diode going short circuit). D2 should be a low leakage Schottky type.
A typical value for resistor R would be 4.7kΩ.

However, you will notice that the QIMI circuit is somewhat different.
The charging current for the battery goes through the transistor (which acts like a diode), then through a 2.2kΩ resistor to the battery. The supply to ZX8302 pin 40 goes through a further 2.2kΩ resistor.

Mark


:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer in Somerset later in the year :)

QL, Falcon, Atari 520STFM, Atari 1040STE, more PC's than I care to count and an assortment of 8 bit micros (Sinclair and Acorn)(nearly forgot the Psion's)
Post Reply