Shop OBEX P1 Docs P2 Docs Learn Events
Current limiting resistor values for 7-segment display: Why 1k instead of 220? — Parallax Forums

Current limiting resistor values for 7-segment display: Why 1k instead of 220?

In the new What's a Multicore Microcontroller? text there is a chapter on the 7-segment display. In earlier chapters with discrete LEDs, the current-limiting resistor was 220 ohm. For the 7-segment they are 1k ohm. Why the difference?

Calcs:
For discrete LEDs that use 220 ohm: 3.3/220 = 15mA per LED. With 8 LEDs total =120 mA
For 7-segment that uses 1k ohm: 3.3/1000 = 3.3 mA per segment. With 8 segments total = 27 mA.

Limit total drain on Propeller?
Datasheet says Mx per pin = 40 mA Max. total = 300 mA.
So does not seem to be a problem with 220 ohm.

LEDs more efficient?
Perhaps the LEDs in segments are bright enough at 3.3 mA; maybe even blow at 15 mA. Discrete LEDs barely glow at 3.3 mA.

Something else?


Comments

  • tonyp12tonyp12 Posts: 1,950
    edited 2016-04-08 16:02
    Modern LED's are more efficient, and using a larger resistor value as: Just enough mA to lit up is good enough.
    So if it is visible at 3mA why not go with 1K, especially when then there are 56segments.

    And the color of the LED also matters as forward voltage is low to high in this order: Orange, Red, Green, Blue

    I recommend these super red with 1K ohm
    http://www.mouser.com/ProductDetail/Osram-Opto-Semiconductor/LS-R976-NR-1/?qs=/ha2pyFaduifXkxR4ije4I0ahoflgqniqwnuykUNyQdexxTBqsKZFg==
  • Thanks, Tony.
  • In the new What's a Multicore Microcontroller? text there is a chapter on the 7-segment display. In earlier chapters with discrete LEDs, the current-limiting resistor was 220 ohm. For the 7-segment they are 1k ohm. Why the difference?

    Calcs:
    For discrete LEDs that use 220 ohm: 3.3/220 = 15mA per LED. With 8 LEDs total =120 mA
    For 7-segment that uses 1k ohm: 3.3/1000 = 3.3 mA per segment. With 8 segments total = 27 mA.

    Limit total drain on Propeller?
    Datasheet says Mx per pin = 40 mA Max. total = 300 mA.
    So does not seem to be a problem with 220 ohm.

    LEDs more efficient?
    Perhaps the LEDs in segments are bright enough at 3.3 mA; maybe even blow at 15 mA. Discrete LEDs barely glow at 3.3 mA.

    Something else?


    The calculation needs to take into account the forward voltage drop of the LED which also increases with current plus also a minor voltage loss from the Prop's I/O. Many LED figures are quoted using 20ma but that figure has been used for decades when LEDs were very inefficient. I mostly run LEDs at way less operating current unless you like burning holes in your retina. So at lower currents the typical voltage drop across a red LED is 1.8V, amber 1.9V, green 2V and we will ignore the minor loss in the I/O at low currents.

    So the resistor for a red LED at 3ma is R=V/I where V is 3.3V less 1.8V so R=1.5/3ma = 500 ohms. So the 1K resistor is only providing I=V/R -> 1.5/1000 or 1.5ma.

    The other thing to remember is that while you might be able to drive a few outputs at higher currents from the I/O you can't however exceed the chip limits. This is indeed the case when you drive a 7-segment display unbuffered, you need to use lower currents plus most LEDs these days are very efficient anyway. Numeric LED displays always benefit from having a red filter as this greatly enhances the contrast and you can also use far less current to get the same results.


  • Thanks Peter, especially the reminder for considering forward voltage drop.
  • Cluso99Cluso99 Posts: 18,069
    Almost always I use 3K3/5K/10K depending on what I want the LED to do. I only buy Superbright LEDs as they are almost the same price in quantity. Done this for many years.
    BTW I don't usually use 7seg LEDs, preferring LCDs when need more than just LED(s).
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2016-04-10 04:31
    Cluso99 wrote: »
    Almost always I use 3K3/5K/10K depending on what I want the LED to do. I only buy Superbright LEDs as they are almost the same price in quantity. Done this for many years.
    BTW I don't usually use 7seg LEDs, preferring LCDs when need more than just LED(s).

    It's amazing how much they glow at microamp currents or microsecond pulses, but on a PCB the value of the resistor is easy to change to suit and I run a couple of milliamps to allow for the fact they might need to be viewed in bright sunlight as is the case with roadside cabinets etc. Unfortunately many hobbyists still buy surplus LEDs from the '80s from hobby supply shops and those LEDs can have atrocious specs of 1.5mc at 20ma!!!!!

    The other thing I was going to mention too is that if I want a lot of LEDs really bright that this can load up the 3.3V rail unnecessarily and generate unwanted noise directly into the Prop. Taking into account that the minimum voltage drop of a red LED is 1.8V at medium currents which means you could tie the LEDs to the 5V rail and still drive them directly from the Prop and the Prop's I/O might only ever see about 100mv above rails when the red LED is off (1.6V drop). Amazingly the red LED glows at this minute current so I just feed the common LED supply from 5V through any diode as I only need a couple of hundred millivolts drop to achieve total cutoff. Good design tip for anyone who is interested.

  • kwinnkwinn Posts: 8,697
    Cluso99 wrote: »
    Almost always I use 3K3/5K/10K depending on what I want the LED to do. I only buy Superbright LEDs as they are almost the same price in quantity. Done this for many years.
    BTW I don't usually use 7seg LEDs, preferring LCDs when need more than just LED(s).

    It's amazing how much they glow at microamp currents or microsecond pulses, but on a PCB the value of the resistor is easy to change to suit and I run a couple of milliamps to allow for the fact they might need to be viewed in bright sunlight as is the case with roadside cabinets etc. Unfortunately many hobbyists still buy surplus LEDs from the '80s from hobby supply shops and those LEDs can have atrocious specs of 1.5mc at 20ma!!!!!

    The other thing I was going to mention too is that if I want a lot of LEDs really bright that this can load up the 3.3V rail unnecessarily and generate unwanted noise directly into the Prop. Taking into account that the minimum voltage drop of a red LED is 1.8V at medium currents which means you could tie the LEDs to the 5V rail and still drive them directly from the Prop and the Prop's I/O might only ever see about 100mv above rails when the red LED is off (1.6V drop). Amazingly the red LED glows at this minute current so I just feed the common LED supply from 5V through any diode as I only need a couple of hundred millivolts drop to achieve total cutoff. Good design tip for anyone who is interested.

    Similar idea to how I drove those old leds from the unregulated input for the 5V supply in the 80's. Only difference was I used transistor arrays as constant current drivers so the brightness remained stable.
Sign In or Register to comment.