Using only ESP8266 to read CT and send via Wifi

Great progress. Whatever I was doing to read the ADC in a tight loop it must have been wrong because when I linked in the emonlib with one source change I started to get actual data. In fact, unlike some issues I have read about, the WiFi did not break when the ADC was being used and the data plopped right into thingspeak.

Two remaining issues. First, I noticed some real variation in each reading (a second apart) which I attribute to noise. For the meantime I addressed this by accumulating and averaging 50 samples but is there a reasonable hardware solution? Other than 10uf cap to ground from the burden, I have no attempt at cleaning up the signal. Can an R-C pass filter be added that will dampen noise? I know that having leads sticking up on a proto board is not the best for immunity but my final device will still have some of that going on so if this is worth a try I’ll give it a go. I’d need some direction in selecting values.

Second, I had some issues with gain and offset. I finally dropped my burden from 43R to 39R so that the ADC input as read on my DVM was proportional across the CT range. That is now pretty solid. But I still have some non-linearity whereby the output agrees with the DVM at 3A (+/-10ma) but by the time the load gets up to 12A the ESP is reporting about 1.5% high. Loads in between have roughly proportional error (about .75% high at 7.5A). In looking at the emonlib code I don’t see where this scaling can be corrected. I suppose in software I could build an offset table based on load but that seems like such a brute force way to approach it. Help gratefully accepted.

I still have to switch over to batteries and get the deep sleep in place but I’d like to get the current reporting correct first. Thanks again for the guidance.

1 Like