Table of Contents
Introduction
Charging batteries efficiently and safely requires a regulated voltage supply. The LM317-based adjustable voltage regulator battery charger is a versatile and cost-effective solution for charging a variety of battery types, including lead-acid, Li-ion, and NiMH. This circuit is capable of adjusting the output voltage between 1.25V and 30V depending on the battery requirements. With a simple configuration, it offers protection and control, making it ideal for DIY electronics enthusiasts, students, and hobbyists.
This circuit utilizes the LM317 voltage regulator IC, which can supply up to 1.5A of current and has built-in protection features like thermal overload, current limiting, and safe operating area (SOA) protection. With the addition of capacitors for stability, resistors for voltage control, and a potentiometer for fine adjustment, this setup provides a reliable output suitable for charging.
The versatility of this design lies in its ability to adapt to different charging needs by merely adjusting the potentiometer. It not only ensures battery safety by preventing overcharging but also improves charging efficiency by delivering a stable voltage. Moreover, its compact design makes it suitable for portable and space-constrained applications. Whether you’re powering up small Li-ion cells or larger 12V batteries, this circuit provides an excellent platform for controlled and adjustable power delivery.
In this article, we will explore the schematic diagram, list of components, working principle, and application tips for building your own adjustable battery charger.
Components Required
Component | Value/Part Number | Description |
---|---|---|
Voltage Regulator | LM317 (TO-220) | Adjustable voltage regulator IC |
Resistor R1 | 220Ω | Fixed resistor for voltage setting |
Potentiometer RP1 | 10kΩ | Variable resistor for output voltage control |
Capacitor C1 | 100µF | Input filter capacitor |
Capacitor C2 | 0.1µF | Bypass capacitor for voltage stability |
Capacitor C3 | 100µF | Output filter capacitor |
Input Terminal | H1 | DC input (3V to 30V) |
Output Terminal | H2 | Regulated DC output |
LM317 Pinout

Circuit Diagram

Working Principle
The LM317 adjustable voltage regulator maintains a constant output voltage by comparing the voltage between its output and adjustment terminals. The output voltage is given by the formula:
Vout = 1.25V (1 + R1 / RP1) + Iadj × RP1
In most applications, the adjustment pin current (Iadj) is very small and can be neglected. So, the simplified formula becomes:
Vout ≈ 1.25V (1 + R1 / RP1)
In this circuit:
- R1 (220Ω) sets the reference resistance.
- RP1 (10kΩ Potentiometer) allows you to adjust the output voltage by varying the resistance.
- Capacitors (C1, C2, C3) are used to stabilize the input and output voltages and prevent unwanted oscillations.
When a DC voltage between 3V and 30V is applied to the input (H1), the LM317 regulates and adjusts this voltage according to the settings of R1 and RP1. The regulated voltage is then available at the output terminal (H2).
Construction Steps
- Gather all the components as listed in the table.
- Place the LM317 on a breadboard or solder it to a PCB, ensuring pin orientation (IN – pin 3, OUT – pin 2, ADJ – pin 1).
- Connect the input capacitor (C1 = 100µF) across the input pin and ground.
- Add the bypass capacitor (C2 = 0.1µF) between the adjustment pin and ground.
- Connect R1 between the output pin and the adjustment pin.
- Connect the potentiometer (RP1) between the adjustment pin and ground.
- Attach the output capacitor (C3 = 100µF) between the output pin and ground.
- Add input and output connectors (H1 and H2) for easy power input and battery connection.
- Optionally mount the LM317 on a heat sink if you are drawing high current to prevent thermal shutdown.
- Double-check all connections before powering the circuit.
Applications
- Charging Li-ion, Li-Po, and lead-acid batteries
- Adjustable bench power supply
- Powering low-voltage DC motors
- DIY electronics and Arduino projects
- Battery maintenance and repair stations