Home / Wiki / Sensor / Electric
ACS712 current sensor


This is ACS712 current sensor module, it can detect the AC(analog current) and DC(digital current), there is a sensor named ACS712 used in the ACS712 sensor module, the sensor can detect the current range from -5A to 5A and the output voltage is 185mV/A, when three’s no current have be detect, the output voltage is half of the VCC. when detect the current by Arduino, we use the analog I/O port. The principle of it is based on the hall-effect, so, remember that avoid to measure the current in the magnetic file.   



Supply Voltage: 4.5 to 5.5V DC

Measure Current Range: -5A to 5A

Sensitivity: 180mV/A to 190mV/A,

Typical: 185mV/A


void setup() {




void loop() {

 float average = 0;

 for(int i = 0; i < 1000; i++) {

     average = average + (.0264 * analogRead(A0) -13.51);//for the 5A mode,  

//   average = average + (.049 * analogRead(A0) -25);// for 20A mode

// average = average + (.742 * analogRead(A0) -37.8);// for 30A mode



 Serial.print("Current :");