Saturday

Distance sensor

An infrared proximity sensor shines a beam of IR light from an LED, and measures the intensity of light that is bounced pack using a phototransistor. If you stare at the sensor, you can see one of the LED’s  glowing slightly red as some of the IR falls into the visible-light spectrum. A new approach was developed that not only gives object detection at a longer range than previous method but also offers range information for certain type of sensors. These new rangers all use triangulation and a small linear charge coupled device (CCD) array to compute the distance and/or presence of objects in the field of view.  The basic idea is this: a pulse of IR light is emitted by the emitter.  This light travels out in the field of view and either hits an object or just keeps on going.  In the case of no object, the light is never reflected and the reading shows no object.  If the light reflects off an object, it returns to the detector and creates a triangle between the point of reflection, the emitter, and the detector. 


The angles in this triangle vary based on the distance to the object.  The receiver portion of these new detectors is actually a precision lens that transmits the reflected light onto various portions of the enclosed linear CCD array based on the angle of the triangle described above. The CCD array can then determine what angle the reflected light came back at and therefore, it can calculate the distance to the object.

When the distance is far or increases the output voltage is decreasing gradually. But when the IR sensor is near to the obstacle the output voltage will increase. The value of output voltage is useful as a reference for the microcontroller (ATmega328). For a gas leakage detector system, if the output voltage is higher than a set point level, the DC motors will be turn off. But if the output voltage is lower than the set point the DC motors will be operated. The set point can be created in the program. This means that to one value of the output corresponds two values of distance. This problem can be avoided by noticing that the object is not too close to the sensor.





Wednesday


Gas sensor (MQ5 sensor)


MQ5 sensor is used in gas leakage detecting equipments in the industries and house. It has high sensitivity to liquefied petroleum gas (LPG) and small sensitivity to alcohol and smoke. The characteristics of this sensor are fast response, stable, long life and have simple drive circuit.

When a dangerous levels of gas vapors are detected. A detectors measure a gas concentration and the sensor responds to a calibration gas, which serves as the reference point or scale. Usually the reference point or scale is in voltage (V). The calibration of MQ5 is important in order to compare the sensitivity of MQ5 when detecting oxygen gas or liquefied petroleum gas (LPG). For an example, if the MQ5 sensor detects oxygen gas it might produce a low value of output voltage but when it detects other gases especially LPG gas it will produce a high value of output voltage. The output voltage value is between ranges 0 until 5 volts.



Based on the picture above, MQ5 have 6 pins (2 A, 2 B and 2 H). Pins for A should be attach together and then connect with the pin H for become an input connection. On the other hands, pins B will be the output connection, meanwhile the other H pin become grounded. Before the sensor connects to theATmega328 pins, it should face some calibration with lighter gas using a multi-meter to identify differences of voltage output value in normal condition (normal atmosphere) and worst condition (when detecting any presence of liquefied petroleum gas). During normal condition, the voltage output is less than 1.5 volts. When the MQ5 detected the gas produce by the lighter, the voltage output is 2 volts and above. This output values are important because it will be useful data during program writing.

Figure below shows the connection wires of gas sensor (MQ5) at the analog pins of ATmega328.




Light sensor (LDR sensor)


A light sensor generates an output signal indicating the intensity of light by measuring the radiant energy that exists in a very narrow range of frequencies basically called "light", and which ranges in frequency from "Infrared" to "Visible" up to "Ultraviolet" light spectrum. The light sensor is a passive devices that convert this "light energy" whether visible or in the infrared parts of the spectrum into an electrical signal output. Light sensors are more commonly known as "Photoelectric Devices" or "Photo Sensors" because the convert light energy (photons) into electricity (electrons).

Light dependent resistors (LDR) are very useful especially in light or dark sensor circuit. Normally the resistance of an LDR is high, sometimes as high 1000kΩ, but when they are illuminated with light resistance drops dramatically. There are just two ways of constructing the voltage divider, with the LDR at the top, or with the LDR at the bottom:


In LDR sensor operation, means light must shine into the light dependent resistance for the circuit to be activated. When the light level is low the resistance of the LDR is high. This prevents current from flowing to the base of the transistors. Consequently the lamp does not light. However, when light shines onto the LDR its resistance falls and current flows into the base of the first transistor and then the second transistor and automatically turning the lamp on. The preset resistor can be turned up or down to increase or decrease resistance, in this way it can make the circuit more or less sensitive. During troubleshooting the LDR sensor, i have tabulated all the data of an output voltage value with different resistance value produce by the LDR sensor.





Based on the figure below, the input of the LDR is only 5 volts and the value for the resistor is 10kΩ. Generally, this sensor was constructed based on voltage divider rules and the voltage output is depending on the change in resistance value of the LDR sensor. The input for IC741 has two input pins from one pin from the voltage output and another one is from the ground. Once the voltage enters the IC741, the IC741 will amplify the voltage by multiplying it gain (dB). Output for IC741 will inject to the relay and automatically switch on the lamp.



