To the question of the operating point of the LED and (suddenly) import substitution
“Having in mind any enterprise, think about whether you will succeed in it”
It happened to me like developing a keyboard with LED backlighting and I decided to do everything correctly, that is, to determine the maximum permissible values of the circuit parameters and the effect of the variation of parameters on performance, but I suddenly realized that I could not remember the corresponding calculation formulas. I had to deduce them myself, with the process of withdrawal and the results, and I hasten to acquaint dear readers.
"Carefully, mathematics dwells there." So, the scheme is so simple that it is easier to describe than to draw, although it is easy to draw. The output of the MC controls the on / off of the LED, while the other end of the LED can be both connected to ground and powered.
In the first case, we get more understandable control - the unit turns on the LED, which is natural; in the second, we can go beyond the MK supply voltage (under appropriate conditions) and get better characteristics, but the control becomes inverted, which is somewhat less convenient. ')
Personally, I always choose the second option, since in TTL circuits it was the only one practically applicable due to a significant difference in the output currents of the high and low levels. For modern CMOS cascades there is no such significant difference, however, the habit takes its place.
Before we finish with this question and consider further the output of the MC as an ideal key, must remind that the “relevant conditions” in the previous paragraph mean that the output of the MC is to be Up tolerant (if we use Up power more than Vcc - power MC) Otherwise, unpleasant artifacts can await you, starting with highlighting of non-activated LEDs and ending with the complete failure of the entire device. The mechanism of such phenomena is quite transparent, but is not the topic of this post, just a warning of caution.
Well, now about another element of the circuit, the parameters of which we must determine, namely, the current-limiting resistor. The need for this element is evident from consideration of the current-voltage characteristics of the circuit.
Here, the red line shows the current-voltage characteristic of the LED itself (for example, KP1608-VGC-Z is taken), and the green line with the number 0 indicates an ideal voltage source. From the figure it is clear that they will meet somewhere far beyond the limits of the shown part of the graph vertically (and, accordingly, at very high currents) and this meeting will be bright, but short.
Therefore, we need a limiting current in the circuit (and in the LED) a resistor, the current-voltage characteristic of such a circuit is given by the green line number 1 and we can quite uniquely determine the resistor we need from the expression
Here, the reader may come to a well-founded indignation - this formula has long been known and displayed in the mind without any graphs - was it really fooled? Patience, we haven't finished yet.
Let us ask ourselves the following question - we calculated the value of the resistor for the typical value of the forward voltage on the LED, but what will we get if it changes within the limits specified in the DUT? After all, there is a minimum and maximum forward voltage on the diode at a certain current in the temperature range - what will be the deviation of the operating current from the rated current - an interesting question. Well, if we are given both the current and voltage characteristics of both at minimum and maximum voltages (as was done in a number of specifications for domestic diodes, for example, IPD165A9-F - thanks to the Proton plant - by the way, they make these LEDs for surface mounting and in compatible with import cases - import-substitute), then we can determine the values graphically, but if only the values are given for a specific current (usually at nominal), the task becomes ambiguous, but the more interesting it is.
Suppose that we know only the minimum forward voltage on the LED at a certain current and it is U1 <Uo and that is all we know. Then we can come up with an infinite number of possible IV characteristics passing through a point (U1; Io) and a point (0; 0) - we choose the second point from the consideration that the LED is a passive device. If we take into account that the IVC graph should be one-to-one, the number of possible candidates will sharply decrease, but it will still remain infinite. The possible variants are shown in the figure by blue lines with numbers from 1-4.
Obviously, the maximum deviation of the operating current from the nominal one, indicated in figure dI, will take place at the IVC, shown by blue line number 4. This statement brings to mind the well-known apocrypha "Well, yes, it is clear that ..." and we will try to prove this statement .
Let us assume for simplicity that we can approximate the VAC of interest to us by a piecewise linear function with a break point (U1 '; 0) - the blue line number 3, then we can solve the problem analytically.
Expression for the green line 1 , for blue line 3 . Express from both the voltage and equate, getting we get from here . By transforming a bit, we get and then we get the relative deviation .
Since all parameters, except the break point, are constants, to maximize the desired value (and we are interested in the estimate from above), we must set U1 '= U1, since the values of U1'> U1 are unacceptable.
And this is exactly the value at which the IVC is displayed by the blue line number 4 - we have proved an obvious fact.
Then the maximum current deviation from the nominal at the minimum forward voltage and, likewise, at maximum forward voltage which leads to the expression
It is interesting that nothing depends on the value of R.
Now we will try to apply the resulting formula, for which we substitute specific values. We open the documentation on the KP1608-VGC-Z and find at a current Io = 20 mA a direct drop on the LED with a typical value of Uo = 3.2V and maximum Umax = 3.7V, and we do not detect the minimum from the word at all. Moreover, the maximum voltage is specified at a temperature of 25 ° C, and the working temperature range is specified at -40 + 85 ° C, which forces us to enter into the shaky ground of guesses and assumptions regarding values over the entire temperature range. Since I could not find any initial data for the guesswork, we will always assume the maximum voltage to be equal to the specified one, and with respect to the minimum we will assume that it will be Umin = 3.2- (3.7-3.2) = 2.7V, although the only correct assumption would be Umin = 0 .
Then for the value Up = 3.3 we get qImax = (3.7-2.7) / (3.3-3.2) = 1 / 0.1 = 10, that is, the possible deviations are tenfold !!! will exceed the expected value. Of course, we will not have a negative current with a positive Up and therefore such a deviation will not work, but there is no doubt that the LED can simply not light up. I hope you also thought about how a diode with a direct drop of 3.7V will behave when a voltage of 3.3V is applied to it, apparently, some current will flow through it, but is this enough for any noticeable glow?
Take the Up value in 5B and look at the results:
qImax = (3.7-2.7) / (5.0-3.2) = 1 / 1.8 = 0.55 ~ 56%, which means the difference between the minimum and maximum current is about one and a half times - unpleasant, but quite experienced, unlike the version with Up = 3.3V , but this is in our assumptions about the minimum voltage. If we accept Umin = 0V, then we get qImax = (3.7-0.0) / (5.0-3.2) = 3.7 / 1.8 ~ 200%, which means the difference of currents three times - even more unpleasant, but not fatal, the luminosity will differ significantly, but not fatal, as in the previous case.
Now we can solve the inverse problem - choose the Up value, at which the maximum deviation of the operating current is no more than qI when the forward voltage on the LED changes from Umin to Umax
and for the first (softer) assumption about the minimum voltage and the desired deviation of 50%, we get Up> = 3.2 + (3.7-2.7) /0.5=5.2V, and for the rigid assumption Up> 3.2+ (3.7-0.0) /0.5=10.5 B, which is clearly not acceptable due to the limitations on the possible supply voltage indicated at the beginning of the article.
The same calculations with reference to the domestic product IPD156A9-F:
at -60, we have Umin = 1.6V, Uo = 2.4V, Umax = 3.2V with Up> = 2.4 + (3.2-1.6) /0.5=5.6V, and at + 85C we have Umin = 1.4V, Uo = 2.0V, Umax = 2.6V with Up> = 2.0 + (2.6-1.4) /0.5=4.4V. That is, 5V power supply provides us with a guaranteed current deviation from the nominal value of no more than 60% over the entire temperature range, and guaranteed, based on data simply taken from the documentation, and not invented on the basis of some general considerations.
And finally, if we don’t want the current through the diode to exceed the maximum allowed under any conditions, we must verify that this condition is met for the minimum drop on the LED, that is:
for an imported product R> = (Up-Umin) / Imax = (5.0-0.0) /0.030=166 Ohm, which gives the operating current Io <= (Up-Uo) / R = (5.0-3.2) / 166 = 11 mA ; for the domestic product R> = (5.0-1.4) /0.030=120 Ohm, which gives the operating current Io <= (5.0-2.0) / 120 = 25 mA, so choosing R = 150 Ohm, we satisfy all the criteria.
Of course, all these calculations are completely unnecessary if you are not going to guarantee the behavior of the device you are designing throughout the entire temperature range, but not everyone can afford this. Here is a completely unexpected advantage of domestic products over a well-known foreign product - our documentation is much fuller. True, this is only if you purchased a copy of the TU, only maximum values are indicated in the catalog at a temperature of 25 ° C (I hope I did not violate any conditions when I indicated values in the whole range a little higher), as with an import manufacturer, maybe and it has an extended version of the documentation, but it is not available to me.
And finally, one question that I don’t know the answer to is which current should be set through the LED to get an acceptable luminosity - I encountered the phrase “we perceive the brightness of a rapidly pulsating light as an intermediate between peak and average,” but the degree of this intermediateness remains for me mystery, and in fact it would be possible to save using PWM. If anyone knows the answer, drop the link in the comments.