Sean,
I don't measure it continually but only during the Convert time.
I sample the voltage across a scaling resistor loading the current transformer 256 times per mains cycle (every 78usec), sum the squares of these voltages, divide by 256, and then calculate the square root. At the moment I'm plotting an 8 cycle average because that conveniently gets an 8 bit value into 'temperature format'
Not sure where you get the time! This is pretty much exactly what I was going to do and is very well done.
By using a larger value scaling resistor you can get it more sensitive. Also as you are suggesting measuring a current in a wire you can disconnect, you can also use a much cheaper non-clamp type current transformer. I decided that doing this on the input to the consumer unit was a likely way of earning a nomination for a Darwin Award.
Ah the Darwin awards! Any good entries this year? Any particular current transformers you would recommend?
I'm using the power supply from the USB dongle but if you look carefully on the graph there does seem to be some jitter. Decoupling the supply at the PIC removes a lot of the power supply noise and does seem to improve things. I notice Maplin do a very low drop out regulator which might be worth trying the provide a more stable reference voltage.
To simplify the calculations I use an 8bit value of the absolute value of the input voltage, and calculating the square root takes around 60usec.
I think the accuracy is set by the resistor tolerances and the 5v supply both of which are probably worse than the errors within the PIC, but all could be improved by adding built-in a calibration run with a known load and storing the fudge factors in the EEPROM.
My gut feeling is that the calculations will be pretty accurate. Will run a simple Monte Carlo next week just to check. It is more likely that the supply voltage and resistor tolerances will limit the accuracy
Having seen the output graph I'm not sure that accuracy is as big an issue as dissuading SWMBO from using the tumble dryer.
Eric