Author Topic: Calculate Current  (Read 20184 times)

0 Members and 1 Guest are viewing this topic.

Online EEVblog

  • Administrator
  • *****
  • Posts: 37730
  • Country: au
    • EEVblog
Re: Calculate Current
« Reply #100 on: October 16, 2021, 11:09:35 pm »
   Thats why I believe the V/I curve is the only possible usable source to find the correct answer.
   I extracted the V/I data from the TLUR6400 presented by Dave as a practical LED diode example.
   With that I calculated the currents and voltages that agree with the curve, using successive approximations.
   Of course extraction data from a image presented in a datasheet is not that precise, but the source of the curve could come from a better source.

Yes, I think that it you want practical results to match up to theory, this is really the only way to do it.
 

Offline GrandTheftAuto4life

  • Contributor
  • Posts: 35
  • Country: se
  • Random Dude Doing Random Stuff
Re: Calculate Current
« Reply #101 on: October 17, 2021, 01:21:29 am »
@GrandTheftAuto4life, either your written rejection of the circuit was invalid, or that indeed isn't the circuit. Because if I'm interpreting the circuit correctly (attached), it's perfectly reasonable to simplify down using parallel and series formulae.

There is something missing but i can not remember it, sorry. (it's been almost 15 years)
I may not be perfect, but parts of me are excellent
 

Offline timenutgoblin

  • Regular Contributor
  • *
  • Posts: 190
  • Country: au
Re: Calculate Current
« Reply #102 on: October 17, 2021, 01:45:59 pm »
The right hand side of this circuit has contradiction written all over it. It is also paradoxical, but there is a solution (*). The LEDs are stated to operate at 2V 20mA. The LEDs either operate under the stated conditions or they don't work at all.

The top LEDs require 20mA each totalling 40mA in to the node. The bottom LED requires 20mA out of the node. This is a contradiction of Kirchhoff's Current Law.

If the bottom LED is operating at 2V 20mA then the top LEDs will fail to operate at 10mA each being under powered. If the top LEDs are operating at 2V 20mA then the bottom LED will fail to operate at 40mA being over powered.

The only way for the LEDs on the right hand side to operate properly is for the top half to operate and not the bottom half or the bottom half to operate and not the top half. This is a paradox. The right hand side of the circuit is invalid, contradictive and paradoxical.

(*) The only solution to resolve the contradiction and paradox is to duplicate the right hand side of the circuit, flip it vertically about the node and superimpose it onto the original circuit. When the top LEDs are operating at 2v 20mA each, the bottom LED will also be operating at 2V 20mA. Also Kirchhoff's Current Law is obeyed since 3 x 20mA going into the node will be the same as 3 x 20mA coming out of the node. The extra 3 LEDs are redundant, but necessary to avoid contradiction and paradoxes.

 :=\
 

Offline Vincenzo

  • Regular Contributor
  • *
  • Posts: 73
  • Country: us
Re: Calculate Current
« Reply #103 on: October 17, 2021, 02:24:57 pm »
The question is in a book I once had (trying to remember the name, will post when I do) and the original question does not say that all LED's have 20mA and 2V at the same time because if that's true (presenting a contradiction 20mA+20mA=20mA which is impossible and I don't know why every commenter is going there!! probably original poster's fault) there is no question left and all voltages and currents are known. The 20mA/2V mentioned by original poster only meant that it is a point where LED's will be "lit" because part of the original question is which LED is lit!

I gave an answer in page 4 of this thread.
 

Offline lacek

  • Regular Contributor
  • *
  • Posts: 63
  • Country: pl
Re: Calculate Current
« Reply #104 on: October 17, 2021, 11:00:52 pm »
You know this because of who the question is aimed at, high schoolers. This is why the 4V VCC matches 2x the given LED drop precisely. The question will not confuse someone with no in-depth knowledge of diodes. It's only us poor engineering schmuck's who get suckered into thinking it's more complicated  ;D

So is this Ipho training material:
https://www.ioc.ee/~kalda/ipho/e-circuits.pdf

On recent (69th) Polish National Physics olympiad  (again, for high schoolers) there was problem centered around diode equation:
https://kgof.edu.pl/archiwum/69/of69-1-2.pdf

What the problem says (in Polish) is not crucial, but the diode equation is clearly visible.

Not every high school problem is "take U/I = R and knowing two things calculate the third.  There are  Olympiad-oriented students. There are even high schools which have a special courses for people willing to participate in olympiad.

The 4V = 2V *2  may be simply a "trap".

I also suspect the teacher may not fully grasp the consequences of the question.

There are different types of teachers:  those that fail at doing even simplest non-standard problems, and those that excel at their job and their student win competitions.
Both types are paid the same due to unions, "for fairness" :) There was even a study into that at my university at the education department and its results were very unpopular among teachers. The study clearly identified both groups...


EDIT:

well that is disappointing:

Thank you, everyone. Especially Dave for even making a whole video regarding the problem. Very interesting to read your different approaches.

So, the backstory of the problem. The circuit got handed to us in a high school entry course in electronics. The circuit was supposedly made by our teacher. Our teacher seems to have lacking knowledge regarding LEDs and current in a series circuit. By his means, the LED drops voltage AND current. I had to prove him wrong 8).

Still this is a problem a good teacher can work with. Too bad it was "an accident" :)
« Last Edit: October 17, 2021, 11:19:16 pm by lacek »
 

Offline perieanuo

  • Frequent Contributor
  • **
  • Posts: 838
  • Country: fr
Re: Calculate Current
« Reply #105 on: October 18, 2021, 06:53:01 am »
Hello, how would I calculate the current at the different points in this circuit?

Vcc = 4v
LED: Vf = 2v, 20mA
R1 = 100 ohms
i'm surprised by the mass of those replies.
this is a clear case of "school" type of question, there is no assumption the LED have a real-life characteristic, so the answer he wanted is imho 0.02/0.04/0.02, assuming the led doesn't change forward voltage when 40mAmps flow in.
it was fabricated by a teacher he wants you to respond quick and make some further observations about B current, why etcaetera.

the real result of course it's different, let's take the characteristic and put that curve equation to deduce what static DC point we get for B and C. i seriously doubt the teacher solve that equation in 10 minutes, put him to that challenge, but without spice simulator. so i added a little bit to this useless thing
 
The following users thanked this post: tooki

Offline lacek

  • Regular Contributor
  • *
  • Posts: 63
  • Country: pl
Re: Calculate Current
« Reply #106 on: October 18, 2021, 07:55:41 am »
this is a clear case of "school" type of question, (...)
the real result of course it's different, let's take the characteristic and put that curve equation to deduce what static DC point we get for B and C. i seriously doubt the teacher solve that equation in 10 minutes, put him to that challenge, but without spice simulator. so i added a little bit to this useless thing

In this case it seems that indeed this problem was interesting by mere accident, as OP claims his teacher has no clue about anything.  But whatever the reason, it is a very good school problem for competetive students.  If one considers schools where there teach about nonohmic characteristics U(I).  Existence of such places very country-specific.  AFAIK there are very different approaches across the world. I was told that in Italy "every students learns everything" meaning they have broad perspective on literature, biology even if they are interested in maths. I have no clue about France.

In my country in high school you specialize - you pick "humanities/science/computer science/theater/....." class and this affects your curriculim. Also the exam after the high school comes in "basic" and "advanced" level - in practice. correlated with the class choice.

