How to Measure Current using AC712


Acs712 Hall Effect-Based Linear Current Sensor is used to measure DC current. A circuit can be made using Acs712 and Arduino Uno to measure current accurately. ACS712 is used to measure both AC and DC current. In this blog, I will provide the code for measuring DC current.

Working and Explanation:

To measure the current use of the current sensor ACS712 in series with the load. The ACS712 has four input pins (VCC, OUT, FILTER, GND) and two output pins (IP+, IP-). Connect the OUT with Arduino, GND with the ground, and Vcc with Vcc. Now connect the one terminal of the load with IP- and the other with the ground. Connect the IP+ with Vcc source. Also to see the result connect the LCD with Arduino.

Components used:

  • Arduino Uno
  • ACS712
  • LCD
  • Connecting wire
  • Battery source
  • Load
Simulation and circuit diagram


#include "LiquidCrystal.h" 
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
double offset = 2.5; 
double sensor = 0.066; 
double current = 0; 
double tension = 0; 
void setup() 
void loop()
double value = analogRead(A1); 
tension= (value*5.0)/1024; 
current= (tension- offset)/sensor; 
lcd.print(current ); 

Leave a Reply