ESP8266 and CT sensor on ADC0

Hello,

I’d like to use one ESP8266 with only one CT sensor connected to ADC0 input and send measured data (with emonLib) to my local emoncms. What is the syntax to send data to input on my emoncms ?

You can look at the emonTx sketch for that - normally it will be a character string, like “ct1:12.3”.
If you are using emonHub, you must not try to decode the value, i.e. datacodes = 0.

But have you checked that the ESP8266 can take readings at a sufficiently fast rate for the numbers you collect to be meaningful? The emonTx normally samples around 2500 samples per second, though less might be acceptable to you depending on the shape of the waveform you are measuring. And if it is current, it will not necessarily be a nice sinusoid.

I think emonTX don’t publish data on TCPIP connection but wit RFmodule. Is it right ?

TCP/IP is a protocol, not a connector. There is a RJ45 connector on the emonTx, but it is not Ethernet. But you can connect an ESP8266 to the serial output.

The emonTx is sending serial data to the ESP8266, instead of using the radio. The ESP8266 transmits this by WiFi. If the format of the data your ESP8266 generates itself is the same as that which it would receive from the serial output of the emonTx, it should be accepted by emonCMS.

You will likely find that the ADC on the esp8266 is good for little more than measuring battery voltage. It has no specified accuracy and does not display high accuracy.

I’ve never been able to find any useful information about that ADC, and you’re confirming the doubts I’ve had. Do you have any credible figures for it’s capabilities and performance (or lack of)?

https://bbs.espressif.com/viewtopic.php?t=2430

I am not sure there is anything more official. I wouldn’t use it for anything that needs accuracy greater than 3%.

Thanks for the link - I hadn’t found that, probably because I was looking for an ‘official’ data sheet.
“The ADC pin is not supposed to be used for highly accurate conversions. We recommend using external serial ADC ICs”

That just about says it all.

I’ve see nothing about conversion time / sample rate, and those are fairly important in our application.