I'm having a problem with my constant current sink circuit [see below]. As I increase the variable voltage, the Voltage across my 22 Ohm resistor remains relatively constant (0.7V). However, the voltage across my LED increases as the source voltage increases, well past 5V and even 6V (I did not want to take it further as these values would be damaging the LED). That indicates that the current across the LED is not limited by my constant current circuit as I believed it should be [see question: 'Leftover' voltage when using constant current

My question is this, what is the path for this excess current, and how do I actually implement the current limiting I want?


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ @Jonk I would appreciate your opinion if you could spare a moment \$\endgroup\$ – Jakkatak Mar 28 '18 at 0:53

While I cannot give you the same answer as jonk did, there is no need to. Your increasing voltage but: R1 is not a constant current source, therefore the voltage will rise at the Q1 collector and the MOSFET gate. That is why op-amps often have several stages of voltage and current regulation, to account for a wide range power supply yet draw the same idle current.

If R1 was a constant current source driven by a voltage regulator driven by a constant current source, then V+ could have a wide range, maybe 5 volts to 30 volts or so. The upper limit is the max ce voltage of Q1 or M1, whichever is lowest.

I will try to get in a schematic to show what I am writing about.

Ok, just what I wrote about. R1 is replaced with a constant current source of 650 uA. It is driven by a constant current sink of 2.65 mA. It has a 3.3 volt zener as a reference, so this circuit should keep the LED current mostly constant from 5 volts to 35 volts. The 2N39xx series has a 40 volt limit and is common and cheap.

Note that the 3.3 volt zener may need to be the 500 mW type to maintain 3.3 volts if V+ is only 5 volts or so.

To understand this more I suggest looking at schematics of op-amps to see the many stages they use for current regulation regardless of the supply voltage.


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ Great response and I could really learn a lot from this schematic. One day I'll get there :) \$\endgroup\$ – Jakkatak Mar 29 '18 at 4:24
  • \$\begingroup\$ Whoa, slightly offtopic, but the minimalist in me shudders at this complexity: all this components, just to reliably drive a single LED! There has to be a better way (thinking of a specialized IC, or JFET-based constant current diode, or discrete depletion-mode MOSFET + a trimpot to set the current). \$\endgroup\$ – anrieff Mar 29 '18 at 7:05
  • \$\begingroup\$ Yes it is overkill, but I wanted to show the OP how to have very stable current over a wide voltage. \$\endgroup\$ – Sparky256 Mar 29 '18 at 7:10
  • \$\begingroup\$ @Sparky256, true, it is a very good example of analog design \$\endgroup\$ – anrieff Mar 29 '18 at 7:27

I apologize for not noticing and also for not reading perhaps as long or as well as I should. I'll just quickly think through some thoughts.

  1. Your \$R_2=22\:\Omega\$ suggests to me an LED current of about \$32\:\text{mA}\$ or less.
  2. The threshold voltage for that FET is a max of \$2.45\:\text{V}\$. Add to this a \$V_\text{CE}\ge 1\:\text{V}\$ (to stay well out of saturation), I'd say that \$V_1\ge3.5\:\text{V}\$.
  3. However, you don't want a lot of variance of \$Q_1\$'s \$V_\text{BE}\$, so this means the collector current should be relatively stable. So a current source would be optimal instead of \$R_1\$.
  4. Lacking a current source and instead stuck with a resistor there, this means that the voltage drop across the resistor needs to be limited to an acceptable dynamic range. Let's pick the range from \$1\:\text{V}\$ to \$4\:\text{V}\$.. this would imply a range in the \$V_\text{BE}\$ of \$26\:\text{mV}\cdot\operatorname{ln}\left(\frac{4}{1}\right)\approx 36\:\text{mV}\$. Across the resistor of \$R_1=22\:\Omega\$, this implies less than \$2\:\text{mA}\$ variation in the LED current.
  5. So now, \$4.5\:\text{V}\le V_1\le 7.5\:\text{V}\$, with still higher maximum voltages implying even more LED current variation.
  6. So if we assume a starting collector current for \$Q_1\$ of \$1\:\text{mA}\$, then \$R_1=\frac{1\:\text{V}}{1\:\text{mA}}=1\:\text{k}\Omega\$. The exact value you have in your circuit.
  7. Base current of \$Q_1\$ should stay below \$\frac{4\:\text{mA}}{\beta=100}=40\:\mu\text{A}\$, which is modest compared to the LED current and shouldn't significantly impact it.

