4 digit 7-segment display - Arduino Stack Exchange most recent 30 from arduino.stackexchange.com 2019-12-11T15:25:15Z https://arduino.stackexchange.com/feeds/question/45488 https://creativecommons.org/licenses/by-sa/4.0/rdf https://arduino.stackexchange.com/q/45488 0 4 digit 7-segment display TBG https://arduino.stackexchange.com/users/38839 2017-10-10T16:14:51Z 2017-10-10T23:18:12Z <p>What happends if I turn on all LEDs at the same time in an 4 digit 7 segment display? that would be 32 LEDs turned on at once, wouldn't that exceed the 200ma MAX for the arduino output?</p> https://arduino.stackexchange.com/questions/45488/4-digit-7-segment-display/45490#45490 0 Answer by Michel Keijzers for 4 digit 7-segment display Michel Keijzers https://arduino.stackexchange.com/users/31105 2017-10-10T16:31:09Z 2017-10-10T16:37:49Z <p>These typically use 12 GPIO pins (4 for the digits, 8 for the segments/dot).</p> <p>Each GPIO pin controls one digit and/or segment at a time.</p> <p>The normal 'maximum' LED current is 20 mA. For the digits, 8 segments * 20 mA = 160 mA which is below 200 mA.</p> <p>However, maybe there are LED displayed which use more current. In that case, you have yourself to make sure not all segments are lit at the same time (by fastly alternating the LEDs, or using less current).</p> https://arduino.stackexchange.com/questions/45488/4-digit-7-segment-display/45491#45491 0 Answer by dannyf for 4 digit 7-segment display dannyf https://arduino.stackexchange.com/users/30005 2017-10-10T16:43:19Z 2017-10-10T22:56:45Z <p>They will turn on, likely with slightly uneven brightness - the LEDs internal resistance and the pins limited current drive will act like the current limiter.</p> <p>The actual current will depend on the supply voltage, led used and the mcus drive capabilities.</p> <p>For a red 4 digit 7 seg on an atmeha8, I got less than 10ma at 2,5v and 20ma at 3.3v, with the LEDs multiplexed.</p> <p>Edit: some quick math.</p> <p>Say that the current through each led segment is I. And the gpio resistance is R.</p> <p>Each common digit has 8 I current through it, and each segment has 4 I. Some math later,</p> <p>I = (Vcc - Vf) / (12 R) where Vcc is the supply voltage and Vf is the LEDs forward voltage (1.9v for a typical red led). The gpio resistance varies from 50+ ohm to 30+ ohm, higher at lower voltage.</p> <p>Plus in 3.3v and 2.7v you get total current of 30 to 75ma for all digits.</p> <p>I'm going to measure mine later.</p> <p>edit: about 25ma (total current = mcu + led) at 2.5v and 50ma at 3.3v. the mcu consumes 2-3ma approximately.</p> <p>the brightness is fairly even amongst the leds if you don't look too closely.</p> https://arduino.stackexchange.com/questions/45488/4-digit-7-segment-display/45500#45500 1 Answer by Chris Stratton for 4 digit 7-segment display Chris Stratton https://arduino.stackexchange.com/users/612 2017-10-10T23:18:12Z 2017-10-10T23:18:12Z <p>The key point is that if you do that, you're doing it wrong.</p> <p>Typically a multi digit display is time multiplexed, such that you use a common set of segment lines to activate the pattern on each digit in turn, therefore at any one time only at most 7 (or 8 counting the decimal point) segments should actually be on.</p> <p>Then in terms of the common connection which selects a given digit, this will indeed typically have to source or sink more current than an MCU I/O pin is typically rated to handle, so it's best if the common connection is driven by an external transistor or FET.</p> <p>Other options of course include mutli-digit LED display drivers, or lower power display technologies like LCDs.</p> <p>That said, if a software bug briefly means everything is on, chances are the chip will survive. But hopefully this only happens to "engineering units" - you do want to make sure that <em>production</em> units don't suffer this at some point in the programming process or something like that (though that's not all that likely, as typically all I/Os become inputs with at most a weak pullup).</p>