In addition to existence of "extended science classes" (in almost every high school) , there  exist  public, state owned schools (one-two per large city) where the classes are even more advanced, and olympiad level problems are considered during normal classes and appear on tests, they also learn complex numbers, some differential calculus (at the price of literature, biology, geography, which will be severely downgraded in curriculum and eyes of every student in such a class)  . Some even have classes (that result in grades in high school diploma) given by university employees. To be admitted to such a highschool you have to show interest in sciance and have top rate grade. Sometimes highresult in middle-school maths/phyisics/.... competition is a requirement.
I think it was a valid assumption that this forum attracts people interested in science and I would not assume that they do just U=I*R in schools. I think there are equivalents here and there. For sure there is one in India and China.
 

« Last Edit: October 18, 2021, 07:57:39 am by lacek »
 

Offline Vtile

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: Calculate Current
« Reply #107 on: October 18, 2021, 05:40:46 pm »
This would be much more interesting example if the circuit would be powered from ideal current source and this circuit would act as parallel resistance/impedance of it.

As of turning the world upside down from piecefull voltage controlled world as we / you usually approach every source and circuit in electrical and electronics networks.

There a is reason why world is sourcing voltage, so boring isn't it.
« Last Edit: October 18, 2021, 05:57:05 pm by Vtile »
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Calculate Current
« Reply #108 on: October 19, 2021, 03:32:01 am »
Has anyone considered that led's are light sensitive ? so , if they are arranged as in the diagram the center led gets more light than the outer ones. That has an impact on the led.
calculators ready ? go !
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 
The following users thanked this post: jesuscf, tooki

Offline dtmouton

  • Contributor
  • Posts: 42
  • Country: za
Re: Calculate Current
« Reply #109 on: October 19, 2021, 10:20:34 am »
A slightly expanded version of the solution posted above.
 

Offline Vincenzo

  • Regular Contributor
  • *
  • Posts: 73
  • Country: us
Re: Calculate Current
« Reply #110 on: October 19, 2021, 11:34:14 pm »
A slightly expanded version of the solution posted above.

Exactly,
It was Sedra & Smith
That's where I saw the questions years ago, and exactly like my solution in page 4 of this thread
 

Offline dtmouton

  • Contributor
  • Posts: 42
  • Country: za
Re: Calculate Current
« Reply #111 on: October 20, 2021, 08:44:24 am »
I fully agree with Dave that this circuit has major deficiencies when viewed from the practical perspective. For one, we saw how the current increased significantly as the junction temperature increased.

The point is that this is a basic exercise in DC analysis that any third year electronic engineering student should be able to perform before moving on to analyzing more practical circuits. It's all about mastering basic concepts and techniques.

Dave, your reply to what you think "the answers is that they wanted" is just fundamentally wrong. Please look at some of the solutions that were posted on this blog.
 

Online EEVblog

  • Administrator
  • *****
  • Posts: 37730
  • Country: au
    • EEVblog
Re: Calculate Current
« Reply #112 on: October 20, 2021, 11:23:38 am »
Dave, your reply to what you think "the answers is that they wanted" is just fundamentally wrong. Please look at some of the solutions that were posted on this blog.

No it's not wrong, it's right.
How do I know this? I suspected that the circuit was entry level stuff and required an entry level answer, and this was confirmed correct by the OP who said it was a question given to high school students. There is absolutely no way a question aimed at high schoolers requires any more complexity than my 20/10/10 answer. And especially when no characteristic curve is provided.
« Last Edit: October 20, 2021, 11:28:12 am by EEVblog »
 

Offline dtmouton

  • Contributor
  • Posts: 42
  • Country: za
Re: Calculate Current
« Reply #113 on: October 20, 2021, 11:29:36 am »
No its wrong. Where did you study engineering?
 

Online EEVblog

  • Administrator
  • *****
  • Posts: 37730
  • Country: au
    • EEVblog
Re: Calculate Current
« Reply #114 on: October 20, 2021, 11:46:12 am »
No its wrong. Where did you study engineering?

 :palm:

It's "right" for the intended audience. There is absolutely no way a simple high school question on LED's expected an answer based on the diode equation or an answer based on the (not supplied) characteristic curve. The "expected" answer is 20/10/10. It was presented as an introductory electronics question.

