LCD display

One of the best solutions for devices that require visualizing the data is the "smart" LCD display. Printing the data on this type of display is performed on the dot segments arranged to form a row. Segment dimensions are 7x5 dots and one row can consist of 8, 16, 20 or 40 segments. LCD display can have 1, 2 or 4 rows. LCD can be connected to a microcontroller via 8-bit or 4-bit bus (4 or 8 lines).


Besides these, there are control lines E (enable), R/W (read/write) and RS (register select) for a total of 7 lines. R/W signal is on the ground, because there is one-way communication toward the LCD display. Some displays feature built-in back-light that can be turned on with RD1 pin via PNP transistor BC557.

. The keyboard is connected to port B.Keyboard In more demanding applications that require greater number of buttons. Microcontrol ler The keys are connected into shared rows and columns. 10K resistors between input pins and the ground determine the state of input pins when the key is not pressed. 1K resistor is added to each row. The following sample includes scheme of connecting the keyboard and accompanying program which reads keyboard keys and prints the read value on LED diodes of port D. Reading the keyboard is done by subroutine "ScanKeys". it is possible to use buttons connected in matrix to keep microcontroller I/O lines free. In order to avoid short-circuits between two pressed keys. It means that the logical zero is on input pins when the keys are not pressed. RB2 and RB1). it's pins being designated as input for rows (RB7. RB5 and RB4) and output for columns (RB3. RB6.

Microcontrol ler The program sets value of the last read key on port D.). By calling the appropriate Lookup table. The greatest task is on the subroutine ScanKey. "*" and "#" are represented with values 10 and 11. variable KeyPress takes value from 0 to 3 (zero for the first row of that column. It sets logical one on keyboard columns and then calls the subroutine Row which checks if any of the 4 keys in that columns is pressed (which is signalized by variable Flag). In case that one of the keys from the column is pressed. etc. If none of the keys is pressed all diodes of port D are on. In case that no key is pressed value of variable is 12. real value of the key is stored into variable Result and then to variable OldResult where from it is displayed on port D. one for the second row of that column. .

The output voltage is many times higher than the voltage difference between input terminals of an op-amp.Pulse generated circuit LM324-(Used as comparator) LM324 is a 14pin IC consisting of four independent operational amplifiers (opamps) compensated in a single package. Op-amps are high gain electronic voltage amplifier with differential input and. usually. . a single-ended output.

Photoresistors are Semiconductor devices that use light energy to control the flow of electrons. comparators. LDR Sensor The Photoconductive Cell A Photoconductive light sensor does not produce electricity but simply changes its physical properties when subjected to light energy. photoresistive cells have a long response time requiring many seconds to respond to a change in the light intensity. and hence the current flowing through them. rectifiers etc. They can be used as amplifiers. The conventional op-amp applications can be more easily implemented with LM324. lead sulphide (PbS). The most common type of photoconductive device is the Photoresistor which changes its electrical resistance in response to changes in the light intensity. Also. lead selenide (PbSe). the Light Dependant Resistor (LDR) is made from a piece of exposed semiconductor material such as cadmium sulphide that changes its electrical resistance from several thousand Ohms in the dark to only a few hundred Ohms when light falls upon it by creating hole-electron pairs in the material. oscillators. The Light Dependant Resistor Typical LDR As its name implies. Materials used as the semiconductor substrate include. indium antimonide (InSb) which detect light in the infra-red range with the most commonly used of all photoresistive light sensors being Cadmium Sulphide (Cds). The net effect is an improvement in its conductivity with a decrease in resistance for an increase in illumination. Cadmium sulphide is used in the manufacture of photoconductive cells because its spectral response curve closely matches that of the human eye and can .These op-amps are operated by a single power supply LM324 and need for a dual supply is eliminated. The commonly used Photoconductive Cell is called the Light Dependant Resistor or LDR.

it has a peak sensitivity wavelength (λp) of about 560nm to 600nm in the visible spectral range. Typically then. The resistance of the cell when unilluminated (dark resistance) is very high at about 10MΩ's which falls to about 100Ω's when fully illuminated (lit resistance). darkness or twilight detection for turning the street lights "ON" and "OFF".even be controlled using a simple torch as a light source. the resistive path forms a zigzag pattern across the ceramic substrate. One simple use of a Light Dependant Resistor. The Light Dependant Resistor Cell The most commonly used photoresistive light sensors is the ORP12 Cadmium Sulphide photoconductive cell. The CdS photocell is a very low cost device often used in auto dimming. is as a light sensitive switch as shown below. To increase the dark resistance and therefore reduce the dark current. and for photographic exposure meter type applications. . This light depedant resistor has a spectral response of about 610nm in the yellow to orange region of light.

A more sensitive precision light activated circuit can be easily made by incorporating the LDR into a "Wheatstone Bridge" arrangement and replacing the transistor with an Operational Amplifier as shown. This type of simple circuit shown above has a fairly low sensitivity and its switching point may not be consistent due to variations in either temperature or the supply voltage. As the light level falls back to darkness again the resistance of the LDR increases causing the base voltage of the transistor to decrease. LDR1 and the potentiometer VR1 form one arm of a simple Wheatstone bridge network and the two fixed resistors R1 and R2 forming the other arm. Light Level Sensing Circuit In this basic circuit the light dependant resistor. A potential divider circuit is formed between the photoresistor. the resistance of the LDR is very high in the Megaohms range so zero base bias is applied to the transistor TR1 and the relay is de-energised or "OFF". By replacing the fixed resistor R1 with a potentiometer VR1. As the light level increases the resistance of the LDR starts to decrease causing the base bias voltage at V1 to rise.LDR Switch This basic light sensor circuit is of a relay output light activated switch. At some point determined by the potential divider network formed with resistor R1. LDR and the resistor R1. turning the transistor and relay "OFF" at a fixed light level determined again by the potential divider network. the base bias voltage is high enough to turn the transistor TR1 "ON" and thus activate the relay which inturn is used to control some external circuitry. When no light is present ie in darkness. the point at which the relay turns "ON" or "OFF" can be pre-set to a particular light level. Both sides of the .

The configuration of the operational amplifier is as a Differential Amplifier also known as a voltage comparator with its output signal being the difference between the two input signals or voltages. D1. V2 .VR1 combination a variable voltage input V1.bridge form potential divider networks whose outputs V1 and V2 are both connected to the inverting and non-inverting voltage inputs respectively of the operational amplifier. Bulb sequence circuit . which is protected by a free wheel diode. When the light level sensed by the LDR and its output voltage falls below the reference voltage at V2 the output from the op-amp changes activating the relay and switching the connected load. The potentiometer can be used to "pre-set" the switching point of the differential amplifier to any particular light level making it ideal as a light sensor circuit. The feedback resistor Rf can be chosen to give a suitable amplifier voltage gain if required. Likewise as the light level increases the output will switch back turning "OFF" the relay. The resistor combination R1 and R2 form a fixed reference voltage input V2. The operation of this type of light sensor circuit can also be reversed to switch the relay "ON" when the light level exceeds the reference voltage level and vice versa by reversing the positions of the light sensor LDR and the potentiometer VR1. As with the previous circuit the output from the operational amplifier is used to control a relay. set by the ratio of the two resistors and the LDR .V1.

Sign up to vote on this title
UsefulNot useful