Constant Current Source LED driver, Series Resistance - Page 1
Forum section: electronics / beginners

author: Chet T16
author_rank: Frequent Contributor
timestamp: October 18, 2021, 11:45:09 am
content: Hi All,Help me out here, this is either a really simple answer or not at all.Falstad sim of circuit:https://tinyurl.com/yjmkkswtConstant current source of 78mA with 2 parallel LEDs, one LED has a series resistance which causes an imbalance of current flowing.What is the relationship between this resistance value and the current flow through each LED?

author: retiredfeline
author_rank: Frequent Contributor
timestamp: October 18, 2021, 12:06:25 pm
content: It depends on the I/V curves of the LEDs. In the case where they are the same type, then the voltages across the LEDs are those required to maintain the respective currents, and also the difference of voltage divided by the resistance should be the current in the less powered LED.

author: tooki
author_rank: Super Contributor
timestamp: October 18, 2021, 12:23:52 pm
content: Quote from: Chet T16 on October 18, 2021, 11:45:09 amStrange circuit, insofar as you’ve somehow got LEDs with a forward voltage of 72V.

author: timenutgoblin
author_rank: Regular Contributor
timestamp: October 18, 2021, 12:52:22 pm
content: Ohm's Law says that I = V / R. In a parallel circuit the voltage is the same across each branch, but the current depends on the branch resistance. More current flows into the left branch because it doesn't have a resistor.If you swap the position of the resistor the left branch will conduct 12.049mA and the right branch will conduct 65.951mA which is the opposite of what you have.If both branches were the same they would share equal current of 39mA each i.e., half of 78mA.

author: Chet T16
author_rank: Frequent Contributor
timestamp: October 18, 2021, 12:55:43 pm
content: Quote from: tooki on October 18, 2021, 12:23:52 pmHaha yes, a simpler way of representing the actual circuit of series LEDs

author: Chet T16
author_rank: Frequent Contributor
timestamp: October 18, 2021, 12:58:17 pm
content: Quote from: timenutgoblin on October 18, 2021, 12:52:22 pmYep, I get this and the current is split equally without the resistance in place in the actual curcuit. What I'm struggling to understand is how you would calculate the current for a different resistance or vice versa

author: tooki
author_rank: Super Contributor
timestamp: October 18, 2021, 01:12:06 pm
content: If you do the math (I did!), then it suggests the resistance in the branch without the resistor is about 80 ohms. It’s not zero because diodes are nonlinear devices. (It also means the resistance of the branch with the resistor isn’t actually just the 440 ohms.)If you measure the voltage at the output of the current source, you’ll find it’s not zero, but an oscillating voltage in the tens of microvolts. It oscillates as it equalizes across the circuit: more current through a diode means more voltage drop, too. But on the side with the resistor, the voltage drop across the resistor means that as current increases, the voltage to the diodes decreases, which then decreases current, which reduces the voltage drop across the resistor, which means more voltage across the diodes, which means more current through the diodes, which means more voltage drop in the resistor… so it’s in a constant feedback loop.The circuit is very hard to calculate exactly because it’s the interplay between two nonlinear components and one linear component.

author: timenutgoblin
author_rank: Regular Contributor
timestamp: October 18, 2021, 01:31:16 pm
content: Quote from: Chet T16 on October 18, 2021, 12:58:17 pmIt's because of this:Quote from: retiredfeline on October 18, 2021, 12:06:25 pmAlso, have a look at the LED voltages (Vd) for each LED. One LED has a higher Vd than the other due to the current in each branch (see attached screenshots).

author: Chet T16
author_rank: Frequent Contributor
timestamp: October 18, 2021, 01:52:25 pm
content: Quote from: tooki on October 18, 2021, 01:12:06 pmThis is what I suspected. The only reason I posted is because the falstad circuit behaves very close to the measured current values in the actual circuit so I thought theremaybe an easy answer

author: Terry Bites
author_rank: Super Contributor
timestamp: October 18, 2021, 05:07:53 pm
content: Assuming you know the function of the curve generating Vf@If for the LED..... then you can use differential calculus to find the operating point.You can get the approximate fucntion by plotting the curve in excel and using the regression tools. Or go badhttps://en.wikipedia.org/wiki/Shockley_diode_equationsic "Circuit simulation programs, of which SPICE and derivatives are the most prominent, take a text netlist describing the circuit elements (transistors, resistors, capacitors, etc.) and their connections, and translate this description into equations to be solved. The general equations produced are nonlinear differential algebraic equations which are solved using implicit integration methods, Newton's method and sparse matrix techniques.". Yawn Yawn Yawn FartOr just open bottle and relax

