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.

Clock battery (or cap) backup

Status
Not open for further replies.

futz

Active Member
My clock/thermometer project is still sometimes resetting in the middle of the night. I'm fairly sure it's not the code. I suspect a blip in the AC power. Guess I should put it on batteries and confirm that before wasting too much time.

Anybody have a good simple method of doing battery/capacitor backup?
 
The simplest method is to choose a battery a few volts lower than the rectified/filtered power supply output but high enough to power the project via the regulator. Add a diode in series with the battery and you are good to go. It won't charge the battery, but it's good enough for testing purposes.
 
Last edited:
Make sure the clock isn't voltage sensitive or it will drift under backup. It would take more than a 'blip' in AC to cause a voltage drop in most DC power supplies big enough to cause a reset. What are you using to power the circuit, and use a lot of details with the description of the power supply =) If you just wanna slap something together put the biggest electrolytic capacitor you can fit as close as possible to the VCC/GND pins of your circuit. You may need a diode before the capacitor on the VCC line to prevent the capacitor from discharging into the power supply.
 
Last edited:
I'm using kchriste's method.I'm using two alkaline batteries (1.5X2).

I have configured to turn off the display when the AC power is unavailable.So only the internal time base is running when running from batteries.I have done this in many clock projects.

But many people doesn't like this method :D
 
Make sure the clock isn't voltage sensitive or it will drift under backup.
It's a 32.768 crystal (with 22pF caps) on T1OS0 and T1OS1 of a 16F88. It's **broken link removed**.

It would take more than a 'blip' in AC to cause a voltage drop in most DC power supplies big enough to cause a reset. What are you using to power the circuit, and use a lot of details with the description of the power supply =)
I use **broken link removed** with a 9V 300ma wall wart powering it.

If you just wanna slap something together put the biggest electrolytic capacitor you can fit as close as possible to the VCC/GND pins of your circuit. You may need a diode before the capacitor on the VCC line to prevent the capacitor from discharging into the power supply.
I've added a 100uF electrolytic on the breadboard and will test overnight. I know it's not very big, but I'm in no rush and I figure I'll try bigger and bigger ones until it either stops resetting or the problem is either solved or I find some other reason for the problem.
 
You might check it with on a vero board, breadboards worst case.:)
Ya, I have a big order of LabEasy stuff coming. I like this thing enough that I'll probably build a permanent one. Have to add date display and do some software and a piezo beeper for alarm(s). But the occasional reset thing has to be settled first. If I can make it reliable on a breadboard then it should be even better when soldered up.
 
I'm posting this to try to jinx this thing into resetting. As soon as I post that it's cured it should immediately fail. :D

Since I put the 100uF electrolytic on the breadboard it has been fine. Another day or two and I'll be sure. It used to reset every night sometime during the night when I was sleeping.
 
Well, it appears that that capacitor has cured this thing 100%. Now I want my breadboard back, so I'm building a permanent one. I bought a couple obsolete SOIC 18F248's cheap and am building it on a DipMicro PB-4 board. So far it's been entertaining. :D

The board is tight for space around the SOIC. Getting that crystal and its caps in there was hard! Had to put the second cap on the bottom side of the board. :p
18F248_clock002_800x600.jpg
 
There is a double wide Lab-easy box, the standard is 57mm.

I'm actually working on making the Eagle Ethernet fit a BT-02 57mmx57mm box, it'll also be breadboard ready (2x wide)
 
Bill said:
That's actually a pretty ingenious way to mount SOICs

Thanks for the credits, Bill. Glad you like it. This board is the reason why Eric Chan does not talk to me anymore.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top