Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
You should not use a NPN transistor, but a PNP instead.
Reviewing the SR-HC501 data sheet reveals that it has a 3.3V logic level output, active high with 1k current limiting resistor. A NPN transistor in common emitter configuration seems as an appropriate output circuit.
Laser diode current limiting resistor has to be chosen according to laser data.