# LM 317 behavior as a current regulator

#### paolo.monza

Joined Jun 10, 2021
4
Using a LM3117 as a current regulator to control the current applied to a 12 V yellow LED and to a 5mW green diode laser, I found a difference in the behavior of the LM317 when controlling both LED and laser.
I tested the circuit with three different resistors.

Here the values and the relevant current-limit, given by 1.25/R1.
R1 = 22 ohm I lim = 56.82 mA
R1 = 47 ohm I lim = 26.60 mA
R1 = 100 ohm I lim = 12.50 mA
Here you can see the results:
R1 = 22 ohm

R1 = 47 ohm

R1 = 100 ohm

I would like someone to explain to me why, in the case of the laser diodes, after reaching the target value I = 1,25/R1 the current tends to decrease and then to grow again, unlike the LED, for which the current is constant as expected. This effect becomes more evident as resistance grows.
Paolo

Last edited by a moderator:

#### dl324

Joined Mar 30, 2015
16,910
Welcome to AAC!

What is the regulator output voltage for each of the input voltage data points?

#### Deleted member 115935

Joined Dec 31, 1969
0
does the laser current vary as its voltage varies in a none linear way ?

#### crutschow

Joined Mar 14, 2008
34,409
What is the regulator output voltage for each of the input voltage data points?
Also what is the input voltage?

#### dl324

Joined Mar 30, 2015
16,910
Also what is the input voltage?
X-axis. Don't know why OP wants to vary it...

#### crutschow

Joined Mar 14, 2008
34,409

#### michael8

Joined Jan 11, 2015
414
Is the laser diode a bare diode (no circuitry?) or does it include some sort of regulator/controller?

I' guess the green laser is really IR and optically processed (including a doubling) to get to green so
I'd expect it's running voltage to be much lower than the yellow LED unless it has a controller
in it.

#### dl324

Joined Mar 30, 2015
16,910
Guess I'm blind, but I don't see any values on the X-axis.
The image view option clips it.

#### crutschow

Joined Mar 14, 2008
34,409
My LTspice simulation of the circuit (below) doesn't show the droop in current at the low voltage that you show for the LASER load, so I don't know what could be causing that.
Do you have another LM317 you can try?

Last edited:

#### Tesla23

Joined May 10, 2009
542
It may be oscillating. There are a lot of very long leads and a dearth of bypass caps.

#### sparky 1

Joined Nov 3, 2018
756
I have used this simulation to set specific voltage and current.
Shows the arrangement of the meters, the general scheme for a given voltage. It adjust for a range of current that works for your application. Heat sink or thermal dissipation contributes to stability and accuracy. I am concerned that the bench meter is warmed up about 30 minets.
I am looking at what a small change in R2 can have and relying on the constant current inside the bench meter to reduce errors when tracking load current. The manufacturers LED simulation model is usually accurate but sometimes needs small adjustments and the jig fixture can cause slight variations.

Last edited:

#### michael8

Joined Jan 11, 2015
414
My LTspice simulation of the circuit (below) doesn't show the droop in current at the low voltage that you show for the LASER load, so I don't know what could be causing that.

My guess is that it's not a green LED, instead it's a LASER controller,
likely with feedback from a photo-diode inside the laser diode package.
So trying to feed a constant current into device which only wants so
much current (so much laser brightness) is not the same as resistive load

A cheap laser pointer is likely to have just two or so transistors as
the control circuit rather than an lm317 but still it's likely looking
at the laser optical output so the whole package wants an approximate
constant current. This will vary with temperature and whatever else
effects the laser output (age?).

#### paolo.monza

Joined Jun 10, 2021
4
Is the laser diode a bare diode (no circuitry?) or does it include some sort of regulator/controller?

I' guess the green laser is really IR and optically processed (including a doubling) to get to green so
I'd expect it's running voltage to be much lower than the yellow LED unless it has a controller
in it.
This is the behavior of a violet - 450 nm Laser. R1 = 47 ohm

Is the laser diode a bare diode (no circuitry?) or does it include some sort of regulator/controller?

I' guess the green laser is really IR and optically processed (including a doubling) to get to green so
I'd expect it's running voltage to be much lower than the yellow LED unless it has a controller
in it.

#### paolo.monza

Joined Jun 10, 2021
4
My LTspice simulation of the circuit (below) doesn't show the droop in current at the low voltage that you show for the LASER load, so I don't know what could be causing that.

My guess is that it's not a green LED, instead it's a LASER controller,
likely with feedback from a photo-diode inside the laser diode package.
So trying to feed a constant current into device which only wants so
much current (so much laser brightness) is not the same as resistive load

A cheap laser pointer is likely to have just two or so transistors as
the control circuit rather than an lm317 but still it's likely looking
at the laser optical output so the whole package wants an approximate
constant current. This will vary with temperature and whatever else
effects the laser output (age?).
Dear michael8, at first reading, I didn’t fully understand your answer, because I didn’t know anything about a photodiode that controls the output power. However, following your suggestion, I found the article "An Introduction to Laser Diodes", which describes two ways of controlling the output current.
In one of the two ways, a photodiode feedback is used to regulate the current.
Then I thought that the key point might be the rise in temperature caused by the emission, which varies the output power. So I tried to redo the measurements with the laser, leaving about 10 minutes between one reading and the next, so that the body temperature of the laser module had the time to stabilize. Here the results.

I think these results confirm your suggestion. Thank you for your help.

PS: Previously I had done some tests with two red laser modules purchased a month ago on Amazon, but the results suggested that they were both damaged. I have just received a red 650 nm laser module from Adafruit, with which I intend to make further tests, being able to have reliable technical specifications. If the subject is of interest, I could publish a post about it.

#### dl324

Joined Mar 30, 2015
16,910
This is the behavior of a violet - 450 nm Laser. R1 = 47 ohm
What do Vsupply and Vin mean? If what you're calling Vin is the regulator output, it isn't working until the input voltage is around 7V.

#### paolo.monza

Joined Jun 10, 2021
4
What do Vsupply and Vin mean? If what you're calling Vin is the regulator output, it isn't working until the input voltage is around 7V.
Maybe "working" is not a good definition.

#### dl324

Joined Mar 30, 2015
16,910
Maybe "working" is not a good definition.
Is "regulating" more helpful? It looks like it's regulating when the input to output differential is about 3V.

#### Deleted member 115935

Joined Dec 31, 1969
0
Is "regulating" more helpful? It looks like it's regulating when the input to output differential is about 3V.
3v is that not the minimum forward drop of the regulator,

#### dl324

Joined Mar 30, 2015
16,910
3v is that not the minimum forward drop of the regulator,
IIRC, it can be as low as 2V.

EDIT: Even lower at low currents:

Last edited: