Op amp based adjustable current source for Laser or LEDs with Multisim simulations
ฝัง
- เผยแพร่เมื่อ 11 ก.ย. 2024
- Constant current source using an op amp and a transistor (or a MOSFET):
We give a detailed analysis of the circuit: derivation of the formulas and Multisim simulations. The values in the circuit are for illustrations only. Below we give more practical design considerations:
1. The beauty of this circuit is that I_LED can be adjusted by adjusting Vi, and I_LED is amplified by R1 and RF. (see point 3 example below).
To adjust Vi, one way is to use a microcontroller. The microcontroller outputs a PWM signal whose duty cycle can be controlled by a push-button for dimming purpose: press the push-button once we get 90% of maximum power, press again we get 80% of the power, .......... press 10 times we return to maximum power again. This concept can be commercialized in a lighting system.
2. From the video, we have
I_LED=V_i*((RE+R1+RF) / (R1*RE) ) .......... Eq. 1
One special case of this circuit is to take RF=0 (just use a wire to replace RF) and R1=∞ (just take R1 off ) then we will end up with a more simple circuit, then Eq. 1 became
I_LED=V_i*((RE+R1+RF) / (R1*RE) )
=V_i*((RE+∞+0) / ( ∞ *RE) )
=V_i*((∞ / ( ∞ *RE) ) if R1 → ∞, then R1+RE≈R1, we just dropped RE
=V_i*(1/ ( RE) ) ...... Eq. 2
3. A calculation example:
Suppose Vi= 1V (from a headphone jack to control a spotlight in DJ nightclub). we take RE=2 Ω (small RE is better to make the power consumption of RE small, so that RE is not hot.) and we use a MOSFET to replace the transistor for large current.
Now we can take 4 choices for R1 and RF:
case 1: simple circuit from Eq. 2 , R1=∞, and RF=0 , then
I_LED=Vi/RE=1/2=0.5A=500mA (use SI units first, to get A, then change A to mA, please)
case 2: R1=500 Ω, and RF=100 Ω, from Eq. 1, we have
I_LED=V_i*((RE+R1+RF) / (R1*RE) ) (use SI units please)
=1*((2+R1+RF) / (R1*2) ) =1*((2+500 +100 ) / ( 500*2) ) =0.6A=600mA
case 3: R1=2Ω, and RF=0 Ω
I_LED=1*((2+R1+RF) / (R1*2) ) =1*((2+2+0 ) / ( 2*2) ) =1A=1000mA
case 4: R1=2Ω, and RF=2 Ω
I_LED= 1*((2+R1+RF) / (R1*2) ) =1*((2+2+2) / (2*2) ) =1.5A=1500mA
Assuming a perfect opamp and sufficient headroom on the supplies, when the voltage at the non-inverting terminal is 8V, the voltage at the inverting terminal is also 8V. So the current through R1 must be 8V / 0.715K = 11.2mA. That current must also pass through Rf, so the voltage across it must be 11.2mA x 0.313K = 3.5V. Therefore the voltage across Re must be 8V + 3.5V = 11.5V, which makes the current through Re 11.5V / 0.368K = 31.3mA. That makes the current from the transistor emitter 11.2mA + 31.3mA = 42.5mA. Assuming the transistor β >> 1, then the collector current is also 42.5mA. No need for algebra, and it doesn't take 7 minutes.
Dear RexxSchneider
Thank you for your comment, your calculation is correct. Very good!
I disagree, the explanation is very important to show how this circuit acts as a current source.
@@mmh1922 Rubbish. My description above shows exactly how the circuit behaves as a current source and takes 30 seconds to read. Which part of it didn't you understand? Exactly what did you find missing that was present in the video, apart from all the unnecessary algebra?
@@RexxSchneiderI respect your right to express your opinion, however, as a reader, I decide what is important to me and what is not.
@@mmh1922 Of course you can decide whatever you want for you. And I can decide to call you out when you're spouting nonsense. Not for your benefit, naturally, but for the benefit of everyone else who reads your misleading comment and wants to decide if it has any value. That's why I asked you "Which part of it didn't you understand? Exactly what did you find missing that was present in the video, apart from all the unnecessary algebra?"
Your inability to address those basic questions are surely the clearest indication to any observer that your initial comment was devoid of merit.
Extremely clearly explained, and a very interesting problem. 谢谢老师。
I was going to comment about how circuits on exams always have ridiculous non-standard values. I guess it's to make the calculation harder or easier, depending on the problem, but you can't easily take these designs as is - good luck finding a resistor with the value of 393 ohms for example.. Then I read your comment on a more practical example. My OCD has been resolved. :D
Dear delarosomccay
Thank you very much for your comment about the values, the values are non-standard in the video, in my teachings I use a software called "diploma" to organize the problems. I randomize the values so that each students get different values on his own exam, so that the students cannot just copy from each other the answers. they have to go through the calculation to get the answers.
Nice slow explaination, loved it so much!!! Thank you
Nice explanation
Great video
Nice video. I would like to make one clarification though. At 5:32, approximating the base current with zero would indicate that the transistor is in cutoff mode and therefore I_0 would be 0 (because I_B*Hfe=I_0). So I don't think that is quite right. It seems the opposite to me, that I_LED == I when the transistor is open.
Dear Enigma758,
Thank you very much for your comments.
The question you raised is vey good. We should clarify here:
1. Electronics is not an exact science like mechanics, for examples, To make CORRECT APPROXIMAITON is a good step to solve any electronic problem, this is due to the fact that semiconductor device is not linear device of resistor type. For example, take any two leads from a transistor, say, B and E, V_BE can not be written as linear equation:
V_BE=(some kind of resistance)*Current !
when we study electronics we need to make approximations, but good ones.
2. The transistor in our circuit is not in cutoff region, Cutoff means all three currents I_B (base current) , I_E (emitter current ) and I_C (collector current) are all zeros.
3. The transistor in our circuit is in saturation region: I_B is quite large in terms of the range of I_B, I_C is large and V_CE is very small.
The transistor works as closed switch, C and E looks like closed wire, and V_CE≈0. (ideal case).
4. When we say "I_B is zero", we mean that when we compare I_B with I_C, I_B can be neglected. Exactly speaking, I_E=I_B+I_C by KCL.
or I_E=I_C/β+I_C, take β (hFE in your notation)≈100, so I_E≈I_C. i.e. we assumed I_B≈0, a valid approximation that does not cause significant errors. (point 1).
Thank you very much for your attention.
@@stemformulas I think you are really just saying that I_B doesn't add in much current even when the transistor is in saturation so that I_LED can be equated to I_O. Thank you for your response.
Exactly.
Nice derivation.
Nice explanation ❤
Why do you need Rf and R1? If you just connect the junction of the emitter and RE back to the inverting input you can set the current by adjusting Vi.
Thank you very much for your comment.
The circuit you suggested is widely available over the internet, that circuit has only two parameters: Vi and RE, the current is given by Vi/RE. The maximum current is limited. What if you need a very large current without complicating the circuit? for example, you have a 10 by 10 LED matrix, then you need a very large current.
In this circuit, by adding only two resistors RF and R1 (not an extra op-amp, not an extra transistor), you are adding another route for the current flowing through the LED. i.e. in this case the total current flowing through the LED is the sum of the current going thought RE and the current going through R1. By choosing proper values of RE, RF, and R1, you can obtain quite large current without adding more trouble. To see this, we can rewrite the current formulas as I_LED= Vi/RE+(RE+RF)/(R1*RE)*Vi, i.e. the first term is the current in the circuit you suggested, the second term is extra current. If we choose RF>>RE, then the current formula can be simplified as I_LED= (1+RF/R1)*Vi/RE, i.e. we get a current gain factor (1+RF/R1). Please see "3 calculation examples" in the description part below this video. Having RF and R1 is the beauty of this circuit.
But did you actually check to see how much base current is flowing? Blue and Green GaN LEDs are bright at 1mA, so maybe the base current could be a source of significant error. To make it irrelevant you could put the LED on the emitter leg of the circuit. As long as you have sufficient voltage headroom the op-amp won't care which side of the transistor it's on.
Dear simonlyons5681,
Thank you very much for your comment.
I do not quite understand the question, what is the 1mA current. what are the two LEDs, you use the two LED at the same time or what? what do you mean by the error? Please write your question in more details, I will get you back as soon as possible.
Hi, how much is the total voltage drop of this circuit? My red laser diode needs around 800/850 milliampere and it drop with 2.2- 2.7 volt. Can i use a single li ion 3,7 volt? and Which op amp and bjt/mosfet do you suggest me in my situation? Thanks you
Dear Sir,
Thank you very much for your comment.
For your situation, you can choose the following:
RE=0.5 Ohm (high power resistor). If you use a MOSFET, the voltage drop between the Source and the Drain normally will be 0.5 V, (less than 1 V)
So the total voltage drop will be
Vcc=2.7 V (laser diode) +0.5V (MOSFET) + (0.85A*0.5 Ohm) =3.6V.
So, a single Li Ion battery (3.7V) is enough.
As for MOSFET, you can use IRF540NF from Aliexpress, it is fairly cheep.
Be careful, do not hurt your eyes from such a powerful laser. Wear a goggle in your project.
Where do I get 8V for Vi assuming it's ground is the same as the rest of the system?
Thank you very much for your comment. First, please read the description section below the video ( I just added a description text there). There are two ways to get Vi, the simple way is to use a Zener diode in series with a resistor,
one lead of the resistor connected to Vcc, another lead of the resistor connect to the cathode of the Zener, and the Anode of the Zener connect to system ground. Vi is connected to cathode. Now you need to determine the resistor value:
To make the Zener working properly, make sure you have 5 mA to 10 mA current flowing through the Zener. then the value of the resistor is determined by the following formula:
Vcc=I*R+Vz, take I=10 mA=0.01A, if we have Vcc=18V, Vz=8V, then 18V=0.01A*R+8V, then R=(18V-8V)/0.01A=1000Ω=1KΩ.
The other way is to use a micro controller to obtain PWM, so you can adjust the brightness of the LED's by a push button.
😅😅😅😅😅😅well information good 😅😅
This is the exact circuit from my laser driver board I bought from Aliexpress 🤔
I am very glad to hear that. To find schematics from circuit boards is a very enjoyable and challenging task.
If 14 mA flows why the LEDs are not glowing? A LED will glow for as little as few 100 uA. Where is the simulation wrong?
Dear Nara49 Veera,
Thank you very much for your comment.
When I say that the circuit is no more working, when I_LED=14 mA, in the example, I mean the current was not kept the same as that flowing through a wire (no LED) or one LED, 41 mA.
Ideal constant current source should keep the current constant no matter how many LEDs are there in series, always 41 mA, as in our example, but in reality such an ideal constant current source never exits, so It is necessary to tell how many LEDs can drive for a current source. We gave the formula in the video.
In our example if the circuit gives 14 mA, (lower than 41 mA), we say that the source is no longer working, whether LED glowing or not is not relevant ! The key is that the current is out of control. Different LED has different properties, all we need is to supply the LEDs with controlled current I_LED. this is the circuit all about with formulas.
Probably what you mean is that I should give a more realistic example with I_LED= a few 100 uA instead of 41 mA. If this is what you meant then you are totally correct.
STEM Formulas
In a practical situation, if the diodes do not light, it means there is no flow of current through them. Probably, I think, if a variable resistive load existed, then a situation may arise in which the current source will not be able to support the intended 41 mA. Thank you for your reply. It was a good step by step explanation that helped me to learn about current source using op amp.
It is also interesting if you simply place a variable resistor to replace the LEDs in the circuit. When the resistance is zero, then the current through the resistor is 41 mA, when you increase the resistance of the resistor the current is kept at 41 mA for some time, when you increase further, the current drops. This is the usual behavior for a real life constant current source.
Constant current source feels comfortable when the load is shorted, but it feels terrible when the load is open, R_load=∞, the voltage =I*R_load=∞, but the source does not have infinite voltage to supply! (whereas voltage source feels comfortable when the load is open, R_load=∞, but feels terrible if you short the output leads, in this case the current supposed to be infinite, but it can not deliver infinite current.)
@@stemformulas Then, perhaps, as the resistance increases beyond a limit, the current starts decreasing to support the supply voltage limitation. It is interesting. I will try to make a practical circuit when I get some time.
In real world application Ib != 0 (if you need some acurracy) and I would put second transistor in Darlington configuration to make Ib really small.
Thank you very much for your comment.
I totally agree, by putting a second transistor in Darlington pair configuration, I_C=β_1*β_2*I_B, if β_1= β_2=100, then I_C=10000*I_B, or I_B=0.0001*I_C≈0
♥️
Anything for Anode grounded lasers?
Dear Sir or Madam,
What is the current needed to go through the laser diode, what is the forward voltage for the laser diode?
@@stemformulasI need from 0 to 100 mA. The forwarded voltage is around 1.5 volts and the laser is anode grounded
@@cristianvargas8095 What is the voltage of your power source? Do you have a dual power supply? or single power supply? We can design a fixed 100 mA constant current diver for the laser with anode grounded.
In reality R1 and RF doesnt make any sense, its only for calculation purpose...because it will rise amplification factor and its not needed here. It will just create stability issues.
哥们我还以为你是印度人哈哈
I don't think "clearly" would be the way I describe the video. Thorough? sure... Informative, educational? definitely. Clearly? Ehhh lol
Thanks 🙏👍
WHAT BOOK IS THIS?
There is no book for this...
♥️