2
\$\begingroup\$

What is the best way to implement an output but with also a led, so I can use the output for other purpose (for example a GPIO for a PIC, or a lot of logic gates) but with a led indicador that the output is in high? I want to preserve the enough current for the led, and have a nice HIGH (5V, 3.3V..) value I did 2 circuits, is there a better way?

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$

2 Answers 2

4
\$\begingroup\$

If driving reasonable inputs, move the output BEFORE (to the left of) the resistor in your Circuit 2 and it should work fine. If driving unreasonable inputs, you'll need a buffer.

Use a resistor as large as you can get away with (experiment) and still see the LED light up to minimize load on the output from the LED. Many modern LEDs are quite visible with a milliamp or two, rather than needing near full rated current to be visible like the ones of days gone by.

\$\endgroup\$
2
  • \$\begingroup\$ Regarding "reasonable inputs" they should look at the high-level input current of the device they're driving, add the current through the LED branch, and make sure the GPIO can supply that much. Good datasheet exercise. \$\endgroup\$
    – Keegan Jay
    Feb 6, 2016 at 2:50
  • \$\begingroup\$ I fix the 2nd circuit :) \$\endgroup\$
    – Pulse9
    Feb 6, 2016 at 3:03
3
\$\begingroup\$

In parallel to the led + resistor. Optional Resistor to keep the GPIO within it's recommended current limit. Adjust values as needed.

Logic level, high-impedence inputs could be connected directly without a resistor.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$

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.