3

LED Circuit

Hi all,

In the screenshot of a circuit I've included, I'm attempting to light up 4 LEDs off of pin 2. In circuits.io, everything works great. 3 blue LEDs and 1 red LED light up and blink as planned. When I create this same circuit on a Arduino Uno Chinese clone, IF the LEDs are all blue, they all light up and blink. If I change one of them to red, yellow, or green, ONLY the red, yellow, or green one lights up. The three blue LEDs no longer light up. It also doesn't seem to matter, where the off blue LED is put.

Not sure what's wrong.

asked Nov 21, 2016 at 19:32

1 Answer 1

7

Use one resistor per led, not one for all of them.

This is because different color leds have different forward voltages. Red requires a lower voltage to light up. So it will guzzle up all available current, while the blue leds are waiting for the voltage to go higher (which never happens).

answered Nov 21, 2016 at 19:43
2
  • 2
    I'd like to note that you may want to calculate the required resistor value. One pin can't supply a lot of current. Commented Nov 23, 2016 at 7:19
  • 1
    Good point @Paul. An Arduino pins shouldn't supply more than 20mA. That's 5mA per led, if you use 4 leds. If you use 1kOhm for each led, like in the diagram above, you should be fine. Commented Nov 23, 2016 at 9:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.