Close

Arduino Pins

A project log for ESP32 Current Sensor with WiFi

Arduino based monitor for two AC power circuits. Status display, and WiFi email

M. FosterM. Foster 08/07/2022 at 20:430 Comments

The ESP32 feather V2 pins that are used for the sensor monitoring:

A4 - ADC1 (sensor 0)

I37 - ADC1 (sensor 1)

A3 - a reference VCC for the two current transformers. 

The code compares the A3 reference value with the values read on A4 and I37. The difference between the reference VCC and the read value is what the transformer is producing. The average of this difference over a few sample periods is used to decide if there is current flowing (or not). Typical off state has a difference of 0 to 1. On state is if the average is greater than 1 for a set of sample periods (the duration and number of samples was derived semi-empirically on the test bench setup).

Discussions