3
\$\begingroup\$

This is a newbie question regarding my second electrical circuit. I've built a switch on a breadboard using NPN transistor SS8050 and it works though voltage across transistor's collector and emitter and transistor base current don't match calculated values. Can someone tell me what might be the cause of that? Everything else checks out. Below are my calculations:

MAX LED current: $$I_{C(MAX)} = 15mA$$
Collector resistor: $$R_{c} = \frac{V_{CC} -V_{(LED)} - V_{CE(sat)}}{I_{C(MAX)}} = \frac{9V-2V-0.5V}{0.015A} = 433Ω$$ Transistor base current: $$R_{c} = I_{B(EOS)} * ODF = \frac{I_{CC(MAX)}}{Beta_{(MIN)}} * ODF = \frac{0.0015A}{45} * 10 = 3.4mA$$ Base resistor: $$R_{c} = \frac{V_{IN} - V_{BE(sat)}}{I_{B}} = \frac{3V - 1.2V}{0.0034A} = 530Ω$$

schematic

simulate this circuit – Schematic created using CircuitLab

I used this tutorial to build the switch: https://www.nutsvolts.com/magazine/article/may2015_Secura
I used this datasheet for the transistor: https://www.mouser.com/datasheet/2/149/SS8050-117753.pdf

\$\endgroup\$

3 Answers 3

4
\$\begingroup\$

Vce_sat is not truly a constant, and depends on manufacturing variations and collector current. The datasheet indicates max Vce_sat of 0.5V when the collector current is 800 mA; your collector current is significantly less, and the 0.5 V was a maximum value anyway, so the lower measured Vce is not unexpected.

Likewise, current gain is given when Vce is 1 V, i.e. forward-active. In saturation, it's reasonable to see Ib > Ic/beta. However, I'm not able to explain Ib being as high as 7.9 mA - even if Vbe were zero volts, Ib should be 3V / 530ohm = 5.7 mA. Perhaps the resistor or voltage source values are inaccurate?

\$\endgroup\$
2
  • \$\begingroup\$ So what would you put on the schema for Vce(sat), given this datasheet? Also I measured and VIn is 2.95 V and resistors are actually 550Ω (220Ω+330Ω), not 530Ω - I've made a mistake. In the test circuit the current is around 5mA so as expected but in the actual circuit I read about 8mA. Please take a look: postimg.cc/gallery/W1z326w. \$\endgroup\$
    – Metech41
    Commented Sep 29, 2022 at 18:49
  • 1
    \$\begingroup\$ @Betech41 I wouldn't put anything on the schematic for Vce_sat, because that's a datasheet parameter. It makes more sense to talk about Vce, but in saturation, Vce will be somewhere below the max Vce_sat indicated by the datasheet. How far below depends on the exact unit-to-unit manufacturing variation, temperature, etc. \$\endgroup\$
    – nanofarad
    Commented Sep 29, 2022 at 20:13
3
\$\begingroup\$

Measurements and simulations do not need to match.

Simulation assumes some fixed default current gain which you likely can change yourself to whatever you want it to be.

Actual manufactured physical transistor may have a couple of octaves range in the current gain, and the single transistor you bought can have any gain within the minimum and maximum range of for example 100 to 400.

So when using a transistor, you usually want to use it in a way that the operation of the circuit does not depend much on the current gain.

But do consider that your measurements may be invalid.

If you have 3V supply and 530 ohms resistor, even a short circuit will have only 5.7mA of current, so there can't be 7.9mA flowing through the resistor.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you. So VIn is 2.95 V and resistors are actually 550Ω (220Ω+330Ω), not 530Ω - I've made a mistake. In the test circuit the current is around 5mA so as expected but in the actual circuit I read about 8mA. Please take a look: postimg.cc/gallery/W1z326w. \$\endgroup\$
    – Metech41
    Commented Sep 29, 2022 at 18:44
2
\$\begingroup\$

One-off

Designing resistor values for your BJT switch topology for an LED is pretty simple if you are only building one of these.

You can just assume \$V_{_{\large \text{LED}}}=2\:\text{V}\$, \$I_{_{\large \text{LED}}}=15\:\text{mA}\$, \$V_{_{\large \text{BE}}}=800\:\text{mV}\$, and \$V_{_{{\large\text{CE}}{\small SAT}}}=200\:\text{mV}\$ and move on with the rest of the design:

$$\begin{align*} R_{_{\large \text{C}}} &= \frac{V_{_{\large \text{CC}}}-V_{_{\large \text{LED}}}-V_{_{{\large\text{CE}}{\small SAT}}}}{I_{_{\large \text{LED}}}} \\\\ R_{_{\large \text{B}}} &= \left(\beta_{_{\large {SAT}}}=10\right)\cdot \frac{V_{_{\large \text{IN}}}-V_{_{{\large\text{BE}}}}}{I_{_{\large \text{LED}}}} \end{align*}$$

And you can tinker around and get what you want without much thought. If the LED current isn't right, you can then just adjust \$R_{_{\large \text{C}}}\$ up or down to your liking.

Building several -- but only as isolated indicators

The question is a little more nuanced when you want to make several and want them all to operate more similarly to each other. Here, you need to spend a little more attention to details. It now becomes worthwhile to estimate the variations, if all you do is use a resistor in series with the LED.