Thank you, everyone. Especially Dave for even making a whole video regarding the problem. Very interesting to read your different approaches.

So, the backstory of the problem. The circuit got handed to us in a high school entry course in electronics. The circuit was supposedly made by our teacher. Our teacher seems to have lacking knowledge regarding LEDs and current in a series circuit. By his means, the LED drops voltage AND current. I had to prove him wrong 8).
« Last Edit: October 20, 2021, 11:51:19 am by EEVblog »
 

Offline dtmouton

  • Contributor
  • Posts: 42
  • Country: za
Re: Calculate Current
« Reply #115 on: October 20, 2021, 11:57:24 am »
I get the context.
 

Offline dtmouton

  • Contributor
  • Posts: 42
  • Country: za
Re: Calculate Current
« Reply #116 on: October 20, 2021, 12:11:31 pm »
Maybe you can make another video about how to solve the problem correctly. I agree that its is far above the level of a high-school entrance exam. My apologies for the misinterpretation.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Calculate Current
« Reply #117 on: October 20, 2021, 02:06:41 pm »
How about a 3 X 6V bulb version. :popcorn:
The second part of the question could be 'What could possibly go wrong?'
.  That took much longer than I thought it would.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12852
Re: Calculate Current
« Reply #118 on: October 20, 2021, 03:46:45 pm »
Hello, how would I calculate the current at the different points in this circuit?

Vcc = 4v
LED: Vf = 2v, 20mA
R1 = 100 ohms


If the original question was "Solve .... for current in each branch, SHOWING YOUR WORKING."  then its a nasty trick question designed to see if anyone has been reading ahead.   The left (R + LED in series) branch checks the student's understanding of the course module to date, as it can be simply solved with the data given.   The right branch(s) are unsolvable due to insufficient data, but its the working that will be interesting.

If one assumes a sub-'spherical cow' grade LED model, namely that Vf remains constant for all useful values of If, (as commonly assumed for 'back of the envelope' LED resistor calculations), and that the impedance of the 4V supply is negligible, it is impossible to write a system of equations for the branch currents consistent with Kirchhoff's circuit laws - as its given that the LEDs have 2V across them when passing 20mA, either you throw out KCL or determine that the current is unconstrained.

If you make the slightly more refined assumption that all the LEDs have non-zero internal resistance, you can determine that the upper pair will have less than 2V across them so will each pass less than 20mA, and that the lower one will have over 2V across it and will pass more than 20mA but less than 40mA, but will be unable to further refine your solution.   I suspect that's the answer the teacher is looking for.

If you attempt to apply the Shockley diode equation , you probably fail as its beyond the scope of the module, and you are forced to assume the ideality factor and saturation current, and attempting to fit a curve with two independent controlling constants to a single data point indicates a severe lack of scientific/engineering rigor, disqualifying you from any careers more advanced than burger-flipping except working as  a sycophantistic yes-man with your nose so far up your boss's @rse, your socks are getting stained! 
« Last Edit: October 21, 2021, 03:23:52 am by Ian.M »
 

Online amyk

  • Super Contributor
  • ***
  • Posts: 8263
Re: Calculate Current
« Reply #119 on: October 20, 2021, 11:58:08 pm »
It's been interesting reading through this thread and seeing the East European vs Western viewpoints on the appropriateness of the question and education level.
If you attempt to apply the Shockley diode equation , you probably fail as its beyond the scope of the module, and you are forced to assume the ideality factor and saturation current, and attempting to fit a curve with two independent controlling constants to a single data point indicates a severe lack of scientific/engineering rigor, disqualifying you from any careers more advanced than burger-flipping except working as  a sycophantistic yes-man with your nose so far up your boss's @rse, your socks are getting stained!
If you look at the original solution using the diode equation, notice how it doesn't matter what the constants are, since they cancel out in the end. It could well be put in the form of a word problem: "Two diodes are connected in parallel, and they are connected in series to a third. Each diode has a forward voltage drop of x volts at a current of y A. 2x volts are applied across the whole assembly. What is the current that flows through each diode?"
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12852
Re: Calculate Current
« Reply #120 on: October 21, 2021, 03:34:23 am »
Thank you for that.  I failed to do the math and only skimmed the thread so must now eat crow!  :palm: 
 

