LCENJ ACS712 x05B educational sketches, 2026-09-21.
Targets: classic ESP32 (esp32:esp32:esp32) and Arduino Uno R3.
No third-party Arduino libraries. Place each .ino in its own matching folder.
For main sketch, copy acs712_math.h into the sketch folder too.
Power off before rewiring. Use only a protected low-voltage DC bench circuit.
Never connect mains AC, high energy battery packs, or an unprotected source.
The IC's isolation rating does not certify the purchased breakout PCB or wiring.
Identify the exact module's terminal and header labels; do not infer from photo.
Sensor VCC to regulated 5 V, GND to board GND.
Classic ESP32: OUT--10k--GPIO34; GPIO34--15k--GND. 100 nF at GPIO34/GND.
Measure GPIO34 voltage with meter before connecting it to the ESP32.
Uno: OUT directly to A0; sensor VCC and Uno ADC reference from same 5V rail.
No current through sense path when zero calibration begins after 3 s.
On ESP32 set SENSOR_SUPPLY_MV to measured supply in millivolts; 0 disables conversion.
Output is approximate DC current. Do not use for protective switching.
Neither sketch nor module was tested on physical hardware.
