No sensor readings from SCT-013-030 @ ESP32 NodeMCU with ESPHome

I’m trying to hook up a SCT-013-030 clamp sensor to a ESP32 NodeMCU board, using the same 2 resistors (10k) + 1 capacitor (10uF) circuit that’s used virtually everywhere to connect these clamp sensors to esp or arduino boards.

I’m testing this with a toaster connected, which draws about 890W (3.84 A * 230 V) when turned on. When measuring the voltage directly at the clamp sensor or at the board between GND and the ADC pin, the multimeter is showing more or less what I would expect from this clamp sensor, i.e. about 0.125 V.

But I can’t get this running with ESPHome. When connecting the circuit to the ESP32, the raw voltage reading from ESPHome always becomes 1.10 V and on disconnecting it drops to 0.00 V. No matter, what the multimeter shows.

These are the sensors configured in ESPHome:

sensor:
  - platform: adc
    pin: 33
    id: adc_sensor
    update_interval: 10s

  - platform: ct_clamp
    sensor: adc_sensor
    name: "Herd rechts Stromwert"
    unit_of_measurement: "A"
    update_interval: 10s

Does anyone have an idea, what I’m missing here? Is this a hardware issue? As the multimeter is showing correct values I would assume, the parts and the circuit are fine. Unfortunately I don’t have another unused ESP board to test, if the board is the cause of the problem.

1 Like

So today I had a typical RTFM moment. After I stumbled upon the attenuation attribute in the ADC sensor doc, I knew, why my sensor had always shown 1.10 V:

1.10 V is per default the maximum voltage, an ESP32 ADC sensor reports. After setting the attenuation to 11db, I could finally see about 1.75 V from the circuit with no current running through the clamp sensor and values up to 2.7 V, rising proportionally to the current through the wire.

With the voltages I measured with the multimeter this should have even worked with the default 0 db attenuation, but I’m not sure if the multimeter was measuring the secondary AC voltage correctly.

Anyways, it’s working now. Maybe this is sometime helping someone stuck with the same problem. :slight_smile:

Thank you. I had set up a CT Clamp on an ESP 8266 and wanted to transition to a ESP 32 to do two CT clamps and this was throwing me completely off… Now I can do the entire laundry room on one ESP 32 :slight_smile:

Hi friend,
Do you can help me, and send me the electrical drawing ?

I just googled for the circuit. You’ll find it everywhere on the internet, when searching for “SCT-013-030 esp32”, f.e. here: Esphome ct clamp 30A/1V - #2 by ogiewon

Everyone uses slightly different resistors for the voltage divider and the capacitor, but it really doesn’t matter that much. It’s important that both resistors have the same value and the capacitor should be something between 100 to 470 µF.

Also it doesn’t matter which wire of the SCT is connected to the analog input and which is connected to the voltage divider. When using clamps with a headphone jack, the two wires are usually connected to the tip and the bottom contact and the middle contact isn’t connected to anything.