Go Down

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

AltairLabs

Getting better.  Try eliminating R3, D3 and the SPST relay, just return the bottom of SPDT relay coil to ground.  You dont need the diode with question mark.

Good job on Q1 / U1 many folks dont know how to properly wrap a big pass transistor around a Vreg, they try to make an emitter follower instead.  You can get a bit more current with Q1 running cooler, if you change 3R to 1.8R or 1.5R, that would make the 7805 regulator take a bigger share of the current, should be able to get 4amp total, 1 amp from 7805 and another 3 amp from the TIP32B if they both have decent heat sink.  Note that the resistor needs to be 2 watts, or use 2 resistors in parallel, each 3R at 1w.

A little more efficiency and simplification is to put R1, 2, D2 and the batteries directly on the output of BR1.  Sharing the common Gnd make it easier to add a charge regulator if you want.

Good luck on your project !

wlewis

#6
Jul 07, 2011, 02:28 am Last Edit: Jul 07, 2011, 02:03 pm by wlewis Reason: 1
Hi.. Thanks for the tips. The tip about sharing current between the 7805 and the tip32b is definitely going into my bag of tricks. Thats a biggy.. thanks again.

1. If you remove SPST relay and diode with question mark you get a reset on power off.

Anyway, Im moving over to 12v 4amp hour batteries to arrive at a 5-6 hour battery on time. Considering my projects draws .25 amps at power off these 12v batteries should do the job. Lets see.. 4 (amp hours) / .25 amp = 8 hours.. something tells me it doesnt work that way.. but well see. I just hooked up a .26 amp fan to one of these 12v batteries


 


wlewis

Tried the 12v 4ah batteries and these dont deliver enough current to justify their use.. even with 2 of these wired in parallel. So Im headed back to the 9v setup for the time being.

I think that in order for a 12v system to work I will need a higher voltage transformer and a 12v battery capable of delivering higher current.

Anyway.. for now, Im going back to the 9volt setup to iron out kinks. It has met and exceeded my expectations.

wlewis

#8
Jul 10, 2011, 05:53 pm Last Edit: Jul 12, 2011, 06:25 am by wlewis Reason: 1
Rethinking this:

1) Considering that without the mq-2 sensor and the lcd backlight and all relays disconnected my current draw is 50mA I can definitely use 12v 4ah batteries.. and achieve the 5-6 or more hours battery on time. Because the lcd with backlight on "looks cool" (hee hee) doesnt justify its usage on power off.

2) With a solar charger this could run on batteries indefinitely..

3) So.. on power off -> disconnect mq-2, lcd backlight, all relays

UPDATE: 7/11

Eureka! Just survived a real life power outage! Power came on and off 4 times, then stayed off for 55 minutes. Power is now back on and my clock has maintained time, and my arduino did not reset.

IT TAKES A LICKIN.. AND KEEPS ON TICKIN BABY! hee hee   :smiley-eek-blue:



tkbyd

Forgive a few "dim" questions? I would love to see a good battery back-up design established.

a) Relay drawings: There's a newbie trap there, isn't there?? I spent half an hour with two copies of the schematic and colored highlighers, doing "power on" and a "power off" drawings before I had anything that made sense! One's drawn as if energized, the other as if NOT energized. True? (Q1) (Not helpful!)

My guess:

The right hand relay, the one below R3, which I'll call "Relay 1" is open until energized, right? (Q2). It's role is to prevent the other relay becoming energized until the voltage out of the bridge rises adequately. That rise could(?) be delayed more than a few centi-seconds if the battery has become significantly discharged while it was powering the Arduino. Yes? Is that the cleverness in this circuit? (Q3)

The left hand relay, the SPDT one, "Relay 2" from now on, connects R5 directly to the =ve pole of the battery when the 120Vac is ABSENT... true? (Q4)

b) Transistor: I don't understand what this is doing... apart from creating the "possibility" of hitting my Arduino's 5v rail with 12 volts! (I assume it won't do that, but to someone like me who only "understands" transistors as being similar to SPST relays, it looks scary!) Maybe there to provide a way to recharge the 50v 1000uF cap (which I'll name "C1" for future discussion) when a voltage returns above R5, after the brief outage while relays operate. I understand the transistor so poorly that I can't even ask a real question, so Q5 is just "What's the transitor there for/ what does it do?"

c) The connection of the battery to the transformer: It seems a shame that the battery is only charged by half of each AC cycle. I presume there was some reason that the connection above the diode above R1 and the connection from the negative side of the battery couldn't go "after" the bridge, and thus benefit from both halves of each cycle. If there IS a reason, I'm content to be told "there is a reason"... I don't need the details. Q6: Did the connection have to be "above" the bridge?

===
Lastly a word of caution to newbies...

While I don't understand all of it, I do believe that the circuit shown does actually work! But that doesn't mean that it will work with just any old re-chargable battery. There are a whole bunch of design considerations to master when doing UPS design, and you should become informed about them before going too far with building something like this.



Go Up