Searching across Internet for SCT013 usage in ESPHome I’ve found plenty of examples.
Some of them better other worse.
Using SCT manufacturer docs[and other], which are mostly focused on Arduino I’ve calculated values and created schematic examples for different approaches.
https://learn.openenergymonitor.org/electricity-monitoring/ct-sensors/interface-with-arduino
For SCT013-000 100A/50mA we need to add a 22R burden resistor.
It comes from calculations:
- 100A * √2 = 141.4A
- 141.4A / 2000 turns = 0,0707A
- (3,3V / 2) / 0.0707A = 23,338048091Ω
I’ve seen on Mouser available 23.2Ω resistor but closest easy available will be 22Ω.
From the Ohm’s law we have [V = I x R]:
0,050A * 22Ω = +/-1,10V AC RMS
1,1V RMS = ~ +/-1,56V Peak Voltage [https://www.allaboutcircuits.com/tools/peak-voltage-calculator/]
Since we have a DC biased 1,65V DC input we have ADC ranges:
1,65V + 1,56V = 3,21V max
1,65V - 1,56V = 0,09V min
It’s all in range of ADC.
Visual simulation here:
https://tinyurl.com/2hvwbue7