Ct_clamp with d1_mini and ads1115 - Roaming Voltages / Inaccuracies

I have a circuit as per the diagram in the image. I am using the ct clamp SCT013 20a/1v (with internal burden sensor).

As you can see from the serial logs, the voltage being received seems to be roaming / drifting and I’m not sure how to keep reasonably accurate measures. I’m also seeing quite a few negative values.

I am supplying the 5v input from a power supply and can guarantee a stable 5v input.

Using a hair dryer and different combos of high/low airflow and temps to get different amp pulls and a power meter to get actuals.

I start of with ~3A current – close to accurate
Switch to high (actual is 12.61A) – the first measurement is very close to accurate, but then over the next several measurements the voltage goes all over the place even though the dryer setting is the same (as is the current draw shown on the meter).

Any idea what is causing this drifting/roaming voltage? I have tried multiple ct_clamps, I have tried with the internal ADC on the d1_mini, multiple d1_minis…in all cases I am seeing similar behaviors. I cannot figure out what is causing this, I would REALLY appreciate some expertise. :slight_smile: thank you in advance.

ESPHOME CODE:

i2c:
  sda: D1
  scl: D2
  scan: true
  id: db_busa
  
ads1115:
  #  continuous_mode : on
 - address: 0x48
   id: ads1115_48
   continuous_mode: on
  
sensor:
  - name: "Akku 01"
    id: ads1115_48_a0
    ads1115_id: ads1115_48
    multiplexer: 'A0_A1'
    gain: 1.024
    platform: ads1115
    unit_of_measurement: "A"
    icon: "mdi:gauge"
    accuracy_decimals: 2
    update_interval: 5s
    filters:
      - calibrate_linear:
        - 0 -> 0
        - 0.133875 -> 3.433
        - 0.23194 -> 5.547
        - 0.71 -> 12.61

I think you need to add some extra components (resistors , capacitor)
https://learn.openenergymonitor.org/electricity-monitoring/ct-sensors/interface-with-arduino

I’m also busy with same project :wink:
here my actual test

i2c:
  sda: 4
  scl: 5
  scan: false
  id: bus_a

ads1115:
  - address: 0x48
    continuous_mode: on
  
sensor:
  - platform: ads1115
    multiplexer: 'A0_GND'
    gain: 6.144
    name: "ADS1115 Channel A0-GND"
    id: ads_ct
    
  - platform: ct_clamp
    sensor: ads_ct
    name: "Measured Current"
    update_interval: 60s

Thanks for the response. I was thinking I may need to add extra components (and did try a few combos) – but – it seems as though the ct_clamp I have has the burden resistor inside it already since it’s a 20A/1V. So I assume I may need to add a capacitor to stabilize the voltage (and perhaps the voltage divider resistors…but I assumed 0V == 0A and 1V == 20A and I could just measure the input voltage on the ADC. Also, the gain, since the ct_clamp outputs, 1V I assumed the gain needed to be 1.024 since the max output voltage of the ct_clamp is 1V, no? Why are you using 6.144?

If you get it to work, could you please post the circuit you used? Is your ct_clamp also a 20A/1v?

Good luck, thanks for posting.

I’m using a CT013 - 100A connected to a 51ohm burden resistor. Also I have follow the guide, so I have One capacitor of 10µF and 2 equal resistor of 10K ohm. I use a D1 mini connected to a ADS1115.
For burden, I calculated base also on the guide provided with a current RMS of 40A and 3,3v as input of ADS1115.
Schema: I don’t have a good picture to share but you can refer to the guide or Energy Tracking with ESP32 + CT Clamp Sensor from an Efergy elite 1.0R

The gain is on ADS and not on ct_clamp. I already modified to something more logic 2.048V