Interfacing ACS712 Current Sensor With Arduino – Measure Current With Arduino

In this article, we will talk about ACS712 Current Sensor and how a “Hall Effect” based current sensor works and how to interface it with Arduino.

A current sensor is a must in power calculation and management applications. It measures the current that flows through a device or a circuit and gives us the appropriate signal that is proportional to the current measured. Usually, the output signal is an Analog voltage.

About ACS712 Current Sensor

The ACS712 current sensor is a device based on Allegro MicroSystems which can be used to measure both AC and DC currents precisely. This sensor is made with Hall Effect and the IC got an integrated Hall Effect mechanism.

The output of the ACS712 current sensor produces an Analog voltage proportional to AC or DC currents (whichever is sensed).

ACS712 Current Sensor Module

One of the variants of the ACS712 IC (5A, 20A or 30A) is used in this project, several manufacturers developed ASC712 current sensor module boards that are very easy to interface with Arduino.

As we can see, it is a simple board with only a few components including the ASC712 IC and some passive components and connectors.

This specific board consists of ASC712 ELC-30 i.e., the effective range of this board is +/- 30A. As we can see the components and the pins on the board in the image.

Interfacing ASC712 Current Sensor With Arduino

Measuring voltages (DC Voltages) using Arduino is a very easy task. If you want to measure less than or equal to 5V, then you have to directly measure using the Arduino Analog pins. If you are required to measure more than 5V, then you have to use a simple voltage divider network or a voltage sensor module.

When it’s time to measure current, Arduino (or any other microcontroller) requires the assistance of a dedicated current sensor. So, Interfacing an ACS712 current sensor with Arduino helps us measure the current with the help of Arduino.

ASC712 is used to measure either AC or DC currents, and Arduino can be used to measure the same.


ACS712 Current Sensor

Circuit Diagram

ACS712 Current Sensor Circuit Diagram

Components Required

  • Arduino UNO
  • ASC712 Current Sensor Module
  • 16×2 LCD Display
  • I2C Display Module
  • 10KΩ Potentiometer
  • 330Ω Resistor
  • Connecting Wires
  • Load
  • 5V Power Supply

PCB Design

After designing the schematic diagram of the ACS712 Current Sensor, the assembled components and wiring are too clumsy and looked very unprofessional. In fact, the wiring also has a chance of loose connection. To give it a clean and professional look and also to compress the size, I decided to build its PCB prototype using EasyEDA software as it is so simple to use. Now come to the main part, where we need to order our PCB prototype. I always prefer PCBWay for their quality assurance, fastest delivery and also for 24/7 customer support.

PCB View

ACS712 Current Sensor 2D View
2D View
ACS712 Current Sensor 3D View
3D View

Why I Choose PCBWay as My First Preference?

I’ve done several runs with PCBWay and am happy with the results, it’s good quality. It is one of the most experienced PCB manufacturing companies based in China with an experience of more than a decade in the field of PCB prototype and fabrication. PCBWay has always been committed to technological innovation and meeting the needs of their customers from different industries in terms of quality, delivery, cost-effectiveness and any other demanding requests. The etching, solder mask, and hole sizes are all done well and that is what matters to me. It takes a few hours for a design to get approved and then a couple of days to finish and ship.

With more than a decade in the field of PCB prototypes and fabrication, PCBWay has proved its assurance from time to time. They always look at the customer’s needs from different regions in terms of quality, on-time delivery, cost-effectiveness and any other demanding requests.

PCBWay Gold Finish
PCBWay Thickness

These PCBs were manufactured by PCBWay and the finish quality really impressive, especially with the gold finish path. If you want to finish your product faster you could also ask PCBWay to make a panelized order where you receive multiple PCBs in a single panel. With this, you will also receive SMT Stencil from PCBWay, saving you time and effort. All the orders are high quality and could select a lot of settings such as thickness, flexible PCB, the colour of the solder masks, the number of layers, material, surface finish and more.

How to Order PCB from PCBWay?

Working Principle of ACS712 Current Sensor

As we discussed earlier, the ASC712 is made with Hall Effect. It is a copper strip that connects the IP+ and IP- pins internally. When some current goes through this copper conductor, a magnetic field is created that is sensed by the Hall Effect sensor. Now the Hall Effect sensor’s part is to convert this magnetic field into appropriate voltage. The input and the output are completely isolated in this process.

Arduino Code

Leave a Comment