An optical pulse sensor can be directly connected to the Pi, using a spare GPIO. This might help: . Directly connecting to Optical Pulse Counter with RPi?