Absolutely no appology needed Bob. I appreciate your help, as I really have only the bare basics in the electronics side. I can follow a Silicon Chip howto, but the what is happening part, that goes over my head.
When it comes to the software, that is my specialty. I can describe whay is happening on the software side a little more later. In this case, the code is not written by me, so i am making some guesses on what is going on under the hood.
When it comes to this style of CT clamp meter hooked up to an analog to digital input on an esp32 or similar, I believe they are taking measurements at a rapid interval in that code (the chip is 240 mHz dual core), and using calculations to convert the sine wave into an amp reading, but i would need to look at the code. With testing, i noticed that 300ms sample_duration provided fairly erratic results. But using 3 seconds smoothed that out a lot. I do not need to be millisecond accurate. A 5 second average is fine.
The raw reading is what is measured by the adc, fed by that wiring i did. I switched out the 10 ohm burden resistor and put in a 20 ohm, closer to the 22 ohm of the initial project i was following. That doubled the raw value, bringing it to that 0.84 for an 8.8 amp load.
In my filters, i only put one value. I plugged in a kettle, measured 8.8 amp with a somewhat trustable power meter, then saw the raw value of 0.084 from tge esp32 code. My line of YAML there states that 0.084 raw is equal to 8.8 amp real. That is one measurement only. I can plug in a lot more loads with different amps required, and can enter as many as i like and plot those too. These will give the code a multi point conversion graph, making the reading really quite accurate. Well, pretty much as accurate as the other power meter anyway.
I have a Uni-T UT210-E clamp meter, so i will double check the measurements with that tomorrow.
In my first picture upload of my breadboard to this forum, I made two mistakes in my wiring. You helped me in discovering them, and I appreciate your help.
When it comes to calculating the watts, i am using the amps x 240. Not completely accurate, but good enough. The x in “return x * 240” refers to the raw value in the adc_sensor after the filters: calibrate_linear has been applied.
I believe i saw a different wiring option somewhere that used the same ct clamp, with different electrical components, fed into another adc on the same esp32, and it measured the volts fairly accurately, giving actual volts and actual amps. I may try to find that one later and attempt that. While i am happy for now to get a warning that the heater is on or off, later on, it woukd be nice to get a fairly accurate watts measurement.
Cheers
David.