What did I do wrong? 7-Segment display

I was going off the datasheet absolute max for current. I thought it said typical. I went back and reviewed it and it's max current is 20mA, not typical current. I measured it and I'm only getting 1mA to a pin and a total of 8mA sourcing the whole LED. Also I was reading a little tutorial on another website and the guy made his calculations on 20mA too. Perhaps that's why I never bothered to measure anything. They're still really bright though.

If 20mA is my max and I have 8 pins. 20/8=2.5mA of available current per pin So to be safe I'll stick with 2mA per pin. That works out to a 1K(closest size) resistor and pulling about 17.1mA total from my 5V pin. The next size resistor I have from there is the 2.2K I was using previously. So at this point from I'll stick with the brighter LED's I get off the 1k.

Thanks GoForSmoke for the info. :slight_smile:

GoForSmoke:
A red led with a 220 ohm resistor pulls less than 20 mA, the recommended most current you should pull which makes for a very bright red led as it is. And you're using 10x the resistance?

LEDs (Light Emitting Diodes) | Electronics Club

Calculating an LED resistor value
LED resistor circuit An LED must have a resistor connected in series to limit the current through the LED, otherwise it will burn out almost instantly.

The resistor value, R is given by:

R = (VS - VL) / I

VS = supply voltage
VL = LED voltage (usually 2V, but 4V for blue and white LEDs)
I = LED current (e.g. 10mA = 0.01A, or 20mA = 0.02A)
Make sure the LED current you choose is less than the maximum permitted and convert the current to amps (A) so the calculation will give the resistor value in ohms (ohm).
To convert mA to A divide the current in mA by 1000 because 1mA = 0.001A.

If the calculated value is not available choose the nearest standard resistor value which is greater, so that the current will be a little less than you chose. In fact you may wish to choose a greater resistor value to reduce the current (to increase battery life for example) but this will make the LED less bright.

http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

Ohms Law with a led and resistor in the circuit:
V_total - Vled_turn_on = R * I

Red led has the lowest visible light On Voltage at about 2V. I dunno about IR leds but I choke those extra.

5V - 2V = 220R x Amps
3 = 220 x Amps
Amps = 3 / 220 = 0.013636... = 13.6 mA = plenty bright without stressing led or pin, hurts my eyes indoors.
Using a 1k or more resistor tones it down and lets you run more leds (segments) with less current.