Source: https://mokxi.com/parts/acs712
Updated: 2026-11-16

Part

# Current sensor, ACS712

A Hall sensor beside a strip of copper in series with the load: 2.5 V at no current, 185, 100 or 66 mV an amp.

See every part

- 5 pins
- 2 settings
- In 5 projects
- In 1 lesson

Drawn live by the editor's own code, at the size you see it.

At a glance

## The Current sensor, ACS712 in brief

What it is, and every setting the properties panel gives it.

The ACS712 is Allegro’s Hall-effect current sensor on the red kit breakout: a screw terminal, IP+ and IP-, in series with the load, and VCC, OUT and GND for the board. The current flows through 1.2 milliohms of copper, isolated from the electronics. It needs 4.5 to 5.5 V, so on an Uno it goes to 5 V with OUT on A0; on an ESP32 power it from 5 V and divide OUT down, since it rests at 2.5 V and swings toward 5 V. Mokxi models the output as half the supply plus 185, 100 or 66 mV an amp for the -05B, -20A and -30A models, ratiometric, so a 4.8 V USB rail moves the zero to 2.4 V. The noise is the datasheet’s 21, 11 and 7 mV peak to peak, drawn 4000 times a second, so an Uno’s reading jumps a few counts and sketches average; one count is 26 mA on the 5 A board. Rob Tillaart’s ACS712 library compiles. The classic mistake is calling autoMidPoint() while the load already runs. The offset error, drift, nonlinearity near full scale, the breakout’s 1 nF filter and heating of the copper are not modeled.

Family

Sensors

Pins

5

model

ACS712-05B (or ACS712-20A, ACS712-30A, ACS758LCB-050B, ACS758LCB-050U, ACS758LCB-100B, ACS758LCB-100U, ACS724LLCTR-05AB, ACS724LLCTR-10AB, ACS724LLCTR-20AB, ACS724LLCTR-30AB, ACS724LLCTR-50AB)

noise

true

A circuit built around it, running and explained: the ACS712 current sensor simulator.

Pins

## 5 pins

Named as the editor names them, so a wire lands where you expect it.

Pin

What it does

IP+

One end of the copper, a screw terminal. Current in here raises OUT.

IP-

The other end.

VCC

Supply, 4.5 to 5.5 V (the ACS758: 3 to 5.5 V). The ACS712 is not a 3.3 V part.

OUT

The analog output: half the supply at no current (a tenth or so of it on a unidirectional U part).

GND

Ground.

How to use it

## How to use the ACS712 current sensor with an Arduino

VCC to 5 V, GND to GND and OUT to A0. The screw terminal goes in series with the load: here the bench supply’s plus runs through a push button to IP+, and IP- goes on to the motor. Current into IP+ raises OUT from 2.5 V by 185 mV an amp on the 5 A board.

The ACS712 library does the sums: ACS712 ACS(A0, 5.0, 1023, 185), then ACS.autoMidPoint() in setup and ACS.mA_DC(10) for an averaged reading. Call autoMidPoint() while nothing flows, which is why the motor here waits for the button. With the motor already on, its current becomes the zero. One count on an Uno is 26 mA, and the noise moves the reading by a few counts, so always average.

Part pin

Board pin

VCC

5 V

GND

GND

OUT

A0

IP+

Supply V+, through the button

IP-

Motor

The ACS712 needs 4.5 to 5.5 V, so on an ESP32 power it from 5 V and put a divider on OUT: it rests at 2.5 V and passes 3.3 V above about 4.3 A on the 5 A board.

Hold the button

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

Zero, then read, from the motor current meter

How it is modeled

## What is true about the Current sensor, ACS712, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Modeled

From the Allegro ACS712, ACS758xCB and ACS724 datasheets:

The output. OUT = zero + sensitivity x current: 2.5 V at no current on 5 V,
and the model's millivolts more for each amp from IP+ to IP-, less for each amp
the other way. A 2 A load on the ACS712 5 A board reads 2.87 V. A unidirectional
part (U) starts at 0.6 V on 5 V and reads current one way only.

Ratiometric. Both the zero and the sensitivity are in proportion to the supply.
On a USB port's 4.8 V the zero is 2.4 V and the 5 A board gives 177.6 mV an amp. (The
ACS724's sensitivity moves 1.3 times as much as the supply, as its datasheet gives.)
A sketch that reads the converter against the same supply cancels most of that; one
that assumes 2.5 V reads a current that is not there.

The noise. 21, 11 and 7 mV peak to peak for the three ACS712 models, a new value
4000 times a second, which is the figure and the 2 kHz bandwidth the datasheet quotes
it at. The ACS758's are its datasheet's 10, 15, 6 and 12 mV (three sigma either way),
and the ACS724's its 150 µA per root hertz over the same 2 kHz, about 8 mA. On an Uno
one converter step is 4.9 mV, so the ACS712 5 A board's reading jumps by a few steps
and the 30 A board's by about one. Average a hundred readings and it settles.

The resolution. One step on a 5 V, 10-bit converter is 26 mA on the ACS712 5 A
board, 49 mA on the 20 A and 74 mA on the 30 A, and 122 mA on the ACS758 50 A. Small
currents need the 5 A board, the ACS724 5 A (12 mA a step), or an INA219.

### Not modeled

The common ACS712 board's filter capacitor is 1 nF, which leaves more of the chip's
80 kHz bandwidth, and more noise, than the datasheet's 2 kHz figure: a real board
jumps more than this one. The chip's offset (here the zero is exactly half the supply; a real
one is a few millivolts off, which is why sketches measure it), the 1.5% total error,
temperature drift, the nonlinearity near full scale, where the output stops past full
scale (here at the rails), the microseconds of response time, the ACS758's extra
error away from 5 V, and the heating of the copper are not modeled.

From ACS712 current sensor, in full.

Projects

## See the Current sensor, ACS712 in a project

5 built-in projects use it. Each opens in the editor, already wired.

Lessons

## Where it turns up in a lesson

One lesson places it in its own circuit.

### Learn articles

1 lesson

- Arduino ACS712 Current Sensor: Wiring and Code

Boards

## The boards it is shown on

This board has a built-in project with the Current sensor, ACS712 in it.

- Arduino Uno R3

Libraries

## Arduino libraries for the Current sensor, ACS712

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

- ACS712
- EmonLib

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the Current sensor, ACS712

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
