Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer
    
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. – Jay Keegan Feb 6 at 2:50
    
I fix the 2nd circuit :) – Pulse9 Feb 6 at 3:03

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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