How to charge a battery while supplying power to my device

Discussion in 'Power Electronics' started by brocio, Mar 15, 2012.

  1. brocio

    Thread Starter New Member

    Mar 5, 2012
    3
    0
    I plan on building a portable radio out of some spare car audio parts I have lying around, and would like to add the option to run off battery for portable uses or AC power (converted to 12V DC) when near a power source. I'll be running two speakers from a small amplifier, 2 x 15 watts from a 5 amp/hour sealed lead acid (SLA) battery (or possibly a NiMh). Here's where I'm stuck: I want the power source to automatically switch from battery to AC (converted to 12V DC) when plugged in, while simultaneously charging the battery, then back to the battery when it's unplugged. Basically, it would be similar to how a cell phone or laptop can run from a wall adapter while also charging the battery, and back to battery when you unplug the wall source, with a seamless transition.

    All I could think to search for was some sort of mini-UPS system (uninterpretable power supply) and found a product by Mini-Box http://www.mini-box.com/picoUPS-120-12V-DC-micro-UPS-battery-backup?sc=8&category=1264

    Does anyone have any experience with something like this, or could anyone point me in the right direction? I am open to recommendations for an "off the shelf" solution, or a somewhat simple DIY build that would accomplish my goals.

    Thanks in advance!
     
  2. #12

    Expert

    Nov 30, 2010
    16,345
    6,831
    Since you are using car parts, think about how a car does this. The radio is always connected to the battery and sometimes the engine is charging the battery and sometimes the engine is not charging the battery. Thus my idea for absolutly instant power supply switching: Connect the radio to the battery.

    It will run whether you have the charger plugged into a wall outlet or not.
     
    Last edited: Mar 16, 2012
  3. K7GUH

    Member

    Jan 28, 2011
    191
    23
    #12 has it right. Cell phones and other devices work the same way. The device runs off battery whether it's plugged in or not. If it's plugged in, the battery gets charged if it's below a certain voltage level. Doing it any other way violates the rule of Occam's razor.
     
  4. brocio

    Thread Starter New Member

    Mar 5, 2012
    3
    0
    Thanks guys. This was actually one of the first ideas I had, however I was told (and read) that drawing power from a battery while simultaneously charging it is dangerous. Is there something that I'm missing?

    Based on your recommendation, would I be OK using a "smart charger" to handle the charging/power supply? I don't want to have to constantly monitor the battery to prevent overcharging, etc.
     
  5. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    There is no such thing as "drawing power from a battery while simultaneously charging it".

    Current can either go into the battery (charging) or out of the battery (discharging). You cannot have it both ways at the same time.

    Which way are you going, in or out the door?
     
  6. brocio

    Thread Starter New Member

    Mar 5, 2012
    3
    0
    Thanks MrChips. If you read my first post in this thread, I only want to draw power from the battery when I'm not near a power source, i.e. the beach, park, tailgating, etc. When I am near a power source and have the charger plugged in, the battery would be charging. I'd also like to be able to run the radio while the battery is charging, so I'm assuming power must be provided by an alternate source (not the battery). Is there some sort of automatic switch that would activate the battery charger while also supplying 12V DC power via a power adapter to the radio's components?
     
  7. BillO

    Well-Known Member

    Nov 24, 2008
    985
    136
    The charging requirements for SLA and NiMH are very different, so choose one.

    SLA is much easier. I've done something very similar to what you want to do. If you supply SLA batteries with 14.4V they will charge nicely and you can keep that voltage on them indefinitely.

    You will need a current limited 14.4V regulator that can supply about 3 amps for the charger. There are many simple circuits that will give you this. Look them up. I used an LM317 with 2N3055 transistor for the current (I needed 8 amps).

    Then just connect both the charger and the load to the battery. Simple.

    Charger ---> Battery ---> Load

    Make sure your amplifier will be okay the the 14.4V. This is very, very likely. I cannot think of an audio amplifier I have ever seen that will run off a '12V' SLA battery (actually 13.2V) and not run just fine off 14.4V.
     
  8. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    Did you follow post #2 and #3?
    Connect the charger and the battery to the radio.
    When you plug the charger in, the charger will power the radio and charge the battery at the same time.
    When you unplug the charger, the battery will power the radio.
     
  9. #12

    Expert

    Nov 30, 2010
    16,345
    6,831
    Confirming MrChips, post #5:

    When the charger is charging, the charger is providing the power to the radio and some more power to the battery. You can not possibly use battery power while the charger is operating. The current will not go into the battery and then come back out of the battery to run the radio.

    The automatic switch you are looking for is called "The Laws of Physics". It is completely automatic, absolutely instantanous, and does not cost money.

    Connect the radio to the battery and connect the charger to the battery. When the charger is plugged in, the radio will be powered by the charger and when the charger is not plugged in, the radio will be powered by the battery.
     
    Last edited: Mar 18, 2012
  10. deityness

    New Member

    Jan 4, 2013
    4
    0
    so in terms of the circuitry itself, how do you hook up the "wall wart" to the battery in a manner with which the battery will be bypassed when the charger is connected? it can't be just a parallel connection between the "wall wart" charging the battery and the battery, right?
     
  11. jfish

    New Member

    Mar 6, 2011
    7
    0
    I know there are some female jacks that also act as switches when the male jack is inserted. In this case, inserting the male jack from the wall wart would open a switch that is part of the battery circuit...or something like that. Think about a radio....speakers off when headphones plugged in.

    If you can't charge and draw from a battery at the same time, how does my cell phone charge? I never turn it off and it's fully charged in the morning. Wouldn't it have something to do with how much current is going in vs. how much is coming out? It might not charge as fast when the radio is on but it seems as though it would charge.
     
  12. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    You will get 15W per channel only if your battery is beiing over-charged at 14.4V, the speakers are 4 ohms and the amplifiers are bridged.
    If the battery is discharging at 13.2V, the speakers are 8 ohms and the amplifiers are single-ended then the output per channel is only 2.2W.
     
  13. Spencer Hutton

    New Member

    Sep 1, 2016
    17
    0
    What if the load draws more than 3 amps? Will the 3 amp charger overheat because it cannot supply the necessary current?
     
  14. Tonyr1084

    Active Member

    Sep 24, 2015
    540
    86
    A car radio.png -
     
  15. Spencer Hutton

    New Member

    Sep 1, 2016
    17
    0
    Thanks for the reply. Ok so situation. Bluetooth audio amp module and sub charging module which both need 12 volts.

    Amp
    https://www.amazon.com/gp/aw/d/B01B..._11?colid=1J3XNSPY5JP8L&coliid=I2GSZQN1KDRELB

    USB charging module
    https://www.amazon.com/gp/aw/d/B01D...olid=1J3XNSPY5JP8L&coliid=I3KOEXCF8F0FYC&vs=1

    I figure there could be a 5-6 amp draw. So a 12 volt 7ah battery should cover that (right?).

    If I need 5 amps then a 3 amp charger is not enough to power the components when battery is low/dead. Is a 5amp charger too much? Will that damage the battery?

    What would you recommend?
     
  16. BobTPH

    Active Member

    Jun 5, 2013
    786
    114
    If the radio uses 5A and you have a 7AH battery, you will most likely get less than 1/2 hour out of the battery. The 7AH is rated for discharge over 20 hours, or at 350mA. When discharged at a higher rate, batteries cannot supply the same capacity as at the more normal rate.

    However, it is unlikely that you are really using 5A. That would be 60W continuously.

    Bob
     
  17. Tonyr1084

    Active Member

    Sep 24, 2015
    540
    86
    @Spencer Hutton

    Do the math. If you're using 6 amps max then whatever you're charging the battery with you must be able to supply at least 6 amps just to play the radio. If you want to charge the battery at the same time then you'll need a bigger supply.

    Start by KNOWING what your radio will draw. Speaker wattage isn't going to tell you much of anything as far as how many amps the radio can draw. Find information on the radio about how much current it draws then engineer from there. If your radio has a 2 amp fuse built in or in-line then the radio doesn't draw more than that. And if you have a 7 amp hour battery (and your radio is drawing only 2 amps then you can play strictly off the battery for 3 1/2 hours (theoretically). You can draw 7 amps for one hour or 1 amp for seven hours. Or any combination in-between.

    Whatever your radio draws your charger will need to be able to deliver more than you draw. Otherwise it's like trying to fill a 5 gallon bucket at a rate of 1 quart an hour and the bucket has a hole in it that leaks 1.1 quarts per hour - - - your bucket will never fill and eventually drain completely.
     
  18. Spencer Hutton

    New Member

    Sep 1, 2016
    17
    0
    Wow thank you for the incredibly detailed reply.

    This is the math I did. Presumably wrong. From the links I posted above, I assumed 4 ohms from the amp at 12 volts = a 3 amp draw. The sub charger at 2 amps. That's where i got the 5 amps from. Is that not correct?
     
  19. Tonyr1084

    Active Member

    Sep 24, 2015
    540
    86
    No, that's not correct. Without going into details, the resistance of a speaker (more aptly known as reactance) changes with the frequency of the note being played. The resistance goes up with the higher frequency - or is it lower - I don't know for sure; someone else will clarify.

    Nevertheless, regardless of what your speakers are, ohms, watts, - whatever, you don't calculate the power consumed by the end product. The math you did - you did right. However, you chose the wrong figures to work with. Unless you KNOW what the expected peak current draw will be - running a tape player or CD - you have nothing to calculate from. At best you can guess at the MAX draw by considering what the fuse is rated at. And it may be 2 amp, 3 amp, 5 amp or 10 amp, common amperages designed to protect a circuit. And just because you have a 10 amp fuse doesn't mean you are using that much power. It only means that if something goes wrong inside the radio the fuse will protect the rest of the car from burning down. Still, if it's a 2 amp fuse then I'd say consider the radio draw to be 2 amp - even though it's not. It MIGHT be 1 amp.

    So go figure that part of it out and let us know. Or if you want to do the math - you already know how to do that part, whatever the amperage of the fuse, the radio will never draw more than that much. So if it's 5 amp fuse then use 5 amps as part of the equation. Also, don't use 12 volts, 12 is the nominal voltage. Actual voltage of a lead acid battery (whether SLA or wet cell) should be 12.6 when fully charged. Still, don't even use that. The battery should charge to around 14.4 volts for a short while but then settle down around 13.6 volts. I'd go with the 13.6 volts since it's also reasonable to expect the charger to be able to put out that much voltage at the needed current to play the radio and charge the battery.

    Back in the 70's I had a car radio I wanted to play in my room. I brought a battery charger in and connected it. The radio had a HORRIBLE hum. No filtration. So I brought an old car battery in and hooked the charger to the battery and the radio to the battery. That effectively got rid of the hum. In essence, I made a huge filter out of the battery. It filtered out the hum. (and there's LOTS more to that story - perhaps some day - some day - some day).

    Peace.
     
  20. Spencer Hutton

    New Member

    Sep 1, 2016
    17
    0
    It's not a car stereo. It's a Bluetooth boom box using one of these. No fuse
    https://www.amazon.com/gp/aw/d/B01B..._11?colid=1J3XNSPY5JP8L&coliid=I2GSZQN1KDRELB
     
Loading...