Connect with us

Transistor as a current limiter

Discussion in 'Electronic Basics' started by Lauri Alanko, Jul 5, 2013.

Scroll to continue with content
  1. Lauri Alanko

    Lauri Alanko Guest

    I'm sorry if I gave that impression. I merely gave an example
    calculation, with realistic sample values, to demonstrate my concern
    with the circuit in question. I hoped to emphasize that this was
    merely hypothetical by using words such as "suppose", "load would be",
    "if we designed" etc.

    Besides, in the same example the supply voltage was 12 V, and that
    didn't prevent you from suggesting otherwise. Surely there was nothing
    to prevent you from suggesting different leds, as well?

    In any case, I don't see how anyone's time has been wasted. All the
    replies I've received have been most pertinent and educational, and
    the circuits I've seen seem useful regardless of whether one plugs in
    four 2.2 V leds or three 3.6 V leds per series.

  2. Jon Kirwan

    Jon Kirwan Guest

    I didn't feel misaligned. (Well, I'm a hobbyist anyway.)

    In any case, this is the 'basics' group. Does a question have
    be asked as though it were framed by an expert here? No. And
    you framed the question better than many I've seen (and some
    that I've asked.)


    So... are you going to try something out? Or will this remain
    hypothetical for a while?

  3. Missed it completely. That's to say my newsserver did. Now you mentioned it,
    I found it in Google groups.

    My IP, though "the best IP of the country," considers its newsserver as
    experimental so it comes without any guaranty at all. Sometimes my own
    postings do not show up even if wrote on that actual server.
  4. Jon Kirwan

    Jon Kirwan Guest

    Thanks for the note about it. Yeah, I get it. Nice you caught
    it, too. I might have missed it myself and that's a good
    catch from you!

    After my internet service (Verizon) decided to remove from
    their contract, unilaterally and without my permission of
    course, NNTP services... I pretty much was forced to "go find
    something." I'm paying 10 euros (despite being in the US) per
    year for a service offered in Europe and it appears to be
    working well these last years (fast.)

    Seems to get everything I care about, perhaps except for
    alt.binaries.schematics.electronic. I have to just live with
    that for now.
    Well, at least you HAVE a newsserver with your internet

    I grew used to the idea that my internet service is supposed
    to provide the usual suite, including domain name services,
    mail, and NNTP. Traditional, I had thought. You take the good
    with the bad to get the business. But it's really a monopoly,
    so... they can take the good with the good and sell off the

  5. Jon Kirwan

    Jon Kirwan Guest

    I think that was already in the OP's original, very first
    post... along with some comments from the OP in that same
    post that showed thinking going on about it.

  6. Jasen Betts

    Jasen Betts Guest

    perhaps next year send $50 to astraweb and receive a terrabyte
    of usenet with no use-before date.
  7. Jon Kirwan

    Jon Kirwan Guest

    Hmm. On first blush, that sounds like a lot. But when I think
    about what a terrabyte will likely mean to me... hmm. Do they
    carry binaries like alt.binaries.schematics.electronic? (I
    guess I can go look and find out... but if you already know,
    I wouldn't mind your opinion about it, too.)

  8. Jon Kirwan

    Jon Kirwan Guest

    I meant "a lot of money." In case that wasn't clear.

  9. Jon Kirwan

    Jon Kirwan Guest

    Just looked at the site and it's not clear what they carry
    and what they don't carry. I'll have to email them about
    details, I suppose.

    Also, I used to get unlimited NNTP, a few email accounts,
    access to their dial-up "56k" modems, and a shell account for
    $10/month in a bundle. (Did NOT include my ground line at the
    home, of course.) The ground line cost me $45 per month,
    then. (And I had to buy my own modem, of course.) That was
    more than 15 years ago.

    Now I still pay for home fiber on three optical wavelengths
    if I can believe what they told me. Phone service, broadband,
    and internet access. Then I pay for NNTP, separately. And pay
    for shell accounts, a name on name servers, and email as a
    bundle, separately. And I pay more, of course.

    My NNTP access has to be around a megabyte or so per day.
    Unless the protocol is totally stupid and intentionally
    inflates packets with random garbage, it can't exceed 10 meg
    per day. I don't do news server binaries, except perhaps the
    electronics one. 1000 gig would last me a while, I imagine. I
    might die before I get my money's worth. ;)

  10. Jon Kirwan

    Jon Kirwan Guest

    That's been discussed.

  11. Jon Kirwan

    Jon Kirwan Guest

    Oh... well.... Then I will most certainly be dead before I
    could use up a 1Tb purchase.

  12. Jon Kirwan

    Jon Kirwan Guest

    Hmm. Haven't looked at that one. And yes, it looks like one
    way or another I'll be dead (and still have more capacity to

    By the way, I did get the list of currently suppported groups
    at astraweb located at:

    For anyone else wondering like I was.

    No information at all on how long they retain things, though.

  13. Lauri Alanko

    Lauri Alanko Guest

    Sorry for not responding to your posts earlier. I was a bit
    overwhelmed by the number of replies to what seemed to be a relatively
    straightforward query. After the current mirror circuit, which seemed
    ideal, the point of the additional suggestions seemed lost to me,
    especially since there was no explication of how they would be

    You are suggesting using a resistor as a current limiter, and a
    transistor as an on/off switch for PWM. This doesn't seem ideal to me.
    Firstly, it requires multiple components per chain (though there is an
    obvious variant where there is a single power transistor switching the
    supply to all the chains). But more importantly, a resistor is a
    fragile current limiter: the current will depend on fluctuations in the
    supply voltage and the I-V curves of the leds (which, I hear, are
    prone to individual variations). And if a single led shorts, the
    current to the others will increase, decreasing their lifetime as
    well. I doubt these issues will be very relevant for my toy project,
    but I want to learn to do things properly.

    The reason I asked about using a _transistor_ as a current limiter is
    that transistors are mostly immune to such fluctuations at the
    collector, and only their (relatively low) base voltage needs to be
    well-regulated. This seems superior to using a resistor, and there is
    the added advantage that the same transistor can also be controlled to
    provide e.g. PWM.

    However, I recently learned that PWM is not actually very efficient
    with leds: it seems that leds provide more light per watt when run at
    constant low currents than when pulsed at a high current. PWM, though,
    provides better linearity and stable color. But even if I want to use
    adjustable current instead of PWM, the current mirror still works:
    just attach a voltage-controlled current source to the mirror. So I
    think I'm going to stick with that one.

    But thanks for your suggestions, regardless.

  14. Jon Kirwan

    Jon Kirwan Guest

    Your statement here needs clarification. It's not as nuanced
    as it probably should be.

    PWM is simply a method of using a duty cycle (from 0% to
    100%) to adjust the apparent intensity. It is not necessarily
    the case that it is less efficient with LEDs. It may be. But
    not necessarily.

    Let's say you are using PWM to adjust the brightness of a
    single LED. Normally, at 100% duty cycle the LED is at
    "normal and desired" brightness. Now you use PWM to reduce
    this intensity. In this case, quite to the opposite of your
    conclusion, PWM is actually a MORE efficient method than
    others. In this case, your nominal power required is 100%
    when operating at full brightness and will correspond to the
    duty cycle % when operating at other brightness levels. So
    operating at 10% duty cycle will require 10% of the power.
    Other methods would dissipate 90% elsewhere so that 10% would
    be dissipated in the LED and would be HORRIBLE, by
    comparison. So you would WANT to use PWM, here, to save

    But let's say you are using PWM because you are multiplexing
    a complex LED display. So, here, let's say you are
    multiplexing by a factor of 5 because you have 5 columns (or
    rows -- pick your terminology) to operate. In order to
    achieve a "nominal 100% brightness" in a column, you must
    drive it at 5 times the nominal current. So if the current is
    20mA, nominally, you need to run them at 100mA, but at 20%
    duty cycle. The other columns will also be operated at 20%
    for their nominal brightness level. To adjust their
    brightness from 0% to 100%, you would PWM them from 0% to
    20%. In this case, because the LED voltage will be higher at
    5X the nominal current, the power dissipated will be more
    than just 5X nominal. But the brightness is determined by the
    current, not the power. So in this case one could argue that
    PWM wastes some power that, had the LEDs had individual
    drivers and weren't muxed instead, would be less for the same
    effect. But you pay this price because of the convenience and
    reduced cost.

    Keep in mind that as far as human perceptions go, so long as
    the repetition rate is high enough that the brain cannot
    follow it, the brightness perceived will be based upon the
    average (integral) of the incident light flux. It will not
    depend upon the pulse intensity. (There are other factors,
    such as the spatial size and spatial frequency, position on
    or off axis of the eye, and the surrounding intensities
    nearby that also affect perception... but let's keep this
    focused.) If you reduce the repetition rate, then at some
    point the brain starts to perceive the peak pulse and will
    show a change in brightness perception, along with it. But
    it's also confounded by the fact that the pulse is being
    noticed as well and that usually isn't desired. So the best
    rule of thumb to stick with is that your average current
    value represents the perceived flux.

    The only other rule to keep in mind is that human perception
    is logarithmic, so halving the average current does NOT
    reduce the apparent brightness in half. To maintain a
    constant rate of decline in brightness, you must multiply the
    duty cycle by a constant factor for each time unit. So, for


    Would yield constant changes in apparent brightness. If you
    achieved those values with fixed time intervals between them,
    a human would perceive a "smooth" diminuation in brightness
    that appeared linear.

    Regardless, PWM is by itself not necessarily inefficient. And
    even when you must pay a small price in efficiency because
    you are multiplexing and have to use higher pulse currents
    because of that, it's still better than the alternative of
    paying for individual drives for every LED and not terribly
    inefficient, anyway. Other alternatives would be either
    excessively expensive for very little gain, or simply worse.
    Of what? Again, note that human perception is logarithmic. So
    while PWM can easily be controlled linearly, it's not going
    to be perceived that way if that is how you use it. In fact,
    PWM would be more usable as a brightness control if the
    hardware could PWM accurately in a logarithmic way -- it's
    actually a pain to use PWM correctly for brightness control
    if you care about human perceptions of relative brightness.
    It's advantage is that it is just easy to apply, is all.
    I guess I should mention something else just to complicate
    things (and agree with you.)

    If you operate a monochromatic (single) LED at differing
    currents (and, consequently, different voltages to achieve
    it), then you will get a different wavelength distribution
    out of it, too. If you use a spectrophotometer you will see
    the shifts. This also means the "color perception" of a
    single color LED shifts a little.

    So one could argue that keeping the LED current fixed while
    PWM'ing to achieve brightness shifts is actually achieving
    "stable color" for these reasons (the peak current remains
    fixed, just the duty cycle changes.)

    But if you are comparing, say, 20mA vs 100mA, then there is
    also a color shift in doing so. So I take your point that PWM
    achieves "stable color."
    It's what I'd probably do (or use an IC, if I could find one
    that is likely to exist for a while, is readily available,
    could handle the dissipation, and is cheap enough.)

  15. Jasen Betts

    Jasen Betts Guest

    Yeah, as far as I can tell, all the binaries groups are available.
    that one certainly is.
  16. Jasen Betts

    Jasen Betts Guest

    currently almost 5 years
  17. Jasen Betts

    Jasen Betts Guest

    yeah, but does your software use XHDR or HEAD? The former pulls a single
    header from several messages whereas the latter pulls all headers from
    a single message.

    If your killfiles only use four headers, 4 XHDR requests will be more
    much more efficient than 100 HEAD requests,

    Also headers are often larger than message bodies.
    Hmm... I can count that.

    [email protected]:/var/spool/news/sci/electronics/design$ find -type f -ctime -183 -exec 'sed' '/^$/,$ d' {} ';' | wc
    457382 1757014 29908634

    Hbout 30 megabytes of headers in the last 183 days.

    total message size:
    find -type f -ctime -183 -exec cat {} ';' | wc
    1567860 8477618 70408901

    Hmm, 70 megs, looks like I over-estimated total volume

    So 40 megs message body, So the header:body ratio is
    approximately 3:4

    How much is quoted content?

    find -type f -ctime -183 -exec cat {} ';' | sed '/^ *>/ p;d' | wc
    643846 4338102 24717942

    Almost 25 megs, well over half. (ignoring the quotes by those who use
    non-standard quoting styles, mainly Phil A. and one of the political
    activists whose handle I don't recall)

    so, headers are more almost twice the volume of the new content.
  18. Jon Kirwan

    Jon Kirwan Guest

    Interesting. So I went to this site:

    where it discusses my reader (Agent.) Apparently, by default,
    it does not use XHDR... but it can.
    I'm still learning about this. And thanks for making me more
    I can easily believe that. Lots of message bodies are very
    Okay. Believable, too. I only examine 3 newsgroups on a daily
    basis. sci.electronics.basics,, and
    comp.arch.embedded. That's it.
    Thanks for the results. It makes it pretty clear that I would
    have quite a long ride with 1000 gig of metered newsgroups.
    Even if it were a gig a year for the 3 groups, and if I
    didn't allow myself to die until it expired, I'd be the new

    Even adding a binary group, if I don't download things I
    don't want, should work okay.

    Best way to find out is to buy the tiniest package they offer
    and see how long it lasts. That will be the benchmark, then.
    Assuming I live long enough to see even that expire....

  19. Jon Kirwan

    Jon Kirwan Guest

    Nice link. Using a diff-amp in a controlled feedback loop.

    I do NOT like the capacitor there. When inactive (OFF), C1
    charges up to Vcc across it, if C1 is small enough (if C1 is
    big, then it never reaches Vcc across it.) When active (ON),
    the common node between C1 and R4 jumps up towards 1.2V below
    Vcc and in doing so causes the collector of Q2 to be driven
    below ground, Vcc-1.2V-Vc1=-1.2V since Vc1=Vcc. As C1
    discharges it actually borrows current from Q3's collector
    (rather than from R3) causing a lower current in R3, yielding
    a lower voltage potential for Q2's base... leading to
    diversion of R2's current towards Q1 and thus MORE drive
    current into Q4 through Q7. The upshot is that upon turn-on,
    the peak current in the LEDs is actually HIGHER than designed
    and it then gently settles down to the desired level as C1
    discharges to a new (lower) potential across its leads. This
    is spikey behavior instead of a "soft start." Make C1 bigger
    and it gets worse, too. The sharp leading edge will reach
    even higher initial currents in the LEDs that way.

    So it's value should be kept small. I'm not yet convinced
    about the danger of oscillations or the source of them in
    this circuit. There are very low impedances on every node of
    Q2. It just doesn't seem necessary to me. I don't see how the
    small Cbc value and the value of Rb' can conspire to make a
    problem here, even with the collector making a small jump at
    turn on. And it actually seems to have a downside where I'd
    rather simply remove it.

    I might also invert the whole structure and delete R1 and D1,
    if my LED supply was a volt or more above the micro rail
    voltage. The pin output won't be loaded much and will
    probably be a very close reflection of the micro rail
    voltage. Of course, I'd adjust values, accordingly.

    For example, if my micro were running on 3.6V and my LED
    supply were 6V (hypothetically) and I wanted 100mA and 5
    chains of them (not 4), then I might invert the polarities
    and use R3=36 ohms, R2=470 ohms, and R4=270 ohms, kill C1,
    and just drive the base of Q1 directly.

    I'd start the design by estimating the total base currents
    required for Q3 through Q7 (600mA/beta=200, or about 3mA.)
    Then I'd double that for the diff-amp pair to 6mA. Given 3.6V
    drive and an estimated 0.7V drop on Q1, I get 2.9V at Q1's
    emitter. So 2.9V/6mA is 483 ohms. 470 is a standard value and
    gives a slight increase in estimated current, so I'd use that
    value instead. I also want 3.6V across R3 at 100mA, so 36
    ohms. Changing that to 33 or 39 ohms would change the LED
    currents by 10% or more. Luckily, 5% resistors do come in 36
    ohms. So I'd stick with that. Then, since R4 should be
    (assuming 3mA in each branch, hopefully) at about one 100mA
    sized Vbe (about 110mV added to 700mV as a guess), so R4
    should be about 0.81/3mA, or 270 ohms. Nice. Standard value.
    So that's where I'd get my values.

    I'm still stuck trying to understand C1's benefit.

  20. Jasen Betts

    Jasen Betts Guest

    ABSE content in the last 6 months
    $ find -type f -ctime -183 -exec cat {} ';' | wc -c

    11.5 megs since 14-January.
    $10 for 25G, probably enough.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day