# i give up.. lm317 + 2n2222

Discussion in 'General Electronics Discussion' started by cjdelphi, Jul 22, 2015.

1. ### cjdelphi

1,096
104
Oct 26, 2011
theory. ...

imagine an lm317 in constant current mode using the voltage drop across the resistor to keep cc..

i've been playing around and exchanging the resistor for a transistor. .. is it even possible? (tried with no success)

2. ### Harald KappModeratorModerator

11,513
2,651
Nov 17, 2011
Of course it is possible. The question is: "what will happen"?
An LM317 in constant current mode works by keeping the voltage across the resistor constant, thus keeping the current constant due to I=V/R:

When replacing the resistor by a transistor, you loose this relationship and the current source will no longer deliver a constant current. Depending on how you connected the transistor, the LM317 will deliver as much current as its internal overload protection will allow.

File size:
4.8 KB
Views:
956
3. ### cjdelphi

1,096
104
Oct 26, 2011
so it is? or it is not?

i've not tried to sink current only source (in through the collector out of the emitter)

4. ### Harald KappModeratorModerator

11,513
2,651
Nov 17, 2011
The answer depends on your expectations. Of course it is possible to replace the resistor in this circuit by a transistor - as it is possible to replace the banana in a banana milk shake by an apple. But don't expect that the circuit behaves identically - or the shakes taste identically.

It's more imporatnat what you tried, not what you not tried to do. Show us a circuit diagram and tell us a bit more what you want to achieve and why you think a transistor could replace the resistor (it can't, as I explained above).

5. ### cjdelphi

1,096
104
Oct 26, 2011
I never said it could, i just read somewhere that it could be done, i don't believe it can...

6. ### Harald KappModeratorModerator

11,513
2,651
Nov 17, 2011
You're confusing "possible" with "meaningful".

5,165
1,087
Dec 18, 2013
Are you asking if you can replace the resistor with a transdiode configuration or similar? Or are you asking if it can be done using a transistor as the current limiting element?

8. ### cjdelphi

1,096
104
Oct 26, 2011
replacing the resistor for a transistor (using the base to vary the resistance between collector/emitter on an npn)

my idea was the sense/adj pin on collector to keep 1.5v drop across and it does work somewhat adjusting the pot as a voltage divider i could vary the brightness but after a threshold it would jump to 4v or .6v all because the transistor spits out - .6v from it's base to it's emitter...

i'll post a schematic but it won't have the lm317 ..

5,165
1,087
Dec 18, 2013
Yes it's the sharp turn on slope (Trans-conductance) of the transistor. Let me have a play and see if I can come up with anything. I am working at the moment so won't be until later. I guess the problem will be solved by then . That's the problem living in the UK, most of the US guys have finished off all the threads by the time I get on

10. ### cjdelphi

1,096
104
Oct 26, 2011
the lm317 adj sits on the emitter .. where i put the non inverting input, the idea being it's output is 1.5v less than the emitter..

or maybe sink the led or use a pnp? i don't know if it can be done due the nature of silicon etc...

feel free to try your results would be interesting if you're able to pull it off otherwise i might try something other than a resistor and transistor...

File size:
215.2 KB
Views:
152
11. ### AnalogKid

2,501
719
Jun 10, 2015
The LM317 is thinks as a voltage mode device. It has an internal reference voltage, and manipulates the output in whatever way it can such that the output is greater than the adjust pin by exactly that reverence voltage amount. Because a resistor has a directly proportional relationship between voltage and current, the 317's attitude about voltage has the side effect of causing a constant current through the resistor. But that's all it is, a beneficial side effect. The 317 is regulating voltage and only voltage. Once you see the world from the 317's point of view, you can better determine how it will react to other impedance devices.

With sufficient sensing and feedback control circuits, a bipolar transistor can emulate a constant resistance in one direction of current flow. This is how some electronic loads (power supply test equipment) work. It takes a little less work with a FET because its method of conducting current is closer to that of a resistor in the first place. Still, it won't work without some control circuitry. Same for using two diodes in a diode switch configuration.

So to answer your original question, yes it is possible. But it probably is not practical unless there are some unusual application requirements.

ak

12. ### cjdelphi

1,096
104
Oct 26, 2011
AnalogKid, ahhh ok you filled in the missing part for me, keeping the resistance across the transistor steady in which case the lm317 can be ruled out because i was hoping to use the lm317 to keep that stable voltage drop across it's col/emit ...

the challenge was to use something other than a resistor in cc mode with the lm317, i've been breadboard experimenting with little success... but you gave me something to go read up on, thanks

13. ### CDRIVEHauling 10' pipe on a Trek Shift3

4,960
652
May 8, 2012
Ha! At the starting gate I would have bet that the OP (cj) wanted to extend the max current limit of the 317 (which is doable using a pass transistor) but doing a bad job of explaining.

Just goes to show that when one assumes .... Glad I'm not a gambler.

Chris

14. ### cjdelphi

1,096
104
Oct 26, 2011

no... to build a constant current circuit using a transistor in place of a resistor

5,165
1,087
Dec 18, 2013
And I guess you want to use this as a variable current source?

5,165
1,087
Dec 18, 2013
This circuit will give you a constant 100 mA with R2 as 1K and R1 as 270R, from a load of 20R to 1R. Change R1 and R2 to increase the max current range.
Thanks

CDRIVE and cjdelphi like this.
17. ### duke37

5,364
771
Jan 9, 2011
R1/R2/Q1 are just a Zener simulation with 0.6V across R2. There will be around 0.2V across R1 giving a total of about 0.6V. Thus there will be 0.6V + 1.2V across R3. Gives a bigger drop out than LM317 on its own.

5,165
1,087
Dec 18, 2013
Nope 1 Volt across R3 as it is drawing 100 mA.
Thanks

19. ### CDRIVEHauling 10' pipe on a Trek Shift3

4,960
652
May 8, 2012
Yes, I get that. Can you be more specific about what you're trying to do. There's not much point in substituting a simple inexpensive resistor with a much more expensive solid state device without a good reason.

Next & last guess: Are you desirous of controlling the 317 current (via the transistor) remotely?

Chris

20. ### cjdelphi

1,096
104
Oct 26, 2011
Actually...

The transistor option would have been a cheaper substitute, the main goal was to use a cheap pot in conjunction with transistor vs higher rated potentiometer. .

i've basically built what i need right here, but it's cheaper to use a 20c transistor and 20c pot rather than using a \$3 potentiometer between out and adj on an lm317 in current regulation mode..

anyway, you show me how to use a cheap 20c pot without burning it on an lm317 cc circuit (that's the original goal)

File size:
187.2 KB
Views:
169