# Help with backup circuit for digital clock

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by the_engineeer, Apr 1, 2016.

1. ### Tony StewartWell-Known MemberMost Helpful Member

Joined:
Aug 31, 2012
Messages:
3,152
Likes:
282
Location:
Richmond Hill , ON Canada near Toronto
You can run the logic from a 3 terminal regulator @ 3.7V with a 3.7V LiPo 2.5Ah for standby in parallel. The LED digits can run from 5V so only the display is off in a power failure.

If you use a Schottky diode pair in series with battery/LDO( to protect some LDO need this due to reverse voltage) then run LDO Vdc at 3.6+diode drop from 5V for LEDs.

You want the battery pre-charged so as not to take a long time to build up charge as a single 18650 LiPo cell is many hundreds of Farads and cheaper than 3 Super caps. The drivers are active low to the LED cathodes with common Anodes for each digit to +5V. The Vol/Iol active low impedance of driver is around 250 Ohms ESR at 5V, give or take 50, for HCxxx CMOS.

• If LiPo drops from 3.7 to 3.0V with let's say 2Ah capacity...
• where C=I*dt/dV
• For a 20 hour [h] standard 1C discharge time with a dummy load of "I"=100mA =2Ah
• then "dt"=20h *3600sec ,
• and "dV"= 3.7-3.0=0.7V,
• Thus using in this way an 18650 LiPo with 2Ah ( more with full charge to 4.2V but faster aging)
• C=0.1A * 20[h]*3600[s/hr]/0.7[V] >10,000 amp-seconds per volt = Farads

capiche?

Last edited: Apr 4, 2016
2. ### the_engineeerMember

Joined:
Feb 26, 2016
Messages:
38
Likes:
1
Location:
Northern Sweden
Well, I kind of capiche...
But an 18650 cell isn't compatible with the idea of a compact circuit, and quite frankly seems very much overkill to power some logic chips.
Also, the 5082 displays do not have anodes and cathodes like regular LED segment ones, these have only 5V power input, GND and 4 binary channels.

3. ### Tony StewartWell-Known MemberMost Helpful Member

Joined:
Aug 31, 2012
Messages:
3,152
Likes:
282
Location:
Richmond Hill , ON Canada near Toronto
Then use a PC coin cell and socket such as CR2032 which is 2.0mm Thick X 32mm D. And 3.0V

Measure load current and use a high R1/R2 value to keep it charged at 3V with less current X duty cycle ...e.g. 10mA load with 2 hr use in 200 hr avg needs 100uA charge to replenish some of the discharge of this normally non rechargeable primary cell as long as V+ is limited.

CR2032 is about 5% of the cost of 3 supercaps and 20x the Capacitance and 20% of the size.
How often does power fail per year? (hours total + duration max.. this goes in your design spec,,,hint)

The hp8052-7300 can still be powered from5+/0.5 and with TTL interface be powered down or separately with CMOS logic powered at 3~3.7V. The TTL logic threshold is always two * Vbe drops or ~1.3V, so the logic levels are compatible with CMOS 3V logic.
The hp8052-8xxx are discrete Anode-cathode type
hp is no longer Agilent, they are now Broadcom.

Last edited: Apr 5, 2016

Joined:
Jan 12, 1997
Messages:
-
Likes:
0

5. ### Tony StewartWell-Known MemberMost Helpful Member

Joined:
Aug 31, 2012
Messages:
3,152
Likes:
282
Location:
Richmond Hill , ON Canada near Toronto

I was with the Engineers from Motorola while I was on the Iridium Satellite phone project one winter in West Palm Beach and he got the strippers phone number so he was texting her between dances. ha.

Last edited: Apr 5, 2016
6. ### specWell-Known MemberMost Helpful Member

Joined:
Oct 27, 2015
Messages:
5,828
Likes:
710
Location:
Somerset UK GMT
That is right Keep. I have not been involved with Mouser much, but recently I have found their search function to be really good. They also have an incredible inventory at good prices. Another thing I like is the advice they give about a particular component: current production, going out of production, and obsolete. They also advise about equivalent/new products related to the item you are looking at. And, unlike many vendors search functions, it is actually meaningful and usable.

One downside though is that in busy periods, in the UK anyway, the site will hang for 30 seconds or more. Also, strangely, they do not stock with Linear Technology parts.

spec

Last edited: Apr 5, 2016
7. ### the_engineeerMember

Joined:
Feb 26, 2016
Messages:
38
Likes:
1
Location:
Northern Sweden
I have never been to West Palm Beach...?
Anyways, let's keep this thread on topic from here on, thanks!

8. ### the_engineeerMember

Joined:
Feb 26, 2016
Messages:
38
Likes:
1
Location:
Northern Sweden
I've just started to learn ExpressPCB, here's my oscillator "module":

9. ### specWell-Known MemberMost Helpful Member

Joined:
Oct 27, 2015
Messages:
5,828
Likes:
710
Location:
Somerset UK GMT
Pretty neat, I don't know if you are aware of CadSoft EAGLE CAD. It is a very popular CAD package and there is a free version too.
spec

10. ### the_engineeerMember

Joined:
Feb 26, 2016
Messages:
38
Likes:
1
Location:
Northern Sweden
Yes, I've installed Eagle + some other freeware programs. I'm going to try them all out and decide which one I like best
ExpressPCB isn't too shabby though, at least for a noob like me, hehe!

