Connecting an Optical Speed Sensor with Pulse Output to Arduino Mega

Connect like shown below
The signal to he arduino will be inverted, so you need to detect when it is LOW
image

Appreciate this, I have updated my diagram as follows:

Would a standard 2N3904 transistor work?

Additionally, should I attach a ground from the Arduino to the emitter?

Yes, 2N3904 OK
The sensor common (COM) connects to the Arduino GND, the transistor emitter and to the 24V power supply negative.
The GND/shield can connect to the Arduino GND

Great.
Many thanks for your continued support, it has been very helpful!
Will be in touch to share results after testing the setup :slight_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.