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…

Infrared proximity sensor circuit diagram

An infrared proximity sensor is a sensor that detects any object when it close to the sensor. The circuit is an important part of an automatic faucet, robot, and touchless switch.

An above image is an infrared proximity sensor circuit diagram. The circuit is simple and easy to make, it has 2 transistors, 4 resistors, an IR LED, an IR phototransistor, and a purple or white or green LED (use as an indicator so you can remove it if you want)

Electronic components list

This circuit's maximum detection range is 10 centimeters, you can decrease the detector range by changing R2 resistor. Use 7805 regulator IC if you want to use the circuit with 12 volts power supply.
The infrared proximity sensor consumes around 50 milliamps per hour when standby and consumes around 80 milliamps(add a relay that consumes 30 milliamps) so you need an external power supply because battery life will not last long. The reason that makes this circuit consume much energy because IR LED need at least 50 milliamps to make IR light strong enough for an IR Sensor.
If you're not familiar with resistor color code see how to read it here

Proximity sensor circuit diagram

The red line does not touch the purple line so be careful.
Note: another leg of R2 connect to Vcc, Replace it with 50 K variable resistor if you want to adjust the sensor range.

See testing video (set video to 720p if the content missing)