Switching between two leds depending on the input signal (HI-Z, 0V, 5V)

Status
Not open for further replies.

Pawni

New Member
So I'm receiving a signal from an IC and it's Hi-Z, 0V or 5V

And what I'm trying to achieve is that Hi-Z = None are lit
0V = Led 1 is on
5V = Led 2 is on

**broken link removed**

That's something that I tried, but when the input signal of STATUS goes Hi-Z the current through the led escapes through the transistor and both leds are dimly lit.

Any ideas are welcome

Thanks!
 
Your circuit diagram is blocked on my computer so I can't see what you did.

You could use two LM339 comparators to detect the three conditions.

Connect two equal value resistors (say 20kΩ) in series between +5V and ground. Connect the IC output to the junction of these resistors. The IC output will now have three voltage states: 0V, 5V, and 2.5V (when Hi-Z).

Now configure one of the comparators in the LM339 package to go low when its input is >4V and connect its output to LED 2 with a resistor to +5V.

Connect another comparator to go low when the input is <1V and connect its output to LED 1 with a resistor to +5V.

When the IC output is at 2.5V no LEDs will be lit.
 
This is what I came up with for the led circuitry (click here if below doesn't show):
**broken link removed**

(Forgot to add the connections from STATUS to VCC & GND through resistors in the picture)

Just one more thing, I'm using the resistors, 330, 1k and 330 to do the voltage division.
Which is actually better, using lower value resistors or higher?
So should I go for 33, 100 & 33 Ohm or 330k, 1M & 330k?

Thanks for everything!
 
That site is blocked for me. You need to directly download it from your hard-drive and attach it to your post using the Attachments option (paper-clip icon in Go Advanced window) for me to see it.

You could use 3.3K, 10K, and 3.3K to save a little power.
 
That's the current setup.

I'll probably then change the resistors then to a bit larger

Thanks again!
 

Attachments

  • MCP_STATUS_PROBE.png
    30.9 KB · Views: 164
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…