I'm going to highlight updates to the original description in italic and add developments to the bottom.
It's currently "working" in so far as it returns numbers: https://thingspeak.com/channels/1098352 (the data feed is erratic at the moment as I'm working on it from time to time).
It survives overnight from the fridge and freezer current and even continues to transmit. The capacitor must have low enough value to give measurable voltage changes at low power use, while large enough to maintain operation through a power cut.
However the numbers returned are not accurate. I need to refine the coefficients in my formula that calculates the power drain. I have removed the CT input and manually charged the capacitor then used its voltage to make reasonable estimates of the power drain and now intend to capture real data that will let me solve more accurately for the coefficients.
I was surprised to find my 8Mhz Pro Mini operates below 1.8v and the cheap 433Mhz RF transmits at below 2v, going through several walls. However I aim to operate it at above 2v to leave a margin for surviving a power cut. I use the RCSwitch library and tried each protocol to find the ones with lowest energy use. A check digit is necessary as signals are occasionally corrupted. I used avrdude to change the brown out detection fuse. I intended to reduce the frequency to 1MHz as well but that hasn't been necessary and is harder than changing the BoD.
An ESP8266 is currently receiving the 433RF and updating the online thingspeak log.
The original aim of the project was to reveal if any appliance was left on at the end of the day and this has been achieved. It can't detect an 11 w low energy bulb but a cooker hotplate or anything significant now shows up. Trying to expand the function to give a reasonable overall power use reading and is too tempting to ignore. As with commercial clip on power monitors there's inaccuracy due to the supply voltage varying slightly from 230v - the power depends on the current and voltage.
Calibration Stage 1
There is current drain from:
a) being awake
b) deep sleep
d) start and end voltage
e) I don't think I can ignore capacitor leakage so a futher test is required. Initial measurements suggest as high as 15uA which surprises me.
Counting the time or number for each of these for a period with known energy consumption (from the meter reading) will allow solving for the unknown current drain from each. There are 4 unknowns so in theory 4 sets of data will suffice, but in practice periods will often be similar to each other and I need very different sampling periods. I'm coding it to report a - d every hour and I will read the meter hourly.
The start and end voltage will have little effect as the small difference is averaged over the hour.
However it's not quite that simple. The current drain will also depend on the voltage. For example transmit current may vary with the square of the voltage. However the code attempts to keep the voltage in a narrow range so the variation due to voltage may be small. If the accuracy of this stage is insufficient.....
To measure the variation with voltage the CT will be removed and the capacitor charged manually to 4v (the transmitter seems unaffected by brief bursts above its 3.6v spec max. The reported data can then be used to fit the variation with V. In this case the changes in V will be significant since the end V will be at the limit of transmit operation.
If stage 2 does not finalise the parameters, a period of controlled power use will be monitored. All appliances will be disconnected and then a known power drain (such as a 1 kw electric bar) turned on.
This will be repeated with 2 kw then 3 kw.
The meter shows divisions of 0.02 kw so it won't be necessary to run the test for as long as an hour.
=====================================================================================...Read more »