Photodetector / night light

Thread Starter

Kefka666

Joined Mar 4, 2008
38
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:



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?
 

steveb

Joined Jul 3, 2008
2,436
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.
 

Thread Starter

Kefka666

Joined Mar 4, 2008
38
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?
 

Audioguru

Joined Dec 20, 2007
11,248
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.
 

steveb

Joined Jul 3, 2008
2,436
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.
 

Thread Starter

Kefka666

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