Shop by category
Shop all componentsSensors & MCUs
Noise is typically ±100 mA, so average many samples. For AC, sample for a full cycle and calculate the RMS of the readings.
V out = reading ÷ 2^bits × V refI = (V out − Vcc ÷ 2) ÷ sensitivitySensitivity = module mV/A × Vcc ÷ 5 VACS712-20A on 5 V with a 10-bit, 5 V ADC reading 614: V = 614 ÷ 1024 × 5 = 2.998 V, so I = (2.998 − 2.5) ÷ 0.1 = 4.98 A. One ADC count equals about 49 mA.
The ACS712 is a Hall-effect sensor that outputs half of its supply voltage at zero current and moves up or down with the current. It measures both AC and DC and keeps the measured circuit electrically isolated from your microcontroller.
Its output scales with supply voltage, so use the real Vcc. With a 3.3 V board such as the ESP32, the 5 V output needs a divider, and remember that the divider changes the zero point and the resolution.
185 mV/A for the 5 A module, 100 mV/A for 20 A and 66 mV/A for 30 A, at 5 V supply.
The zero point sits at half the supply and drifts slightly. Measure the no-load reading and subtract it.
The module needs 5 V. Divide its output to keep it under 3.3 V at the ADC, and adjust the calculation.
V out = reading ÷ 2^bits × V ref; I = (V out − Vcc ÷ 2) ÷ sensitivity; Sensitivity = module mV/A × Vcc ÷ 5 V.
ACS712-20A on 5 V with a 10-bit, 5 V ADC reading 614: V = 614 ÷ 1024 × 5 = 2.998 V, so I = (2.998 − 2.5) ÷ 0.1 = 4.98 A. One ADC count equals about 49 mA.
Geekobot builds that use it include DC current meter with a big display, LED strip current budget meter, 12 V pump idle or dry-run current alarm and Wi-Fi 12 V pump current monitor. Each has the full parts list, wiring and code.
Results are estimates for design and learning. Check critical designs against the component datasheet. Made by the Geekobot Learning Team. How we write our calculators