author: magic
author_rank: Super Contributor
timestamp: October 18, 2021, 05:13:59 pm
content: Yep, ordinary silicon diodes work by Shockley's equation and LEDs are probably similar.In more practical terms, with a silicon diode at room temperature and at low current you get a doubling of current for each 20~40mV difference in forward voltage depending on how "nonideal" the diode is. This voltage increases with temperature and at high currents some parasitic series resistance also comes to play.

author: perieanuo
author_rank: Frequent Contributor
timestamp: October 19, 2021, 07:06:07 am
content: hi,i don't get the utility of current source powering unbalances loads and expecting current control for each load.if you wanna master current in a load, you put each constant current source for each load, especially for led (one of my employers did something like this for voltage serial loads, LED bars in series, trying to activate or not the last leds if the mains voltage changed, the result was one last ugly bar half illuminating)2 years later, still nobody buyed that, not even for lightning elevator's shaft used by the repair technicians

author: Chet T16
author_rank: Frequent Contributor
timestamp: October 19, 2021, 09:19:55 am
content: Quote from: perieanuo on October 19, 2021, 07:06:07 amThe purpose here is to achieve colour mixing between two sets of LEDs but to shift the balance towards one colour or the other.In use, like this:https://tinyurl.com/ygtx83nr

author: tooki
author_rank: Super Contributor
timestamp: October 19, 2021, 04:49:37 pm
content: What I'd suggest, if the mechanical design provides for enough optical diffusion, is to not alter the current through an LED at all. You said you've got dozens of LEDs in series, so if you can, adjust the ratio by switchingwhichLEDs get turned on. (Meaning that you have some "spare" LEDs.)For example, suppose you only need a bit of tweaking, and you have 48 cool white and 48 warm white LEDs. You could divide those into 16 strands each (of 3 LEDs) and design your switching to control, say, 5 strands. So you'd have 43 strands WW always on, 43 CW always on, and then 5 circuits that can be switched to either a WW or CW strand to give you a few % of color control.If you need more control, then you'd really need a more elaborate controller based on either constant-current control or PWM.

author: Badwolf
author_rank: Contributor
timestamp: October 19, 2021, 10:10:58 pm
content: The calculation of voltages and currents is quite basic, it is a simple mathematical calculation.Starting from the Shockley diode equation$$I_d=I_s (e^{\frac{V_d}{nV_T}} -1)$$which is more than sufficient for our calculations, we can start by removing the -1.This value is only of interest for reverse biased diodes (Vd<0). For forward biased diode we have$$I_d \approx I_s e^{\frac{V_d}{nV_T}}$$.However, we do not know the value of n (quality factor), but we do know the characteristics of the diode: Is = 93.2pA and Vd = 72 for Id = 1A.So can calculate n :$$V_d \approx nV_T \ln{(\frac{I_d}{I_s})}$$and therefore nVt = 3.117386 and n = 120.58We can check this value with the first diodes: V = 63.527, which gives 66mANow let's use ohm law $$V_{d1}=R*I_{d2} + V_{d2} \;\;\;\;\; V_d = nV_T \ln{(\frac{I_d}{I_s})} \;\;\;\;\; I = I_{d1} + I_{d2}$$therefore$$nV_T \ln{(\frac{I_{d1}}{I_s})} = R*I_{d2} +nV_T \ln{(\frac{I_{d2}}{I_s})}$$which gives$$I= I_{d2} + I_{d2} e^{\frac{R*I_{d2}}{nV_T}}$$By using tools such Scilab, Matlab, ... we easily obtain the solutionExample in scilab, for R = 440 and I = 78mACode:deff (" = f (x)", "y = x + x * exp ((440 * x) /3.117386) -0.078")y = fsolve (0.040, ff)gives 12.04mA and to get the voltage, just use previous equationsNow, you just have to test different values ​​of R to get the desired current.

author: Badwolf
author_rank: Contributor
timestamp: October 19, 2021, 10:20:41 pm
content: Quote from: tooki on October 18, 2021, 01:12:06 pmPay attention to the limit of tools used.In this circuit there is no feedback (like on amplifiers), all values are well defined. Ultimately, there may be some oscillation when the current source is turned on, but very quickly the system will stabilize to a fixed and final value (excluding temperature variations that affect the characteristics of the diodes).The oscillations on Falstad scope are due to its algorithm of calculating voltages / currents