Figure above shows the circuit of light sensor (LDR circuit)

Tuesday


IR sensor (Line sensor)

Nowadays, in electronic market provides variety of IR sensor. Infrared (IR) sensors have become indispensable tools for several industries. However, not all frequencies of light within the infrared spectrum behave the same. There are a number of methods which can be used to build a line following robot. In general there are three different types of line followers which are single light, two lights, and three lights sensor model. On the other hands, besides using a complete sensor which it can easily find in the market, an infrared LED transmitter and receiver can be used to detect the line.

The reason of selecting this type of IR sensor is because it has good range which is fulfil the requirement for robots. It is very low cost and can be constructed on general purpose PCB. Besides that, it is very small in size which is best for robots. For obtain a good result, the number of transmitter and receiver can be increase. Thus, it has good immunity to ambient light and waves are invisible to eyes.
IR LED is used as a source of infrared rays. It comes in two packages 3mm and 5mm. 3 mm is better as it is require less space. IR sensor is nothing but a diode which is sensitive for infrared radiation. This infrared transmitter and receiver were known as IR Tx-Rx pair.


Pictures below shows the results after done with designing the PCB line, etching, components placement and soldering procedures.







Referring to the picture below, the input for the line sensor circuit is 5volts max. There are 3 pin for voltage output which are Vout 1(V1), Vout 2 (V2) and Vout 3 (V3). These output voltage pins are important to the system because every each of output pin will produce a different output voltage value which is directly connecting to the IC.







When IR sensor detects line, the voltage output is high but when it did not detect any line the output voltage is low. During troubleshooting the circuit, the result when detecting line is 1.59 volts and 0.14 volts is when it not detecting any line. On the other hands, each of voltage output pins control left and right motors.


Wednesday


Tip 120 as power transistor

A transistor is a semiconductor which is a fundamental component in almost all electronic devices. Transistors have many uses including switching, voltage or current regulation and amplification. Transistor controls a large electric output signal with changes to a small input signal. Since a large amount of current can be controlled by a small amount of current, a transistor acts as an amplifier. Transistor also acts as switch which can open and close many times per second.


The TIP120 also known as Darlington transistor. It was designed as a medium power switching transistor and can be used to switch a motor on and off. This type of transistor can use a small current to switch and amplify a much larger current to the motor or other load such as buzzer. The controlling pin on the transistor or base is sensitive to too much current, so the circuit required a 1k Ω or 2.2kΩ resistor coming from the output pin into TIP120. This transistor coupled with a motor power supply and will allow the circuit to run a DC motor and empower the circuit to activate many other devices. Therefore, for this project i used a TIP120 because it can pass more current especially if i add a heat sink on the transistor and handle larger load.




Troubleshooting the PCB line

After done with etching procedure, a PCB line should be check by using a multi-meter. This is important to ensure each component that will be install on the circuit board able receive a voltage and current and operate perfectly. Basically before soaking the copper board into the hydrochloric acid, the printed PCB line sometimes are not connected or dotted line. This problem can be fixing by drawing back those dotted line with a black marker pen and then continue soak the copper board into the acid.

Below picture shown the dotted line on the copper board


Making a connection troubleshooting using multi-meter.


Thus, the complete etching board will be drill to make a hole for electronic component placement.








Etch a single sided PCB

Etching is a printmaking process and where the excess copper is removed to leave the individual tracks on the circuit board. A muriatic or hydrochloric acid is important because it is used to remove the cooper layout on the circuit board.
\
Etch a single sided PCB

Etching is a printmaking process and where the excess copper is removed to leave the individual tracks on the circuit board. A muriatic or hydrochloric acid is important because it is used to remove the cooper layout on the circuit board.

The copper board can be cut into a necessary size needed and then clean it using a paper towel from any dust. Make sure our hands clean from any oil before touching the circuit board. Then place the pcb layout on a copper board and stick it using a masking tape.


Thus, get ready with a clothes iron and set the iron on the hottest setting to allow the iron get hot. Before start ironing the circuit board, use a thick clothes such as kain pelekat to sandwiching the copper board.


Firmly press the iron onto the back of the PCB layout for about 20 seconds and repeat the same method for more than 5 minutes. Without moving the iron, press board very hard for 1 minute to provide perfect heat to the circuit board. Then slowly move the iron around the copper board with a lot of pressure. After done with these methods, make sure the circuit board fully cool before removing the PCB layout from the copper board. 



Pour some hydrochloric acid on a plastic container and soak in the copper board into the acid. Wait for 4 minutes and shake the container slowly to remove the copper layout from the board.  The copper layout can be easily separate from the board by this method. Repeat the same method for 3 or 4 times to get a fully circuit board.



Separates the circuit board from the acid and leave it for 2 minutes. Wash the circuit board using clean water and brush the copper layout side using a sand paper. Repeat the same method until the copper layout completely removed.