So I actually don't see a problem. So long as your starting voltage is at least \$4.5\:\text{V}\$.

If you'd used a fixed voltage (say \$5\:\text{V}\$) at the top of \$R_1\$, that would just be even better, really.

Either way, I think it should work.

So I'm not sure about the problem. Current source would be better. But the resistor, assuming some reasonable limitations on the lowest allowable voltage, should be okay. Not optimal. But okay.

So if you are experiencing odd behavior, I'd look more closely at the devices themselves (make sure they are good) and also the wiring. Something else is going on.

An approach that is relatively stable over temperature, works passably vs supply voltage, and uses the same number of active parts, you could consider this:


simulate this circuit – Schematic created using CircuitLab

The temperature stability applies if both BJTs are coupled thermally. If the temperature increases, the \$V_\text{BE}\$ of \$Q_1\$ declines, leaving a higher voltage across \$R_1\$, and this fact would tend to suggest that there would be an increase the LED current. However, as the temperature increases and assuming that \$Q_2\$ is thermally coupled to \$Q_1\$, then this also means that \$Q_2\$'s \$V_\text{BE}\$ declines and therefore there is less current through \$R_3\$ and thus also through \$R_2\$. With a now lower voltage drop across \$R_2\$, the base of \$Q_1\$ is lower too. So this tends to compensate by causing a smaller voltage drop across \$R_1\$.

It uses just two BJTs. The cost is in the added resistors. Also, cheap BJTs can be used. I get my BJTs for far less than I get my FETs for, generally speaking.

  • \$\begingroup\$ Thank you for responding to my post. I really appreciate the math you include in your response, it helps tie it all together for me. As you say, the problem was elsewhere in my circuit and I have continued to use a 1k resistor. \$\endgroup\$ – Jakkatak Mar 29 '18 at 4:23
  • \$\begingroup\$ @jonk. Thanks for your input. I am a hardware person and know enough math to do current sources and sinks. At least you did not contradict me. I do think 30 mA is a bit much for todays LED's though. \$\endgroup\$ – Sparky256 Mar 29 '18 at 5:43
  • \$\begingroup\$ @Sparky256 (A) I didn't care to comment on \$30\:\text{mA}\$. It was just an inference I made from the resistor value in order to follow through analyzing the circuit. For analysis there's no need to judge the right or wrong of it. It's just a step of many about my thinking as I went through the circuit. Nothing more or less. (B) I don't know what to say to "at least you did not contradict me." I hadn't even read your response, at all. I still haven't. Maybe I should? The OP had just asked for me by name and so I wrote as fast as I could so I could move on. \$\endgroup\$ – jonk Mar 29 '18 at 6:08

I don't see why this is not working for you. This circuit works at fairly constant current. With a 2n4401 and a voltage from 6 to 24V in you should get a current varying between 31 and 32 mA, which is good enough for LEDs usually.

Careful, with a Blue Led you get a forward voltage drop around 4 V, so you need a minimum input voltage of 4 V, plus the Vbe of the transistor 0.7 V, plus some room to move, thus minimum 6V.

  • \$\begingroup\$ Yes, the fact that the voltage across the 22 Ohm resistor remained 'relatively constant' proves that the current through it was regulated to ~32mA. Where the presumed extra LED current came from is a mystery. Only thing I can think of is that Q1's Collector and Emitter were swapped around, resulting in very low current gain and high Base current. \$\endgroup\$ – Bruce Abbott Oct 24 '19 at 19:48
  • \$\begingroup\$ another possibility is that a long lead on the gate got the MOSFET oscillating at high frequency. Best put a 10 ohm resistor in series very close to the gate. \$\endgroup\$ – Mike Tommasi Oct 24 '19 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.