ACS712 Current Module Features
ACS712 chip is used to measuer DC/AC current based on the Hall effect. This chip is produced in 3 models with different maximum currents. Different models and output sensitivity of each model are shown in the table below:
Sensor sensitivity means that, for example, if you use 5 amp model, as input current increase 1 amp, the output voltage of the sensor increases about 185 mV.
When input is not connected to something and there is no load on output, the sensor has an initial voltage (Offset) of Vcc/2. That is, if nothing is connected to the input and the supply voltage of the module is 5 volts, the output of the module will be 2.5 volts.
As a result, the relationship between the output voltage of the sensor with 5 amp and the supply voltage of 5 volts is as follows:
You can download the ACS712 chip datasheet here.
ACS712 Current Module Pinout
ACS712 module has 3 pins as below:
- VCC: Power supply – 5 Volt
- GND: Ground
- OUT: Module output which is in the form of analog voltage.
You can see the pinout of this module in following image:
Interfacing ACS712 Current Module with Arduino
Step 1: Circuit
Connect the module to the Arduino according to the following diagram. You can connect the sensor output to any of the Arduino ADC pins.
Step 2: Code
Upload the following code to your Arduino board.
This code reads the output value of the sensor 500 times and averages it. It then displays the result in 3 different ways in the serial monitor.
/* ACS712 Current Sensor modified on 06 Sep 2020 by Mohammad Reza Akbari @ Electropeak
When there is no load on the sensor’s input, you will have the same result as the following image.
When there is 1 amp bar on module, you should see something like this: