0% found this document useful (0 votes)
10 views3 pages

Usecase 19

The document outlines the development of a Battery Protection System using Arduino to safeguard against over-voltage, under-voltage, and short circuits. It details the components used, wiring connections, and Arduino code for real-time monitoring and fault detection. The system alerts users through a buzzer and LED indicators while displaying battery status on an LCD, ensuring battery safety and longevity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Usecase 19

The document outlines the development of a Battery Protection System using Arduino to safeguard against over-voltage, under-voltage, and short circuits. It details the components used, wiring connections, and Arduino code for real-time monitoring and fault detection. The system alerts users through a buzzer and LED indicators while displaying battery status on an LCD, ensuring battery safety and longevity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

⚡ Use Case 19: Battery Protection System

🎯 Objective:
Develop hardware that protects the battery from over-voltage, under-voltage, and short circuits using Arduino and safety mechanisms.

📋 Components Used (From Your List)


Component Purpose

Arduino Uno Main microcontroller for monitoring and control

Voltage Sensor (x3) Measures voltage of individual battery cells

Current Sensor (ACS712) Detects overcurrent or short circuits

Relay Module Disconnects battery in case of fault

Buzzer Alerts user when a fault is detected

LCD Display (I2C) Displays real-time battery status

LED Indicators (Red/Green) Shows normal and fault conditions

🔌 Pin Connections & Wiring Details


Component Arduino Pin

Voltage Sensor 1 A0

Voltage Sensor 2 A1

Voltage Sensor 3 A2

Current Sensor (ACS712) A3

Relay Module D4

Buzzer D5

LED (Green - Normal) D6

LED (Red - Fault) D7

LCD Display (I2C) SDA/SCL

📜 Arduino Code for Battery Protection System


#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// LCD setup
LiquidCrystal_I2C lcd(0x27, 16, 2);

// Sensor and control pins


#define VOLTAGE_SENSOR_1 A0
#define VOLTAGE_SENSOR_2 A1
#define VOLTAGE_SENSOR_3 A2
#define CURRENT_SENSOR A3
#define RELAY_PIN D4
#define BUZZER_PIN D5
#define LED_GREEN D6
#define LED_RED D7

// Battery protection thresholds


float MAX_VOLTAGE = 4.2; // Max safe voltage per cell
float MIN_VOLTAGE = 3.0; // Min safe voltage per cell
float MAX_CURRENT = 5.0; // Max safe current (A)

void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
lcd.backlight();

pinMode(VOLTAGE_SENSOR_1, INPUT);
pinMode(VOLTAGE_SENSOR_2, INPUT);
pinMode(VOLTAGE_SENSOR_3, INPUT);
pinMode(CURRENT_SENSOR, INPUT);
pinMode(RELAY_PIN, OUTPUT);
pinMode(BUZZER_PIN, OUTPUT);
pinMode(LED_GREEN, OUTPUT);
pinMode(LED_RED, OUTPUT);

digitalWrite(RELAY_PIN, HIGH); // Battery connected


digitalWrite(BUZZER_PIN, LOW);
digitalWrite(LED_GREEN, HIGH);
digitalWrite(LED_RED, LOW);
}

void loop() {
// Read voltage values
float voltage1 = analogRead(VOLTAGE_SENSOR_1) * (5.0 / 1023.0) * 5;
float voltage2 = analogRead(VOLTAGE_SENSOR_2) * (5.0 / 1023.0) * 5;
float voltage3 = analogRead(VOLTAGE_SENSOR_3) * (5.0 / 1023.0) * 5;

// Read current value


float rawCurrent = analogRead(CURRENT_SENSOR);
float current = (rawCurrent - 512) * (5.0 / 1023.0) * 30.0; // Convert to amperes

// Display values on LCD


lcd.clear();
lcd.setCursor(0, 0);
lcd.print("V1:");
lcd.print(voltage1, 2);
lcd.print("V V2:");
lcd.print(voltage2, 2);
lcd.print("V");

lcd.setCursor(0, 1);
lcd.print("V3:");
lcd.print(voltage3, 2);
lcd.print("V I:");
lcd.print(current, 2);
lcd.print("A");

// Check for over-voltage, under-voltage, or overcurrent


if (voltage1 > MAX_VOLTAGE || voltage2 > MAX_VOLTAGE || voltage3 > MAX_VOLTAGE ||
voltage1 < MIN_VOLTAGE || voltage2 < MIN_VOLTAGE || voltage3 < MIN_VOLTAGE ||
current > MAX_CURRENT) {

digitalWrite(RELAY_PIN, LOW); // Disconnect battery


digitalWrite(BUZZER_PIN, HIGH);
digitalWrite(LED_GREEN, LOW);
digitalWrite(LED_RED, HIGH);
lcd.setCursor(10, 1);
lcd.print("FAULT!");
} else {
digitalWrite(RELAY_PIN, HIGH); // Keep battery connected
digitalWrite(BUZZER_PIN, LOW);
digitalWrite(LED_GREEN, HIGH);
digitalWrite(LED_RED, LOW);
}
Serial.print("V1: ");
Serial.print(voltage1);
Serial.print("V | V2: ");
Serial.print(voltage2);
Serial.print("V | V3: ");
Serial.print(voltage3);
Serial.print("V | I: ");
Serial.print(current);
Serial.println("A");

delay(1000);
}

🔧 How the System Works


1 Real-Time Voltage & Current Monitoring
1️⃣

● Voltage sensors measure each battery cell’s voltage

● Current sensor (ACS712) monitors current draw

2️⃣Fault Detection

● Over-voltage protection: If any cell voltage > 4.2V, relay disconnects battery

● Under-voltage protection: If any cell voltage < 3.0V, relay disconnects battery

● Short Circuit Protection: If current > 5A, battery disconnects

3️⃣Alerts & Safety Mechanisms

● Buzzer and Red LED turn on if a fault is detected

● LCD displays real-time voltage and current

● Relay module disconnects battery for safety

✅ Final Outcome
✔ Monitors voltage & current in real-time
✔ Automatically disconnects battery on over-voltage, under-voltage, or overcurrent
✔ Alerts user using LCD, buzzer, and LED indicators
✔ Prevents battery damage and increases lifespan

You might also like