This basic transistor battery charger controls both current and voltage so your battery does not get overcharged or damaged. It uses a TIP122 with a 2N2222 to limit current, a Zener and preset to set the voltage limit, and a 100 ohm resistor to keep a tiny trickle current going once full. READ MORE:
100+ Automatic Battery Charger Circuits & Schematics (6V, 12V, 24V, 48V)
Building a reliable battery charger needs very accurate voltage regulation and overcharge protection to stop and avoid cell damage.
Below here, you will find over 100 well researched bench tested DIY battery charger circuits ranging from simple transformerless designs to smart microcontroller based constant current/constant voltage (CC/CV) chargers. You can go through the schematics for 6V, 12V, 24V and 48V Lead Acid, AGM, Gel, Lithium Ion and LiFePO4 batteries.
100V to 450V Solar Battery Charger Circuit with Automatic cut-off using MOSFET
This circuit charges a battery from 100V to 450V solar panels using a high-voltage MOSFET and an SCR latch setup. It starts safely without instant switch-on, cuts charging off automatically when the battery gets full, and stops low-voltage or deep discharge trouble too. READ MORE:
Automatic Battery Full Cut-Off Latching Circuit with Trickle Charging
This circuit cuts off battery charging automatically when full, using an SCR latch so the relay does not keep clicking ON and OFF near the cutoff point. Once main charging stops, a small trickle current still goes into the battery to cover self-discharge without overcharging it. READ MORE:
Make this EV Battery Charger Circuit
This article shows how to build a wireless EV battery charger using an IRS2453 full H-bridge circuit driving a series LC coil to send power across the air to a matching receiver coil. It covers setting the frequency, dead-time, snubbers, and shutdown protection on the transmitter side, plus rectifying and regulating the power with voltage and current limits so it safely charges an EV battery without blowing parts READ MORE:
LC Resonance Calculator for EV Battery Charger Circuits
This tool helps you figure out the resonance capacitor or frequency for a wireless EV charging coil when starting a basic design. You first measure the real coil inductance with an LCR meter, put in coupling details, and pick a nearby polypropylene capacitor value, while keeping in mind real vehicle alignment will still need some fine tuning later. READ MORE:
220V AC to 56V DC SMPS Circuit for 48V Battery Charging
A 48V battery needs around 56V DC to charge full properly, so this post shows how to build a 220V AC to 56V DC SMPS charger using IR2153 and two IRF840 MOSFETs in half bridge. It covers the input filter, around 44 kHz switching, snubbers, and how to wind the ferrite transformer with multi-strand wire to avoid skin effect loss. READ MORE:
How to Choose the Right DIY Battery Charger Circuit
Choosing the right battery charger circuit depends on the battery chemistry, voltage, Ah rating, charging current and the way the battery will be used.
A lead acid battery, lithium ion battery, LiFePO4 battery and NiMH battery may all have similar voltage ratings, but their charging methods are not the same.
If you select the wrong charger, the battery may never get fully charged, its capacity may become weak, or it may get overheated and damaged.
So before selecting any DIY battery charger circuit, let us first understand the important battery charging rules and formulas.
Important Battery Charging Formulas
These formulas can be used for calculating the basic charging requirements of most rechargeable batteries.
1. Battery charging current formula
The charging current is normally calculated using the C-rate.
C-rate means the charging current compared with the battery's Ah capacity.
Formula:
Charging current (A) = Battery capacity (Ah) × C-rate
For example, if a battery is rated at 20Ah and the recommended charging rate is 0.2C:
Charging current = 20 × 0.2 = 4A
So a 20Ah battery can be charged at 4A if its manufacturer permits 0.2C charging.
A 1C charging rate means the charging current is equal to the battery's Ah rating.
For a 10Ah battery:
1C = 10A
But remember, 1C does not mean every battery can safely accept 10A. The maximum charging current must be checked from the battery datasheet.
2. Battery charging time formula
A simple charging time calculation can be done using:
Charging time (hours) = Battery Ah ÷ Charging current
Since charging is not 100% efficient, we can use the following practical formula:
Charging time = (Battery Ah × 1.2) ÷ Charging current
For example, for a 100Ah battery charged at 10A:
Charging time = (100 × 1.2) ÷ 10
Charging time = 12 hours
This is only a rough estimate for a deeply discharged battery. Actual charging time depends on the battery chemistry, initial charge level, temperature, charging efficiency and the current reduction near the end of charging.
For lead acid and lithium batteries, the final charging stage may take additional time even when the charging current has already reduced considerably.
3. Battery pack voltage formula
When cells are connected in series, their voltages add together.
Pack voltage = Number of series cells × Cell voltage
For example, four LiFePO4 cells connected in series:
Nominal voltage = 4 × 3.2V = 12.8V
Full charging voltage = 4 × 3.65V = 14.6V
For parallel cells, the voltage remains the same, but the Ah capacity increases.
Pack capacity = Number of parallel cells × Individual cell Ah
For example, four 3Ah cells connected in parallel:
Total capacity = 4 × 3 = 12Ah
4. Battery charging power formula
The charging power can be calculated using:
Charging power (W) = Charging voltage (V) × Charging current (A)
For example, a 12V battery charged at 10A:
Power = 14.4 × 10 = 144W
Here, we use the actual charging voltage of 14.4V, not the nominal battery voltage of 12V.
The charger input power must be higher than the battery charging power because some energy is lost in the transformer, rectifier, switching circuit and wiring.
5. Transformer and rectifier voltage formula
When a transformer is used with a bridge rectifier and filter capacitor, the approximate DC voltage can be calculated as:
VDC ≈ VAC × 1.414 − 2 × VD
Where:
VAC = Transformer secondary AC voltage
VD = Forward voltage drop of one rectifier diode
For example, with a 15V AC transformer and a silicon bridge rectifier:
VDC ≈ 15 × 1.414 − 1.4
VDC ≈ 19.8V
This is the approximate no-load DC voltage.
Under load, the voltage will be lower because of transformer regulation, diode losses and ripple.
So always measure the DC voltage before connecting the battery.
Different Types of Battery Charger Circuits
1. Lead Acid Battery Charger Circuits
Lead acid batteries are commonly used in cars, UPS systems, inverter systems, emergency lighting and backup power supplies.
They are available in 6V, 12V and 24V versions, along with larger battery banks.
Lead acid batteries include:
- Flooded or wet lead acid
- AGM batteries
- Gel batteries
- Sealed lead acid (SLA) batteries
Most lead acid batteries use a controlled bulk, absorption and float charging method.
Typical charging voltages for a 12V battery at around 25°C:
| Battery type | Absorption voltage | Float voltage |
|---|---|---|
| Flooded lead acid | 14.4–14.8V | 13.2–13.5V |
| AGM | 14.4–14.7V | 13.5–13.8V |
| Gel | 14.1–14.4V | 13.5–13.8V |
These are common reference values only. The exact voltage must be selected according to the battery manufacturer's specifications.
For a 6V battery, use approximately half the 12V values. For a 24V battery, use approximately twice the 12V values.
Lead acid charging stages
Bulk charging: The charger supplies controlled current while the battery voltage rises.
Absorption charging: The charger holds the specified absorption voltage and allows the current to gradually reduce.
Float charging: After the battery is fully charged, the charger reduces the voltage to a lower standby level.
Float charging is useful for UPS and backup batteries that remain connected to the charger for long periods.
Lead acid charging current
A common conservative charging rate for many lead acid batteries is around 0.1C.
For a 100Ah battery:
Charging current = 100 × 0.1 = 10A
But some batteries allow higher current, while others require lower current. Always check the manufacturer's limit.
Flooded batteries may permit equalization charging if the manufacturer specifies it. AGM and Gel batteries must not be equalized unless the manufacturer specifically allows it.
2. Lithium Ion Battery Charger Circuits
Lithium ion batteries are commonly used in mobile phones, laptops, power banks, electric tools, electric vehicles and many DIY projects.
The most common cylindrical and pouch lithium ion cells have a nominal voltage of around 3.6V or 3.7V.
A typical conventional lithium ion cell uses:
- Nominal voltage: 3.6V or 3.7V
- Maximum charging voltage: commonly 4.20V
- Charging method: Constant Current, followed by Constant Voltage (CC/CV)
However, not every lithium ion chemistry uses 4.20V. Some cells have different maximum charging voltages, so the exact cell datasheet must be followed.
Lithium ion charging formula
For a conventional 4.20V lithium ion cell:
Pack charging voltage = Number of series cells × 4.20V
For example, a 3S lithium ion pack:
Charging voltage = 3 × 4.20 = 12.6V
A 4S pack:
Charging voltage = 4 × 4.20 = 16.8V
The charger first supplies controlled current. When the battery reaches the specified maximum voltage, the charger holds that voltage and allows the current to taper down.
Charging should terminate when the current reaches the specified termination level.
A simple fixed-voltage power supply is not a proper lithium ion charger unless it also provides the required current limiting, charging control and termination.
3. LiFePO4 Battery Charger Circuits
LiFePO4 means Lithium Iron Phosphate.
These batteries are widely used in solar systems, inverter systems, electric vehicles, backup power supplies and DIY battery banks.
A typical LiFePO4 cell has:
- Nominal voltage: 3.2V
- Maximum charging voltage: commonly 3.65V
- Charging method: CC/CV
For a 4S LiFePO4 battery:
Nominal voltage = 4 × 3.2 = 12.8V
Full charging voltage = 4 × 3.65 = 14.6V
For an 8S LiFePO4 battery:
Nominal voltage = 8 × 3.2 = 25.6V
Full charging voltage = 8 × 3.65 = 29.2V
A 12.8V LiFePO4 battery is therefore not exactly the same as a 12V lead acid battery, even though both are often used in the same applications.
LiFePO4 batteries do not need continuous float charging or lead acid equalization. The charger should stop or enter the manufacturer's specified standby mode after charging is complete.
A suitable BMS should be used for lithium battery packs to protect against overvoltage, undervoltage, overcurrent and cell imbalance.
4. Lithium Polymer Battery Charger Circuits
Lithium polymer (LiPo) batteries are commonly used in drones, RC models, portable electronics and compact battery packs.
Many conventional LiPo cells use the same 4.20V maximum charging voltage as standard lithium ion cells.
For a 2S LiPo pack:
Charging voltage = 2 × 4.20 = 8.4V
For a 3S LiPo pack:
Charging voltage = 3 × 4.20 = 12.6V
A LiPo charger must use CC/CV charging and proper termination.
For multi-cell LiPo packs, a balancing charger is often required to keep the individual cell voltages within the specified limits.
Never assume that every lithium polymer battery uses 4.20V per cell. High-voltage LiPo cells and other lithium chemistries may have different charging specifications.
5. Nickel Metal Hydride (NiMH) Battery Charger Circuits
NiMH batteries are commonly available as AA, AAA, C, D and rechargeable battery packs.
A typical NiMH cell has:
- Nominal voltage: 1.2V
- Charging method: Controlled constant current
- Full-charge detection: Voltage and temperature monitoring
NiMH batteries do not have a simple fixed charging voltage like lithium batteries.
During charging, the cell voltage rises and then reaches a peak near full charge. A smart charger detects the voltage behavior and temperature rise to terminate charging.
A slow charging rate around 0.1C may be used for some cells when the manufacturer permits it and the charging time is properly controlled.
For faster charging, proper termination using voltage, temperature and a safety timer is necessary.
A simple LM317 constant-current circuit without full-charge detection is not suitable for unattended fast charging of NiMH batteries.
6. Nickel Cadmium (NiCd) Battery Charger Circuits
NiCd batteries have a nominal voltage of around 1.2V per cell.
They are used in some emergency lights, industrial equipment, older cordless tools and backup battery systems.
NiCd batteries are generally charged using controlled constant current.
At the end of fast charging, the cell voltage reaches a peak and then slightly drops. This is called negative delta voltage or −ΔV detection.
A proper NiCd charger can use:
- Negative delta voltage detection
- Temperature rise detection
- Maximum temperature cutoff
- Safety timer
NiCd cells can tolerate certain charging conditions differently from NiMH cells, but overcharging still causes heating, gas generation and battery damage.
Do not use a lithium ion charger or a simple lead acid charger for NiCd battery packs.
7. Lithium Titanate (LTO) Battery Charger Circuits
Lithium titanate batteries are a special type of lithium battery.
They have a lower nominal cell voltage than ordinary lithium ion batteries, but they can provide high charging and discharging current in suitable designs.
A typical LTO cell may have:
- Nominal voltage: around 2.3V to 2.4V
- Maximum charging voltage: commonly around 2.7V to 2.8V
The exact voltage depends on the cell manufacturer.
For example, a 6S LTO pack with a 2.8V maximum cell voltage:
Charging voltage = 6 × 2.8 = 16.8V
LTO batteries require a charger designed for their chemistry. A normal 4.20V lithium ion charger must never be used directly with LTO cells.
8. Sodium Ion Battery Charger Circuits
Sodium ion batteries are another rechargeable battery chemistry being used in energy storage and other applications.
Their cell voltage and charging requirements vary depending on the particular chemistry and manufacturer.
Some sodium ion cells have a nominal voltage near 3V, but their maximum charging voltage cannot be assumed from the nominal voltage alone.
The charger must use the exact charging voltage and current specified by the cell manufacturer.
Do not use a lithium ion charger just because the sodium ion cell has a similar nominal voltage.
9. Solar Battery Charger Circuits
Solar battery chargers are useful for car batteries, inverter batteries, garden lighting, backup systems and off-grid projects.
The solar panel voltage and current change according to sunlight, temperature and load.
A proper solar charger should regulate the battery charging voltage and current.
For lead acid batteries, the charger can use bulk, absorption and float stages.
For lithium batteries, the charger must use the correct CC/CV voltage and termination method.
A PWM solar charger controls the connection between the panel and battery.
An MPPT solar charger uses a switching converter to operate the panel near its maximum power point and convert the available power efficiently.
10. Trickle and Maintenance Battery Charger Circuits
Trickle chargers are mainly useful for lead acid batteries and certain nickel-based batteries when the battery manufacturer permits it.
For lead acid batteries, a proper float charger maintains the battery at a lower standby voltage.
For lithium ion and LiFePO4 batteries, continuous trickle charging after full charge is generally not recommended.
A lithium charger should stop charging or enter the specified standby mode when the battery is full.
Important Battery Charging Safety Rules
Before switching ON any homemade battery charger, check the following points.
Never exceed the battery charging voltage
The maximum charging voltage must match the battery chemistry and number of cells connected in series.
For example:
- Conventional lithium ion: commonly 4.20V per cell
- LiFePO4: commonly 3.65V per cell
- LTO: commonly around 2.7V to 2.8V per cell
- Lead acid: depends on battery type and charging stage
Always check the manufacturer's specifications.
Use proper current limiting
A charger must limit the charging current to the value permitted by the battery.
The current can be controlled using:
- LM317 constant-current circuits for small applications
- Dedicated battery charger ICs
- Current-controlled buck converters
- Switching charger controllers
- MOSFET-based current regulation circuits
For high-current battery chargers, a switching converter is generally more efficient than a linear regulator.
Use a proper battery protection circuit
Lithium battery packs should have a suitable BMS or protection system.
The BMS must be selected according to:
- Number of series cells
- Maximum charging current
- Maximum discharge current
- Cell voltage limits
- Temperature limits
- Battery chemistry
A BMS is not a substitute for a proper charger. Both are needed for a reliable lithium battery system.
Add a fuse near the battery
A fuse should be installed close to the battery positive terminal.
The fuse rating must be selected according to the maximum expected current and the wire's current carrying capacity.
The fuse protects against short circuits and wiring faults. It does not replace current limiting inside the charger.
Check transformer and rectifier ratings
For transformer-based chargers, the transformer must have sufficient VA rating.
Transformer VA rating = Secondary AC voltage × Secondary current
For example, a 15V, 10A transformer:
VA = 15 × 10 = 150VA
The bridge rectifier must also have sufficient current and reverse voltage ratings, along with proper heat sinking.
The filter capacitor must be rated for the maximum DC voltage and ripple current.
Avoid direct mains battery charging circuits
Do not use capacitor dropper circuits or non-isolated mains circuits for charging large batteries.
A non-isolated circuit can expose the battery terminals and connected equipment to dangerous mains voltage.
For DIY battery chargers, use a properly isolated transformer or a certified isolated AC-DC power supply followed by a suitable charging controller.
Frequently Asked Questions
What is the correct cutoff voltage for a 12V automatic battery charger?
For a normal 12V lead acid battery, the absorption voltage is commonly around 14.2V to 14.8V depending on the battery type.
AGM and Gel batteries may require lower or more specific voltage settings.
The float voltage is commonly around 13.2V to 13.8V.
The exact values must be selected from the battery manufacturer's specifications.
Can I use a lead acid battery charger for a LiFePO4 or lithium ion battery?
No, not unless the charger is specifically designed and approved for that lithium battery.
A lead acid charger may use an incorrect voltage, float charging or equalization mode that is not suitable for lithium batteries.
Use a charger with the correct CC/CV voltage, current limit and termination method.
Why does my battery charger voltage drop when I connect the battery?
When a discharged battery is connected, it may draw a large charging current.
The voltage may drop because of transformer resistance, rectifier losses, wiring resistance or the charger's current limit.
If the charger is designed correctly, the current should remain within the specified limit while the battery voltage gradually rises.
How do I calculate the charging time for my battery?
Use the following formula for a rough estimate:
Charging time = (Battery Ah × 1.2) ÷ Charging current
For a 100Ah battery charged at 10A:
Charging time = (100 × 1.2) ÷ 10 = 12 hours
The actual charging time may be longer because the charging current reduces near the end of the charging cycle.
Can I charge two batteries of different Ah ratings together?
It is not recommended to connect batteries of different capacities, ages or chemistries in the same charging arrangement without a properly designed system.
In series-connected batteries, the same current flows through every battery, so the smaller battery may become overcharged.
In parallel-connected batteries, current sharing may become uneven.
Use batteries of the same type, capacity, age and condition whenever possible.
Can I use an LM317 as a battery charger?
An LM317 can be used for small battery charging applications when it is configured with proper current and voltage control.
But it is not a complete universal battery charger.
For lithium ion, LiFePO4 and NiMH batteries, proper charge termination and protection are still required.
For large batteries, an LM317 may also produce excessive heat because it operates as a linear regulator.
Which is the best DIY battery charger circuit?
There is no single best circuit for all batteries.
For small single-cell lithium ion batteries, a dedicated charger IC such as TP4056 may be suitable when the cell specifications and board protection are appropriate.
For lead acid batteries, an automatic bulk, absorption and float charger is generally preferred.
For LiFePO4 battery packs, use a dedicated CC/CV charger with the correct pack voltage and a suitable BMS.
For NiMH and NiCd batteries, use a controlled-current charger with proper full-charge detection.
Always select the circuit according to the battery chemistry, voltage, capacity and manufacturer's charging specifications.





