Photodetector / night light

Discussion in 'The Projects Forum' started by Kefka666, Oct 25, 2008.

  1. Kefka666

    Thread Starter Active Member

    Mar 4, 2008
    38
    1
    I'm building a battery-powered LED night light for in-home use. Light levels are typically very low in a house (compared to the sun), and I want my night light to be relatively sensitive. I built the following circuit I found online:

    [​IMG]

    This circuit worked, but very bright light had to be shined on the phototransistor to deactivate the circuit. What I would like is for the LED to turn off following continued exposure to less bright light, like the fluorescent lights inside a home. How can I make a more sensitive photodetector circuit for use as a night light?
     
  2. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    It looks like you can just increase the value of the 1k resistor. This would allow less light to shut off the drive transistor for the LED.

    You can also improve the temperature and beta sensitivity of this circuit by increasing the supply voltage and putting an emitter resistor in series with the LED. For example use two of those batteries. The emitter resistor will also help protect the LED if set properly.
     
  3. Kefka666

    Thread Starter Active Member

    Mar 4, 2008
    38
    1
    steveb, thanks for the advice. With 9V, adding a low ohm emitter resistor and increasing the base resistor resistance worked reasonably well for 20mA LEDs. However, I got stuck when trying to power a 100mA LED (a fat 10mm). I couldn't bring it even near full power without markedly decreasing the photosensitivity of the circuit (i.e. lowering the resistance). It seems that there is a trade-off between LED brightness and photosensitivity. Is there a way to overcome this?
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Make sure the phototransistor can't "see" the LED. Add a shade to the housing.
     
  5. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Use a stronger transistor. The 2N3904 runs out of gain when the load is higher than about 50mA. A 2N4401 works well up to about 300mA.
     
  6. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    Looks like you got a couple of good suggestions. The only thing I can add is to make sure your emitter resistor is not too large. In your case Re in Ohms must be less than (9V-Vled)/0.1A in order for the transistor to drive near the full 100 mA. (maybe 56 to 68 ohms)

    Actually, it's good to use an Re just about at that value so as to act as a current protection so you don't burn out your LED.
     
  7. Kefka666

    Thread Starter Active Member

    Mar 4, 2008
    38
    1
    Replacing the 2N3904 with the 2N4401 solved the problem immediately. Thanks for all the great suggestions
     
Loading...