Can I drive a 5v LED without a current resistor?


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    No, you're not thinking this 7-segment thing through...

    Only ONE segment is ON at any instant in time. Assign a letter to each segment, 'a' thru 'g'. Each of those segments is allowed to be ON only for 1mS in any period. Now my period time was 15mS, but let's say for examples sake you have a 7mS Period. The first segment ('a') will illuminate only for the first 1mS of any period. The second segment ('b') will illuminate only during the second mS of the 7mS period. The third segment ('c') is only allowed to illuminate during the third mS of the period... and so on. So each segment gets it's own single mS all to it's-self and is the ONLY segment that is switched ON during that particular mS.

    So in a 7mS cycle divided into 1mS segment periods, a number one (which might have segments 'a' and 'b' illuminated) would have the cycle...

    OnA-OnB-OffC-OffD-OffE-OffF-OffG

    So in that 7mS cycle, only ONE segment is illuminated at any time (and then for only 1mS).

    If you want a Resistor, then a single Common Anode (or Common Kathode) Resistor is fine. It only ever has to cope with ONE segment being illuminated and the brightness is constant.

    Your eye will not distinguish the flicker and the display will appear constantly (and consistantly) illuminted regardless of the number of segments displayed - but if you film the display with a video camera, you will then notice the flicker because the refersh rate of the camera will not the the same as that of your display and you will observe a strobe effect.

    There is a SECOND AND VERY BIG ADVANTAGE to this technique... if you want to display '1' or '8888' the current consumption will be the same (that for ONE segment - say 10mA). Go display '8888' on a quad 7-segment display using the usual amateurish sloppy techniques of switching all the segments ON that you want at the same time and tell me how much current you pull... (7 segments, multipled by the number of digits, multiplied by say 10mA for each segment...). 7 x 4 x 10mA = 280mA... I've had so many laughs at some of the schematics and coding that I've seen for 7-segment displays...
    I am trying to understand this technique as a coder using "amateurish sloppy techniques of switching all the segments ON".

    Suppose I have 10 digits and will show 8 on all of them.
    I have to stop at each common pin and scan through all seven segments with a total of 7mS, and jump to the next common pin do it again ...and so on...

    I get a total of 70mS at the end.
    So displaying 8 on all 10 digits will take me 70ms to complete?

    Do I get it right?

    I wanna be a pro !

    ------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I've not tried beyond four digits and a decimal point (ie a typical Clock)... but altogether that accounts for 29 segments at 1mS each. Now I have a personal rule that I must accomplish everything within 30mS otherwise I'm running the risk of introducing a visible flicker on the display and that just about fits inside the specification. For that you need 12 PIC pins (1 pin for each of the 7-segments, 1 for the Decimal Point, and 4 for the Common Anodes). Advantge: Current consumption 10mA. Worst case conventional senario say displaying "00:00" time = 25 segments at 10mA each = 250mA. Your choice - 10mA or 250mA?

    But in your case with 10 digits I'd need a PIC with more pins as I would consider driving the display as three independent sets of digits (two sets of three and one set of four). For that I would need to devote 34 pins from my PIC, but I'd still be able to scan all potential 80 segments (the Decimal Point also being considered a segment) giving each 1mS and all still within 30mS. Advantage: Current Consumption 30mA (maximum of 3 simultaneous segments at 10mA each). Worst case scenario displaying "888888888.8" = 71 segments at 10mA each = 710mA. Your choice 30mA or 710mA?

    OK, you can chose to run 80 segments as one display devoting say 300uS to each rather than 1mS (and needing only 18 pic pins), and to compensate for the lower brightness you can chose a more expensive high-intensity LED. There's lots of work-arounds, but I've just told you the way I would go - doesn't mean to say it's path you would take.

    You're the engineer - which way would you chose? The answer (for most professional engineers) is probably revealed in their pay packet at the end of the month.

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie;
    ...using the usual amateurish sloppy techniques of switching all the segments ON...
    Quote Originally Posted by Melanie;
    ...There's lots of work-arounds, but I've just told you the way I would go - doesn't mean to say it's path you would take.
    Quote Originally Posted by Melanie;
    ......I've had so many laughs at some of the schematics and coding that I've seen for 7-segment displays... .
    Quote Originally Posted by Melanie;
    ......You're the engineer - which way would you chose? The answer (for most professional engineers) is probably revealed in their pay packet at the end of the month.
    So it seems that this would not always be the most prefered way of doing it. This techniue is case sensitive with many factors in it; and the way people make their choices should be "amateurish" for those with personal rules .

    ------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Oooohhhh... I've touched a raw nerve here...

    If you read my replies you will understand there is more than one way of doing anything - AND that INCLUDES multiple ways of scanning a segment at a time rather than switching all the segments on simultaneously which (and I will repeat it again) is sloppy and amateurish for the reasons I have already stated - namely massive power consumption and the almost certain need for additional circuitry to either latch the display on, or to handle the excessive driving power requirements. They haven't made a PIC yet to handle 710mA worth of LED's - and that's me being conservative and driving them at 10mA and not at 25mA! Why have a 6VA PSU when you can get away with 1.5VA? Why have a 7805 and great lump of metal for a Heatsink when you can get away with a 10 cent 78L05?

    My 'personal rule' for scanning/refreshing a display within 30mS is based on good scientific principles formed from the reaction and persistance times of the Rods and Cones in your Retina (Human Physiology and Performance not covered in your University Engineering Course?). If you think you can scan an LED in a slower time and still get away without flicker - go for it - you might end up with a patentable idea and make yourself a great deal of money.

    You know there is no 'correct' way of doing anything, but there sure are crazy ways of doing things which may still achieve the same goal. If you and a competitor both chose to make a 10-digit Frequency Counter, and your competitor came up with a design that was 25% cheaper to manufacture, used 50% fewer/smaller parts and tumpeted the fact that his used 80% less engery when working than yours - you'd be pretty upset about it!

    It's like the old engineering joke, but based on fact... the Americans spent a million Dollars developing a pen that could write upside-down and in zero gravity. The Russians used a Pencil...

    Allow me to laugh at the crazy designs/ideas...

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    It's like the old engineering joke, but based on fact... the Americans spent a million Dollars developing a pen that could write upside-down and in zero gravity. The Russians used a Pencil...
    And who walked on the moon???

    And I will respectfully add, do not start with the American bashing. There may come a time when you need our help again.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Melanie,

    I am well aware that I am an amateur, and also I know that there is a lot for me to learn from professionals like you in whom I know there is a lot to give and share willingly and greatfully.

    I respect and admire the knowledge you have and some others on this forum have .

    So there is nothing personal here,no offense either.

    Given my thoughts, I can now learn more from you.

    Your technique may seem better in some respect. But in a case with 10 digits more i/o needed. Thus, a more expensive pic or an addition of an i/o extender is in need. This way, creating more expensive and also more complex design, conflicts with your idea.

    --------------------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  7. #7
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I didn't bash the Americans at all... I'm just siting a single example of crazy engineering (the British have the Billion Dollar Millenium Dome as an example of crass stupidity) - mind you Pentel Corporation did very well out if it...

    Don't be offended Guys... a lot of this is "tongue-in-cheek" but based on facts too...

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I am sorry to have been so sensitive. Or Patriotic
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Conway's Game Of Life
    By wellyboot in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 28th May 2020, 06:14
  2. Free Project - 245 LED Display
    By T.Jackson in forum Code Examples
    Replies: 221
    Last Post: - 16th August 2009, 04:59
  3. new and need help
    By smeghead in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd November 2008, 20:19
  4. Led + resistor ?
    By ruijc in forum General
    Replies: 7
    Last Post: - 10th March 2008, 20:33
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts