Switching power sources, battery charging


Closed Thread
Results 1 to 19 of 19
  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599

    Default Switching power sources, battery charging

    Hi,

    I'm designing a home alarm system and need to be able to switch during blackouts between a 15VDC power source and a 12V battery. I have found this design using mosfets:

    http://saeedsolutions.blogspot.ca/#!...-supplies.html



    I need to support 5A so I'm using IRFU6215 mosfets instead (150V 12A 110W). Comments and opinions appreciated.

    Robert


    EDIT: Changed to 15VDC source to remain above battery charging voltage.
    Last edited by Demon; - 2nd July 2013 at 21:40.

  2. #2
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    Why not to use just 2 diodes?

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    Actually, his article using diodes was the first one I looked at. But I eventually went with his transistor approach.

    D'oh!

    So, how do I go about selecting a diode that can take 15V 5A?

    Robert


    EDIT: Based on 1N4007 classification on Digikey as rectifier standard 1KV 1A, I searched on Digikey for DIODE - RECTIFIER - STANDARD - 5A and came up with these:

    BY500-400 400V 5A thru-hole
    S5GC-13-F 400V 5A surface mount
    (I like to have both types)

    I figure it's not like I have to go up to 1000V...?
    Last edited by Demon; - 2nd July 2013 at 23:56.

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    Quote Originally Posted by pedja089 View Post
    Why not to use just 2 diodes?
    Now I remember why I went with his transistor design, I need 12V for the siren.

    If I use the diodes, the source must always be higher voltage than the battery. I end up with 15V from the main or "about" 12V from the battery. And then I can't add a 7812 voltage regulator at the end.

    If I use transistors, I can use a 12V source. The OP AMP doesn't care if it's 12 or 15 volts, as long as it's there.

    (and that's why I initially had a 12V source)

    Robert

  5. #5
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    You can't put 7812 when device is powered from accumulator. Because 7812 have voltage drop about 2V, so you need at least 14V on input to get 12Voutput, and 7812 is only 1A rated in to220 package, in to3 is 3A rated.
    If you need all ways 12V on output, use buck/bust regulator, or use boost to get 15V and then use buck regulator to get 12V from 15V. This way your input voltage may be from 5-6V to 30-40V, depending on device. You also have simular PSU on ebay
    http://www.ebay.com/itm/DC-Boost-Buc...item5af2b8bf04

  6. #6
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    Robert, if your siren needs an absolute minimum of 12 V, it's likely not going to work anyway with a 12V battery, as the battery could get under 12V fairly quickly when being discharged depending on the load and it's capacity. I think you need a proper spec for what the circuit produces i.e. "Must operate from a 12V sealed lead acid battery and/or an external power supply between 12V and 16V and must produce 12 V regulated to +/- 0.5 V"... that sort of thing. Further, you need to specify with tolerances, the current needed and for how long, and under what conditions. If you plan to mount it outside in a garage or something, the temperature range will be important too.

    The circuit shown is way too complicated for what it does - effectively switching the load to one supply or another. You would not need 2 FETs for each leg - power VFETS have a saturated resistance of a few milliohms depending on the device chosen. At 5A you wouldn't even need a heat sink. And how does the battery get charged? You might be able to connect the battery charger to the battery and power from the battery at the same time (like a car) depending on your spec. Or you might need to design either a switching supply, or a linear regulator that can work with a very small volt drop - again depending on that spec.

    It's a fun problem.

  7. #7
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    Quote Originally Posted by Charlie View Post
    Robert, if your siren needs an absolute minimum of 12 V, it's likely not going to work anyway with a 12V battery, as the battery could get under 12V fairly quickly when being discharged depending on the load and it's capacity. I think you need a proper spec for what the circuit produces i.e. "Must operate from a 12V sealed lead acid battery and/or an external power supply between 12V and 16V and must produce 12 V regulated to +/- 0.5 V"... that sort of thing. Further, you need to specify with tolerances, the current needed and for how long, and under what conditions. If you plan to mount it outside in a garage or something, the temperature range will be important too....
    These are piezo residential alarm sirens, not humungous horns. I have an old DSC1000 system in the house and it works fine using such a horn and a 12V 4Ah battery. I am upgraded to a 12V 7Ah with this project.

    My plan is to make 3 identical systems; house, garage, shed, all interconnected. If one system is triggerred and disabled, the other systems will still be triggerred (making it very difficult for someone to overcome them all quickly). It's also possible the cables between the buildings could get damaged.

    Here is a pic of the current system to give you an idea how the installed system operates:




    Quote Originally Posted by Charlie View Post
    ¨... The circuit shown is way too complicated for what it does - effectively switching the load to one supply or another. You would not need 2 FETs for each leg - power VFETS have a saturated resistance of a few milliohms depending on the device chosen. At 5A you wouldn't even need a heat sink. ...
    I liked this circuit because it seemed so much simpler than so many other designs I've googled; some even used mechanical relays. So how would I go about connecting VFETS, and which model? Remember this is my first foray in MOSFET territory so schematics help me understand (I'm visual by nature).


    Quote Originally Posted by Charlie View Post
    ¨... And how does the battery get charged? ...
    My initial idea was to keep things simple and bought this universal floating charger:
    http://www.rpelectronics.com/fc-612c...ger-6-12v.html


    I wouldn't mind handling the charging myself if I find a design I can manage.


    Quote Originally Posted by Charlie View Post
    ¨... You might be able to connect the battery charger to the battery and power from the battery at the same time (like a car) depending on your spec. ...
    Wouldn't that shorten the life of the battery?


    Quote Originally Posted by Charlie View Post
    ¨... Or you might need to design either a switching supply...
    Schematics I've seen so far seem complicated. I would have liked to keep things reliable and simple if at all possible.


    Quote Originally Posted by Charlie View Post
    ¨... or a linear regulator that can work with a very small volt drop ...
    I don't think that would be good when the system would run off the battery. I would think I need all the juice I can muster under blackouts.


    I'm embarking on this adventure because the DSC1000 is erratic after 20 years of service. The neighbours and family don't enjoy listening to a siren at 3am. That and it only has 4 zones.

    Robert

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    One issue that is plaguing me is current requirement. The garage needs at least 16 zones (2 stories); that quickly adds up using average 20mA LEDs to show status. I also want to have visibility of the other buildings from any keyboard, even more current required.

    I have several older units of this graphic LCD, mine are 90-100mA:
    http://www.qingyun-it.com/products/y...LCM3202401.pdf

    Much lower current required than LEDs and much more flexible.

    Robert

  9. #9
    Join Date
    Apr 2011
    Posts
    53


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    If the device is primarily mains-powered there is no real concern for power consumption and a simple RELAY would allow switching of practically any amperage at the cost of a few 10's of mA.

    Sometimes the simplest way is best.

  10. #10
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    There's a few reasons why I wanted to stay away from a relay:

    - they must be slower than transistors.
    - mechanical parts mean wear.
    - and I really was looking for an excuse to finally use mosfets.


    I don't know why the design I posted at the top uses 2 mosfets back-to-back. According to this site (and many others) P-channel mosfets are connected "backwards" and you only need one to act as a switch:
    http://www.electronics-tutorials.ws/...or/tran_7.html
    (scroll down to P-channel MOSFET Switch)

    Robert


    EDIT: Updated design

    Name:  Modified HEXFET switch.JPG
Views: 880
Size:  46.1 KB
    Last edited by Demon; - 5th July 2013 at 23:07.

  11. #11
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    Quote Originally Posted by Demon View Post
    One issue that is plaguing me is current requirement. The garage needs at least 16 zones (2 stories); that quickly adds up using average 20mA LEDs to show status. I also want to have visibility of the other buildings from any keyboard, even more current required.

    I have several older units of this graphic LCD, mine are 90-100mA:
    http://www.qingyun-it.com/products/y...LCM3202401.pdf

    Much lower current required than LEDs and much more flexible.

    Robert
    Hi Robert,
    Do you mean you cannot waste the power or do you mean you need to limit the output draw on the PIC?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  12. #12
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    Sorry, I meant I can't use columns of LEDs as initially planned.

    I'm switching for the 100mA LCDs that I have on hand. The house has only 1 keypad, the garage will have 2. That means I can live with 1.5A, even only 1A if I must.

    So now I'm looking for improvements on the latest schematic, and a battery-charging circuit is a bonus.

    Robert

  13. #13
    Join Date
    Apr 2011
    Posts
    53


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    Quote Originally Posted by Demon View Post
    There's a few reasons why I wanted to stay away from a relay:

    - they must be slower than transistors.
    - mechanical parts mean wear.
    - and I really was looking for an excuse to finally use mosfets.
    I sympathise with the 'excuse' but the first two resons don't parse..... a simple capacitor will prevent the volt drop for the millisecond(s) the relay switches and relay contact reliability is usually measured in the 'millions' (or 10's of millions) of operations....... Indeed, in this particular application you'll find most manufacturers use relays too - simple and cheap.

  14. #14
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    First Robert, let me say sorry for starting to help and then falling off the internet. I had to be away for a couple days without access.

    The original problem... Based on what you've posted, just hook the float charger to the battery and power your circuit from that. Your siren won't care about voltage from about 10 V to about 15 V.

    A sealed lead acid battery can remain on a float charge forever without damage. Large commercial systems do it all the time - for example the telephone system works this way. Hook up your trickle charger to the battery and measure the voltage - if it's between 13.2 V and 14.4 V (2.2 - 2.4 volts per cell) you are good to go. Cars are usually 13.8 V.

    The current required for multiple LEDs is an old problem, and the reason "scanning" LEDs was invented. You basically switch them on and off fast enough that your eyes don't pick up the blinking (anything over about 100 Hz). You use about a 10% duty cycle and increase the current a little bit if you wish. You can experiment to adjust perceived brightness. You will end up with less current than the LCDs.

    I'll see if I can sketch you a VFET circuit when I have a second - still catching up on email.

  15. #15
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    I'm concerned with this wallwart made-in-china trickle charger. I wanted it for testing and maintaining my new 12V battery, but I wouldn't trust it in permanent service in a metal enclosure. I've read reports of them overheating.

    I'm googling LM317 app notes and such looking for a reliable 12V 7Ah automatic charger.

    The DSC1000 runs without a battery connected (I ran it over 1 year when the battery died). That's why I wanted to run off mains first, and battery during blackouts.

    This charger seems interesting:
    http://www.sentex.ca/~mec1995/circ/lader.htm

    Robert
    Last edited by Demon; - 7th July 2013 at 13:45.

  16. #16
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    You can certainly roll your own - they are pretty simple. As I mentioned, you want a voltage between 13.2 V and 14.4 V. Limit current for thermal reasons because the battery can handle a lot more current than a simple charger can provide when it is really flat. If you want to get fancy, remove the charge every once in awhile and measure the voltage as this will give you the state of charge, or set it up so that you provide under 2A when the battery voltage is about 12.6V, then reduces as it rises further.

    The amp hour rating of your battery is not relevant to the design. and overheating is only a potential issue if you are charging a totally pancaked battery. In normal use you really don't need to worry.

    The 317 is a bit light, but conceptually you could use it as a reference with a couple power transistors that turn on as required.

    The circuit in the link seems fine.

  17. #17
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    Quote Originally Posted by Charlie View Post
    ... overheating is only a potential issue if you are charging a totally pancaked battery. In normal use you really don't need to worry.
    What if the battery dies, sulfates, whatever?


    The 317 is a bit light, but conceptually you could use it as a reference with a couple power transistors that turn on as required.

    The circuit in the link seems fine.
    I'm open to using higher rated components, I'm not merchandising. I try to follow his math on how to select resistors but I get lost.

    Robert

  18. #18
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    I checked this, but I'd prefer to build and learn instead of using a charging module.

    http://www.picbasic.co.uk/forum/show...5713#post95713


    I could use a PIC as they did, but I haven't seen much on google or here that does exactly what I need.

    The PIC could do it all, switch between sources and auto charge. But I would need more hand holding going that route.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  19. #19
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: Switching between power source and battery

    If I were doing same thing as you, I'll check if siren works form 10-15V(It should).
    If wont work then put step up, to boost output voltage to 12V. So if battery voltage drop below 12V, you still get 12V for siren.

    And supply everything from battery, and put battery charger with little hysteresis(Turn on your charging if battery voltage is below 13.2V, and turn it off when battery voltage reach 14.2V). So you wont worry about battery, just replace it every 2-4 years.
    For battery charger you can use transformer with 1A rated output, and 12Vac. Then just put rectifier capacitor and voltage regulator to limit maximum voltage to 14.2V.

    For lower power consumption of board with PIC, LCD, LED, keypad etc, use step down convertors. So you your input current will be less then output(Pout=Pin*0.9). If you have 12V input, output 5V out 1A, it will only take about 0,5A from your battery.
    Last edited by pedja089; - 7th July 2013 at 16:24.

Similar Threads

  1. SLA battery charging with PWM but which frequency
    By showtime in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 13th June 2017, 11:41
  2. Without resetting....Switching PIC over to Backup Battery
    By financecatalyst in forum Schematics
    Replies: 5
    Last Post: - 29th December 2010, 14:23
  3. 4.5V Battery charging circuit....
    By Megahertz in forum Schematics
    Replies: 2
    Last Post: - 2nd July 2010, 00:33
  4. Safe battery charging?
    By keymuu in forum General
    Replies: 11
    Last Post: - 29th November 2008, 08:45
  5. Read the level of the Charging battery
    By DragonBall_6 in forum General
    Replies: 2
    Last Post: - 30th November 2006, 03:47

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts