sensor sensor and dectector wiring diagram simple circuit usb wiring diagram Automatic night light switch project
This automatic night light switch project makes you save your electricity bill and makes your light bulb life longer. The circuit uses 5 volts power supply so you can use old USB cell phone charger as a power source or you can use any 5 volts adapter that rate at least 100 mAh.
Electronic components list:
BD139 npn transistor = 1
BD140 pnp transistor = 1
100 kilo-ohms resistor = 2
5Volts@100 mAh adapter
1 kilo-ohms resistor = 1
Led = 1 ( you can remove 1 kilo-ohms resistor and LED if you don't need LED indicator)
1 LDR (light dependent resistor) = 1
5 volts Relay = 1
BD 140 is a PNP transistor that amplifies small current from 2 x 100 kilo-ohms resistor and sending current to BD 139 NPN transistor Base (B) and amplifies current again until the current high enough to drive a Relay to turn on.
When an environment light is enough the LDR's resistance is very low (1000- 100 ohms)and steal current that supply to BD 140 Base(B) from 2x100 kilo-ohms so the circuit doesn't have enough current to drive a Relay to turn on, but when an environment light is not bright enough, the LDR's resistance is higher(10,000 to 20,000 ohms) and it can not steal enough current from 2x100 kilo-ohms resistors that feed to BD140 so the current is enough to drive a Relay to turn on.
You can replace one 100 kilo-ohms resistor with 100 kilo-ohms variable resistor if you want to adjust light sensor sensitivity.
See the test circuit video below.