Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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!
 
This is what I came up with for the led circuitry (click here if below doesn't show):

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?
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
    MCP_STATUS_PROBE.png
    30.9 KB · Views: 163
That's the current setup.

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

Thanks again!
That looks OK.
 
Status
Not open for further replies.

Latest threads

Back
Top