SCT013-100 Not consistent reading!

I use an ESP8266 primarily for pulse counting on import and generation meters, but I also have a CT sensor to measure household consumption when generation > use. From this experience I can offer the following advice:

  1. There is only one ADC on the ESP8266 so you can’t correct for power factor
  2. The ADC is 10-bits (like standard Arduino)
  3. Although a 3.3V device, the ADC has a temperature compensated Vref of ~1V (I’m using a bare ESP8266 module for minimum cost/footprint, I don’t know if there are other options when integrated into boards)
  4. In order to bias the ADC to about 0.5V I used a 56k / 10k potential divider (just changing component values from those shown elsewhere on this site that divide Vcc by 2)
  5. I started with a CT sensor marked ‘1V / 30A’. This had a surface mount resistor on it marked as 62 ohm (it can’t be measured in circuit as the CT winding is in parallel). I In order to reduce the CT output to (very approximately) ‘1V / 60A’ I placed a 68.3ohm metal film resistor in parallel (within my equipment, not in the probe where there isn’t much room)
  6. I then measured the DC offset as seen by the ESP8266 with the CT probe input shorted out, and removed the offset. In terms of the ‘model code’ shown on this site (which I didn’t use as I’m doing pulse counting), this means removing the calculation for ‘offsetI’ and replacing it with the DC offset measured in practice.
  7. I then connected the sensor and checked that I got low power readings when not clamped over a wire
  8. I then calibrated the sensor (like the original poster) using a 3kW kettle.

I forgot another thing I did to get to ~2% accuracy.

  1. I checked the ADC measurement speed using the Arduino ‘micros’ command. I’m not sure of the stability of the ESP8266 clock module, but I measured 103uS+/-3uS per measurement.
  2. I set the ESP8266 to take 1941 measurements to return a reading. This is in order to average over 10 complete 50Hz mains cycles. If your mains is 60Hz and had the same ESP8266 module then I’d recommend 1618 measurements.
    If these steps are done with some attention to detail, then a CT sensor can be used with an ESP8266.

When not exporting I can compare my CT reading of household use with the dual-meter pulse-counting measurement (import + generation). With relatively heavy loads (e.g. kettle on, power factor = 1) I observe the CT sensor within about 2% of the pulse measurements, but at low power consumption dominated by loads such as fridge-freezer and central heating pump the combination (I guess) of noise plus power factor means that the CT sensor typically reads 5 - 11% over, and the worst I’ve seen is 17% over (although as the pulse counting doesn’t give an instantaneous measurement, so there could have been a transient power use that exaggerated the difference in this case).

Hope this helps!

[Edited to include the subsequent post - RW]