Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help with backup circuit for digital clock

Status
Not open for further replies.
Well, not really... But perhaps after my buffer redesign I will have more room.
Will it work with a LiPo battery, by the way? If so, there's many to choose from and a 130mAh is only 40 x 7 x 11 mm - about the same size as my 3 caps :happy:
LiPo will be fine. Would you like to point me at a battery that you would like to use? Then I can optimize the charger for that.

spec

PS: I see from your profile that you are in Sweden, but you talk like a Brit. :wideyed:
 
Last edited:
Just a thought; if the display 5V power supply lines are at OV, what do the display inputs look like. Aren't they a reverse diode (emitter of an NPN transistor). If so, will the output lines of the counter chips be loaded when they go to logic 1. They certainly will not be loaded at logic 0. I am just speculating here.

spec
(excuse unintentional pun :happy:)
 
Just for the record: a supercap backup circuit.

spec

2016_04_02_Iss01_Sh20_ETO_CLOCK_BATTERY_BACKUP_VER1.png

ERRATA
(1) Title along bottom should read 'Supercap' and not 'Battery'.
(2) Reduce supply voltage to 5.5V to 5V +- 250mV (wall wart).
(3) replace 1N4003 diode with a link (as a result of (2) above the IN4002 is no longer needed to reduce voltage to counter chips)
 
Last edited:
That could overload the power supply. When the capacitors are flat, the current in each resistor would be about 0.25 A, so a total of 0.75 A. If the display takes 0.8 A the whole lot would be 1.55 A. Depending on the type of the power supply, it might not work. Many power supplies would work, either by sustaining the overload, or the voltage would not reach 5.8 V for a few seconds until the capacitors are partially charged.

Also, if the oscillator and counter take less than 10 mA, the forward drop of the BAT54 at 25 °C will be less than 0.3 V, and even lower at higher temperatures (**broken link removed**) and so the capacitor voltage could exceed its rating.
 
Hy engineer,

Here is a schematic for the battery backup approach.
The only thing is that the MCP73831 is hellish expensive: £0.43 UK :D:D

spec

UPDATE: 2016_03_29. This circuit will function, but if the clock is left unpowered for long periods the backup battery will discharge to a voltage below its design minimum. This can reduce the life of the battery. A revised circuit to take care of this problem and also to optimize the battery life is given in post #54.

2016_04_02_Iss01_Sh20_ETO_CLOCK_BATTERY_BACKUP_VER1.png

DATA SHEETS & SOURCES
(1) Microchip MCP73831
https://ww1.microchip.com/downloads/en/DeviceDoc/20001984g.pdf
https://uk.farnell.com/microchip/mc...mMKVKqAIpoCwWb51lWiWIro8n0M5vlVftYaAuWh8P8HAQ
(2) Multicomp LIR2450
https://www.farnell.com/datasheets/1475807.pdf
https://uk.farnell.com/multicomp/lir2450/coin-cell-lithium-120mah-3-6v/dp/2009025?MER=BN-2009025

ERRATA
(1) B1 now named as Multicomp LIR2450
(2) IC2 now specified as Microchip MCP73831-2-xxx (4.2V)

NOTES
(1) It is most important to get the earthing and decoupling right with this type of chip
(2) The 'Prog' input is very sensitive so the PCB traces should be as short as possible. Avoid stray capacitances.
(2) C4 and C5 are minimum values and can be ceramic, tantalum, or aluminum electrolytic types
(3) Supply voltage is 5V +- 250mV (wall wart).
(4) The battery charge current is set to 45mA which for a 120mA/hr battery should ensure a long battery life, especially as the drain current is extremely low.
 
Last edited:
I was just going to use a small RC LiPo, I've used these in one of my planes and they are readily available and very cheap. Here's an example:

https://www.hobbyking.com/hobbyking...ck_NE_Style_T1_Single_Rail_for_2010plus_.html

The LiIon you suggested feels more 'professional' though, so perhaps I'll go that route instead. I found a smaller one, but it's a rechargeable LiMnO2 cell though:

https://uk.farnell.com/maxell/ml-2032-t25/cell-lithium-coin-rechargeable/dp/3032000

