Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
chanseng738
PostPosted: Mar 13, 2010 - 02:12 PM
Hangaround


Joined: Feb 24, 2009
Posts: 140


I am current using 5V which is the output from 7805. Is there any IC that can perform automatic power-fail detect and switch the circuitry to my battery?

I know the RTC ic contains this feature, how about any IC that can auto switch to battery for my uC, so that I won't lose any data during power failure. Once the power is restored, the IC will then switch back to the main supply, just like the RTC IC (like DS1307).
 
 View user's profile Send private message  
Reply with quote Back to top
ka7ehk
PostPosted: Mar 13, 2010 - 03:48 PM
Raving lunatic


Joined: Nov 22, 2002
Posts: 7176
Location: Tangent, OR, USA

Linear Tech has a number of ICs that will do this.

Jim

_________________
Jim Wagner
Oregon Research Electronics, Consulting Div.
Tangent, OR, USA
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
chanseng738
PostPosted: Mar 13, 2010 - 04:47 PM
Hangaround


Joined: Feb 24, 2009
Posts: 140


Hi Jim, can you name one please?
 
 View user's profile Send private message  
Reply with quote Back to top
ka7ehk
PostPosted: Mar 13, 2010 - 10:22 PM
Raving lunatic


Joined: Nov 22, 2002
Posts: 7176
Location: Tangent, OR, USA

Check here -

http://www.linear.com/pc/viewCategory.j ... 1142,C1079

Jim

_________________
Jim Wagner
Oregon Research Electronics, Consulting Div.
Tangent, OR, USA
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
brunomusw
PostPosted: Mar 13, 2010 - 11:23 PM
Resident


Joined: Dec 15, 2005
Posts: 569
Location: Brazil

Quote:
I am current using 5V which is the output from 7805. Is there any IC that can perform automatic power-fail detect and switch the circuitry to my battery?

What is the Voltage on the Vin of the LM7805? Other option is sense the Vin and switch to your battery before it afect your Vcc.

_________________
Regards,
Brunomusw
 
 View user's profile Send private message  
Reply with quote Back to top
Xantor
PostPosted: Mar 14, 2010 - 04:18 AM
Wannabe


Joined: Aug 19, 2008
Posts: 52


or... if your battery voltage is a bit lower and your circuit can handle the additional 0.6V drop... a diode.
 
 View user's profile Send private message  
Reply with quote Back to top
chanseng738
PostPosted: Mar 14, 2010 - 06:00 AM
Hangaround


Joined: Feb 24, 2009
Posts: 140


brunomusw wrote:
Quote:
I am current using 5V which is the output from 7805. Is there any IC that can perform automatic power-fail detect and switch the circuitry to my battery?

What is the Voltage on the Vin of the LM7805? Other option is sense the Vin and switch to your battery before it afect your Vcc.

Vin is 9V DC. How to automatically switch to battery before it affect my Vcc? Sorry, I'm not good in electronics, is there such a ready circuit available or preferably just an IC?
 
 View user's profile Send private message  
Reply with quote Back to top
chanseng738
PostPosted: Mar 14, 2010 - 06:14 AM
Hangaround


Joined: Feb 24, 2009
Posts: 140


ka7ehk wrote:


How about this one?



the circuit looks quite simple. If my wall adapter input is supplying 5VDC, and my battery cells is 4.5VDC, and I connect my Vcc to "TO LOAD", will this circuit work?
 
 View user's profile Send private message  
Reply with quote Back to top
chanseng738
PostPosted: Mar 14, 2010 - 06:39 AM
Hangaround


Joined: Feb 24, 2009
Posts: 140


After many many googling, found this circuit!



According to the website, The wall adapter input can be anything between 3 to 28V DC. The battery voltage can be anything between 2.5V to 28V.

Does it mean I can put my wall adapter 12VDC, my battery 9VDC, and then "To load" connect to 7805 pin1, pin3 to my uC, and viola, my uC is 7/24 working non-stop and I don't have to worry volatile memory.

