ESP 32 and a CT Clamp HOW?

I have been tinkering :slight_smile:
I tried min value but that did not work well

I was also pondering if my being close to the sensor made any diff. but not yet

So do just have an automation if above a threshold it means on?

    filters:
      - calibrate_linear:
     #     - 0.015 -> 0   #0.0075
          - 0.008 -> 0
          - 0.061 -> 1.2

      # - clamp:
      #     min_value: 0.0
          
      #     ignore_out_of_range: true

I changed the rates to every 30 seconds, but still varies
I would be happy if I could change the accuracy decimals to 1 but that has no effect

[13:33:56][D][ct_clamp:041]: ā€˜Measured Current’ - Raw AC Value: 0.012A after 306 different samples (1275 SPS)
[13:34:26][D][ct_clamp:041]: ā€˜Measured Current’ - Raw AC Value: 0.007A after 304 different samples (1266 SPS)

This is an old post, looks like you did not fet it to work?
You will need to set attenuation to 12dB in order to measure with the center voltage being 1.65V.
You can check the ADC range for your specific version of ESP32 to make sure you are using the correct attenuation.

1 Like

My problem/the answer is… Use a CT clamp that is close to your expected load. IE: a 30 amp ct clamp will not work very well on the bench with a 7 watt light bulb :frowning:

So what clamp you used to confirm that?

Please also make sure to mention to potential future readers of this thread that if you use a clamp for low amperage, then the device might be fried if somebody connects a high load to the clamped line.

What I would be seriously interested in is a type of circuit that could be placed in line with the clamp to limit the amount of voltage it generates, such that if it ever gets about 3.3 volts, which is typically what you see on a GPIO line, then that voltage is diverted somewhere else and for bonus points, a GPIO pin is raised somewhere that says, this is now overloaded.