Current Sensor ACS712 Using ArduinoHello guys! In this lesson, we will talk about ACS712 Current Sensor, working of current sensor and at the end how to interface the ACS712 Current Sensor with Arduino.[otw_is sidebar=otw-sidebar-1]

Current Sensor ACS712 Using Arduino

A Current Sensor is a main device in power measuring and management applications. It calculates the current passing through a device or a circuit and generates a proper signal that is proportional to current measured. Mostly, the output signal is in the form of analog voltage.


The ACS712 Current Sensor is a byproduct of Allegro Micro Systems that can be utilized for accurate measurement of both Alternate Current and Direct current. This sensor is constructing on Hall Effect and the IC has an integrated Hall Effect component.

Current Sensor ACS712 Using Arduino, ACS712  ArduinoComing to the output of the Current Sensor, it gives us an analog voltage that is proportional to Alternate Current and Direct current whichever is being sensed.

ACS712  Pin Configuration:

The ACS712 IC is accessible in an 8-lead SOIC package and the following diagram shows its pins.

Pin No Pin Name Description
1 IP+ Terminal for sensing positive current
2 IP+ Terminal for sensing positive current
3 IP- Terminal for sensing negative current
4 IP- Terminal for sensing negative current
5 GND Signal Ground
6 FILTER External Capacitor
7 VIOUT Analog Output
8 VCC Power Supply

Interfacing Current sensor with Arduino:

Calculating DC Voltages with Arduino is very simple. If your requirement is to calculate less than or equal to 5v, then you can directly calculate by using the Arduino Analog Pins. If you need to calculate more than 5v, then you can utilize a simple voltage divider or a voltage sensor.

When it comes to measuring current, Arduino required assistance from a dedicated Current Sensor. So, in the Interfacing of an ACS712 Current Sensor with Arduino guide us in calculating current with the help of Arduino. As ASC712 can be utilized for measuring either AC or DC currents, Arduino can be applying to measure the same.

Component Required

Push button




Virtual Terminal

Circuit Design

Firstly connect the push button with the bulb and the other terminal of the bulb will be attached with Current Sensor pin 3.  The other terminals of the ASC712 Current Sensor board are attached in series with the power supply as shown in the circuit diagram above.

Then join the Vcc, GND and OUT of the Current Sensor board to 5v, GND and A0 pin of Arduino.


Make the connections and loaded the code to Arduino. In the code, there is a tiny calculation for measuring the current.

First, suppose the Vcc to ASC712 is 5V, when there is no current passing through the IP positive and IP negative terminals, the output voltage at VIOUT of ACS712 is 2.5V. This means that you have to subtract 2.5V from the voltage calculated at the analog pin. Afterthat you will see the result on the screen.


The ACS712 can be utilizing in many current measuring applications like:

  • Inverters
  • SMPS
  • Battery Charges

So this is it. I hope you consider this guide useful. Let me know if you required any help with its projects. Will meets you guys next time. Till then take care, have more fun.


Current Sensor ACS712 Arduino code library voltage circuit