I am trying to build a Energy sensor using a CT Clamp and ESPHOME, everything “works” but I see a weird behavior on the logs. Or at least I think it is weird.
When I turn on the load (a bulb) to test, the board reports a lower voltage than when the load is off.
See the logs
[12:48:08][C][api:143]: Using noise encryption: YES
[12:48:08][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.042A after 807 different samples (1345 SPS)
[12:48:08][D][sensor:094]: 'Measured Current': Sending state 1.04216 A with 2 decimals of accuracy
[12:48:10][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 0.14200 V with 3 decimals of accuracy
[12:48:11][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.040A after 1054 different samples (1756 SPS)
[12:48:11][D][sensor:094]: 'Measured Current': Sending state 1.03984 A with 2 decimals of accuracy
[12:48:13][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 2.97900 V with 3 decimals of accuracy
[12:48:14][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.038A after 1065 different samples (1775 SPS)
[12:48:14][D][sensor:094]: 'Measured Current': Sending state 1.03841 A with 2 decimals of accuracy
[12:48:16][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 3.15500 V with 3 decimals of accuracy
[12:48:17][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.042A after 1063 different samples (1771 SPS)
[12:48:17][D][sensor:094]: 'Measured Current': Sending state 1.04192 A with 2 decimals of accuracy
[12:48:19][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 3.15500 V with 3 decimals of accuracy
[12:48:20][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.040A after 1057 different samples (1761 SPS)
[12:48:20][D][sensor:094]: 'Measured Current': Sending state 1.03997 A with 2 decimals of accuracy
[12:48:22][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 3.15500 V with 3 decimals of accuracy
[12:48:23][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.041A after 1057 different samples (1761 SPS)
[12:48:23][D][sensor:094]: 'Measured Current': Sending state 1.04070 A with 2 decimals of accuracy
[12:48:25][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 1.17500 V with 3 decimals of accuracy
[12:48:26][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.039A after 1067 different samples (1778 SPS)
[12:48:26][D][sensor:094]: 'Measured Current': Sending state 1.03890 A with 2 decimals of accuracy
[12:48:28][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 0.52500 V with 3 decimals of accuracy
[12:48:29][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.038A after 1055 different samples (1758 SPS)
[12:48:29][D][sensor:094]: 'Measured Current': Sending state 1.03802 A with 2 decimals of accuracy
/// LIGHT ON
[12:48:31][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 0.14200 V with 3 decimals of accuracy
[12:48:32][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.149A after 1088 different samples (1813 SPS)
[12:48:32][D][sensor:094]: 'Measured Current': Sending state 1.14875 A with 2 decimals of accuracy
[12:48:34][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 0.14200 V with 3 decimals of accuracy
[12:48:35][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.149A after 1082 different samples (1803 SPS)
[12:48:35][D][sensor:094]: 'Measured Current': Sending state 1.14901 A with 2 decimals of accuracy
[12:48:37][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 0.14200 V with 3 decimals of accuracy
[12:48:38][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.152A after 1082 different samples (1803 SPS)
[12:48:38][D][sensor:094]: 'Measured Current': Sending state 1.15155 A with 2 decimals of accuracy
[12:48:40][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 0.14200 V with 3 decimals of accuracy
/// LIGHT OFFF
[12:48:41][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.150A after 1084 different samples (1806 SPS)
[12:48:41][D][sensor:094]: 'Measured Current': Sending state 1.14950 A with 2 decimals of accuracy
[12:48:43][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 0.58500 V with 3 decimals of accuracy
[12:48:44][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.040A after 1051 different samples (1751 SPS)
[12:48:44][D][sensor:094]: 'Measured Current': Sending state 1.04007 A with 2 decimals of accuracy
[12:48:46][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 2.62800 V with 3 decimals of accuracy
[12:48:47][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.043A after 1058 different samples (1763 SPS)
[12:48:47][D][sensor:094]: 'Measured Current': Sending state 1.04346 A with 2 decimals of accuracy
[12:48:49][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 2.60400 V with 3 decimals of accuracy
[12:48:50][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.041A after 1055 different samples (1758 SPS)
[12:48:50][D][sensor:094]: 'Measured Current': Sending state 1.04058 A with 2 decimals of accuracy
[12:48:52][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 2.68500 V with 3 decimals of accuracy
[12:48:53][D][ct_clamp:042]: 'Measured Current' - Raw AC Value: 1.042A after 1057 different samples (1761 SPS)
[12:48:53][D][sensor:094]: 'Measured Current': Sending state 1.04157 A with 2 decimals of accuracy
[12:48:55][D][sensor:094]: 'adc_sensor_wash_machine': Sending state 2.93500 V with 3 decimals of accuracy
I am using this diagram:
and this is my config:
### CT CLAMP ###
sensor:
- platform: adc
pin: GPIO34
id: adc_sensor_wash_machine
attenuation: 12db
accuracy_decimals: 3
# update_interval: never
update_interval: 3000ms
- platform: ct_clamp
sensor: adc_sensor_wash_machine
name: "Measured Current"
internal: true
id: voltage
sample_duration: 600ms
update_interval: 3000ms
# filters:
# - calibrate_linear:
# - 0.012 -> 0
# - 0.025 -> 1.0
This is the light I am using
When I read with a multimeter the connection, I correctly see 1.6v going into the Clamp.
The clamp arrows are pointing into the direction of the lamp.
When I read the input on the ADC I also see how the voltage is being reduced.
What I am doing wrong?
Thanks!