Community
OpenEnergyMonitor

OpenEnergyMonitor Community

ESP8266 + pulse counting Wifi upload to Emoncms

Tags: #<Tag:0x00007fc9b178c3f0> #<Tag:0x00007fc9b178c210>

I’ve been thinking about a cheap method of uploading led pulses from my Kwh meter to Emoncms and thought it could be done with just a ESP8266 and a photo diode like the one you can get from the shop https://shop.openenergymonitor.com/optical-utility-meter-led-pulse-sensor/ Is there any code already written to do this for the ESP8266 ? I’ve come across Easyesp which might do it, but unsure it’ll work with Emoncms. This shows the it working with Domoticz https://www.youtube.com/watch?v=lY-bSa3NFPk

Thanks,

Dave.

It should be possible since ESP8266 has got an interrupt input, see this thread and link:

It sounds like every ESP8266 pin can be used in interrupt mode:

Pin interrupts are supported through attachInterrupt, detachInterrupt functions. Interrupts may be attached to any GPIO pin, except GPIO16. Standard Arduino interrupt types are supported: CHANGE, RISING, FALLING.

from: http://esp8266.github.io/Arduino/versions/2.1.0-rc2/doc/reference.html#digital-io

Hi,
I can verify this. I have been used this to measuring my electricity consumption since I got working TSL257 sensor. You can find example code from other thread linked by Glyn. Although I am not using Emoncms after all so I cannot comment to that.