Design And Construction Of An Automatic Battery Charger With Charging Full, Charging Process Indicator Using Arduino

Overview

Arduino Battery Charger Project

An Arduino Battery Charger: How to save the planet one battery at a time! Did you know that all those single use batteries (alkaline ones) that have a label on them saying “Do Not Recharge” are in fact chargeable!

Of course some will not be and some will charge a little bit better than others. But even getting on re-use out of a throw-away battery seems like a better way to go.

The criteria for whether or not the battery is re-chargeable or not is first of all give it a visual inspection. If it has powdery residue on it then it is dead so re-cycle it in your local battery re-cycling place.

The next thing to determine re-chargeability is whether or not the battery voltage has fallen below 0.8V. If it is too low then you are unlikely to get anywhere. You could measure this with a volt meter or just use the project below that does this automatically for you (I set the level to 0.75 since the voltage measurement is not absolutely accurate (Voltage regs usually have a ±10% regulation so you don’t get exactly 5V out – also the reference voltage I used is using two divider resistors so that’s another 10%). It is not absolutely critical for charging alkaline batteries.

Arduino Battery Charger Schematic

Arduino Battery Charger Circuit operation

First of all when CHRG and HCHRG are floating then R1 pulls the transistor base high so no current flows = OFF.

Pulling CHRG low results in a constant current of 21.3mA and then pulling HCRG low results in an increased charging current of 33mA

The basic operation is to start charging the battery at low current for a period, and then charge at a high current for another period. If the battery voltage increases, during high charge, then carry on charging, if not, then charging is finished (as long as the battery is within the acceptable voltage limits).

Arduino Battery Charger charging current

When CHRG is pulled low R1, R2 and R3 are enabled forming a resistive divider that sets the base voltage at

3.28V : 5*((1e3+560)/(1e3+560+820))

So the voltage across the base of the transistor, i.e. across R1, is:

1.722 : 5 – 3.26

The base emitter diode drop is 0.7V so that leaves 1V dropped across R4. This therefore allows you to define the charging current i.e. for the 47R resistor shown the charging current will be

21.3mA : 1.0/47

Arduino Battery Charger high current Charging

When HCHRG is pulled low (regardless of CHRG) then resistor R3 is shorted out to ground. So the voltage now dropped across (only) R2 is:

2.74V : 5*((1e3)/(1e3+820))

This the voltage across the base of the transistor, i.e. across R1, is:

2.25V : 5 – 2.74

Now the voltage drop across R1 is:

1.55 : 2.25 – 0.7

Which results in a charging current of:

33mA : 1.55/47

AREF External voltage

The voltage divider formed by R8 and R9 halves the voltage used for the ADC reference so the maximum that the ADC can read is 2.5V which is plenty since we only really need to measure up to about 1.6V. Having a lower AREF voltage also means that each bit of the ADC has a lower value i.e. a finer resolution – instead of 4.88mV it is 2.44mV per bit so the ADC can see smaller voltage changes at the battery.

Displays

You can use only the LCD display or only the LEDs. You will get a green (pass) or red (fail) light at the end of charging. The LCD displays more information such as the current voltage level at the battery, the start voltage of the battery and the elapsed time. It also shows the state variable (really for debug) that lets you know where the code is at. In addition the serial port outputs text messages showing you what happened. So the LCD is not really essential for operation but is useful if you make a stand alone unit.

Serial Monitor

You can use the serial monitor (in the Arduino IDE) to observe operation as serial data is also reported showing state machine operation, adc values and voltages.

Software Library and versions

Arduino IDE Version

Version : 1.8.3

The liquidCrystal library is replaced with one that allows SPI operation (so you can still use non SPI code with this library).

Download the (SPI) LiquidCrystal library from:

https://playground.arduino.cc/Main/LiquidCrystal#Download

Then goto your library location

C:\Users\<username>\Documents\Arduino\libraries

Rename directory LiquidCrystal to LiquidCrystal_orig.

Then unzip the downloaded file here which should result in a new folder

LiquidCrystal

You can find the schematic here (Wiring diagram):

https://playground.arduino.cc/Main/LiquidCrystal#Connections

There ‘s no facility to change pins (you could change the code though).

Code Operation State Machine

The Arduino Battery Charger code is formed from a simple state machine. These are the main states:

You can more or less read these from left to right and see what the code is doing.

IDLE

First of all in the IDLE state the system is set up to charge.

BATFND

Then in the BATFND state the voltage is checked (during low charge) to see if a valid battery is present.

If out of range then the state is set to FAIL.

If in range then the state is set to CHARGE

CHARGE

In the CHARGE state low charge current continues for 30 seconds. At the end the ADC reading is stored in the variable lowChrgADC.

After 30 seconds the state is set to HIGH_CHARGE and the high current output activated.

The state changes to HIGH_CHARGE after 30s.

Two other tests are made (all the time).

Battery reaches max voltage

  1. The state is set to FINISHED.

Battery is out of range

  1. The state is set to FAIL.

HIGH_CHARGE

After 30 seconds the state is set to TEST

The state changes to TEST after 30s.

Two other tests are made (all the time).

Battery reaches max voltage

  1. The state is set to FINISHED.

Battery is out of range

  1. The state is set to FAIL

TEST

Battery Voltage Increase for High Charge

This is where the decision is made either to terminate the process or continue. First of all, if the current ADC value (at the end of high charge compared to the ADC value at the end of the low current charge period) is not high enough (<9.77mV) then the battery is considered to be charged and the state is set to FINISHED.

The state of the battery (out of range) is not tested here since it has been continuously tested in states CHARGE and HIGH_CHARGE.

Detecting Final Charge : test_avg()

Some batteries hover around a final value but change their voltage output enough during High charge so that the algorithm can’t stop. To detect this state (over several charge and high-charge cycles) requires storing ADC values so a rolling shift register containing the last 10 low charging ADC values is used for detection.

In the function test_avg() the array prevADC[] is tested to see if the values are all within 1 value of the average of those 10 readings. If they are, then the state machine goes to the FIINISHED state i.e. this shows there has been no ‘real’ change in battery voltage over the last few charging cycles.

After each test phase the array is shifted and the latest low charge ADC value is inserted.

If neither of the above cases is true then the state machine goes back to IDLE.

The next state is :

FINISHED (if battery voltage is high enough) or

FINISHED for no average battery change or

IDLE (if the others are not true).

FINISHED

The controls and LEDs are set: (green LED is lit to indicate success) and charging is turned off.

The next state is WAIT_START.

FAIL

The controls and LEDs are set: (red LED is lit to indicate failure) and charging is turned off.

The next state is WAIT_START.

WAIT_START

Here is the only state that allows restart detecting a button press on the input pin. When pressed, various variables are initialised for a complete restart.

When pressed the state is set to IDLE.

Chapter Two: Literature Review

2.0 INTRODUCTION:

This chapter provides the background and context of the research problems, reviews the existing literature on the Design And Construction Of An Automatic Battery Charger With Charging Full, Charging Process Indicator Using Arduino, and acknowledges the contributions of scholars who have previously conducted similar research [REV65548] …

Document Information

    • Format: DOC/PDF
    • Title: Design And Construction Of An Automatic Battery Charger With Charging Full, Charging Process Indicator Using Arduino:

YOU MAY LOVE THESE (Recommended)

  • How to write the “Smart Waste Bin Using Arduino” Project

    To start a project on Smart Waste Bin Using Arduino, follow these guidelines: The main objective of the project is to design a smart dustbin which will help in keeping our environment clean and also eco friendly. Nowadays technologies are getting smarter day-by-day so, as to clean the environment we are designing a smart dustbin by using Arduino. This smart dustbin managem…

    45 Pages 1 - 5 Chapters 6,758 Words DOC/PDF Format Instant Download UPN65324

  • To develop a project on Design And Construction Rechargeable Lamp Using LED With Charging Monitoring And Controlling System, follow these approaches: Nowadays, because of low energy or power consumption, low heat emission, low cost, the portability, wider application, LED bulbs are highly used than florescent lamp when building lantern. This work is on LED lantern with dual power supply which uses an AC source to power the lamp when there is …

    51 Pages 1 - 5 Chapters 7,367 Words DOC/PDF Format Instant Download UPN65885

  • To undertake a project on Design And Construction Of Programmable 3-Phase Motor Controller Using Arduino Embedded System, follow these effective ways: This project aims to control the speed of a three-phase induction motor using an Arduino controller. The Arduino generates Pulse Width Modulation (PWM) signals to regulate motor speed, which is managed through a driver and three-phase inverter circuits. Additionally, the project reduces harmonics…

    43 Pages 1 - 5 Chapters 4,858 Words DOC/PDF Format Instant Download UPN64752

  • Steps for writing the “Design And Construction Of Battery Charger” Project

    To write a project on Design And Construction Of Battery Charger, follow these structure: This project which consists of four chapters deals extensively with the design and construction of a battery charger which is capable charging a 12 volts, battery. The first chapter which is the introductory chapter goes a long way in defining the battery charger and explaining of the mode of ope…

    35 Pages 1 - 5 Chapters 3,427 Words DOC/PDF Format Instant Download UPN63981

  • Guide for writing the “Design And Construction Of Automatic Smart Waste Bin” Project

    To carry out a project on Design And Construction Of Automatic Smart Waste Bin, follow these effective methods: The main objective of the project is to design a smart dustbin which will help in keeping our environment clean and also eco friendly. Nowadays technologies are getting smarter day-by-day so, as to clean the environment we are designing a smart dustbin by using Arduino. This smart dustbin managem…

    45 Pages 1 - 5 Chapters 6,761 Words DOC/PDF Format Instant Download UPN85748

  • INTRODUCTION As the growing population of human race widens the gulf between energy supply and energy demand, the imbalance in energy availability sent researchers into excavating for a way of settling this age long squabble. A lasting solution is vested on alternative use of the renewable energy source, a project that is yet to be widely applied. Hence, the continuation of the unsettled yearns for sufficient power. Consequently, the p […]

    51 Pages 1 - 5 Chapters 5,437 Words DOC/PDF Format Instant Download UPN63942

  • To start a project on Design And Construction Of Automatic Fence Light Controller, follow these guidelines: The very fundamental reasons behind this project assignment is to expose student to the very important aspect of private and independent research work not only theories but also subsequent translation of the theoretical research work into a particular function system. The project construction of …

    25 Pages 1 - 5 Chapters 2,587 Words DOC/PDF Format Instant Download UPN63990

  • To develop a project on Design And Construction Of Automatic Change-Over For Three Phases, follow these approaches: The main aim of any electric power supply in the world is to provide uninterrupted power supply at all times to all its consumers. Although in developing countries, the electric power generated to meet the demands of the growing consumers of electricity is insufficient hence instability and outag…

    50 Pages 1 - 5 Chapters 6,521 Words DOC/PDF Format Instant Download UPN64102

  • To undertake a project on Design And Construction Of Arduino Based Traffic Lights System With Vehicle Counter, follow these effective ways: This project work is on design and construction of a traffic lighting system with vehicle counter. This device was designed to replace a manual traffic control and vehicle method. The device is a portable traffic light unit which can be best utilized in controlling traffic flow in a high way. The…

    54 Pages 1 - 5 Chapters 7,936 Words DOC/PDF Format Instant Download UPN64385

  • To write a project on Design And Construction Of An Intelligent Vehicle Over Speed Detection And Reporting System Using Arduino And GSM, follow these structure: This device is capable of detecting over speed vehicles running on road, Over speeding vehicle make lot of nuisance sometimes also leading to loss of lives and other damages. Project has two parts hardware part and software part. The central and intelligent unit of the model is arduino. Hardware …

    40 Pages 1 - 5 Chapters 5,146 Words DOC/PDF Format Instant Download UPN64714

Live Chat