# UPS battery as auxiliary power supply for car - charging and detecting car on

I'm designing a arduino-based car system that I would like to have running even when the car is off and parked. Though the system is designed to be very energy efficient, I don't want it to run down my car's main battery. I have a 12v to 5v converter already working (Tobsun EA15-5v DC12v to DC5v 3a converter)

I would like to use a small lead acid battery (a 12v 7200mAh battery for an APC UPS) as a power supply for the project, having it charge off my car's cigarette lighter port (which only supplies power when the car is on), and when the car is off the UPS battery runs the arduino system.

Additionally, I would like to know whether the car is on or the backup battery is being used, so I intend to build this circuit using a 4n25 optoisolator so the arduino can detect if the car is on.

My question really centers around:

1) Does this arrangement, without further circuitry, safely charge the 12v UPS battery when the car runs? If I need further circuitry to manage charging, any recommendations for a module that would fit?

2) In this arrangement, especially given the D1 diode, is the 4n25 circuit in the right place to detect a signal when the car power is on, but not when running off the UPS battery?

simulate this circuit – Schematic created using CircuitLab

• Should work, but keep in mind that your UPS battery will constantly be underchanged. You can minimize it by using a Shottky diode instead, but if you want long UPS battery life, please do charge it (externally) a few times per year. Commented Aug 28, 2018 at 8:10

No, this will not effectively charge the added battery. The voltage regulator for the car will only provide a high enough voltage for charging main battery needs to be charged. When the main battery is charged the voltage will be reduced to prevent overcharging the main battery.

Even worse, the diode you added in series will reduce the voltage to the secondary battery by about 0.7 V. So even if the regulator for the main battery is providing an adequate charging voltage the voltage to the secondary battery will be too low to charge it properly.

To properly charge the secondary battery you need a dc/dc boost converter, perhaps to 15 V, and then a proper lead-acid charging circuit for the secondary battery.

I meant for this to be a comment but it was getting too long to fit, so:

1) I don't think hooking up two batteries in parallel is a good idea (even WITH a diode), and it's not guaranteed to charge your second battery (Lead acid battery voltages change linearly and to get a appreciable charge rate you need a voltage differential above nominal). If you wanted to guarantee safe, you can always get an UL/ETL listed inverter for that 12 volt socket, and then get a UL/ETL listed 12 volt lead acid battery charger. I don't think you'll manage to find a 12 volt input to 12 volt output battery charger because the voltage is not right. Also note your diode is like an additional 1 volt drop so you really will have a tough time charging your battery if that port is regulated (though if it come straight from the alternator you might pull it off).

2) A cursory glance suggests to me that this setup would work, though I might be missing something.

Addendum: While the inverter-charger setup seems to be a bit complicated (and more costly), I think it would provide you with a far higher degree of safety. If you really want to know if your car is on, you could just run a fused connection to your ignition switch to a relay. You would consume zero current while the car was off (assuming the switch was OPEN), and you would also provide isolation with "automotive grade" parts.

Does this arrangement, without further circuitry, safely charge the 12v UPS battery when the car runs?

That depends on the charging requirements of the battery, and the voltage available from the vehicle. My 2003 Chevrolet Malibu alternator's output voltage is not constant. I measure 14.2 VDC at the battery on a hot day, 15.4 VDC when it's -20 C outside. My alternator's voltage regulator is "temperature compensated", so the output voltage varies.

Can you tell us what charging voltage the 12v 7200mAh battery requires? It may require less voltage than an automotive lead acid car battery.

Regarding the diode in your circuit, you may want to use an off the shelf component like this 90 Amp Battery Isolator.

• Look at the charging curves for your battery and determine with your current how long it will take to charge, then you know how long you need to have the car running to charge it. Eventually it will discharge your battery and destroy it.
– Gil
Commented Feb 5, 2021 at 5:35