Arduino Projects

Over load monitoring and Protection using Arduino & ACS712 Current sensor

Over Load monitoring ProjectDescription:

over load monitoring

over load monitoring using Arduino- In this tutorial, you will learn how to make an overload monitoring system using Arduino and ACS712 current sensor.  This is the second part of the SCADA application based grid station parameters monitoring system.

While the first part was based on the AC voltage monitoring system. In which we successfully monitored the Normal voltage, overvoltage, and under-voltage. So far we can monitor the voltage and load on our SCADA application, if we increase the voltage above a pre-defined value It will provide the automatic disconnection. while during the normal voltage the led remains ON.  Now if I decrease the voltage below a certain pre-defined value, it will provide automatic disconnection and the led will be turned off. In the end, we will connect a relay with pin number 13 so that in case of overvoltage or under voltage the supply can be disconnected to protect our appliances from any damage.

For demonstration purposes, this project is designed in such a way that it shows normal load for one light bulb and overload status when another bulb is connected or the load is increased. For the best understanding watch video tutorial. The load value can be set in the programming as per your requirements….

In this tutorial, we will cover

  1. ACS712 current sensor Pinouts
  2. Complete circuit diagram
  3. Interfacing
  4. Programming and finally
  5. Testing

Amazon Links:

12v Adaptor:

Arduino Uno

Arduino Nano

acs712 current sensor:

12V SPDT Relay:

One-Channel Relay Module:

Other Tools and Components:

Top Arduino Sensors:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines


Please Note: these are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

over load monitoring

This is the ACS712 current sensor.

over load monitoring

as you can see it has three male headers labeled as vcc..out and ground…vcc will be connected with the Arduino’s 5v..the out pin will be connected with the Arduino’s Analog pin A1 and the ground will be connected with the Arduino’s ground..

over load monitoring Circuit Diagram:

This is the complete circuit diagram of the over load monitoring system, this schematic is designed in cadsoft eagle 9.1.0 version. If you want to learn how to make schematics and pcb’s then watch my tutorial.

This is the ACS712 Current sensor, the vcc is connected with the Arduino’s 5v, the ground is connected with the Arduino’s ground and the out is connected with the Arduino’s analog pin A1…This current sensor is connected in series…The relay is connected with pin number 13 of the Arduino… This relay provides the disconnection when load is increased… For the relay driver circuit design calculations watch my tutorial, the link is given in the description.

Cut any of the two wires and connect the current sensor in series…now let’s fix the current sensor , Arduino and relay module on a hard board….Now its ready for the interfacing…connect red jumper wire with the vcc of the current sensor….connect yellow wire with the out pin of the sensor and finally connect white wire with the ground…now connect red wire with 5v, white wire with the ground and yellow wire with the analog pin A1…connect the relay module with pin number 13… and connect the blue wire which is the ground wire with the Arduino’s Ground…

Over load Monitoring Arduino Programming:

int x,y;
const int currentPin = 1; // current sensor connected with analog pin A1
int relay1 = 13;
int flag1 = 0;
float load = 3;

const unsigned long sampleTime = 100000UL;                           // sample over 100ms, it is an exact number of cycles for both 50Hz and 60Hz mains
const unsigned long numSamples = 250UL;                               // choose the number of samples to divide sampleTime exactly, but low enough for the ADC to keep up
const unsigned long sampleInterval = sampleTime/numSamples;  // the sampling interval, must be longer than then ADC conversion time
const int adc_zero = 510;                                                     // relative digital zero of the arudino input from ACS712 (could make this a variable and auto-adjust it)

void setup()
  pinMode(currentPin, INPUT);
  pinMode(relay1, OUTPUT);
  digitalWrite(relay1, LOW);
void loop()
  unsigned long currentAcc = 0;
  unsigned int count = 0;

  unsigned long prevMicros = micros() - sampleInterval ;
  while (count < numSamples)
    if (micros() - prevMicros >= sampleInterval)
      int adc_raw = analogRead(currentPin) - adc_zero;
      currentAcc += (unsigned long)(adc_raw * adc_raw);

      prevMicros += sampleInterval;

  float rms = sqrt((float)currentAcc/(float)numSamples) * (75.7576 / 1024.0);
 // delay(1000);
 if(( currentAcc >= 2500) && (flag1 == 1)) 

digitalWrite(relay1, HIGH);
Serial.println("load exceeded");
 flag1 = 0; 
 if(( currentAcc < 2500) && (flag1 == 0)) 
digitalWrite(relay1, LOW);
Serial.println("normal Load");
 flag1 = 1; 

Watch Video Tutorial:

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button