Offline dtmouton

  • Contributor
  • Posts: 42
  • Country: za
Re: Calculate Current
« Reply #121 on: October 21, 2021, 05:58:57 pm »
The one thing we don't know is the junction temperatures and this circuit would be sensitive to the junction temperatures. The bottom LED in the right-hand string will get hotter than the two above it.

Once we know how to analyze the circuit we can do a sensitivity analysis and figure out ways to make the design less sensitive to variations in component parameters.
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5226
  • Country: us
Re: Calculate Current
« Reply #122 on: October 22, 2021, 05:05:16 pm »
In contrast with many on this thread, I think that this is an excellent question.  It can be solved at many levels of approximation, each level indicating a greater understanding of both theoretical and real world answers.

Those who actually breadboarded the problem and measured results got a rich opportunity to understand the results, which undoubtedly varied between the experimenters.  Those variations are yet another opportunity for learning.  The published results directly contradict the opinions expressed by some in this thread.  Those folks also get an opportunity to understand where their analysis was wrong.  Reality always trumps theory.

I do have a comment about some of the opinions expressed here.  There is a whole group saying that there is not enough information to solve the problem, identifying various things such as lack of diode curves, lack of temperature information and so on.   I would ask this group if a question showing a single 1000 ohm resistor with 10 volts across it that asks for the current can be solved with the supplied information.  Most would jump in with Ohm's Law and say sure.  But what about the tempco of the resistor and the thermal impedance to ambient and the ambient temperature?  Or any of several other things that might matter.  Almost all problems lack sufficient information if enough thought is put into the issue.  A good student will show how the problem was addressed, and a good teacher will grade the results as they compare to the desired performance in the course.  Radically different in high school and grad school.
 
The following users thanked this post: rs20

Offline AG6QR

  • Frequent Contributor
  • **
  • Posts: 857
  • Country: us
    • AG6QR Blog
Re: Calculate Current
« Reply #123 on: October 24, 2021, 11:49:21 pm »
I do have a comment about some of the opinions expressed here.  There is a whole group saying that there is not enough information to solve the problem, identifying various things such as lack of diode curves, lack of temperature information and so on.   I would ask this group if a question showing a single 1000 ohm resistor with 10 volts across it that asks for the current can be solved with the supplied information.  Most would jump in with Ohm's Law and say sure.  But what about the tempco of the resistor and the thermal impedance to ambient and the ambient temperature?  Or any of several other things that might matter.  Almost all problems lack sufficient information if enough thought is put into the issue.  A good student will show how the problem was addressed, and a good teacher will grade the results as they compare to the desired performance in the course.  Radically different in high school and grad school.

But the difference is that, with a resistor, the secondary effects such as tempo, ambient temperature, or amount of ambient light shining on an LED typically won't affect the first or second significant digits. With the LED problem as stated, you can't even determine the first digit of the currents in the right branch without knowing those types of details.

Part of good design practice is to avoid designing circuits where the secondary effects affect the desired behavior so much.
 

Offline szir

  • Newbie
  • Posts: 1
  • Country: hu
Re: Calculate Current
« Reply #124 on: October 26, 2021, 08:53:27 pm »
If I would give my job interview answer then it would look like something like Tomorokoshi’s after pointing out that this should not be built like this in practice. :)
...except (1.3 should be) I=Is*(exp(V/VT/n)-1)
Since the current at zero voltage should be zero (otherwise I could just get a bunch of diodes and generate current… though I would need a lot since Is is really small)

