Go Down

Topic: BATTERY BACKUP with charging (will not trigger arduino reset) (Read 4 times) previous topic - next topic


Jul 04, 2011, 12:40 pm Last Edit: Jul 04, 2011, 01:12 pm by wlewis Reason: 1
Hi Compadrinos.. Here's a (crude yet functional) first attempt at a 9v battery charging low-current (5V 30mA) battery backup system that will not cause your arduino to reset when power goes out.  As I plan to use data logging I need a way to maintain system time using a ds1307/37 and data logging - this to indicate time and duration of a power outage. Problem is if youre using sensors (like the mq-2 gas sensor) this will drain your 9v battery in seconds.. so next version will cut off relays and sensors and only maintain time and data logging functions. I'll try a 12v version of this to maintain sensor functions as well. The main thing is it does not trigger a reset.

Project goals:
1) disallow arduino reset
2) maintain system time and data logging
3) charge a 9volt battery when power comes back on.

Btw.. I tried the ICL7673 but it caused a reset on power outage.

Mods, suggestions, etc, welcome.


so next version will cut off relays and sensors and only maintain time and data logging functions.

If you turn off the data collection part, what is there to log?
Code: [Select]
17:05:01 - No data
17:05:02 - No data
17:05:03 - No data


You're right.. datalogging needs at least one sensor providing feedback to make sense. Knowing how long power was off is as simple as a digitalread high when power comes back on.

Still, the idea can be taken to higher voltages and currents, so that sensors can stay on, etc.



Ok... here's the corrected version. The first version wasn't charging the batteries correctly.. this one does.

"Im not responsible if your house blows up.. heh heh." - evil mad scientist hot on the trail


Jul 06, 2011, 02:14 pm Last Edit: Jul 06, 2011, 02:37 pm by wlewis Reason: 1
Here's the high current version... "works like a charm". Runs all the sensors (Im using 5 sensors including the gas guzzling mq-2) without skipping a beat (a.k.a. does not cause reset).

Ran this circuit with a dc motor at high current long enough to know the tip32b gets "very" hot.. consequently I highly recommend a beefy heat sink (a 22.5 square centimeters aluminum block seems sufficient at about 1.5amps) if running high current values. As well, I have to assume the tip32, BD536 and the like will also do the job.

"task remaining": disconnect batteries when fully charged: Use the rtc ds1307 for this? hmmm.

happy motoring!

Go Up