Resistor color code

A resistor is the most important electrical component in almost every electronic circuit, it can limit current to any load such as led, transistor, opamp, etc. We must read resistor color code if we want to know the resistive value, tolerance, temperature coefficient. Resistors have different color bands (3,4,5,6) the more color bands the more resistor's information.Now let's start with 3 bands resistor color code.

The above resistor has only 3 bands First digit, Second digit, and multiply. A 3 bands resistor color code has fixed +/-20% tolerance that means if color code value is 1,000 ohms the real life resistive value may be +/- 200 ohms.
4 band resistor color code

A 4 bands resistor color code has tolerance value color strip, the resistor on an above picture has 5% tolerance. This type of resistor uses in a regular circuit such as television,radio,washing machine.

5 bands resistor color code

A 5 bands resistor color codes have third digit color bands.
1(first digit) 0(second dig…

Hello, today I'm going to show you how to make automatic night light switch. This circuit is easy to make and uses few electronic components.

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
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
All resistor are 1/4 watts rating

Full wiring diagram

Circuit explains:
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 BD 139 to turn fully on and make a relay switch to NO position.

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.