Since we assume ideal and identical diodes we can use n=1 and calculate Is from the given data point Vf=2V, If=20mA and rearranging (1.3)
(1.5) Is = I/(exp(V/VT)-1)
Where
(1.6) VT = k*T/q
k=1.380649e-23; // J/K = C*V/K
q=1.602176634e-19; // C
T=300; //K
Note: Because we don’t know anything about the temperature or cooling it’s easy to assume constant identical temperatures (T=300), but it will not be the case in real world.

From 1.3 we can calculate V by rearranging the terms and taking the natural logarithm of both sides
(1.7) I/Is+1=exp(V/VT)
(1.8 ) V=ln(I/Is + 1)*VT

There are multiple ways solving this.

The quickest to do without a computer is to take the voltage difference between diode B and C
(3.2) dV = V2-V1 = VT*(ln(I2/Is+1) - ln(I1/Is+1)) = VT*ln((I2/Is+1)/(I1/Is+1))
Because we know that I1>>Is (I1 is much greater than Is) and I2>>Is, therefore I1/Is>>1 so we can simplify with little error
(I2/Is + 1)/(I1/Is + 1) ~~ (I2/Is)/(I1/Is)=(I2/I1)
and we get
(3.1) dV = VT*ln(I2/I1)
Because I2=2*I1,
(3.3) dV=VT*ln(2) = 17.919241 mV
We know that V1+V2 = Vcc and V2=V1+dV (from 3.2), so V1+V1+dV=Vcc and therefore
(3.4) V1=(Vcc-Vd)/2 = 1.9910404 V
(3.5) V2=(Vcc+Vd)/2=Vcc-V1= 2.0089596 V
Substituting the results to (1.3) we get the currents:
IC=I1=Is*(exp(V1/VT)-1)= 14.142136 mA
IB=I2=Is*(exp(V2/VT)-1)= 28.284271 mA

Since we calculated the currents from voltages it’s not surprising that V1+V2=Vcc with zero error (V1+V2-Vcc=0). The only error of our calculation we can notice is in the currents. While I2/I1=2.0000000 is true, I2-2*I1 should also be 0, but it is not. It’s -3.504e-16, but it is close enough to 0, it’s unmeasurebly small (-0.0003504 pA). The error is likely comes from floating point precision rather than the simplification we made at (3.1). I1/Is = 2.805e+33 so adding 1 does not make a difference, cannot be represented in float or double precision. (I1/Is+1)-(I1/Is) does give 0 as result (instead of 1).

I used SciLab to solve the problem in other ways.
We can get an idea by graphing either the voltages over currents or the currents over voltages.
Or we can solve it numerically by either way: reducing the voltage error or the current error.
First define the diode functions:
Code: [Select]
function I=diodeI(V)
    I=Is*(exp(V/VT)-1);
endfunction

function V=diodeV(I)
    V=ln(I/Is + 1)*VT;
endfunction
Then we can graph the Voltages over an interval (10mA..20mA) of currents of C. The solution is when VB = Vcc-VC (while IB=2*IC)
Code: [Select]
I=linspace(10,20,4000)/1000; // 10mA to 20mA
figure;
plot(I*1000,    diodeV(I*2)    ); // VB =
plot(I*1000,Vcc-diodeV(I)  ,'r'); // Vcc-VC

Or we can graph the currents (IB and 2*IC) over a range of voltages.
Code: [Select]
V=linspace(1.9,2.1,4000);
figure;
plot(V,diodeI(V));     // IC =
plot(V,diodeI(Vcc-V)*2,'r'); // 2*IC

To solve it numerically we can also use these two approaches:
We minimize the voltage error as a function of current:
Code: [Select]
function Verr=diodeVErr(I)
    Verr = diodeV(I)+diodeV(I/2) - Vcc;
