LED as a light sensor

Discussion in 'The Projects Forum' started by Pinnock, Jan 21, 2011.

  1. Pinnock

    Thread Starter New Member

    May 28, 2010
    4
    0
    Tis my wish to use an LED, 5mm size, yel or red, in place of an LDR in a Day/Night sensor circuit, using a 741 Opamp. though I register a voltage change under light, about 15mv. The Opamp seems insensitive to triggering this. I'm wired for non-invert and the output is just another red LED with a 1kR. LDRs and opto's are not available here and the next most available i/c is the 555. What is the best way forward?
     
  2. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,348
  3. wayneh

    Expert

    Sep 9, 2010
    12,148
    3,058
    That old op-amp may not have high enough input impedance. The input of the op-amp alone may be too much load on the LED's tiny output.

    Even more likely, that op-amp cannot sense voltages near ground. Are you trying to compare the LED voltage to ground? It won't work with that op-amp. Others can. I'm using a LM358 for just this reason. If you're stuck with the 741, there are ways to overcome the problem.
     
  4. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    You don't have mail delivery? I did a quick test on a red LED and was able to generate 350mV into a 10Meg (DVM) load when shining a flash light on it. I also tested current output and could not get a measurable reading.
     
  5. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Using an LED as a sensor can be done with a microcontroller.

    LED as Light Sensor

    You'll want high input impedance, and a method of measuring very small changes. The source code above hooks up the LED in reverse. When it is dark, the ADC returns a value close to zero. When light is hitting the LED, it is creating a tiny negative voltage on the uC ADC input, so the ADC will read as NULL instead of "floating/low".
     
  6. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    Does he really need a uC to to that?
     
  7. wayneh

    Expert

    Sep 9, 2010
    12,148
    3,058
    ;) Not likely. He just needs to add another diode below the LED, to raise the "off" voltage into range where the 741 can see small changes, and to likewise raise the reference voltage off of ground up to ~0.7v, same as the bottom of the LED. Could be as simple as adding 2 diodes to his existing circuit. I think.
     
  8. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    No, the concept can be used with a high input impedance op amp. I was explaining the method, comparing the voltages can be done with any device that can work with very small variations in voltage and low current draw.

    It was in my bookmarks, I am trying to find one that used a single JFET for the task, IIRC, it involved reverse biasing the LED, and measuring the voltages when illuminated vs not illuminated.
     
  9. AlexR

    Well-Known Member

    Jan 16, 2008
    735
    54
    Wouldn't it be simpler to just use a photo-diode?
    Just because something can be done doesn't mean it should be done.
     
  10. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    Just for the record, I decided to Spice this using a MPF102 JFET and a N_Ch MosFET with a goal of lighting a LED. It lit the LED with a -100mV input signal. That said, I still think this is a bad idea except as a classroom experiment.
     
  11. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    I've been following this with interest, as I have a separate application in mind. Instead of a 741 though, a simple comparator would be much better. A LM393 is such a comparator, it will do a much better job. I don't think a 741 can even come close to working, it is a very old op amp and will not approach the specs you need.

    [​IMG]

    This is an experiment I have not built yet, but will.

    Since you don't have your location as part of your profile I'm assuming the USA. You'll note most of the high count members have this displayed as part of their post, this is so we can recommend parts, which lead me to the next paragraph.

    Radio Shack carries a quad comparator, the LM339. Just do what I did with the unused comparators, grounding the inputs and possibly the output. Comparators do not work without a pull up resistor such as R4, so grounding them when they aren't used is no problem.
     
  12. wayneh

    Expert

    Sep 9, 2010
    12,148
    3,058
    I wonder if you couldn't eliminate the voltage reference resistors and just lay the LED across the input pins, perhaps keeping that tie to ground with the 10M resistor. The LM393 will definitely stay in one state (forget which it is) when both pins are the same voltage, and it needs a few mV in order to swing to the other state. If the LED can produce that ∆V, it will trigger the comparator.
     
  13. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    In most cases yes. The narrow response to wavelengths by LEDs (their peak color) is also the area they are the most sensitive. Using a red and green LED, two different signals could be sent over the same airspace.

    Forrest M Mimms III (Of Radio Shack book fame) wrote a great deal on this topic for monitoring the sky conditions back in the 90's. It's on his website, though I don't have that link handy.

    Blue and white LEDs don't work so well for this as they use phosphors to get the desired color from typically infrared LEDs.
     
  14. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    You may be able to use the LED in a current mirror such as the one shown here.

    Be sure to connect the LED in the reverse-bias mode as shown. You would need to play with the value of the resistor on the output transistor to obtain the best output signal swing.


    hgmjr
     
  15. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    It would help a great deal if you could post a schematic of your circuit as it is now.

    Keep in mind that the LM741 can't "see" within about 1.5v or so of either "rail", and needs >8v to operate properly, so if you're trying to use it as a single rail opamp, you won't get good results.
     
Loading...