11. ### specWell-Known MemberMost Helpful Member

Joined:
Oct 27, 2015
Messages:
5,828
Likes:
710
Location:
Somerset UK GMT
PCB Express, from what I know, is easy to learn and use and as a get-you-started-as-soon-as-possible ECAD it is ideal. My concern, though, is that EAGLE is probably better for more complex applications, so it would be a better program to learn long term. There are a load of very good free ECAD programs available, and everyone has their favorites, but EAGLE is the industry standard, within its sector that is.

By the way, my latest back up battery circuit is only a paper design and has never been built and tested. As such, it would be wise to prototype it before committing to a PCB.

spec

12. ### Tony StewartWell-Known MemberMost Helpful Member

Joined:
Aug 31, 2012
Messages:
3,152
Likes:
282
Location:
Richmond Hill , ON Canada near Toronto
Another thing to learn is to set design goals that are testable in a short list of specs.... like ppm clock error and supply tolerance for that. You may need a tiny trimcap like those used in watches to null +/-50 ppm or +/-25ppm offset error for example depending on crystal (or tuning fork or MEMS) tolerance spec, layout pF and choice of fixed caps.

(although when I was a rookie, I just filed down the ceramic to tune the cap and Xtal to WWVB by triggering on scope with probe as antenna so as not to load circuit with more pF.)

50 ppm is over 100 seconds per month.

p.s. no need to backup 5V,, just 3.0 Lithium clock voltage with same 3V voltage from LDO from 5V. Lithium primary cells ( not LiPo) are extremely stable voltages. XO (Xtal Osc) accuracy is supply dependant.

Last edited: Apr 5, 2016
13. ### specWell-Known MemberMost Helpful Member

Joined:
Oct 27, 2015
Messages:
5,828
Likes:
710
Location:
Somerset UK GMT
A good point Tony,

The effect of the voltage supply on the accuracy of the Xtal oscillator needs to be determined. Presently, the oscillator will be operating over a worst case voltage range of 4V to 3.6V (dV= 400mV) after 4Hrs or down to 3V (dV=1V) if the clock is left unpowered for a long time.

Along the lines of what you suggest, but not going for a lithium primary cell, is to use a very low power, very low drop out regulator at around 3V powered from the LiIon secondary backup battery. This would be a good move for maintaining a constant oscillator supply rail. It should be simple to do- famous last words.

Another thought is that it would probably be better, from the frequency stability point of view, to have a separate Xtal oscillator. I haven't investigated this though.

spec

Last edited: Apr 6, 2016
14. ### Tony StewartWell-Known MemberMost Helpful Member

Joined:
Aug 31, 2012
Messages:
3,152
Likes:
282
Location:
Richmond Hill , ON Canada near Toronto
I could go with that too.

My point was to show how a slim coin cell in parallel with an LDO could be used instead of a bulky supercap, albeit which would have a longer life, but if care is done with LDO, a primary coin cell can last 10 years or more as they have less leakage.

FOr the newbie's FYI, not all LDOs are "low drop out" historically half a life time ago LDO mean 2V drop, now ultralow LDO means 20 mV.. here is a cheap 60mV one at rated 150mA which means ESR is 60/150 or 0.4Ω=RdsOn.

http://www.digikey.com/product-detail/en/texas-instruments/LP3985IM5-3.0/NOPB/LP3985IM5-3.0/NOPBCT-ND/638745

15. ### specWell-Known MemberMost Helpful Member

Joined:
Oct 27, 2015
Messages:
5,828
Likes:
710
Location:
Somerset UK GMT
Last edited: Apr 6, 2016
• Like x 1
16. ### specWell-Known MemberMost Helpful Member

Joined:
Oct 27, 2015
Messages:
5,828
Likes:
710
Location:
Somerset UK GMT
A CR2032 has a rating of 225 mA/h. The drain of the oscillator and counters is around 340uA so the CR2032 would be exhausted after 27 days. You mention charging the CR2032 but they are not specified for that- shame on you Mr Specman.

spec

17. ### the_engineeerMember

Joined:
Feb 26, 2016
Messages:
38
Likes:
1
Location:
Northern Sweden
OK, that seems like a good idea, can I just replace the crystal etc from pin 10-11 on the 4060 with this or do I need some other components also?

18. ### specWell-Known MemberMost Helpful Member

Joined:
Oct 27, 2015
Messages:
5,828
Likes:
710
Location:
Somerset UK GMT
I will check and get back
spec

19. ### the_engineeerMember

Joined:
Feb 26, 2016
Messages:
38
Likes:
1
Location:
Northern Sweden
Thanks, I appreciate all your help!

20. ### specWell-Known MemberMost Helpful Member

Joined:
Oct 27, 2015
Messages:
5,828
Likes:
710
Location:
Somerset UK GMT
No probs eng

spec

21. ### specWell-Known MemberMost Helpful Member

Joined:
Oct 27, 2015
Messages:
5,828
Likes:
710
Location:
Somerset UK GMT
Hy again eng
To fit separate Xtal oscillator:

(1) Remove all components from CD4060 pins 10 and 11
(2) Connect CD4060 pin 11 (reset) to 0V
(3) Connect clock module pin 1 (output) to CD4060 pin 10.
(4) Connect clock module pin 11 (reset) to 0V
(5) Connect clock module pin 3 (GND) to 0V
(6) Connect clock module pin 4 (VDD) to back-up battery positive

spec