Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Controlling a 7 Segment display, w/out shift registers


  • Please log in to reply
5 replies to this topic

#1 Eric Burdo

Eric Burdo

    Advanced Member

  • Members
  • PipPipPip
  • 130 posts

Posted 05 October 2010 - 02:19 PM

I didn't have any shift registers available, so I wrote this to control the 7 segment display without using a shift register. http://brick-labs.co...shift-register/ Video, picture and source code available.
~ Eric D. Burdo ~ http://brick-labs.com/

Today LED's, tomorrow, the world!!! Well, OK, maybe servos.

#2 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 05 October 2010 - 03:17 PM

I didn't have any shift registers available, so I wrote this to control the 7 segment display without using a shift register.

FYI, given the typical forward voltage ~2 V for a red LED and 41 Ω resistor the display segment is drawing ~30 mA (no wonder it appears so bright on the video). Although it is probably no big deal for the display to run on current close to absolute maximum rating (typical value is 10-20 mA depending on type), it is dangerously high for Netduino - it can provide only 16 mA on three pins (2, 3, 7) and 8 mA on the rest (with the exception of analog pins that can provide only 2 mA). I would recommend you using a current booster, or increase resistance of the current limiting resistors to get below safe 8/16 mA per Netduino pin.

#3 Eric Burdo

Eric Burdo

    Advanced Member

  • Members
  • PipPipPip
  • 130 posts

Posted 06 October 2010 - 01:11 PM

Hi CW2 Thanks for that... is there a good place to learn how to calculate the resistors, and learn what would be the optimal resistor for this instance? Based on what you said... I'm more concerned with making sure I don't pull to man mA's from the Netduino, then I am feeding too many to the LED display. Right? I'm a software guy, learning hardware. So some of this stuff is new to me...
~ Eric D. Burdo ~ http://brick-labs.com/

Today LED's, tomorrow, the world!!! Well, OK, maybe servos.

#4 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 06 October 2010 - 01:28 PM

Thanks for that... is there a good place to learn how to calculate the resistors

Hm, I don't know any special place I could recommend, just pick one returned by Google search for 'LED resistor calculator'.

, and learn what would be the optimal resistor for this instance?

The formula is simple: ResistorValue [Ω] = (SupplyVoltage [V] - LedVoltage [V])/MaxCurrent [A], in your particular case (typical LED segment current 10 mA, 2 V red) R = (3.3 - 2)/0.01 = 130 Ω. If you don't know voltage of your LED display (usually referred to as Forward Voltage or Voltage Drop), you can use typical values, based on the color.

Based on what you said... I'm more concerned with making sure I don't pull to man mA's from the Netduino, then I am feeding too many to the LED display. Right?

As you have the display connected directly to Netduino, it is basically the same thing. But in general yes, Netduino is certainly more expensive Posted Image

#5 Cosivox

Cosivox

    New Member

  • Members
  • Pip
  • 2 posts

Posted 04 February 2011 - 07:03 AM

FYI, given the typical forward voltage ~2 V for a red LED and 41 Ω resistor the display segment is drawing ~30 mA (no wonder it appears so bright on the video). Although it is probably no big deal for the display to run on current close to absolute maximum rating (typical value is 10-20 mA depending on type), it is dangerously high for Netduino - it can provide only 16 mA on three pins (2, 3, 7) and 8 mA on the rest (with the exception of analog pins that can provide only 2 mA). I would recommend you using a current booster, or increase resistance of the current limiting resistors to get below safe 8/16 mA per Netduino pin.


Why is drawing ~30 mA? Assuming the led works with ~2v and ~15mA then we can calculate the mA's drawn applying 3.3v:

Calculated resistance of led = 2/.015 = ~133.33 ohms, plus the resistance applied of 41 ohms = 174.33
so the total of mA's drawn is = 3.3 volts / 174.33 ohms = ~18mA

Please correct me if I'm wrong

#6 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 04 February 2011 - 07:45 AM

Why is drawing ~30 mA? Assuming the led works with ~2v and ~15mA then we can calculate the mA's drawn applying 3.3v:

The LED consumes all the current that comes through the resistor: I = (VCC - VF)/R, where VCC is the supply voltage, VF is LED forward voltage, so for the sample values above I = (3.3 - 2)/41 = 31.7 mA.

To have 15 mA for the LED, you'd need current limiting resistor R = (VCC - VF)/I = (3.3 - 2)/0.015 = ~87 Ω.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.