I've been wanting to make a simple circuit that would turn on a bedlamp once the room light is off- it should keep me from tripping over things as I always forget to turn the bedlamp on before turning the room light off.
The idea is simple enough, but there's a few problems I'm running into. I'm using this basic circuit as a guide:
**broken link removed**
It works great except there's no way to turn it off in the dark; basically the light sensor turns the circuit ON whenever it detects darkness, so once all the lights are off it keeps turning itself back on. I've somewhat worked around this issue by putting another LDR inline between +9v and the potentiometer, which keeps it from turning itself on if it's in the dark. However now the issue is that it turns on whenever it detects light as well as darkness. To get around that issue I put a diode between the new LDR and the potentiometer; now it doesn't turn on with light, but there are certain instances where it would turn off/on incorrectly (for example if the second LDR is dark for any reason, the first LDR won't enable the lamp. I don't know if there are any real world situations where this might be a concern though).
Does anyone have a better, cleaner way of going about this? It's been over a decade since my last EE days and I'm trying to get back in the swing of things. I'd like to stay away from incorporating ICs at this point if possible.
The idea is simple enough, but there's a few problems I'm running into. I'm using this basic circuit as a guide:
**broken link removed**
It works great except there's no way to turn it off in the dark; basically the light sensor turns the circuit ON whenever it detects darkness, so once all the lights are off it keeps turning itself back on. I've somewhat worked around this issue by putting another LDR inline between +9v and the potentiometer, which keeps it from turning itself on if it's in the dark. However now the issue is that it turns on whenever it detects light as well as darkness. To get around that issue I put a diode between the new LDR and the potentiometer; now it doesn't turn on with light, but there are certain instances where it would turn off/on incorrectly (for example if the second LDR is dark for any reason, the first LDR won't enable the lamp. I don't know if there are any real world situations where this might be a concern though).
Does anyone have a better, cleaner way of going about this? It's been over a decade since my last EE days and I'm trying to get back in the swing of things. I'd like to stay away from incorporating ICs at this point if possible.