endfunction
Isol = fsolve(20e-3, diodeVErr); /// start from 20 mA
Isol  = 0.0282843
Or we minimize the current difference as a function of voltage:
Code: [Select]
function Ierr=diodeIErr(VB)
    Ierr = diodeI(VB) - 2*diodeI(Vcc-VB);
endfunction
Vsol = fsolve(Vcc/2, diodeIErr); /// start from 2V
Vsol  = 2.0089596
Thankfully the results match the one we got earlier. (Which does not mean it’s correct, but at least consistent ; )
It’s also nice that it matches the simulation result of hadibaria and Wytnucls.

I was curious how would temperature change effect the result. It’s likely that higher current will result higher temperature (unless there is significant different in cooling or environment between B and C). Obviously we don’t have any data on this, so it’s complete guesswork…
A diode at 2V and 20mA consumes 40mW, some of it will become heat (60%..95% of it). Checking the datasheet referenced in the video has 60mW power dissipation (I guess assuming non typical forward voltage and calculating it with the max 3V) but more importantly 500K/W thermal resistance. That would mean 20K increase @ 40mW heat generation. Obviously we don’t know how well the diode is insulated from the ambient environment so lets just assume total 500K/W resistance and that all the dissipated power becomes heat eventually. So around 2V operation voltage dT=Rth*P=Rth*U*I=500*2*I, or dT/dI=1 K/mA. Which means there should be around 14K difference between the parallel and series diodes on the right side.
We can still solve it with ease (to not have to recalculate Is at a higher temperature to make it easier to compare with previous results, we will still assume 2V, 20mA @ 300K operation, which would mean a bit cold 280K ambient temperature)
Code: [Select]
function V=diodeVT(I)
    T=300+(I-20/1000)*1000; //1 K/mA
    VT = k*T/q;
    V=ln(I/Is + 1)*VT;
endfunction
function Verr=diodeVErrT(I)
    Verr = diodeVT(I)+diodeVT(I/2) - Vcc;
endfunction
IsolT = fsolve(20e-3, diodeVErrT); /// start from 20 mA

Now we get 26.888 mA instead of 28.284 mA around 1.4 mA difference.
Note that this is still using an ideal diode model. And it’s clear from the pdf that real LEDs are not ideal because I-V log-lin graph is not linear. They have at least serial resistance.
We could use a model that includes serial resistance like this:
Code: [Select]
Rs=10;
function V=diodeVR(I)
    V=ln(I/IsR + 1)*VT+Rs*I;
endfunction
And solve it like this:
function Verr=diodeVErrR(I)
    Verr = diodeVR(I)+diodeVR(I/2) - Vcc;
endfunction
IsolR = fsolve(20e-3, diodeVErrR);
But here we have to recalculate the Is for Vf=2 @ 20mA to remain true.
Code: [Select]
function Is=diodeIsR(V, I)
    Vd=V-Rs*I;
    Is = I/(exp(Vd/VT)-1);
endfunction
IsR = diodeIsR(Vf,If);
With this we get a similar curve as in a real LED in the pdf.
Code: [Select]
I=linspace(0.1,100,4000)/1000;
plot("ln",I*1000,    diodeVR(I));

The solution gives 26.846 mA current.
Using both temperature and resistance could give us more realistic result (26.769 mA), but it’s still not gonna be perfect. Even if we use real word measurement data of I-V curve of a LED it's not going to solve everything. Because of manufacturing variances the 2 diode in parallel will not be perfectly matched, so the currents will not be evenly distributed. We haven’t mentioned resistor tolerances and their temperature dependency…
...Or the voltage supply tolerance. The difference between currents we got was small at 4.00V Vcc (within 2 mA), but they get much larger as Vcc changes.
At Vcc=4.2 (+5%) we get
1353 mA for the ideal diode
44 mA with T
39 mA with Rs
34 mA with T and Rs.


It is interesting how complicated calculations can get with a seemingly simple circuit like this. ;)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf