PDA

View Full Version : Switching power sources, battery charging



Demon
- 2nd July 2013, 21:07
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/#!/2012/05/how-to-switch-between-power-supplies.html

http://tinyurl.com/p6fnyzo

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.

pedja089
- 2nd July 2013, 22:42
Why not to use just 2 diodes?

Demon
- 2nd July 2013, 23:34
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...?

Demon
- 3rd July 2013, 00:19
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

pedja089
- 3rd July 2013, 07:33
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-Buck-Converter-3-5-28V-to-1-25-26V-Step-Down-Step-Up-Voltage-Regulator-/390619250436?pt=LH_DefaultDomain_0&hash=item5af2b8bf04

Charlie
- 3rd July 2013, 12:39
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.

Demon
- 4th July 2013, 19:50
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:

http://i991.photobucket.com/albums/af37/DemonDNF/Electronics/Alarm/DSC1000PCBlabels_zps4182d078.jpg



¨... 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).



¨... 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-lead-acid-gel-charger-6-12v.html
http://www.rpelectronics.com/Media/400/FC-612C.jpg

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



¨... 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?



¨... 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.



¨... 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

Demon
- 4th July 2013, 20:33
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/yejing/simply/tx/LCM3202401.pdf

Much lower current required than LEDs and much more flexible.

Robert

kellyseye
- 5th July 2013, 08:24
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.

Demon
- 5th July 2013, 22:18
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/transistor/tran_7.html
(scroll down to P-channel MOSFET Switch)

Robert


EDIT: Updated design

7028

Archangel
- 6th July 2013, 00:48
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/yejing/simply/tx/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?

Demon
- 6th July 2013, 01:12
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

kellyseye
- 6th July 2013, 12:29
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. :)


:D I sympathise with the 'excuse' :p 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.

Charlie
- 7th July 2013, 11:33
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.

Demon
- 7th July 2013, 13:40
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

Charlie
- 7th July 2013, 15:21
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.

Demon
- 7th July 2013, 15:48
... 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

Demon
- 7th July 2013, 15:57
I checked this, but I'd prefer to build and learn instead of using a charging module.

http://www.picbasic.co.uk/forum/showthread.php?t=13933&p=95713#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

pedja089
- 7th July 2013, 16:20
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.