Battery Charger

Arduino-Controlled 12V Battery Charger Schematic Circuit Diagram

The provided circuit is capable of autonomously recharging a 12V, 7Ah battery or larger. Noteworthy attributes of this charger include the following: It dynamically regulates the charging current in accordance with the battery’s condition. Additionally, it provides real-time feedback by displaying the battery voltage level and charging status on an LCD screen. When the battery reaches full charge, the charger maintains a float voltage. The system utilizes Arduino to detect the battery’s status and voltage, subsequently relaying this information to the LCD for user visibility.

Circuit and working of 12V automatic battery charger

Figure 1 illustrates the schematic diagram of the 12V automatic battery charger, which is under the control of an Arduino. The construction of this charger centers around several key components, including the Arduino Uno (Board1), the adjustable voltage regulator LM338 (IC1), the 12V voltage regulator 7812 (IC2), a 16×2 LCD (LCD1), and various additional components.

Circuit diagram of automatic battery charger 1

When the AC mains power source is active, a step-down transformer labeled as X1 generates approximately 15V AC, which is subsequently converted to a voltage exceeding 18V DC through the processes of rectification and filtering. This resulting DC voltage is then divided into two separate streams: one is dedicated to charging the 12V battery denoted as BATT.1 through IC1, while the other powers the Arduino (Board1) via IC2.

During the battery charging process, the voltage of the battery is showcased in the upper-left corner of the LCD1 display. The charger type and charging status are simultaneously exhibited on the second line of the LCD1. LM338 supplies a voltage of 14.2V to the battery until it reaches full charge. Once the battery attains a full charge state (above 13V), LM338 sustains the charge at approximately 13.3V, a mode known as float charging. The charging voltage is regulated by two BC547 transistors (T1 and T2), with their bases connected to Arduino board pins 8 and 9.

To ascertain the battery’s status when the 230V AC mains power is unavailable, one can press and hold the test switch S1 for a brief period. In this scenario, Arduino draws power from the connected battery and proceeds to display the battery’s voltage and its operational status, under the assumption that the battery remains functional.


The software program, labeled as “batterycharger.ino,” is crafted using the Arduino programming language. To compile and upload this program, the Arduino Integrated Development Environment (IDE) is employed. The ATmega328P microcontroller embedded in the Arduino Uno board is equipped with a pre-installed bootloader, which facilitates the seamless uploading of new code without the need for an external hardware programmer.

To initiate the process, establish a connection between the Arduino board and your computer. Then, within the Arduino IDE, designate the appropriate COM port. Next, compile the program or sketch and, from the “Tools” menu in the Arduino IDE, select the correct board. Finally, upload the sketch to the internal memory of the microcontroller.

Construction and testing

An actual-size PCB layout of the Arduino-controlled 12V automatic battery charger is shown in Fig. 2 and its components layout in Fig. 3.

Circuit diagram of automatic battery charger 2

Circuit diagram of automatic battery charger 3

Assemble the circuit on the designed PCB. Once the circuit is ready and Arduino sketch is written to the board through USB port, connect shorting jumper SJ1 and a multimeter in place of the battery for calibration. Switch on AC mains power and adjust VR1 till the multimeter reads 14.2V DC. Adjust VR2 till LCD1 displays 14.2V. Remove shorting jumper SJ1 and the multimeter. The charger is ready to use. Connect a battery that needs to be charged (12V battery) at BATT.1, as shown in the circuit.

Precaution. Maintain proper polarity of the battery while connecting for charging. Reverse polarity of the battery may damage the circuit.

Charging voltage is set to 14.2V. This value is dependent on the lead-acid battery manufacturer. Hence, refer battery manual before charging.

Use suitable heat-sinks for IC1 and IC2.


Related Articles

Leave a Reply

Your email address will not be published.

Back to top button