Reading a photodiode output into a window comparator.

Discussion in 'Analog & Mixed-Signal Design' started by twosacrowd, Aug 26, 2016.

  1. twosacrowd

    Thread Starter New Member

    Jul 3, 2009

    Hi, I wonder if anyone could help me with this. I am wishing to indicate three different voltage levels using the attached circuit. I am looking for LED's to indicate a Low, Medium and High condition, so I only ever want one LED on at a time. I thought this circuit would do this for me, but I have conditions where I can have a Low and Medium LED on, or a Medium and High LED on. Am I doing something wrong or have I made a mistake in the design? If anyone can suggest improvements or other designs I would be very grateful thanks.
  2. bertus


    Apr 5, 2008

    I have taken your image rotated it (I do not want to turn my monitor to see it), changed white balance (the image was hardly visible) and scaled it down:


  3. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    The LEDs should have sereies resistors to limit their current.
    Try connecting pin 11 to 2.5V (using a voltage divider between the power rails) instead of to the pot wiper.
  4. twosacrowd

    Thread Starter New Member

    Jul 3, 2009
    Thanks for your reply. And appreciate your editing of the document. I am using the 33 ohm as my LED current limit. I need the option of varying the thresholds and that is why I am tying pin 11 to the wiper. I need a variable window to illuminate the centre LED; but I get the condition of a certain times middle and upper or middle and lower LED's are on. I must be doing something wrong but don't see what it is. Any further assistance greatly appreciated ?
  5. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    You need only the two adjustable threshold voltages you already have in order to define the variable window: the low and the high thresholds established with the two pots. That is why I suggested 2.5V as the reference for the third opamp. Try it, and see if it cures the problem.

    Edit: You could also try adding a resistor (~100k) from pin 10 to ground, to provide a fixed path for the opamp bias current. 33 Ohm seems rather low for the limit resistor. What is the LED current rating?
    Last edited: Sep 29, 2016
  6. schmitt trigger

    Active Member

    Jul 12, 2010
    33 ohm is way too low for LEDs supplied from 5 volt.
    With such a low value, the opamp will attemp to sink 90 mA. which of course it can't. The end result is that it will current-limit and the output voltage will not drop enough (close to zero) to allow your diode-OR to operate correctly.

    Use 330 ohm.
  7. AlbertHall

    Well-Known Member

    Jun 4, 2014
    Yep, agree, 330Ω for the LEDs and 2.5V on pin 11.