Intro:
I was looking for a system that allowed me to trigger a circuit when was getting dark, so I found out that with some testing, a photo resistor and a inverter logic I could achieve this goal.
Items:
- 1x 74HC04N ( hex logic )
- 1x photo resistor
- few resistors ( 10-22k )
- 1x transistor n-channel
- 1x led
- 1x battery 5v
- few jumpers
Wiring:
Connect the battery to the VCC and Ground of your Inverter logic.
The photoresistor needs to be connect to 5v on one pin and the other needs a resistor 10-22k to the ground and a jumper to the Input 1 on your Inverter logic. The resistor has to be tested on the final circuit because based on it, the system trigger the transistor when is very dark or less dark.
Connect the output 1 on the gate of your transistor, the drain to the led and the source on the ground. Remember to bridge the gate and source with 10k!
Complete everything by connecting the other pin of the led to the 5v, better to put a resistor if you dont want burn it.
After all this is done, try to cover it or switch off your light, you should see the led lighting up, if it doesn't work, try with something less than 10k.
Video: