[Solved] ESP32 with ethernet LAN8720 - Problems on reading sensor SCT-013-020

Hello guys!

I am developing a project with ESP32. In it I measure the electrical current of an equipment and control it. I can work with ESP32 in two connection modes: WiFi and ethernet.

In WiFi mode everything works perfectly, but when I change the connection mode to ethernet, the current measurement is incorrect.

For example: Normally the equipment consumes 1A measuring on the multimeter and with the SCT-013-020 on the ESP32 in WiFi mode. When I switch the connection to ethernet, the ESP32 measures 5A, 6A. And this is repeated when I measure the consumption of other equipment as well.

The ethernet connection scheme is exactly that: https://sautter.com/blog/ethernet-on-esp32-using-lan8720/

I tested powering the LAN8720 with an external source and not using the ESP32 3v3, but it didn’t work. I tested changing the SCT-013 sensor reading pin for other ESP32 ADCs as well.

I don’t know what else to try. Help me please
Thank you!

I did several tests with the ESP32, but everything indicated to be an internal failure of the ADC. I fed the entire circuit with the 3v3 of an arduino and the current sensor signal shared between the arduino and the ESP32.

When ESP32 on wifi, both read the sensor correctly, but when I switch to ethernet on ESP32, the arduino continues to read correctly and ESP32 does the wrong reading.

In order to proceed with the project, I added an external ADC module, the ADS1115. With it, he read correctly both on wifi and on ethernet.