Optical Pulse sensor and Raspberry Pi

Has anyone figured out how to connect a OPS to a raspberryPi, onto the pins and then a good script to count and send data to emonCMS


Yes, RPi direct pulse input: Directly connecting to Optical Pulse Counter with RPi? - #2 by pb66
(Did a search not reveal this?)

There are 3 connections to the optical sensor. 2 & 5 are +5V & GND respectively, 6 is the output. It is not in fact a pulse, in that there is no control of the shape of the output using (say) a Schmitt trigger. I measure pin 6 at 3 mV in darkness and VCC - 35 mV in reasonably bright light. The output goes to an acceptable ‘high’ state long before the LED on the rear of the sensor lights up.

Measurements: First try with EmonPi - Pulsecount stuck at 1 - #16 by Robert.Wall

Also Adjusting sensitivity of Optical Pulse Sensor - #21 by Kempson

Those other 2 links have allot of discussions, but don’t see a script that have been tested/proven to work that uploads to emonCMS?


Not in the first link - just above the picture?