Is that so simple? If so, why people still want this eeprom thing?


Last edited by chanseng738 on Mar 14, 2010 - 03:40 PM; edited 2 times in total
 
 View user's profile Send private message  
Reply with quote Back to top
Xantor
PostPosted: Mar 14, 2010 - 08:27 AM
Wannabe


Joined: Aug 19, 2008
Posts: 52


Bah in your case just use a diode like I suggested before

Adapter 12V straight to input pin of 7805
Battery 9V to anode of 1N4001 diode, cathode also to input pin
All grounds (including 7805) tied together.

Done.

Battery won't discharge when adapter is connected because of the diode. At the same time the diode prevents the battery from being charged by the adapter, otherwise you may damage it.

When voltage drops below 8.4 volts the diode starts conducting and the battery supplies the 7805.

Cost: $0.02 or less.
 
 View user's profile Send private message  
Reply with quote Back to top
chanseng738
PostPosted: Mar 14, 2010 - 03:28 PM
Hangaround


Joined: Feb 24, 2009
Posts: 140


Xantor wrote:
Bah in your case just use a diode like I suggested before

Adapter 12V straight to input pin of 7805
Battery 9V to anode of 1N4001 diode, cathode also to input pin
All grounds (including 7805) tied together.

Done.

Battery won't discharge when adapter is connected because of the diode. At the same time the diode prevents the battery from being charged by the adapter, otherwise you may damage it.

When voltage drops below 8.4 volts the diode starts conducting and the battery supplies the 7805.

Cost: $0.02 or less.


Like this? sorry I don't have a proper schematic drawing software, draw using Paint Smile

 
 View user's profile Send private message  
Reply with quote Back to top
chanseng738
PostPosted: Mar 14, 2010 - 03:37 PM
Hangaround


Joined: Feb 24, 2009
Posts: 140


I don't understand, when +12V is conducting, why it stop battery from discharging?

Edit: ok, understand now... thanks
 
 View user's profile Send private message  
Reply with quote Back to top
Xantor
PostPosted: Mar 14, 2010 - 04:20 PM
Wannabe


Joined: Aug 19, 2008
Posts: 52


You may also want to add a second diode inline with the 12V just in case there is circuitry there that draws power from the 9V battery when it's off (indicator light for example). so 12V ---|>|--- 7805. That way no current can flow back into the power supply.
 
 View user's profile Send private message  
Reply with quote Back to top
chanseng738
PostPosted: Mar 14, 2010 - 05:03 PM
Hangaround


Joined: Feb 24, 2009
Posts: 140


Thanks, Xantor. One question, how long the battery can last assuming the 12VDC supply always on. I mean battery will leak by itself even if not use right? A good Duracell 9V battery can last for how long without usage?
 
 View user's profile Send private message  
Reply with quote Back to top
chanseng738
PostPosted: Mar 14, 2010 - 05:24 PM
Hangaround


Joined: Feb 24, 2009
Posts: 140


Found this one from Duracell website:
Shelf Life
Up to 85% capacity remaining after 4 years of storage at 70°F (21°C).

Does that mean if my 12VDC supply always on, the battery can power the uC for 4 years in the event of power failure?
 
 View user's profile Send private message  
Reply with quote Back to top
brunomusw
PostPosted: Mar 14, 2010 - 09:58 PM
Resident


Joined: Dec 15, 2005
Posts: 569
Location: Brazil

Quote:
Does that mean if my 12VDC supply always on, the battery can power the uC for 4 years in the event of power failure?

It all depends how many power failure will happen and for how long the power failure will take.

What Duracell says is that if you don't use the battery, over 4 years it will remain up to 85% the capacity.

You could change your 7805 for a low-drop regulator, it's better when running on your battery or even a swicth regulator better yet.

_________________
Regards,
Brunomusw
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits