OpenEnergyMonitor Community

Optical Utility Meter LED Pulse Sensor issues on DIY hardware

Using ESP32 with the Optical Utility Meter LED Pulse Sensor on an interrupt pin as per resources example and uploading to a mysql database evey minute.

Last year I set up the above in April on the incoming electricity meter and let it run. It works very well and seems to be very close to the real meter reading.

I bought another one to go on a solar generation meter I have just fitted. The meter seems to read the same as the micro inverters website readings. But the sensor does not seem to record all the flashes on the meter. I am generating 500wH approx a day, but the Optical Utility Meter LED Pulse Sensor is only getting 100wH ish a day. sometimes it just stops reading for a while and then starts again.

The solar meter is covered in a box to try and block out and light from the Optical Utility Meter LED Pulse Sensor. I have even moved the solar meter and piggy backed it on the incoming supply electricity meter but it never seems to flash.

Could it be a duff Optical Utility Meter LED Pulse Sensor, unfortunately I have cut the end off the cable to wire it on to the board.

Are they easy to ‘break apart’ as I could get it all resoldered at work if that could be the issue.

Any help would be appreciated.

There’s almost zero information about the Optical pulse sensor from the manufacturer, but fortunately a lot of information came, some time ago, from a contributor and that enabled us to publish a circuit diagram, along with some measurements and observations on the sensor’s performance.

There’s some information here: GitHub - openenergymonitor/optical-pulse-sensor: Hardware resources for the optical pulse sensor and a link to a forum thread, which in turn has further links to more threads with useful information.

One important fact discovered is - the green LED does not necessarily indicate a pulse that is sensed by the emonTx (or ESP32 in your case) - it all depends on the output voltage of the sensor and the input voltages your ESP needs to detect a logic ‘0’ and a logic ‘1’, because the sensor output is essentially analogue, not a defined and shaped pulse.

How are you counting the pulses - are you using a separate hardware interrupt pin for each, and is your software handling each identically, not allowing one to block the other? Just thoughts.

And yes, it could be a faulty sensor.

Thanks for your help.

The optical sensors have their own esp32’s so only the one interrupt on each board.

I forgot i got sent the wrong electricity meter and it has a pulsed output on it (I used the optical sensor as I had already bought it!)

I have wired up an Arduino Mega with interrupt to the pulsed output on the meter and every time it fires the interrupt the mega pin 13 led pin flashes. Works perfectly. With a 3.3v or 5v pullup on it.

But when I move it over to the same esp32 the sensor was on, it only fires randomly.
The same as with the optical sensor on it, so I think the optical sensor is not guilty.
Looks like the esp32 is a bit crappy will try another one.

Will report back after another ESP32 is setup.

Hope this helps some one in the future.

I am now using the pulse output on the meter and its working a lot better.

Also noticed the wifi was a bit patchy where the ESP32 was installed.
Have fitted a wifi repeater to boost the signal and its a working a lot better.

Now within a few watts of the solar panel metering software.

Thanks for your help.

1 Like