Arduino digital pin in OUTPUT mode have low impedance, is it safe to limit current through two leds (connected to two output pins) with one resistor, not two (knowing that leds will go dim and current will decrease when both diodes will be on (I'm not going to turn them on at the same time anyway)). Does led diode protect pin from sinking current (when pin is LOW)?

There's two circuits on simulation, right is right way to limit current, and left is "wrong" way to do it, center switch closes first circuit and opens second and vice versa. Left and right switch changes level of second pin from HIGH to LOW. Resistor near current source simulates low impedance of power source.

simulation image

  • \$\begingroup\$ It's very difficult to understand what your simulation is trying to show. \$\endgroup\$ Commented Jul 17, 2015 at 14:53
  • \$\begingroup\$ I added explanation to the post. \$\endgroup\$ Commented Jul 17, 2015 at 15:04
  • \$\begingroup\$ Part of the reason it's hard to follow is because everything's "upside down". FWIW, when drawing schematics, others will find it much easier to read if the top is "more positive" than the bottom and conventional current mostly flows downwards. \$\endgroup\$ Commented Jul 17, 2015 at 15:05

2 Answers 2


As long as you will definitely only power one of the LEDs, it's perfectly fine to share a single resistor between them. If you do ever power both, the current won't be split evenly between them; one is likely to be much brighter than the other because of slight variations in LED forward voltage.


It may be practical to share a resistor between two LEDs of the same colour, but how the current divides will depend on the forward voltage of each LED.

If the LEDs are different colours, the forward voltages will differ significantly, so only the lowest voltage LED will light. For example, with red and green LEDs in parallel, only the red LED will light.


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.