LED help

Thread Starter

Nekwan Angel

Joined Dec 16, 2015
3
I need a circuit in which a green LED will turn on only when the voltage is in between 1V - 3V. The voltage may change within the range of 0V - 5V. Can anyone help me with this task?
 
Last edited:

Thread Starter

Nekwan Angel

Joined Dec 16, 2015
3
Yes, but I don't know how to ensure that there is a minimum of 1V and a max of 3V in the system. I don't know how to make sure that the LED works only in that area.
There is a random amount of voltage always flowing between 0V and 5V
 

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Yes, but I don't know how to ensure that there is a minimum of 1V and a max of 3V in the system. I don't know how to make sure that the LED works only in that area.
There is a random amount of voltage always flowing between 0V and 5V
 

DickCappels

Joined Aug 21, 2008
6,097
Yes that is a comparator but you need a window comparator

The voltages at the top and bottom of R3 define the window. In the example above, the LED is on when the In is above the voltage at the bottom of R3 but below the voltage at the top of R3.


For your case run the thing from the 5 volt power supply.

Is that enough for you to get started?
 

WBahn

Joined Mar 31, 2012
25,104
Yes that is a comparator but you need a window comparator

The voltages at the top and bottom of R3 define the window. In the example above, the LED is on when the In is above the voltage at the bottom of R3 but below the voltage at the top of R3.


For your case run the thing from the 5 volt power supply.

Is that enough for you to get started?
Are you sure about this?

If Vin is within the window, then IC1 is trying to drive its output to +15 V while IC2 is trying to drive it's output to -15 V. So what is Vout?

EDIT: Papabravo reminded me that the LM339 is open collector, so Vout is well defined for this case.
 
Last edited:

Papabravo

Joined Feb 24, 2006
12,770
It is not clear what the supply rails are for the LM339, but it might interest some to know that the output is open collector. Vout will be at +15V when the LM339's output transistor is off. One might infer that the supply rails are ±15V, but that might not be the case. Further, the part has certain other restrictions on the input voltages for proper operation. The parameter of interest is called Input Common Mode voltage Range. IIRC if either input is within 1.5V or 2.0V of the supply rails the output could be inverted. This is a real gotcha of a thing to discover in production.
 
Last edited:
Top