The 74HC08 would absolutely be a better choice, thanks for that advice!


...and thanks, I suppose, if I'm sounding like a brit :happy:
I read a lot of english books, started when I was about 15 years old with Tolkien and HP Lovecraft and traces remain to this day of the 'old school' language. Sometimes I stop myself from writing words like 'fortnight' and 'betwixt' :D:D
 
That could overload the power supply. When the capacitors are flat, the current in each resistor would be about 0.25 A, so a total of 0.75 A. If the display takes 0.8 A the whole lot would be 1.55 A. Depending on the type of the power supply, it might not work. Many power supplies would work, either by sustaining the overload, or the voltage would not reach 5.8 V for a few seconds until the capacitors are partially charged.

Also, if the oscillator and counter take less than 10 mA, the forward drop of the BAT54 at 25 °C will be less than 0.3 V, and even lower at higher temperatures (**broken link removed**) and so the capacitor voltage could exceed its rating.
Hi Driver,

Some good points. I should have said that the schematic is just an outline and not fully analyzed. I will put a note on it to say as much.

spec
 
I was just going to use a small RC LiPo, I've used these in one of my planes and they are readily available and very cheap. Here's an example:

[1] https://www.hobbyking.com/hobbyking/store/__18790__Turnigy_nano_tech_130mah_1S_25C_Lipo_Pack_NE_Style_T1_Single_Rail_for_2010plus_.html

The LiIon you suggested feels more 'professional' though, so perhaps I'll go that route instead. I found a smaller one, but it's a rechargeable LiMnO2 cell though:

[2] https://uk.farnell.com/maxell/ml-2032-t25/cell-lithium-coin-rechargeable/dp/3032000

Hi engineer,

Battery [1] above is the wrong type of construction for backing up a clock, where you want low leakage and not necessarily high current. It is a bit blood and thunder for this application, but nonetheless a useful battery, especially at the price.

Battery [2] is a nice package but the wrong chemistry, I am afraid.

Yes, I think the LIR2450 would be a good choice, especially as it can be stuck in a little holder and easily replaced, not that I would expect that to be necessary. It is not all that much bigger than battery [2] either. I will work on the circuit to optimize it for the LIR2450, if you agree. Even when the chip has been specified, so long as you stick with the same chemistry, you can change the battery model at any point anyway.

spec
 
...and thanks, I suppose, if I'm sounding like a brit :happy:
I read a lot of english books, started when I was about 15 years old with Tolkien and HP Lovecraft and traces remain to this day of the 'old school' language. Sometimes I stop myself from writing words like 'fortnight' and 'betwixt' :D:D

I am always surprised how well Scandinavians speak English. Once we were in a hotel in Spain that was packed with Norwegians having a last fling before being conscripted into the Army. They all spoke perfect English. The topless girls were a bit distracting though. :D:D

spec

PS: 'fortnight' would go unnoticed but 'betwixt' would raise a smile or two. :happy:
 
I am always surprised how well Scandinavians speak English. Once we were in a hotel in Spain that was packed with Norwegians having a last fling before being conscripted into the Army. They all spoke perfect English. The topless girls were a bit distracting though. :D:D

spec

PS: 'fortnight' would go unnoticed but 'betwixt' would raise a smile or two. :happy:


Aaah, norwegian girls... Man, I could tell some stories :D
 
Here's a better LiPo, only 12 x 15 x 4 mm and 40mAh:

https://www.aliexpress.com/item/Who...able-Battery-For-Mp3-Mp4-PAD/32511368066.html

I think that's the perfect one for the battery backed up version.
Because I have already ordered some caps I'm still not abandoning the capacitor route though, I think I will make some of each and see which one I like best.
Hmm. Yes, they are a nice package but I wonder about the quality- batteries are one component where you should really only buy from a reliable source, but if that is the way you want to go that will be fine, but you would compromising the reliability of your clock. :wideyed:

As you are still considering the supercap approach I will optimize the design a bit.:)

spec
 
Last edited:
Hmm. Yes, they are a nice package but I wonder about the quality- batteries are one component where you should really only buy from a reliable source, but if that is the way you want to go that will be fine, but you would be compromising the reliability of your clock. :wideyed:

