aTao wrote:If (and only if) the max charge current is greater than the current drawn by the RPi AND the RPi DC->DC converter can handle the max charge voltage of the battery THEN you can just hook up a charger and nothing will blow immediately.
LM2596S DC to DC Step Down Adjustable Power Supply Module is connected in between battery and RPi. And as per its specs, Input voltage: 4-35V, Output Voltage: 1.23-30V (I have set output voltage to 5.4V) and Output current: rated current 2A. So is it safe to connect APC UPS charging leads to battery?
the charger can safely supply max battery charge current plus
aTao wrote:The biggest problem you face is detecting a full charge. Since the RPi will be drawing current you have no way of knowing how much current the battery is using to charge, it is often when this current drops significantly that the charger "knows" when to stop. Over charging a battery is one way to break it.
As I mentioned in my original post, battery is from a APC Back-UPS ES 500. So if i use the same APC UPS battery connector to connect the battery. APC UPS should know when battery voltage drops and when it is full and stop. Am I right?
That all depends on how the charger senses a full battery, it might well simply sense current drawn (actually easier than volt sense). It may simply set a target voltage just above 12V in which case the charge current will drop to a safe trickle for a lead acid battery (fatal for LiIon and LiPo)
aged_geek wrote:I take it the DC-AC inverter in the original UPS only get switched on when the AC mains power is disconnected?
Depends on the UPS.
Some have a small blip at switchover, a brief break in supply and an unsynchronised AC waveform. The fancy ones have a charger, a DC power supply and a permanently running inverter that has a power supply switch on its input. The switch is set by incoming mains sensing.
Normal operation is.
AC in to charger and DC PSU, charger charges battery as required, inverter is powered by DC supply.
When the mains fails the charger looses its supply, the switch then powers the inverter from the battery. At no time is the battery being charged and powering the inverter.