# Battery charge/discharge circuit

#### Pabert

Joined Mar 8, 2020
20
Hello,

I would like to use a battery for a project. As it will be irremovable, I need to be able to use it while the external charger is plugged (thus, the external charger would, I guess, charge the battery while powering up the load. The battery would then be "separated" from the load.) Or, if it is not possible, the charger would only charge the battery if the load is disconnected, I don't know which option is easier to do.
How can I do that ? Maybe some IC are mare for this ? If so, I can't find one.

Last edited:

#### MrChips

Joined Oct 2, 2009
30,925
The simple solution is to use steering diodes for automatic switch-over.

Here is an example:

#### Pabert

Joined Mar 8, 2020
20
I don't fully understand the usefulness of all the diodes. Can you explain this, so that I can adapt your example to my battery voltage ?

#### MrChips

Joined Oct 2, 2009
30,925
Steering diodes are used to OR voltage sources to a common load.

D1 and D2 will drop one diode voltage which is about 0.3V for a Schottky diode such as 1N5817.
The higher of the two voltage sources will take over while the lower source drops out because the diode in series with the lower voltage will be reversed biased.
Hence each diode D1 and D2 act as automatic switches.

What is missing a way to charge the battery.

In this schematic, the battery is being charged via a diode and current limiting resistor R1.

The chain of three diodes is used to drop the 5V down to 4V.

The two diodes in parallel will drop the battery voltage from 3.6V to 3.3V.
The two diodes share the current (100mA each) so that the total current is 200mA,
Diode forward voltage will increase slightly with higher current. Thus with one diode alone, the voltage drop will be higher than 0.3V.

Presumably, the designer of this circuit included additional diodes so that the automatic switch over from 3.6V battery to 5V supply occurred at defined voltages.

#### Pabert

Joined Mar 8, 2020
20
Thank you for the explanations ! They are very clear !

However, if I understood correctly, the type of circuit in question would work well if the battery charger had a "substantially" (so, around 0.3V or more with a schottky diode) higher voltage than the battery.
My battery has a varying voltage, and the external charger has a voltage of 12.6V. How can I take into account the cases when the battery is close to be full or full ? The two voltages will be equal. What would happen to the diodes?