Problem with Optical Pulse sensor

I have a Emontv v3.4 running the latest 3 phase sketch with 3 CTs and an AC supply.
The PRI Sprint meter has a LED which pulses fine (800 pulse to the KWh) and looks nice and bright.
However very few pulses are counted and the green LED on the sensor does not illuminate. Pulses are reported occasionally but not consistently. If I detach the sensor from the meter and shine a torch near the sensor, the green LED on the sensor illuminates and the pulses are counted and passed to the Emonhub correctly, The same happens if i point the sensor towards a the window and move my hand in front of it.

It seems that the sensor, Emontx, Emonhub are working OK when there is enough light, but the meter LED (a red one) is not bright enough.

Strangely, before I loaded the 3 phase sketch, I was using the supplied single phase sketch and the pulse count seemed to work fine, but I don’t remember any green flashes on the sensor. I didn’t give it much attention, since I knew the power readings weren’t correct.

Does anyone have any experiences like this? or any ideas how to diagnose or resolve the problem?

The optical sensor output is not a true TTL output as is claimed, it appears to be an over-driven analogue signal - in that is appears to be linear over a small range. You might be able to see this with a multimeter measuring the output voltage. Also, the operation of the green LED on the sensor isn’t a reliable indication that the emonTx has or hasn’t detected a pulse, due to that pseudo-analogue output again.

One thing I do notice is, the single-phase emonTx sketch detects a pulse on the falling edge of the pulse (i.e. going dark) and the 3-phase sketch on a rising edge (going light). You can change this on line 394, if you wish, though as the trigger input is level-sensitive, as distinct from slope-sensitive, it should make no difference.

Unfortunately, we don’t have any more information about the optical sensor other than that published here and in ‘Resources’, and there’s no means of adjusting the sensitivity.

The only suggestion I have is to make sure the hole in the middle of the sticky pad is accurately lined up on the point where the LED is brightest, and the sensor is lined up accurately on the pad.