I’m trying to set up a power meter to measure watts using one of these ZMCT103C modules. I have been trying to find online sources that could help me to get it working, but so far I haven’t been successful. The board is like the one in this listing: https://id.aliexpress.com/item/32862297933.html
The board has these pins:
GND
GND
OUT
VCC
I connected one of the GND pins to ground, the OUT to A0 on my ESP8266, and VCC to 5v. I tried using this example provided here https://esphome.io/components/sensor/ct_clamp.html
sensor:
- platform: ct_clamp
sensor: adc_sensor
name: "Measured Current"
update_interval: 60s
- platform: adc
pin: A0
id: adc_sensor
The code runs without errors, and the sensor appears in HA. But I can’t get a correct reading from the sensor. Even without any load turned on it shows some random value instead of 0, and when I turn on my load for testing which is a light bulb, the reading changes but to a value that is incorrect. I tried calibrating it but I am still unable to get a correct reading. Did I improperly connect it? Do I need to add a resistor somewhere in the circuit? Or did I just not calibrate it right?
Has anyone ever had any experience using this sensor with ESPHome? Or maybe someone could point me to a link (website or forum) that could show how to correctly set this up? Any suggestions would be very appreciated. Thanks!