• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Battery Charger Circuits / Arduino based Battery Over Discharge Protection Circuit

Arduino based Battery Over Discharge Protection Circuit

Last Updated on November 4, 2020 by Swagatam 37 Comments

In this post, I will show how to construct a over discharge protection circuit for 12v battery using Arduino   which can protect 12V SLA battery against over discharge, and also protect the connected load from over voltage in case of overcharged battery is connected.

Table of Contents
  • Understanding Battery Charge/Discharge Rates
  • How it Works
  • Program Code:
  •  How to calibrate:

Understanding Battery Charge/Discharge Rates

All the batteries have natural decline, but most of them get damaged due to ignorance from the users part. The life span of battery will get shorten if the voltage of a battery goes below certain degree, in case of 12V SLA battery, it must not go below 11.80 V.

This project could be accomplished with comparators, but here we are using microcontroller and coding to accomplish the same.

This circuit is well suitable for resistive loads and other loads which don’t generate noise in the supply during operation. Try to avoid inductive loads such as brushed DC motors.

Microcontrollers are sensitive to noise and this setup may read error voltage values in such case, and it may cut-off the battery from load at wrong voltage.

How it Works

warning message: electricity is dangerous, proceed with caution
Arduino based Battery Over Discharge Protection

The discussed over discharge protection circuit for 12v battery consists of a voltage divider which is responsible for stepping down the input voltage and reduce to narrow range where arduino can read the voltage.

The 10k pre-set resistor is used to calibrate the readings on arduino; these readings are used by arduino to trigger the relay, the calibration of this setup will be discussed later part of the article.

A LED indicator is utilized for indicating the status of the relay. The transistor drives the relay on/off and a diode is connected across the relay for arresting high voltage spike generated from relay, while switching it on/off.

When the battery voltage goes below 11.80V, the relay gets turned on and disconnects the battery from load and LED indicator also turns on, this happen same when the circuit reads overvoltage from the battery, you can set the overvoltage cut-off in the program.

When the battery goes below 11.80V, the relay disconnect the load, the relay will reconnect the load to battery only after when the battery voltage attains above nominal voltage which is set in the program.

The nominal voltage is normal operating voltage of the load. The above stated mechanism is done because; the battery voltage rise after disconnecting from load and this must not trigger the relay ON at low battery state.

The nominal voltage in the program set as 12.70 V which is full battery voltage of typical 12V SLA batteries (Full battery voltage after disconnecting from charger).

Program Code:

//---------Program developed by R.Girish----------//
float cutoff = 11.80; //Cutoff voltage
float nominal = 12.70; //Nomial Voltage
float overvoltage = 14.00; //Overvoltage
int analogInput = 0;
int out = 8;
float vout = 0.0;
float vin = 0.0;
float R1 = 100000;
float R2 = 10000;
int value = 0;
int off=13;
void setup()
{
pinMode(analogInput,INPUT);
pinMode(out,OUTPUT);
pinMode(off,OUTPUT);
digitalWrite(off,LOW);
Serial.begin(9600);
}
void loop()
{
value = analogRead(analogInput);
vout = (value * 5.0) / 1024;
vin = vout / (R2/(R1+R2));
if (vin<0.10)
{
vin=0.0;
}
if(vin<=cutoff)
{
digitalWrite(out,HIGH);
}
if(vin>=nominal && vin<=overvoltage && vin>cutoff)
{
digitalWrite(out,LOW);
}
if(vin>=overvoltage)
{
digitalWrite(out,HIGH );
delay(10000);
}
Serial.println("INPUT V= ");
Serial.println(vin);
delay(1000);
}
//---------Program developed by R.Girish----------//

Note:

float cutoff = 11.80;            //Cutoff voltage
float nominal = 12.70;           //Nomial Voltage
float overvoltage = 14.00;       //Overvoltage

You can change the cut-off, nominal and overvoltage by changing the above values.
It is recommended not modify these values unless you are working with different battery voltage.

 How to calibrate:

The calibration for this battery over discharge protection circuit must be done carefully; you need a variable power supply, a good multimeter and a screw driver for adjusting the pre-set resistor.

1)    The completed setup is connected to variable power supply without load.
2)    Set the 13 volt on the variable power supply, verify this using multimeter.
3)    Open the serial monitor and rotate the 10k preset resistor clock or counter clock wise and bring the readings close to the readings of multimeter.
4)    Now, reduce the voltage of variable power supply to 12V, the multimeter and serial monitor must read same or very close value.
5)    Now, reduce the voltage to 11.80 V the relay must trigger on and LED must light up.
6)    Now, increase the voltage to 14.00V the relay must trigger on and LED light up.
7)    If the above sets are successful replace the variable power supply with a fully charged battery, the readings on serial monitor and multimeter must be same or very close to same.
8)    Now connect the load, the readings on both must remain same and synchronized.
If the above steps are successful your circuit is ready to serve the battery.

NOTE: 

Please note this point while calibrating.

When the relay is triggered on due to low voltage cut-off or due over voltage cut-off, the readings on serial monitor will not read the correct voltage as on multimeter, and shows higher or lower than on multimeter.

But, when the voltage falls back to normal operating voltage the relay will turns off and starts showing correct voltage.

The conclusion of the above point is that, when the relay is trigged ON, the readings on the serial monitor show some significant variation and you need not to calibrate again at this stage.

You'll also like:

  • 1.  Lithium Polymer (Lipo) Battery Charger Circuit
  • 2.  Single Transformer Inverter/Charger Circuit
  • 3.  Simple 48V Automatic Battery Charger Circuit
  • 4.  Make a Battery Charger in 15 Minutes
  • 5.  Battery Charger Problems Troubleshooting Discussed
  • 6.  Self Regulating Battery Charger Circuit

Filed Under: Battery Charger Circuits Tagged With: Arduino, Based, Battery, Discharge, Over, Protection

About Swagatam

I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!

Previous Post: « Timer Controlled Submersible Pumpset Circuit
Next Post: 1.5V Power Supply Circuit Diagram for Wall Clock »
Subscribe
Notify of
guest


guest
37 Comments
Inline Feedbacks
View all comments

Primary Sidebar

circuit simulator image

Subscribe to get New Circuits in your Email

Categories

  • Arduino Projects (90)
  • Audio and Amplifier Projects (132)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (83)
  • Datasheets and Components (106)
  • Electronics Theory (143)
  • Free Energy (37)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (19)
  • Health related Projects (25)
  • Home Electrical Circuits (12)
  • Indicator Circuits (15)
  • Inverter Circuits (89)
  • Lamps and Lights (142)
  • Meters and Testers (71)
  • Mini Projects (46)
  • Motor Controller (64)
  • Oscillator Circuits (28)
  • Pets and Pests (15)
  • Power Supply Circuits (108)
  • Remote Control Circuits (50)
  • Security and Alarm (64)
  • Sensors and Detectors (103)
  • Solar Controller Circuits (59)
  • Temperature Controllers (42)
  • Timer and Delay Relay (49)
  • Transmitter Circuits (29)
  • Voltage Control and Protection (40)
  • Water Controller (36)

Other Links

  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

People also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Quora
  • Stack Exchange
  • Linkedin
  • Recent Comments

    • Swagatam on Understanding Capacitor Codes and Markings
    • Swagatam on Mains High Low Voltage Protection Circuit with Delay Monitor
    • Swagatam on 3 Phase Induction Motor Speed Controller Circuit
    • Swagatam on Smart Bathroom Exhaust Fan Controller Circuit with Sensors
    • James Williams on 3 Phase Induction Motor Speed Controller Circuit

    © 2025 · Swagatam Innovations