tnmarktx
Want to do some testing with a ct. My question is this, will an esp32 handle 5v at 5ma of current without damage? Could use a different resistor to lower the voltage to 3.3v, but don't believe any current will be read by the esp32 unless the current range is higher. Want to try and read at least 1a of current which will be 1ma in. I've read that around 1v is the minimum threshold for the inputs.
Reply 0 0
thiagoralves
Analog inputs don't read current. Usually to read current you need to build a circuit with a resistor (at a minimum) and then read the voltage drop across the resistor to then calculate the current "read". If your input signal can scale up to 5V, I believe it might damage the ESP32 input pins (must check this on their datasheet).
Reply 0 0
tnmarktx
That's what I was curious about. The CT measures from 0-5 amps, the output is 0-5ma. With 660 ohms at 5ma that would be the max of 3.3v. However at 1ma (1 amp) would only input ~.66v. I'm not certain that it would register in the program. In other words, the program may only read if amperage is 2 -5 amps.
Reply 0 0
thiagoralves
If it can’t read .6V then it is not an analog input. The ESP32 should be able to read any value from 0V to 3.3V in 800uV increments since it has a 12-bit ADC.
Reply 0 0
buttley
I can maybe add to this as I have some experience in this area. First, it’s true you don’t want to exceed 3.3 V going the ESP32 analog input. Resolution is also not a problem, being 12 bit they can resolve down to 1/4095 X 3.3 V or .0008 V. The inputs are very high impedance. They are designed such that they do not load the circuit. Basically there is almost no current draw by the analog input.
 
The problem I see here is that using a CT means you’re measuring an AC current. Across the CT burden resistor, you’re going to get an AC voltage that is proportional to AC amps. It is a 60 HZ sine wave. The ESP32 samples the analog input at a rate determined by your scan time. This sampling is not in sync with 60 HZ from your CT. I think you would find that you would seem to read a series of random numbers that made no sense.
 
The solution is to feed the signal across the burden resistor through a diode bridge. Then you need a small filter capacitor and a voltage divider to knock it down to the 3.3 volts or under. This gives a DC voltage proportional to the AC current.
 
I would probably pick a burden resistor so you get 10V out of the CT at the max current you want to measure. Diodes have a voltage drop that can cause some trouble with low voltage readings. 10V keeps the measuring range above the diode drop range. The other thing that helps is to get low voltage drop diodes for your bridge. That improves the low-level readings. The filter cap, keep it a low value I would say .5 uf – 1 uf range. If you get it too high, it will lag the signal. Voltage divider would be something like a 60K in series with a 30k. That should drop the 10V to about 3.3 V. Then if your worried about going over 3.3 v and causing damage to the ESP32 you could add a 3.3v zener diode across the analog input. Basical this would clamp the volage to 3.3 v and protect the analog in.
Reply 0 0
Reply