Вы находитесь на странице: 1из 5

DEVICES Relay Relay: Generally, it is a five terminal device. It is used for isolating interfacing devices with the controller.

It consist one coil and three terminals for connecting devices.


3 1 coil 2 5 relay n/c 4 n/o

N/c - normally closed. N/o normally open. Operation: when the power supply is given to the coil, the coil will get magnetized and will attract the center lead (4), so that the lead will break its contact with n/c lead (3) and make contact with lead (5). Now the lead 4 & 5 act as a short circuit and lead 3 as open circuit.
4

5
free w heeling diode

LED1
5

In the above circuit when we remove the power supply, the LED will be turned off. Note that we have connected a reverse biased diode parallel to the relay coil; this type of diode connection is called free wheeling diode. When we connect a voltage source to the coil, it will get energized and store the signal as magnetic field in it. Now when we remove the power supply, the energy stored in the coil continue to be there as long as a path is

available. Now, if we once again connect the power supply, the coil will once again try to store voltage. At one stage the stored voltage reach a condition that it may damage the power connected to it. In order to avoid this the free wheeling diode is connected across it. Now after removing the power supply the voltage stored in the coil will get a closed path because of diode connected to it. The diode connection to the relay ensures that there is no voltage stored in the coil and it is safe to operate. Normally a relay will be connected to the MC using a driver circuit. The driver circuit may be a transistor or buffer IC.

Vcc free w heeling diode

To MC port

driver circuit

LCD LCD stands for liquid crystal display, it is a output device used for displaying alphanumeric characters. It is a 16-pin device, which is, separated in to 8 data lines, 3 control lines, 2 power supply lines, 2 lines for back light and last line for contrast adjusting. LCD as a in built memory which is used to store data which as to be displayed which can also be read back. The LCD is differentiated based on lines present, for e.g. 1X16, 2X16, 4X16 etc. The 1X16 means that the LCD as 1 line with 16 characters can be displayed and similarly for other displays. A LCD has two registers named command register and data register. The data register is used to display data in LCD, for e.g. to display data one in LCD the datas should be written in the data register. There are different types of commands like clear screen, cursor blink, start data from first line, start data from second line (each command is represented by its own hex code) etc., which should be written in the command register. In order to display the data one, its corresponding ASCII values should be written in the data register. Control lines:

A LCD has only one data bus for both data and command. So in order to differentiate between data and register a control line called RS (register select) is used. If RS is given the value 1 the data is given to the LCD, else if RS is given 0 the command is given to the LCD. R/W (read/write) is a control line, which is used to inform LCD that a data is written to or read from LCD. For example if R/W is given the value 1 it means that the data is read from LCD and if R/W is 0 then the data is written to the LCD. E(enable) is a control line, which is used to inform LCD that a data or command is present in the data bus of LCD. VCC & led+
8 data lines

8051

LCD

Preset

3 control lines Gnd & led-

Contrast pin

The contrast line is used to adjust the contrast of the LCD so that data can be clearly displayed. A potentiometer or preset is used to adjust contrast Power supply lines and LED back up lines are connected to +5v and ground respectively.

LED LED stands for light emitting diode; it is a two-pin device capable of producing light when it is forward biased. Cathode & anode are the two pins of LED. A LED can be made to glow when a voltage level greater than its potential difference is applied across its pins through a series resistor. For example in order to glow a green LED you have to give voltage greater than 2.6v through the series resistor. The series resistor is used to limit the current flowing through the LED, in order to make LED glow normally we need to give a current value of about 20mili amps, so the series resistor will depends on the type of color LED used and the voltage level used. The formula used to calculate the resistance level is R=((VCC- LED potential difference)/ 20mili amps)

Color Infrared Red Orange Yellow Green Blue White Ultraviolet

Potential Difference 1.6 V 1.8 V to 2.1 V 2.2 V 2.4 V 2.6 V 3.0 V to 3.5 V 3.0 V to 3.5 V 3.5 V

So for 5v power supply for a RED LED requires resistance greater than 150 ohms and for 12v greater than 500ohms.

Вам также может понравиться