2
\$\begingroup\$

I am currently working on a school project for my work-study. The project is super simple: light up 4 LEDs, in various patterns, using a push button to cycle through the modes. I'm using 4 colored LEDs, a breadboard, resistors, jumpers, and an Arduino UNO.

I am brand new to electrical engineering, and have spent the night learning about resistors. I have 5 band resistors, cheap blue ones, and I have been trying to use Ohm's Law to figure out the right resistor to use.

By my calculations @ 5V power, ~2V for the LED (taking voltage drop into consideration), and ~10-20mA current you end up with something like a 150ohm resistor.

My professor used 1000ohm resistors when he helped me start building my setup, so now I am confused as to why he would have chosen 1000 if Ohm's Law states you ought to need closer to 150? I have all sorts of resistor values, including 100, 220, and 1000. I am using a separate resistor for every LED, since they must be separately controlled.

My setup, with 1000ohm resistors used:

Arduino/breadboard/LED setup

\$\endgroup\$
5
  • 2
    \$\begingroup\$ This depends a lot on the LED, its efficiency and the desired brightness. LED brightness is proportional to the current, and its efficiency, so modern high efficiency LEDs, you may not need much current (2-3mA may be fine), where as for bargain bin or 10 year old LEDs, 20-30mA may be necessary to get a good brightness. \$\endgroup\$ Commented Jan 14 at 0:09
  • 3
    \$\begingroup\$ the LEDsbin the picture are not in a circuit ... GPIO 6, 9, 10, 11 are all shorted together to V+ .... the blue resistors are all shorted together at top \$\endgroup\$
    – jsotola
    Commented Jan 14 at 0:43
  • \$\begingroup\$ @jsotola I'm sorry, but would you mind explaining more about that? My intention is to control each LED separately, and I expected each of the LEDs to connect to a resistor, which in turn connects to ground. The current is being provided by the 5V. One LED worked with this setup (the blue LED/associated resistor was set up by my Professor), and I figured I could copy that setup for the 3 other LEDs. Can you help me understand the difference between what I'm doing and a circuit? \$\endgroup\$
    – Dio B.
    Commented Jan 14 at 6:08
  • \$\begingroup\$ 1.bp.blogspot.com/-fL0dNzv_b4w/XNVzdNC8DsI/AAAAAAAAIVA/… \$\endgroup\$
    – jsotola
    Commented Jan 14 at 6:38
  • 4
    \$\begingroup\$ The "power rails" of the breadboard are connected all the way along the length of the breadboard, so all the white wires are connected together. That's probably not what you want. Also, I don't see the other ends of the LEDs connected anywhere. \$\endgroup\$
    – ilkkachu
    Commented Jan 14 at 8:32

3 Answers 3

10
\$\begingroup\$

For most modern LEDs, 15mA or 20mA is way more than you need, and close to the maximum that can be driven directly from the Atmel/Microchip MCU chip you are using.

Consequences of using too low a resistance are reduced reliability, excessive power consumption and sometimes annoyingly and unnecessarily bright LEDs. For example, I have a computer case that has a blue LED so bright it casts shadows on my office wall. People actually sell stickies to reduce the brightness of indicator LEDs, so this problem has created a capitalist solution. Of course if you need your indicators to be visible in direct sunlight you will need more brightness than if they are to be used in subdued lighting of an office or home.

So I suggest you try various resistors (of higher value than the minimum, of course) with the LEDs and see what brightness looks good to you. The values in general will be different for different colors, but maybe you can use just one value. You may find 1K or even 10k yields enough current.

\$\endgroup\$
0
3
\$\begingroup\$

20 mA is probably more than the recommended current for your MCU.

For most applications indoors, modern LEDs are plenty bright with a few milliamps. So, 1k will often give you good brightness and won't stress the MCU.

\$\endgroup\$
1
  • \$\begingroup\$ Appreciated! Redoing the math with your recommendation resulted in a 1000 ohm resistor, which matches my Professor's work. \$\endgroup\$
    – Dio B.
    Commented Jan 14 at 0:22
0
\$\begingroup\$

You should get a data sheet from the chip manufacturer for a current output spec. Then buy LEDs accordingly. Then you can limit the current calculating the resister value. Or, put a potentiometer in the test circuit and measure the resistance at the desired brightness across the pot and use that value for fixed resistor.

\$\endgroup\$
1
  • \$\begingroup\$ Appreciated, but unfortunately with this project I had to use what we had. My professor gave me a bunch of stuff we had lying around, so I could learn over winter break:) Great advice for the future though! \$\endgroup\$
    – Dio B.
    Commented Jan 17 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.