ESP8266 and CT sensor on ADC0

(ALLUYN Laurent) #1


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 ?

(Robert Wall) #2

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.

(ALLUYN Laurent) #3

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

(Robert Wall) #4

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.

(Frogmore42) #5

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.

(Robert Wall) #6

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)?