Note:

  • LEDs are notoriously different in the required voltage for any given operating current.

Let's look at a very common LED datasheet from Sparkfun:

enter image description here

It's a nice pick. Their recommended operating current is close to your own desire for \$15\:\text{mA}\$. Great! But notice that when running at \$20\:\text{mA}\$ they say the voltage drop can be anywhere from \$1.8\:\text{V}\$ to \$2.2\:\text{V}\$. And at \$15\:\text{mA}\$ these values will drop a little. They might drop by as much as \$100\:\text{mV}\$, worst case (old red LEDs had a bulk resistance of almost \$20\:\Omega\$!) So the range might be better estimated as \$1.7\:\text{V}\$ to \$2.1\:\text{V}\$.

You have three choices at this point:

  1. Don't waste any time and just design the circuit as if these are to be one-offs.
  2. Take the experience I offered to you about old-style red LEDs and go with a range of \$1.7\:\text{V}\$ to \$2.1\:\text{V}\$ and an average of \$1.9\:\text{V}\$ for design purposes.
  3. Get a bag of the LEDs you intend using, apply \$15\:\text{mA}\$ to 5 or 10 of them, and measure the voltage across them and place those values into a log book. (Always a good idea to keep a log book of everything you spend time doing!) Use the average voltage drop for your design purposes.

New Note:

  • operating temperature and emitter current may significantly affect the operating \$V_{_{\large \text{BE}}}\$.
  • variations from one BJT to another, even of the same part number, impact the operating \$V_{_{\large \text{BE}}}\$ (which may matter) and also active mode \$\beta\$ (which in this case mostly doesn't matter.)
  • operating \$V_{_{{\large\text{CE}}{\small SAT}}}\$ will vary from BJT to BJT and over temperature.

The first item is probably the more important one. But to be honest? Even though there can be a lot of variation in BJTs, the variations usually don't matter that much in this circumstance. You could go to the trouble of getting some BJTs and measuring them, logging down those results. But it almost isn't worth the trouble.

So let's jump to the thinking about how well a simple design like this works with respect to having similar currents in various LEDs given the simple equations above in setting the values for the two resistors in your topology.

There's a concept called sensitivity. It's a way to quantify just how sensitive one thing is when some other thing changes or is different than what we planned on. In this case, the sensitivity equation (you can find the development for it here) is:

$$\begin{align*} \%\, I_{_{\large \text{LED}}}&=\frac{\%\, V_{_{\large \text{CC}}}}{1-\frac{V_{_{\large \text{LED}}}}{V_{_{\large \text{CC}}}}}-\frac{\%\, V_{_{\large \text{LED}}}}{\frac{V_{_{\large \text{CC}}}}{V_{_{\large \text{LED}}}}-1}-\%\,R_{_{\large \text{C}}} \end{align*}$$

This includes all three things that may vary. But we don't care about changes in the supply voltage (we can assume that's stable) and resistors are pretty precise, these days, so that also can be ignored. This leaves us with the middle term:

$$\begin{align*} \%\, I_{_{\large \text{LED}}}&=-\frac{\%\, V_{_{\large \text{LED}}}}{\frac{V_{_{\large \text{CC}}}}{V_{_{\large \text{LED}}}}-1} \end{align*}$$

You have \$V_{_{\large \text{CC}}}=9\:\text{V}\$ and for our purposes using that above datasheet and my own estimation about changing those values based upon using \$I_{_{\large \text{LED}}}=15\:\text{mA}\$: \$V_{_{\large \text{LED}}}=1.9\:\text{V}\$ and \$\%\, V_{_{\large \text{LED}}}\approx \pm\,10\%\$. So we find:

$$\begin{align*} \%\, I_{_{\large \text{LED}}}&=\pm\,\frac{10\%}{\frac{9\:\text{V}}{1.9\:\text{V}}-1}\approx \pm\,2.7\% \end{align*}$$

I think that means you don't have to worry much!!!

But the main point here is that there is a process to follow if you are making more than one of anything. You want to look up the variations and apply them in some kind of sensitivity analysis to make sure that variations in part behaviors don't lead to variations in the desired outcome that are excessive and unacceptable.

In this case? You are fine. But it's good to know how to check things out in different circumstances. The fact that you are using a \$9\:\text{V}\$ voltage source for a \$2\:\text{V}\$ LED is what makes this work so well. But if you were using \$3.3\:\text{V}\$, then you would need to take into account the BJT saturation collector-to-emitter voltage (as it is now more significant than before) and you'd find that there'd be a lot more variation in the design outcome. Perhaps still okay. Perhaps not. But you'd want to see the numbers just to be sure.

Note about using LEDs in displays

When LEDs are placed close to each other in displays, everything gets more difficult. This is because humans are REALLY GOOD at being able to see slight differences in color and slight differences in brightness when LEDs are placed right near each other.

In cases like this, everything starts to matter. Often, a designer for an LED sign will ask for binned LEDs. This means that the manufacturer has sorted them into bins based upon the common items of interest: such as brightness and color and voltage drop (at some operating current.) Buying binned LEDs allows a less complicated design approach. If binned LEDs are not available then the entire sign display design becomes more complicated.

LEDs can be a real pain, at times.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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