I'm trying to make an LED dim according to the ambient light (darker ambient -> brighter LED), through use of an LDR.
I'm using a voltage divider with an NPN transistor (BUL38D). I've tried multiple values for each of the resistors shown, but always seem to end up with a fairly narrow range of light intensity from the LED.
It's either bright or dim, but changes in the LDR (turning the lights off or putting my finger over it) don't seem to change the LED's brightness much, although some change is visible. When I shine my lamp directly at the LDR the LED does turn off.
Is there anything I'm doing wrong? I'm trying to get 20 mA when totally dark (here the LDR is about 400 kΩ) and transistor turned off at LDR = 8 kΩ or so. Do I need a higher voltage?
Edit: I tried the Darlington pair without the rheostat but with a 30 kΩ resistor instead, and after some tweaks it ended up with the sensitivity range I wanted, circuit below. I appreciate all your replies, I learned a lot!
In order to add more LEDs, how should it be done in such a way that they all keep their brightness up?