Electrical – What determines if a battery is charging or discharging in a circuit

batteriesbattery-operatedpower supply

I have a basic understanding of DC circuits from high school and university physics courses, but those courses only covered circuits that discharge batteries.

I'm trying to build an rudimentary electrical system for the inside of a trailer. It'll be used for a few LEDs for lighting, USB ports for device charging, and an inverter for a few 110v outlets. The system will be powered from its own lead-acid battery (not charged by the car's alternator), that's chargeable via a solar panel on the roof, or by plugging it in.

I have no experience in this domain, and couldn't find the information on this (perhaps I just can't think of the right keywords to google). Fundamentally, what determines if a battery is being charged in a circuit, vs being discharged? For example, how can I ensure that if the system is plugged into a mains outlet, that the energy comes from the wall plug and not the battery?

Best Answer

The direction of current through the battery determines whether it is charging or discharging.

The battery is trying to push current in a particular direction. If the current flows in that direction, the battery is discharging. If the current flows in the other direction, the battery is charging.

It is a little bit like a spring or a clockwork toy. When you have a spring, it tries to push in a particular direction (longer or shorter). If the spring moves in that direction, then it's discharging. If you push the spring in the opposite direction, it's charging.

What determines the direction of current? You'll have to solve the circuit to find that out. In general, since the battery is connected in parallel to the charger, the battery charges if the charger is trying to output a voltage which is greater than the battery voltage.