The Core Function of a Sensor: Translating Physics to Voltage
The fundamental function of a sensor is to transduce a physical phenomenon into a measurable electrical signal. In the case of the ACS724 Hall effect current sensor, the physical phenomenon is the magnetic field generated by electrons flowing through a copper conductor. As current passes through the IP+ and IP- terminals, it creates a proportional magnetic flux. Because the current-carrying path is galvanically isolated from the sensor die, this method allows you to measure high-power loads safely without exposing your microcontroller to high voltages.
Inside the IC, a Hall element detects this flux and a differential amplifier scales it into a ratiometric analog voltage. The output is strictly an analog voltage (not a digital I2C or SPI data stream), centered at exactly half of your supply voltage (VCC/2) when zero current is flowing. If you supply 5.0V to the breakout board, the zero-current baseline is 2.5V; current flowing in the forward direction pushes the voltage toward 4.5V, and reverse current pulls it toward 0.5V.
ACS724 Spec Sheet and Wiring Pinout
To interface this sensor with an ESP32 or Arduino, you need to wire both the low-voltage logic side and the high-current load side. The table below maps the pins for a standard 5V breakout board using the ACS724LLCTR-20AB-T (±20A bidirectional) variant.
| Pin / Terminal | Function | Specifications & Constraints |
|---|---|---|
| VCC | Logic Power Supply | 4.5V to 5.5V (Must be clean; 5.0V nominal) |
| GND | Logic Ground | Common ground with microcontroller |
| OUT | Analog Output | 0.5V to 4.5V (Ratiometric to VCC) |
| IP+ | Current Input | Load side positive; max ±20A continuous |
| IP- | Current Output | Load side negative/return |
Wiring Note: The ESP32 operates on 3.3V logic, but its ADC can safely read up to ~3.1V reliably on the default attenuation settings. Because the ACS724 outputs up to 4.5V at full scale, you must either power the sensor at 3.3V (which reduces sensitivity) or use a voltage divider on the OUT pin. The best practice for 2026 ESP32 builds is to power the ACS724 at 5V for maximum sensitivity, and use a simple 10kΩ/10kΩ resistor divider on the OUT pin to scale the 0.5V–4.5V signal down to 0.25V–2.25V, fitting perfectly within the ESP32's linear ADC range.
Output Signal Math: Converting Raw ADC to Amps
The most common mistake makers make with Hall effect sensors is treating the ADC reading as an absolute number. Because the output is ratiometric, the physical voltage changes if your VCC sags. Furthermore, the ESP32's 12-bit ADC (0-4095) is notoriously non-linear at the extremes. Always convert the raw ADC reading to millivolts first using the ESP32 Arduino Core's built-in calibration function.
The Raw-to-Unit Formula:
Current (A) = (V_measured - V_offset) / Sensitivity
For the ACS724LLCTR-20AB-T powered at exactly 5.0V, the datasheet specifies a sensitivity of 132 mV/A. The zero-current offset (V_offset) is VCC/2, or 2500 mV.
Worked Numeric Example:
Assume your ESP32 reads the voltage divider and calculates the actual sensor output as 2832 mV.
1. Delta Voltage = 2832 mV - 2500 mV (offset) = 332 mV.
2. Current = 332 mV / 132 mV/A = 2.51 Amps.
If the reading was 2168 mV, the delta is -332 mV, meaning current is flowing backward at -2.51A.
// ESP32 Arduino Core v2.x / v3.x Current Reading
const int sensorPin = 34; // ADC1_CH6
const float vccMilliVolts = 5000.0; // Measure your actual 5V rail with a DMM
const float sensitivity = 132.0; // mV/A for 20A bidirectional variant
const float offset = vccMilliVolts / 2.0;
void setup() {
Serial.begin(115200);
analogReadResolution(12);
// Set attenuation to 11dB for full 0-3.1V range on ESP32
analogSetPinAttenuation(sensorPin, ADC_11db);
}
void loop() {
// analogReadMilliVolts uses ESP32's internal eFuse calibration data
int rawMV = analogReadMilliVolts(sensorPin);
// If using a 1:1 voltage divider, multiply by 2 to get actual sensor mV
float actualSensorMV = rawMV * 2.0;
float currentAmps = (actualSensorMV - offset) / sensitivity;
Serial.printf("Current: %.2f A\n", currentAmps);
delay(250);
}
Interference, Noise, and Calibration Fixes
Hall effect sensors are incredibly useful, but they are highly susceptible to specific environmental interference. If your readings are jittery or drifting, check these three culprits:
- External Magnetic Fields: The sensor cannot distinguish between the magnetic field generated by your load current and the field from a nearby stepper motor, transformer, or neodymium magnet. Keep the sensor at least 2 inches away from inductive components. If you must mount it near a motor, use a mu-metal shield or average 50+ samples in software to smooth out AC ripple.
- VCC Ripple (Ratiometric Error): If your 5V supply has 100mV of switching noise from a cheap buck converter, your sensor output will inherit that noise, masquerading as current spikes. Power the sensor from a dedicated LDO (like an LM7805 or AMS1117-5.0) rather than sharing the noisy 5V rail of a high-power motor driver.
- Thermal Drift: The ACS724 has a typical offset drift of ±15 mA/°C. If your enclosure heats up by 30°C during operation, your zero-point will shift by ~450 mA. Always implement a software 'tare' function that reads the sensor at startup (when the load is known to be off) and sets that as the dynamic V_offset.
V_offset variable. This eliminates board-to-board manufacturing tolerances.
Decision Tree: Which Current Sensor Should You Actually Buy?
Not every project requires a Hall effect sensor. Use this decision path to select the correct current sensing topology for your embedded build:
| If your project requires... | Then choose this technology... | Specific Part Recommendation |
|---|---|---|
| High precision (<10mA resolution), low current (<3.2A), and digital I2C output | High-side I2C Shunt Monitor | INA219 or INA226 Breakout |
| Galvanic isolation, bidirectional AC/DC, and 5A to 30A range | Hall Effect IC (Analog) | ACS724 (Bidirectional variant) |
| Massive currents (50A to 200A+) for battery banks or EV builds | External Shunt + Isolated Amplifier | 75mV/50A Shunt + INA138 or Hall module like HTFS 200-P |
The Default Pick: If you are building a general-purpose ESP32 or Arduino project involving DC motor control, solar charge monitoring, or battery capacity tracking in the 5A to 20A range, buy the ACS724LLCTR-20AB-T (±20A bidirectional) breakout board. It costs roughly $4 to $6 on standard maker marketplaces, provides vital galvanic isolation to protect your microcontroller from inductive kickback, and outputs a simple analog voltage that requires no complex I2C library debugging. Pair it with a clean 5V LDO and a voltage divider, and you will have a robust, bench-grade current measurement system.