As you are still considering the supercap approach I will optimize the design a bit.:)

spec

OK, let's use the good quality 2450 battery instead... I don't want to think "should have used the other battery" whenever i look on the watch, haha!
 
Just for the record:
Note this is just an outline schematic and has not been fully analyzed
spec


ERRATA
(1) Title along bottom should read 'supercap' and not 'battery'.


Regarding the supercap version, note that the displays have a max current draw of 170mAh each, so that's over 1A for 6 of them :nailbiting:
This wouldn't happen irl though, the max current draw in the spec is when the numbers 0 and 8 are lit, but it's nice to know..

By the way, why is the 1N4002 needed in your design?
 
Here's the complete schematic with the AND gates (minus the backup circuit):

schematic (buffered).jpg

Hmm. On the lower right there's a runaway green +, pretend to not notice it and perhaps it'll go away. :facepalm:
 
Last edited:
Regarding the supercap version, note that the displays have a max current draw of 170mAh each, so that's over 1A for 6 of them :nailbiting:
This wouldn't happen irl though, the max current draw in the spec is when the numbers 0 and 8 are lit, but it's nice to know..

By the way, why is the 1N4002 needed in your design?

I was aware of the special circumstance when the displays would be taking maximum current- it is just a worst case design consideration, not likely to be encountered in the real world.

The 1N4002 is only there to drop the 5.8V supply line to the display chips. On one hand I wanted to get the voltage on the supercaps as high as possible, ie 5.5V but that is also the maximum voltage that the display chips will stand. I will probably delete the 1N4002 and drop the 5.8V supply to 5.5V. This point was highlighted by Driver 300. Also the schottky diode will need beefing up to cater for the situation when the capacitor is fully discharged.

By the way, what is the power supply for the clock like? I would imagine a mains transformer/bridge/reservoir capacitor followed by an LM317 voltage regulator. I need to know because it impacts the 0V capacitor situation.

spec
 
Last edited:
OK, let's use the good quality 2450 battery instead... I don't want to think "should have used the other battery" whenever i look on the watch, haha!

Don't let me influence you too much. My opinion is just that, and there are many opinions. Design is always a trade off of pros and cons. I always feel uncomfortable though about working without a specification giving all the salient parameters for a component, and there is no information for the Lipo battery. But, as the clock is a non critical item and the battery can be changed at any time, it does not really matter what you use.

spec
 
I was aware of the special circumstance when the displays would be taking maximum current- it is just a worst case design consideration, not likely to be encountered in the real world.

The 1N4002 is only there to drop the 5.8V supply line to the display chips. On one hand I wanted to get the voltage on the supercaps as high as possible, ie 5.5V but that is also the maximum voltage that the display chips will stand. I will probably delete the 1N4002 and drop the 5.8V supply to 5.5V. This point was highlighted by Driver 300. Also the schottky diode will need beefing up to cater for the situation when the capacitor is fully discharged.

By the way, what is the power supply for the clock like? I would imagine a mains transformer/bridge/ reservoir capacitor followed by an LM317 voltage regulator. I need to know because it impacts the 0V capacitor situation.

spec

Regarding the power supply, I want to be able to use any 5V / >1A power supply - a simple "wall-wart" is the preferenced PSU. My current PCB layout even has a DC jack built-in. I don't want to have the power supply on my PCB, and I don't plan to build the PSU myself. There's too many chinese guys and gals that does that better and cheaper ;)
 
Don't let me influence you too much. My opinion is just that, and there are many opinions. Design is always a trade off of pros and cons. I always feel uncomfortable though about working without a specification giving all the salient parameters for a component, and there is no information for the Lipo battery. But, as the clock is a non critical item and the battery can be changed at any time, it does not really matter what you use.

spec

Well, this opinion of yours is the correct way to do this, I think. If I use the LiPo, the eventual battery change will not be as easy as just clicking a new one in a holder.
My vision of the finished clock is, using one word: "mil-spec" - it is supposed to be small, rugged, easy to service and totally optimized for its purpose... :happy:
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top