Equipment
ESP32-WROOM-32-D
Arduino Uno
Current Transformer (CT) 100A, 0-1V DC Output
I am starting a project to monitor my home electoral usage. I found these great CT (see link)
that measure 100A and output 0-1V DC, I also bought some 20A 0-3V DC output. perfect for the Arduino.
Here is my issue, with the 100amp model (0-1V DC output) on the Arduino Uno it measures pretty close with 10 bit ADC. I put 10amps through the sensor and my DMM measures 99mv while the Uno shows 88mv. I'm happy with that for now.
Now with the ESP32 with 12bit ADC, the same setup, (see code i used), does not measure anything.
I then tried my 20amp CT sensor and with 10amps through it, the ESP32 picks it up nicely at 1520mv which is pretty close again.
So, is 0-1V to low of a range for the ESP32 12 bit ADC, 3.3v / 4095 = .0008058608mv
Does anyone have some insight into this?
// Sketch to read CT Sensor and convert analog reading to CT Sensor out put voltage.
// Pin Declations
byte CT1 = A0; // Setting Up Pins
void setup() {
Serial.begin(115200); // Starting serial monitor
}
void loop() {
float raw_reading = analogRead(CT1); // reading analog input
float CT_voltage = raw_reading * (3.30 / 4095.00); // ESP32 test
// float CT_voltage = raw_reading * (5.0 / 1023.00); // Uno test
Serial.println("Raw Reading = " + String(raw_reading, 3) + " CT Volts = " + String(CT_voltage, 3)); // Printing Values
delay(250);
}
Your CT is not JUST a CT. By the schematic, it has a bridge rectifier and a filter capacitor. SO your CT output will be based on PEAK TO PEAK current, so will be peak to peak voltage. Your DVM is reading RMS voltage.
Paul
Thank you, very interesting read. So I see I can reduce the attenuation, but if I'm looking at this right, it can only do 100-950mv range. Already below the range of my CT sensor.
Dunno about that… the output from the CT will be a smooth DC voltage , it is calibrated 1v DC for the given full scale current - so peak to peak rms etc is irrelevant , you are measuring a resultant DC voltage with your dvm, which just measures … DC.
If the CT output is above the range of your analog input , then use a voltage divider - use values such that the two resistors load on the CT is > 10k ohms ( ie if the two resistors were to be in parallel ( instead of series ) the value would be > 10k. )
Thank you every one, drmpf pointed me to the data sheet and I have determined that even with changing the attenuation to db0 my CT sensor is just below the min 100ma min reading value. I will look into adding a 16 bit ADC like the ADS1115 to my project.