This project is a “Battery Charger Circuit” with automatic charging disconnection which is able to charge the batteries between 1.2V to 24V...
Price:
Other projects from this group
The main processor of the “1.2-24V Battery Charger Circuit” is ATmega8A. ATmega8A is an AVR 8 bit microcontroller which has 28 pins.
This circuit has an internal volt-meter and temperature-meter with digitally calibration feature.
The project contains 3 folders, “CodeVision Source”, “PCB-SCH-BOM” and “sim”.
There’s a source code folder in this project which contains the CodeVision program files (C) and pre-compiled HEX file. To re-compile or check out the source code, open “BatteryCharger.prj” with codeVision AVR software. First of all set the fuse bits.
The microcontroller uses its internal 8MHz oscillator. Also the BOD is enabled to check the voltage if it is not under 2.9v to saving the EEprom data.
Project Compilation
Before compiling the project, go to “headers.h” file and Search for “#define SIM”. In case you are going to test the program with “Proteus Software”, it should not be logged.
But if you’re going to upload the program into the microcontroller, log it with two slashes:
//#define SIM
Then compile the project with ctrl+F9.
The Proteus Simulation File
Also in this project there is a Proteus simulation file inside of “sim” folder. Open it with Proteus Schematic and set the project .COFF file by double click on the microcontroller, then run the simulation.
The Battery Charger Circuit and PCB
In the “PCB-SCH-BOM” folder, there are 6 files:
The PCB is 8cm*9cm with 4 3mm pads in the 4 edges of the PCB.
Mountage and assemble the parts according to the bill of materials.
The Con1 connector is AC input which must be under or equal with 24VRMS. And Con2 is the DC input which can be vary between 7V to 27V.
The Con 3 is the charger’s output and must be connected to the battery + and -. And Con4 is the NTC’s input and in case of using the temperature sensing feature, a 10K ohm NCT resistor should be connected to this connector.
The 1.2V to 24V Battery Charger Circuit’s Configuration
There are two push buttons (UP and Down) and a potentiometer (P1) for the configuration.
To calibration of the temperature sensor, connect the NTC and then plug the power source. When --- is appeared on the segment screen, press UP button.
Then “tpc” will be appeared on the screen and then the temperature value number will blink.
With using a standard temperature meter and a glass of warm/hot water calibrate the circuit’s temperature meter. UP and Down is the “Divider” and potentiometer is the “Subtractor”.
To calibrating the circuit’s internal volt-meter, connect a battery (or DC power source) to the Con3 and after seeing ---, press the Down button.
Then the voltage of the battery appears and blinks. Calibrate the voltage with UP and Down and using a standard volt-meter.
To setting the “Charging voltage” and the “Maximum battery voltage”, unplug everything from the circuit first and then wait for at least 1 minute.
Then connect the power source to the Con1 or Con2. When --- disappears, the voltage of Con3 appears (without blinking and the voltage should be 0.00).
With pressing the UP button, “chg” will be appeared and you can set the “Charging voltage” with Up and Down buttons.
And with pressing the Down button, “bat” will be appeared and you can set the “Maximum battery voltage”.
The Battery Charging
After the configuration, connect the battery to the Con3. The battery’s voltage will be appeared after ---. And then the power source to the Con1 or Con2.
The voltage of a proper battery with the correct configuration will slowly increase.
Press the UP button to see the percent and the temperature.
Press the Down button to pause the charging process.
When the battery is fully charged, the right “Dot” on the screen will be turned on.
1.0
- The charging algorithm design
- Programming
- Schematics design
- PCB design