Advertisement
current sensor circuit

Current Sensor Module For Microcontrollers w/ ACS712

The title says it all – this article describes a microcontroller-compatible current sensor module you can build yourself, using an inexpensive 8-pin chip as an ‘active shunt’ for measuring ac/dc current levels upto 20 Amperes. First of all, note that the circuit as it stands is only really intended to show how a basic current sensor module can be built and act as a stimulus for further improvement.

The design is centered around a fully integrated, linear current sensor ACS712 from Allegro. The sensor (in SOIC8 package) consists of a precise, low-offset, linear Hall-effect sensor circuit with a copper conduction path located near the surface of the die.

Applied current flowing through this copper conduction path generates a magnetic field which is sensed by the integrated Hall-effect sensor and converted into a proportional voltage. The output of the ACS712 has a positive slope (>VIOUT(Q)) when an increasing current flows through the primary copper conduction path (from pins 1 and 2, to pins 3 and 4), which is the path used for current sensing.

Schematic of the ACS712 Current Sensor Circuit

current sensor circuit

(tested circuit diagram of the current sensor module)

The internal resistance of this conductive path is 1.2 mΩ typical, providing low power loss. The do-it-yourself module described here is a simple carrier for Allegro’s ±20A ACS712 linear current sensor. This 5VDC operated little module accepts a bidirectional current input, and outputs an analog voltage (66 mV/A) centered at 2.5 V (Vcc/2) with a typical error of less than 1.5%.

It is better to rig up the whole circuit using smd components on a dedicated printed circuit board. The PCB should made with 2-oz copper to reduce unnecessary power loss in the circuit board. Photograph of a readymade ACS712 current sensor module is included here as an example.

current sensor module

current sensor module

However, for those with poor smd soldering skills, a small common prototyping board and leaded components (excluding the ACS712) are recommended. Use of an ‘SOIC8 to DIP8’ adapter (for ACS712) will make this construction task sweet and simple.

Regulated 5VDC is required to power up the finished module. The red LED in the circuit indicates the presence of the input supply. The nominal output voltage is 2.5VDC at zero current. When DC load connected to the module draws current, this output voltage will deviate from 2.5V to either 0V or 5V depending on polarity of the connected load. However, note that to monitor an AC load you cannot use a DVM (or ADC of a microcontroller) directly. For more information, refer the official datasheet published by Allegro. Luca Dentella has written a great tutorial on how to interface ACS712 current sensor with an Arduino. For more details and Luca’s smashing tutorial, visit: lucadentella.it/en/2011/11/29/sensore-di-corrente-con-arduino/

current sensor testing

Lab Note

My DC 5A load-tested prototype was fabricated on a small prototyping board with leaded and leadless components bought from www.sunrom.com.

One Comments

Join the conversation!

Error! Please fill all fields.