# Driving a laser diode with an LM317

I want to make a a line of sight sensor. I want to drive a laser diode with constant current and aim it at a photodiode, then using a transimpedence amplifier I will monitor any changes in light intensity. The reason I am using a photodiode and a laser diode is because I want fast response times.

I have in my hands 2 OPV382 laser diodes that I fail even to turn on. I am using an LM317T to provide constant current to my laser diode. In the datasheet it states that the diode starts conducting at less than 2mA and that the maximum continuous current should be 12mA. I decided to try with a low current first just to be on the safe site but nothing happened.

My circuit was a resistor between the adjust and output of the LM317T to set the current and then the laser diode connected to the output and to ground. I used various resistor values from 220 Ohms to about 70(and connected the laser diode only momentarily but still nothing).

I also added another resistor from adjust to ground to set the voltage to 2.2V that is the maximum forward voltage and again nothing. Can you explain to me what I'm doing wrong? The supply voltage is 5V(measured 4.9V)

The only thing I can think of is the series resistance of the laser diode which is 20-55ohms according to the datasheet, could this be affecting the rest of the circuit?

• The LM317 needs to have the supply voltage 2 to 3 Volts above the output voltage. The laser has a forward voltage of probably a couple of volts, so tge LM317 can't really do anything. You need to supply it with a higher voltage or use a regulator that can work with less difference between input and output.
– JRE
Jun 27, 2017 at 21:31
• This might not do what you want, anyway. Constant current doesn't mean constant output from the laser.
– JRE
Jun 27, 2017 at 21:32
• Related: most basic laser diode driver? Jun 27, 2017 at 21:50
• Also related: Question about laser driver Jun 27, 2017 at 21:52
• 12-mA maximum indicates a laser that's going to be pretty sensitive to excess current or voltage. If you over-drive it for even a microsecond it's possible to destroy the laser. When you "connected the laser only momentarily" if that means timed according to human scales, you could have destroyed the laser. Do you have a reliable way to confirm the laser is still working? Jun 27, 2017 at 21:55

The laser diode requires 7 mA and it will drop a maximum of 2.2 volts at that current. If you have a regulated 5 volt supply, you can simply put a 400 ohm, or slightly larger, resistor in series with it. A 1/10 watt or higher power rating for the resistor will be more than sufficient.

Since the laser is infrared, you will not be able to see it with the naked eye. But a clever trick is to look at it with your phone video camera. Most phones are quite sensitive in the infrared range. You can confirm that this works with your phone by trying it with your TV remote. You should see flashes from the IR LED when you are pushing a button on the remote.

• Didn't Radio Shack sell a little plastic (or paper, can't recall) strip with anti-Stokes fluorescent phosphor paint on it so that you could see an IR spot? I think I may still have some of that laying around here.
– jonk
Jun 27, 2017 at 22:43
• Radio Shack retail is out of business. Perhaps still available by mail order. But the camera is much more sensitive. Jun 27, 2017 at 22:47
• The discussion just reminded me of anti-Stokes phosphors. Cheap, no battery to wear out, easy to use, goes anywhere, can't break -- especially useful for the right IR bands. Would be fine with a laser, I think. Have their place. (I did a few decades with making and using various phosphors.)
– jonk
Jun 27, 2017 at 23:04
• I understand. I used to have one. Don't know where it is - maybe in my vacuum tube drawer... Try the phone. It works great. Jun 27, 2017 at 23:15
• I have several spectro-photometers, including a very old Beckman scanning monochromator (that thing is heavy) and a much newer Ocean Optics one that can adapt to cover the range if I need that. I'll try out someone's camera phone, too. I recall that the Fujifilm X-T1 had been used to look through peoples' clothes... article a few years back?
– jonk
Jun 27, 2017 at 23:46

I'm going to go away from W9IQ's answer and say do NOT use a resistor as a power supply, especially if using a battery, or over a long time. This can over-current your diode and burn it out (which they do quite easily, I may add). A simple circuit to control the current going through your diode my be as follows. this sample will push 7.35mA, and a larger resistor can be used to push less

simulate this circuit – Schematic created using CircuitLab

• To push less current, best to put a shunt resistor across the laser; currents from LM317 output must be over 5mA, preferably 10mA, for internal bias. Nov 12, 2017 at 0:55
• A simple infrared laser diode has a forward voltage around 2.2 volts, and the minimum voltage for a LM317 is 1.25 volts, so V1 could not possibly be 1 volt. V1 should be at least 2.2+1.25=3.45 volts, but should have a bit more -- adding 10% yields about 3.8 volts. Jan 6, 2019 at 22:24