Sanity Check

Not sure if this is the right place to ask this, but here goes!

I’ve done a couple projects using the SF Inventor kit, and have a basic grasp of electrical thoery, but just wanted to bounce this off some more experienced minds before I made it out on a perf board.

Making a small simple LED display using 10 LEDs, thrown HIGH and LOW by an UNO via its IO pins. Basic flashing patterns.

Would it be sane to wire all the cathodes together and use a single resistor (higher value than if 1 R per LED) to ground? At any given time only two LEDs will be lit, so should I calculate for 40mA of current, as opposed to the 20mA per pin?

Is this set up sane, or should I just do a single R per LED?

Thanks! I’m an IT guy trying to get more involved in physical computing, and a lot of this stuff just flies over my head, beyond White to White, Black to Black, Green to Green :slight_smile:

I would not use one R for all the LEDs. Better to have an R for each.

Could you explain why?

Not trying to argue your response, but rather genuinely interested in the reasoning.

Thanks!

Can you guarantee that two LEDs will be always lit and only two LEDs? If each LED is being driven from a different processor output I would not guarantee this.

If you use a resistor value for 40mA of LED current what happens if only one LED gets driven? Can that LED handle 40mA?

A little FYI: LED specs are usually for the max current which gives the max brightness. They will light with less current and I typically bias an LED spec’ed for 20mA at about 5mA or less unless I need the full brightness.

So, if the LEDs are spec’ed at 20mA max and you do want to use one resistor for two LEDs then ensure that if only one LED is driven its current is below the max spec.

Any help?

Very much so.

Thanks!

I just did something similar to this. I ended up tying all the cathodes together and running through a resistor coming out of each IO port.

Reversing the logic here. If only two LED’s are most that will be lit then you can probably get away with the same R specced for 20mA total current. Sure when two LED’s are lit then you only get 10mA a piece but the difference in brightness especially for the superbrights listed on this website is not appreciable. I’ve had up to three in parallel before noticing much difference. So keep your current 20mA R and connect them all together that way.

LEDs have a maximum current rating, usually around 20-30mA for the common ones (of course there are exceptions). So you want to keep the current at or below that max rating.

Usually the ‘cheater’ way to run an LED is to take advantage of the (usually) 2V voltage drop across the LED (potential energy used) and figure out how big a resistor will drop just enough of the leftover voltage so that the current through the resistor (and consequently the LED) is at or below the max.

E.g., 5V source, 2V voltage drop = 3V left over. V=IR, 3=(20mA)R, R=3/0.02=150Ω

So if you add two LEDs you have to account for the added current through the other LED if you’re using one resistor. But the current is going to vary based on how many LEDs are lit.

So since resistors cost like $0.05 it’s easier to just use one resistor per LED and make sure your LEDs retain constant brightness, correct current, etc.

But, if you’re sure you want to limit yourself to 2 on at any time, then you can get away with one resistor.

Michael