Esp32 + sct-013-000

Hello everybody.

I need help, I’ve searched a lot and made several tests, but no success.

I’m creating a homemade Voltage and Current monitoring, with:

All tests don’t have an effective reading of the analog pin, it is practically stuck at 1800 (analogRead). (I have 3.3v, voltage divider to 1.65v and a 20 Ω Burden Resistor.)

Apparently everyone who uses ESP32 chooses to use an ADC. But I didn’t find any examples or material for study to that.

Can you help me with this information, SCT-013-00, ADC (maybe) and ESP32?

*Sorry for my english and if my searches didn’t return any possible answer already existing in the forum.

I am very sorry to have to tell you that the ESP32 is not a good choice for an energy monitor. This is the reason why most people use a separate ADC, and use the ESP32 only to communicate the result.

I cannot remember seeing here a circuit diagram for connecting an ADC to the ESP32, so I cannot help you with that. I think you will need to find an ADC that sends its output on an I²C bus to the ESP32, then do the mathematics there. Your ADC will need an analogue interface similar to the arrangement we use, details of that are explained in ‘Learn’.

Don’t worry about your English, it is much better than my French.

Robert, Tks for your help.

Today I bought an ADC 16Bits I2C (ADS1115). I’ll carry out new tests and studies on it, so I’ll be able to analyze, if new results I’ll talk here again.

Tks again.

Hi Jean,

Unfortunately, the 1115 is too slow which means it won’t produce accurate results.

This thread explains why:

Here’s another thread you may find helpful:


Tks @Bill.Thomson for helpme with topics, i’m reading calmly, a lot information…

I spent a few hours yesterday to studying circuits, communications and behaviors.

Now I’m using an ESP32 + SCT013-000 + ADS1115.

I continued with the resistive voltage divider circuit, so that I use 1.65v as a reference and a 23.3 Ohms Burden.

In the configuration of the ADS library (Adafruit_ADS1X15.h) I put the gain as GAIN_TWO (+/- 2.028v - 0.0625mv) and use the function ads.readADC_Differential_0_1().

So I’m getting the proper readings, but they are not accurate and with a lot of oscillation. Possibly it could be for the reason that you mentioned, that the ADS1115 is slow. (as I understand it is 820SPS at most). But honestly I don’t know if it’s because of that.

I don’t have an oscilloscope, I’m just using a True RMS Multimeter.

I’m thinking of some ideas and would like you to help me, if possible of course.

Two options:
1- Search for a new ADC (if they can suggest a model)
In some research I saw that the ADS1015 goes up to 3.3K SPS, is that correct? Does’t serve my purpose?
I’ve also been researching ADS1256, which has a rate of up to 30K SPS via the SPI bus).
2- Assemble a precision full wave rectifier circuit (maybe use an LM741)

If I use 2CH to read the same signal, (double checks)

What do you want to do, what is the big picture?

A precision rectifier will only give the rectified average current (or voltage), which you can scale to read rms for a sine wave. If you are not measuring a sine wave, or the load has a power factor that is not close to unity, then the “power” you calculate will be wrong.
That is the whole point of measuring a lot of samples of current and voltage close together and multiplying to get the power at that instant, then averaging the result. This way, you get much closer to the power that your supplier’s meter reads.

The ADS1256 appears to be far more complicated than you need, but I think it will do the job (but it will be hard to set it up initially to get it to work for you). It needs a dual supply, 5 V & 3.3 V.

[Edit: Looking harder at the data sheet. I noticed “Fast Channel Cycling − 18.6 Bits Noise-Free (21.3 Effective Bits) at 1.45kHz” I don’t know exactly what this means, I think it could mean you can only swap channels at the rate of 1.45kHz, which depending on how you use it might mean a sample rate of 1.45 kHz. You must check this.]

If you have the ADS1013, 4 or 5 and use two channels only, then you will be able to sample about 27 times per mains cycle, which should be OK but not excellent. Sampling 3 or 4 channels isn’t really good enough, and you’ll have the same problems. (And this of course only if you sample at the maximum rate possible.)

If you do this, you will read each channel at half the speed - either as a sample rate or as an averaging period, so what do you gain?