I've got a small LED garden lamp, battery operated, that turns on with a switch.
I am currently trying to use a photoresistor that I have to make it turn on when it gets dark (so I don't have to switch it on manually)
My first thought was to use a microcontroller like an attiny to do it but then I realized I might be able to achieve this with just a transistor (which I already have too)
The problem is that the transistor makes the light fade in and out as I'm using the photoresistor in a current divider configuration attached to the base of the transistor. When it gets dark, the photoresistor gets high impedance and current flows to the base of the NPN.
I would like to know if there's a way of making the transistor turn off and on "fully" without going through the active region.
I tried using a diode at the base of the NPN, hoping it would block everything until the voltage was high enough to go through and fully turn on the transistor but with no success... it still fades in and out.
Any ideas of something I can do with just these simple components?
Thanks in advance.
Added the schematic of what I did initially.
I also tried a darlington pair but the results were similar.