LED help

Discussion in 'Homework Help' started by Nekwan Angel, Dec 16, 2015.

  1. Nekwan Angel

    Thread Starter New Member

    Dec 16, 2015
    3
    1
    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: Dec 16, 2015
    RRITESH KAKKAR likes this.
  2. RRITESH KAKKAR

    Senior Member

    Jun 29, 2010
    2,831
    89
    yes i can with micro ADC or comparator
     
  3. Nekwan Angel

    Thread Starter New Member

    Dec 16, 2015
    3
    1
    How would the circuit scheme look like if you used a comparator?
     
  4. RRITESH KAKKAR

    Senior Member

    Jun 29, 2010
    2,831
    89
    have you used microcontroller
     
  5. Nekwan Angel

    Thread Starter New Member

    Dec 16, 2015
    3
    1
    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
     
  6. RRITESH KAKKAR

    Senior Member

    Jun 29, 2010
    2,831
    89
    DO YOU KNOW VOLTAGE DIVIER?
     
  7. RRITESH KAKKAR

    Senior Member

    Jun 29, 2010
    2,831
    89
    [​IMG]
     
  8. DickCappels

    Moderator

    Aug 21, 2008
    2,651
    632
    Yes that is a comparator but you need a window comparator
    [​IMG]
    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?
     
  9. RRITESH KAKKAR

    Senior Member

    Jun 29, 2010
    2,831
    89
    what is window comparator
     
    joeyd999 likes this.
  10. DickCappels

    Moderator

    Aug 21, 2008
    2,651
    632
    It is a circuit with the same function as the circuit in post #8. Its output is low when the input voltage is between a lower and an upper limit. Or, you could design it high when the input is in the "window".

    https://en.wikipedia.org/wiki/Window_detector
     
  11. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,792
    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: Dec 19, 2015
  12. Papabravo

    Expert

    Feb 24, 2006
    10,140
    1,790
    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: Dec 19, 2015
  13. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,792
    Ah! And I knew this, too. But simply forgot. Apologies to Dick.
     
  14. Papabravo

    Expert

    Feb 24, 2006
    10,140
    1,790
    Last edited: Dec 19, 2015
Loading...