Automatic Ambulance Rescue System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 139

AUTOMATIC AMBULANCE RESCUE SYSTEM CORDIALITY SERVICES

TITLE

PROJECT REPORT PHASE I Submitted by

Register No: in partial fulfillment for the award of the degree Of MASTER OF ENGINEERING In APPLIED ELECTRONICS PAAVAI ENGINEERING COLLEGE PACHAL, NAMAKKAL 637 018

ANNA UNIVERSITY OF TECHNOLOGY COIMBATORE 641 001 NOVEMBER 2010

ACKNOWLEDGEMENT A great deal of time and effort has been spent in completing this project work. Several people have guided us and contributed significantly to this effort and so this becomes obligatory to record my thanks to them.

I express my profound gratitude to our honorable Chairman, Shri.CA.N.V.NATARAJAN, B.Com., F.C.A., and also to our Correspondent, Smt.MANGAI NATARAJAN, M.Sc., for providing all necessary facilities for the successful completion of the project.

I have immense pleasure in expressing our gratitude to our beloved Principal, Dr.C.JEGADHEESAN, Ph.D., for allowing us to have the extensive use of our college facilities to do this project.

I express my heartiest gratitude to Assistant Professor& Head of the Department, for his guidance and encouragement. I am indebted to my internal guide Assistant Professor, Department of Electronics and Communication Engineering for her constant help and excellent creative ideas over the period of project work.

I express my sincere words of gratitude to the staff members of the Department of Electronics and Communication Engineering for their encouragement to do the project work with full interest and enthusiasm.

I would like to extend my warmest thanks to all our Lab Technicians for helping me in this venture. Unflinching support and encouragement from the members of my family, friends and all staff members in PAAVAI ENGINEERING COLLEGE helped me a long way to complete my project work. I must thank them all from the depth of my heart. Mrs.K.NIRMALA DEVI,M.Tech .,(Ph.D)., Mr.R.ARANGASAMY, M.Tech.,(Ph.D).,

2. ABSTRACT: Traffic congestion and tidal flow management were recognized as major problems in modern urban areas, which have caused much warting for the ambulance. Moreover road accidents in the city have been incessant and to bar the loss of life due to the accidents is even more crucial. To implement this we introduce a scheme called AARS (Automatic ambulance rescue system). The main theme behind this scheme is to provide a smooth flow for the ambulance to reach the hospitals in time and thus minifying the expiration. The idea behind this scheme is to implement a ITS which would control mechanically the traffic lights in the path of the ambulance. The ambulance is controlled by the central unit which furnishes the most scant route to the ambulance and also controls the traffic light according to the ambulance location and thus reaching the hospital safely. The server also determines the location of the accident spot through the sensor systems in the vehicle which encountered the accident and thus the server walks through the ambulance to the spot. This scheme is fully automated, thus it finds the accident spot, controls the traffic lights, helping to reach the hospital in time.

3. INTRODUCTION Present industry is increasingly shifting towards automation. Two principle components of todays industrial automations are programmable controllers and robots. In order to aid the tedious work and to serve the mankind, today there is a general tendency to develop an intelligent operation. The proposed system AUTOMATIC AMBULANCE RESCUE SYSTEM CORDIALITY SERVICES is designed and developed to accomplish the various tasks in an adverse environment of an industry. The intelligent This project is an owe to the technical advancement. This prototype system can be applied effectively and efficiently in an expanded dimension to fit for the requirement of industrial, research and commercial applications. Microcontroller is the heart of the device which handles all the sub devices connected across it. We have used as microcontroller. It has flash type reprogrammable memory. It has some peripheral devices to play this project perform. It also provides sufficient power to inbuilt peripheral devices. We need not give individually to all devices. The peripheral devices also activates as low power operation mode. These are the advantages are appear here.

4. EXISTING SYSTEM:
Vehicle Accident Automatic Detection and Remote Alarm Device

The Rapid growth of technology and infrastructure has made our lives easier. The advent of technology has also increased the traffic hazards and the road accident take place frequently which causes huge loss of life and property because of the poor emergency facilities. Our project will provide an optimum solution to this draw back. An accelerometer can be used in a car alarm application so that dangerous driving can be detected. It can be used as a crash or rollover detector of the vehicle during and after a crash. With signals from an accelerometer, a severe accident can be recognized. According to this project when a vehicle meets with an accident immediately Vibration sensor will detect the signal or if a car rolls over, and Micro electro mechanical system (MEMS) sensor will detects the signal and sends it to ARM controller. Microcontroller sends the alert message through the GSM MODEM including the location to police control room or a rescue team. So the police can immediately trace the location through the GPS MODEM, after receiving the information. Then after conforming the location necessary action will be taken. If the person meets with a small accident or if there is no serious threat to anyone`s life, then the alert message can be terminated by the driver by a switch provided in order to avoid wasting the valuable time of the medical rescue team. This paper is useful in detecting the accident precisely by means of both vibration sensor and Micro electro Mechanical system (MEMS) or accelerometer. As there is a scope for improvement and as a future implementation we can add a wireless webcam for capturing the images which will help in providing driver`s assistance.

5. SYSTEM SPECIFICATION: 5.1 HARDWARE REQUIREMENT:

PIC MICROCONTROLLER MICROCONTROLLER LCD DISPLAY RS 232 GSM MODEM PC VIBRATION SENSOR KEYPAD RF TRANSMITTER &RECIVER ENCODER & DECODER TRAFFIC LIGHT KEY RELAY

5.2 SOFTWARE REQUIREMENT: MPLAP PCB DESIGNING

6. SOFTWARE DESCRIPTION:

6.1 MPLAB

MPLAB IDE is an integrated development environment that provides development engineers with the flexibility to develop and debug firmware for various Microchip devices MPLAB IDE is a Windows-based Integrated Development Environment for the Microchip Technology Incorporated PICmicrocontroller (MCU) and dsPIC digital signal controller (DSC) families. In the MPLAB IDE, you can:

Create source code using the built-in editor. Assemble, compile and link source code using various language tools. An assembler, linker and librarian come with MPLAB IDE. C compilers are available from Microchip and other third party vendors.

Debug the executable logic by watching program flow with a simulator, such as MPLAB SIM, or in real time with an emulator, such as MPLAB ICE. Third party emulators that work with MPLAB IDE are also available.

Make timing measurements. View variables in Watch windows. Program firmware into devices with programmers such as PICSTART Plus or PRO MATE II.

Find quick answers to questions from the MPLAB IDE on-line Help.

MPLAB SIMULATOR MPLAB SIM is a discrete-event simulator for the PIC microcontroller (MCU) families. It is integrated into MPLAB IDE integrated development environment. The MPLAB SIM debugging tool is designed to model operation of Microchip Technology's PIC microcontrollers to assist users in debugging software for these devices

IC PROG The PRO MATE II is a Microchip microcontroller device programmer. Through interchangeable programming socket modules, PRO MATE II enables you to quickly and easily program the entire line of Microchip PICmicro microcontroller devices and many of the Microchip memory parts. PRO MATE II may be used with MPLAB IDE running under supported Windows OS's (see Read me for PRO MATE II.txt for support list), with the command-line controller PROCMD or as a stand-alone programmer

COMPILER-HIGH TECH C A program written in the high level language called C; which will be converted into PICmicro MCU machine code by a compiler. Machine code is suitable for use by a PICmicro MCU or Microchip development system product like MPLAB IDE.

PIC START PLUS PROGRAMMER:

The PIC start plus development system from microchip technology provides the product development engineer with a highly flexible low cost microcontroller design tool set for all microchip PIC micro devices. The pic start plus development system includes PIC start plus development programmer and MPLAB IDE.

The PIC start plus programmer gives the product developer ability to program user software in to any of the supported microcontrollers. The PIC start plus software running under MPLAB provides for full interactive control over the programmer.

6.2PCB DESIGNING

Design and Fabrication of Printed circuit boards

INTRODUCTION:

Printed circuit boards, or PCBs, form the core of electronic equipment domestic and industrial. Some of the areas where PCBs are intensively used are computers, process control, telecommunications and instrumentation.

MANUFATCURING:

The manufacturing process consists of two methods; print and etch, and print, plate and etch. The single sided PCBs are usually made using the print and etch method. The double sided plate through hole (PTH) boards are made by the print plate and etch method.

The production of multi layer boards uses both the methods. The inner layers are printed and etch while the outer layers are produced by print, plate and etch after pressing the inner layers.

SOFTWARE:

The software used in our project to obtain the schematic layout is MICROSIM. PANELISATION: Here the schematic transformed in to the working positive/negative films. The circuit is repeated conveniently to accommodate economically as many circuits as possible in a panel, which can be operated in every sequence of subsequent steps in the PCB process. This is called penalization. For the PTH boards, the next operation is drilling. DRILLING:

PCB drilling is a state of the art operation. Very small holes are drilled with high speed CNC drilling machines, giving a wall finish with less or no smear or epoxy, required for void free through hole plating. PLATING: The heart of the PCB manufacturing process. The holes drilled in the board are treated both mechanically and chemically before depositing the copper by the electro less copper platting process. ETCHING: Once a multiplayer board is drilled and electro less copper deposited, the image available in the form of a film is transferred on to the out side by photo printing using a dry film printing process. The boards are then electrolytic plated

on to the circuit pattern with copper and tin. The tin-plated deposit serves an etch resist when copper in the unwanted area is removed by the conveyors spray etching machines with chemical etch ants. The etching machines are attached to an automatic dosing equipment, which analyses and controls etch ants concentrations SOLDERMASK: Since a PCB design may call for very close spacing between conductors, a solder mask has to be applied on the both sides of the circuitry to avoid the bridging of conductors. The solder mask ink is applied by screening. The ink is dried, exposed to UV, developed in a mild alkaline solution and finally cured by both UV and thermal energy. HOT AIR LEVELLING: After applying the solder mask, the circuit pads are soldered using the hot air leveling process. The bare bodies fluxed and dipped in to a molten solder bath. While removing the board from the solder bath, hot air is blown on both sides of the board through air knives in the machines, leaving the board soldered and leveled. This is one of the common finishes given to the boards. Thus the double sided plated through whole printed circuit board is manufactured and is now ready for the components to be soldered.

7. HARD WARE DESCRIPTION: 7. 1 BLOCK DIAGRAM:

7.2 BLOCK DIAGRAM DESCRIPTION: 7.2.1 PIC MICRO CONTROLLER

CONCEPTS OF MICROCONTROLLER : Microcontroller is a general purpose device, which integrates a number of the components of a CPU, memory and

microprocessor system on to single chip. It has inbuilt

peripherals to make it as a mini computer. A microcontroller combines on to the same microchip:

The CPU core Memory(both ROM and RAM) Some parallel digital i/o

Microcontrollers will combine other devices such as: A timer module to allow the microcontroller to perform tasks for certain time periods. A serial i/o port to allow data to flow between the controller and other devices such as a PIC or another microcontroller. An ADC to allow the microcontroller to accept analogue input data for processing.

Microcontrollers are : Smaller in size Consumes less power Inexpensive

Micro controller is a stand alone unit ,which can perform functions on its own without any requirement for additional hardware like i/o ports and external memory. The heart of the microcontroller is the CPU core. In the past, this has traditionally been based on a 8-bit microprocessor unit. For example Motorola uses a basic 6800 microprocessor core in their 6805/6808 microcontroller devices. In the recent years, microcontrollers have been developed around specifically designed CPU cores, for example the microchip PIC range of microcontrollers.

INTRODUCTION TO PIC : The microcontroller that has been used for this project is from PIC series. PIC microcontroller is the first RISC based microcontroller fabricated in CMOS (complimentary metal oxide semiconductor) that uses separate bus for instruction and data allowing simultaneous access of program and data memory. The main advantage of CMOS and RISC combination is low power consumption resulting in a very small chip size with a

small pin count. The main advantage of CMOS is that it has immunity to noise than other fabrication techniques.

PIC (16F877) : Various microcontrollers offer different kinds of memories. EEPROM, EPROM, FLASH etc. are some of the memories of which FLASH is the most recently developed. Technology that is used in pic16F877 is flash technology, so that data is retained even when the power is switched off. Easy Programming and Erasing are other features of PIC 16F877.

PIC START PLUS PROGRAMMER : The PIC start plus development system from microchip technology provides the product development engineer with a highly flexible low cost microcontroller design tool set for all microchip PIC micro devices. The picstart plus development system includes PIC start plus development programmer and mplab ide. The PIC start plus programmer gives the product developer ability to program user software in to any of the supported microcontrollers. The PIC start plus software running under mplab provides for full interactive control over the programmer.

SPECIAL FEATURES OF PIC MICROCONTROLLER : CORE FEATURES :

High-performance RISC CPU Only 35 single word instructions to learn All single cycle instructions except for program branches which are two cycle Operating speed: DC - 20 MHz clock input DC - 200 ns instruction cycle Up to 8K x 14 words of Flash Program Memory, Up to 368 x 8 bytes of Data Memory (RAM) Up to 256 x 8 bytes of EEPROM data memory Pin out compatible to the PIC16C73/74/76/77 Interrupt capability (up to 14 internal/external Eight level deep hardware stack Direct, indirect, and relative addressing modes Power-on Reset (POR) Power-up Timer (PWRT) and Oscillator Start-up Timer (OST) Watchdog Timer (WDT) with its own on-chip RC Oscillator for reliable operation Programmable code-protection Power saving SLEEP mode Selectable oscillator options

Low-power, high-speed CMOS EPROM/EEPROM technology Fully static design In-Circuit Serial Programming (ICSP) via two pins Only single 5V source needed for programming capability In-Circuit Debugging via two pins Processor read/write access to program memory Wide operating voltage range: 2.5V to 5.5V High Sink/Source Current: 25 mA Commercial and Industrial temperature ranges Low-power consumption: < 2mA typical @ 5V, 4 MHz 20mA typical @ 3V, 32 kHz < 1mA typical standby current

PERIPHERAL FEATURES : Timer0: 8-bit timer/counter with 8-bit prescaler Timer1: 16-bit timer/counter with prescaler, can be incremented during sleep via external crystal/clock Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler

Two Capture, Compare, PWM modules Capture is 16-bit, max resolution is 12.5 ns, Compare is 16-bit, max resolution is 200 ns, PWM max. resolution is 10-bit 10-bit multi-channel Analog-to-Digital converter Synchronous Serial Port (SSP) with SPI. (Master/Slave) Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with 9- bit address detection. Brown-out detection circuitry for Brown-out Reset (BOR) (Master Mode) and I2C.

ARCHITECTURE OF PIC 16F877 : The complete architecture of PIC 16F877 is shown in the fig 2.1. Table 2.1 gives details about the specifications of PIC 16F877. Fig 2.2 shows the complete pin diagram of the IC PIC 16F877.

ARCHITECTURE OF PIC 16F877

SPECIFICATIONS

DEVICE PIC 16F877

PROGRAM FLASH

DATA MEMORY 368 Bytes

DATA EEPROM 256 Bytes

8K

PIN DIAGRAM OF PIC 16F877

PIN OUT DESCRIPTION

Legend:

I = input O = output I/O = input/output P = power = Not used TTL = TTL input ST = Schmitt Trigger input

Note 1. This buffer is a Schmitt Trigger input when configured as an external interrupt 2. This buffer is a Schmitt Trigger input when used in serial programming mode.

3. This buffer is a Schmitt Trigger input when configured as general purpose I/O and a TTL input when used in the Parallel Slave Port mode (for interfacing to a microprocessor bus). 4. This buffer is a Schmitt Trigger input when configured in RC oscillator mode and a CMOS input otherwise.

Legend:

I = input O = output I/O = input/output P = power = Not used TTL = TTL input ST = Schmitt Trigger input

Note : 1. This buffer is a Schmitt Trigger input when configured as an external interrupt. 2. This buffer is a Schmitt Trigger input when used in serial programming mode.

3. This buffer is a Schmitt Trigger input when configured as general purpose I/O and a TTL input when used in the Parallel Slave Port mode (for interfacing to a microprocessor bus). 4. This buffer is a Schmitt Trigger input when configured in RC oscillator mode and a CMOS input otherwise.

2.5 I/O PORTS : Some pins for these I/O ports are multiplexed with an alternate function for the peripheral features on the device. In general, when a peripheral is enabled, that pin may not be used as a general purpose I/O pin. Additional Information on I/O ports may be found in the IC micro Mid-Range Reference Manual,

PORTA AND THE TRISA REGISTER : PORTA is a 6-bit wide bi-directional port. The corresponding data direction register is TRISA. Setting a TRISA bit (=1) will make the corresponding PORTA pin an input, i.e., put the corresponding output driver in a Hi-impedance mode. Clearing a TRISA bit (=0) will make the corresponding PORTA pin an output, i.e., put the contents of the output latch on the selected pin. Reading the PORTA register reads the status of the

pins whereas writing to it will write to the port latch. All write operations are readmodify-write operations. Therefore a write to a port implies that the port pins are read; this value is modified, and then written to the port data latch. Pin RA4 is multiplexed with the Timer0 module clock input to become the RA4/T0CKI pin. The RA4/T0CKI pin is a Schmitt Trigger input and an open drain output. All other RA port pins have TTL input levels and full CMOS output drivers. Other PORTA pins are multiplexed with analog inputs and analog VREF input. The operation of each pin is selected by clearing/setting the control bits in the ADCON1 register (A/D Control Register1). The TRISA register controls the direction of the RA pins, even when they are being used as analog inputs. The user must ensure the bits in the TRISA register are maintained set when using them as analog inputs.

PORT A FUNCTION

Legend: TTL = TTL input, ST = Schmitt Trigger input

SUMMARY OF REGISTERS ASSOCIATED WITH PORTA

Legend:

x = unknown,

u = unchanged,

- = unimplemented locations

read as '0'. Shaded cells are not used by PORTA.

PORTB AND TRISB REGISTER :

PORTB is an 8-bit wide bi-directional port. The corresponding data direction register is TRISB. Setting a TRISB bit (=1) will make the corresponding PORTB pin an input, i.e., put the corresponding output driver in a hi-impedance mode. Clearing a TRISB bit (=0) will make the corresponding PORTB pin an output, i.e., put the contents of the output latch on the selected pin. Three pins of PORTB are multiplexed with the Low Voltage Programming function; RB3/PGM, RB6/PGC and RB7/PGD. The alternate functions of these pins are described in the Special Features Section. Each of the PORTB pins has a weak internal pull-up. A single control bit can turn on all the pull-ups.

This

is

performed

by

clearing

bit

RBPU

(OPTION_REG<7>). The weak pull-up is automatically turned off when the port pin is configured as an output. The pull-ups are disabled on a Power-on Reset.

Four of PORT Bs pins, RB7:RB4, have an interrupt on change feature. Only pins configured as inputs can cause this interrupt to occur (i.e. any RB7:RB4 pin configured as an output is excluded from the interrupt on change comparison). The input pins (of RB7:RB4) are compared with the old value latched on the last read of PORTB. The mismatch outputs of RB7:RB4 are ORed together to generate the RB Port Change Interrupt with flag bit RBIF (INTCON<0>). This interrupt can wake the device from SLEEP. The user, in the interrupt service routine, can clear the interrupt in the following manner: a) Any read or write of PORTB. This will end the mismatch condition. b) Clear flag bit RBIF. A mismatch condition will continue to set flag bit RBIF. Reading PORTB will end the mismatch condition, and allow flag bit RBIF to be cleared. The interrupt on change feature is recommended for wake-up on key depression operation and operations where PORTB is only used for the interrupt on change feature. Polling of PORTB is not recommended while using the interrupt on change feature. This interrupt on mismatch feature, together with software configurable pull-ups on these four pins, allow easy interface to a keypad and make it possible for wake-up on key depression

PORT B FUNCTIONS

SUMMARY OF REGISTERS ASSOCIATED WITH PORTB

PORTC AND THE TRISC REGISTER : PORTC is an 8-bit wide bi-directional port. The corresponding data direction register is TRISC. Setting a TRISC bit (=1) will make the corresponding PORTC pin an input, i.e., put the corresponding output driver in a hi-impedance mode. Clearing a TRISC bit (=0) will make the corresponding PORTC pin an output, i.e., put the contents of the output latch on the selected pin. PORTC is multiplexed with several peripheral functions. PORTC pins have Schmitt Trigger input buffers.

When the I2C module is enabled, the PORTC (3:4) pins can be configured with normal I2C levels or with SMBUS levels by using the CKE bit (SSPSTAT <6>). When enabling peripheral functions, care should be taken in defining TRIS bits for each PORTC pin. Some peripherals override the TRIS bit to make a pin an output, while other peripherals override the TRIS bit to make a pin an input. Since the TRIS bit override is in effect while the peripheral is enabled, read-modify write instructions (BSF, BCF, XORWF) with TRISC as destination should be avoided. The user should refer to the corresponding peripheral section for the correct TRIS bit settings.

PORTC FUNCTIONS

SUMMARY OF REGISTERS ASSOCIATED WITH PORTC

PORTD AND TRISD REGISTERS : This section is not applicable to the 28-pin devices. PORTD is an 8-bit port with Schmitt Trigger input buffers. Each pin is

individually configurable as an input or output. PORTD can be configured as an 8bit wide microprocessor Port (parallel slave port) by setting control bit PSPMODE (TRISE<4>). In this mode, the input buffers are TTL.

PORTD FUNCTIONS

SUMMARY OF REGISTERS ASSOCIATED WITH PORTD

PORTE AND TRISE REGISTER :

PORTE

has

three

pins

RE0/RD/AN5,

RE1/WR/AN6 and RE2/CS/AN7, which are individually configurable as inputs or outputs. These pins have Schmitt Trigger input buffers. The PORTE pins become control inputs for the microprocessor port when bit PSPMODE (TRISE<4>) is set. In this mode, the user must make sure that the TRISE<2:0> bits are set (pins are configured as digital inputs). Ensure ADCON1 is configured for digital I/O. In this mode the input buffers are TTL. PORTE pins are multiplexed with analog inputs. When selected as an analog input, these pins will read as '0's. TRISE controls the direction of the RE pins, even when they are being used as analog inputs. The user must make sure to keep the pins configured as inputs when using them as analog inputs.

PORTE FUNCTIONS

SUMMARY OF REGISTERS ASSOCIATED WITH PORTE

\ MEMORY ORGANISATION : There are three memory blocks in each of the PIC16F877 MUCs. The program memory and Data Memory have separate buses so that concurrent access can occur.

PROGRAM MEMORY ORGANISATION : The PIC16f877 devices have a 13-bit program counter capable of addressing 8K *14 words of FLASH program memory. Accessing a location above the physically implemented address will cause a wraparound. The RESET vector is at 0000h and the interrupt vector is at 0004h.

DATA MEMORY ORGANISTION : The data memory is partitioned into multiple banks which contain the General Purpose Registers and the special functions Registers. Bits RP1 (STATUS<6) and RP0 (STATUS<5>) are the bank selected bits. RP1:RP0 00 01 10 11 Banks 0 1 2 3

Each bank extends up to 7Fh (1238 bytes). The lower locations of each bank are reserved for the Special Function Registers. Above the Special Function Registers are General Purpose Registers, implemented as static RAM. All implemented banks contain special function registers. Some frequently used special function registers from one bank may be mirrored in another bank for code reduction and quicker access.

PIC16F877 REGISTER FILE MAP

GENERAL PURPOSE REGISTER FILE : The register file can be accessed either directly or indirectly through the File Selected Register (FSR). There are some Special Function Registers used by the CPU and peripheral modules for controlling the desired operation of the device. These registers are implemented as static RAM. The Special Function Registers can be classified into two sets; core (CPU) and peripheral. Those registers associated with the core functions.

INSTRUCTION SET SUMMARY : Each PIC 16f877 instruction is a 14-bit word, divided into an OPCODE which specifies the instruction type and one or more operand which further specify the operation of the instruction. PIC16F877 instruction set summary in Table 2.13 The

lists byte-oriented, bit-

oriented, and literal and control operations. It shows the opcode Field descriptions. OPCODE FIELD DESCRIPTIONS

For

byte-oriented

instructions,

represents a file register designator and d represents a destination designator. The file register designator specifies which file register is to be used by the instruction. The destination designator specified where the result of the operation is to be placed. If d is zero, the result is placed in the w register. If d is one, the result is placed in the file register specified in the instruction.

For bit-oriented instructions, b represents a bit field designator which selects the number of the bit affected by the operation, which f represents the address of the file in which the bits is located. For literal and control operations, k represents an eight or eleven bit constant or literal value.

The instruction set is highly orthogonal and is grouped into three basic categories: Byte-oriented operations Bit-oriented operations Literal and control operations All instructions are executed within one single instruction cycle, unless a conditional test is true or the program counter is changed as a result of an instruction. In this case, the execution takes two instruction cycles with the second cycle executed as a NOP. One instruction cycle consists of four oscillator periods. Thus, for an oscillator frequency of 4 MHz, the normal instruction execution time is 1 ms. If a conditional test is true or the program counter is changed as a result of an instruction, then the instruction execution time is 2 ms.

16F877 INSTRUCTION SET

GENERAL FORMAT FOR INSTRUCTIONS :

7.2.2 MICROCONTROLLER: INTRODUCTION Microcontrollers are destined to play an increasingly important role in revolutionizing various industries and influencing our day to day life more strongly than one can imagine. Since its emergence in the early 1980's the microcontroller has been recognized as a general purpose building block for intelligent digital systems. It is finding using diverse area, starting from simple children's toys to highly complex spacecraft. Because of its versatility and many advantages, the application domain has spread in all conceivable directions, making it ubiquitous. As a consequence, it has generate a great deal of interest and enthusiasm among students, teachers and practicing engineers, creating an acute education need for imparting the knowledge of microcontroller based system design and development. It identifies the vital features responsible for their tremendous impact, the acute educational need created by them and provides a glimpse of the major application area.

MICROCONTROLLER A microcontroller is a complete microprocessor system built on a single IC. Microcontrollers were developed to meet a need for microprocessors to be put into low cost products. Building a complete microprocessor system on a single chip substantially reduces the cost of building simple products, which use the microprocessor's power to implement their function, because the microprocessor is a natural way to implement many products. This means the idea of using a microprocessor for low cost products comes up often. But the typical 8-bit microprocessor based system, such as one using a Z80 and 8085 is expensive. Both

8085 and Z80 system need some additional circuits to make a microprocessor system. Each part carries costs of money. Even though a product design may requires only very simple system, the parts needed to make this system as a low cost product. To solve this problem microprocessor system is implemented with a single chip microcontroller. This could be called microcomputer, as all the major parts are in the IC. Most frequently they are called microcontroller because they are used they are used to perform control functions. The microcontroller contains full implementation of a standard

MICROPROCESSOR, ROM, RAM, I/0, CLOCK, TIMERS, and also SERIAL PORTS. Microcontroller also called "system on a chip" or "single chip microprocessor system" or "computer on a chip". A microcontroller is a Computer-On-A-Chip, or, if you prefer, a single-chip computer. Micro suggests that the device is small, and controller tells you that the device' might be used to control objects, processes, or events. Another term to describe a microcontroller is embedded controller, because the microcontroller and its support circuits are often built into, or embedded in, the devices they control. Today microcontrollers are very commonly used in wide variety of intelligent products. For example most personal computers keyboards and implemented with a microcontroller. It replaces Scanning, Debounce, Matrix Decoding, and Serial transmission circuits. Many low cost products, such as Toys, Electric Drills, Microwave Ovens, VCR and a host of other consumer and industrial products are based on microcontrollers.

EVOLUTION OF MICROCONTROROLLER

Markets for microcontrollers can run into millions of units per application. At these volumes of the microcontrollers is a commodity items and must be optimized so that cost is at a minimum. .Semiconductor manufacturers have produced a mind-numbing array of designs that would seem to meet almost any need. Some of the chips listed in this sec0tion are no longer regular production, most are current, and a few are best termed as "smoke ware": the dreams of an aggressive marketing department.

Sl.No Manufacturer Chip Designation

Year No. of

No of

RAM ROM Other Features

Pins I/O 4 Bit MC 1. Texas Instruments 2. Hitachi HMCS 40 TMS 1000 Mid 1970 28 10 32 512 28 23 64 1K LED Display 10 ROM 3. Toshiba TLCS 47 42 35 128 2K Serial I/O 8 bit MC 1. Intel 8048 1976 40 27 64 1K External Memory 8K 2 Intel 8051 1980 40 32 128 4K External Memory 128 K 3. 4. Motorola Motorola 6081 68HC11 1977 1985 52 31 40 128 256 2K 8K Serial Port, ADC, 5. Zilog Z8 40 32 128 2K External Memory bit bit

128K, 16 Bit MC 1. Intel 80C196 68 40 232 8K External Memory 64K, Serial Port, ADC, WDT, PWM 2. Hitachi H8/532 84 65 1K 32K External Memory 1M, Serial Port, ADC, PWM 3. National HPC16164 68 52 512 16K External Memory 64K, ADC, WDT, PWM 32 Bit MC 1. Intel 80960 132 20 MHz clock, 32 bit bus, 512 byte instruction cache

APPLICATION Microcontrollers did you use today? A microcontroller is a kind of miniature computer that you can find in all kinds of Gizmos. Some examples of common, every-day products that have microcontrollers are built-in. If it has buttons and a digital display, chances are it also has a programmable microcontroller brain. Every-Day the devices used by ourselves that contain Microcontrollers. Try to make a list and counting how many devices and the events with microcontrollers you use in a typical day. Here are some examples: if your clock radio goes off, and you hit the snooze button a few times in the morning, the first thing you do in your day is interact with a microcontroller. Heating up some food in the microwave oven and making a call on a cell phone also involve operating microcontrollers. That's just the beginning. Here are a few more examples: Turning on the Television with a handheld remote, playing a hand held game, Using a calculator, and Checking your digital wrist watch. All those devices have microcontrollers inside them, that interact with you. Consumer appliances aren't the only things that contain microcontrollers. Robots, machinery, aerospace designs and other hightech devices are also built with microcontrollers.

One of the major differences between a micro controller and a microprocessor is that a controller often deals with bits , not bytes as in the real world application, for example switch contacts can only be open or close, indicators should be lit or dark and motors can be either turned on or off and so forth. BLOCK AND PIN SPI Serial Bus Interface DIAGRAM OF MICROCONTROLLER

Pin Description VCC Supply voltage. GND Ground. Port 0 Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 may also be configured to be the

multiplexed low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pull-ups are required during program verification. Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the loworder address bytes during Flash programming and verification. Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to

Port 2 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @ DPTR). In this application it uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of various special features of the AT89C51 as listed below:

Port 3 also receives some control signals for Flash programming and verification.

RST Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. ALE/PROG Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN Program Store Enable is the read strobe to external program memory. When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations

starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier. It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory.

Architecture of 89C51

ADVANTAGES OF MICROCONTROLLERS: 1. If a system is developed with a microprocessor, the designer

has to go for external memory such as RAM, ROM or EPROM and peripherals and hence the size of the PCB will be large enough to hold all the required peripherals. But, the micro controller has got all these peripheral facilities on a single chip so development of a similar system with a micro controller reduces PCB size and cost of the design.

INTRODUCTION TO ATMEL MICROCONTROLLER SERIES: 89C51 Family, TECHNOLOGY: CMOS The major Features of 8-bit Micro controller ATMEL 89C51: 8 Bit CPU optimized for control applications Extensive Boolean processing (Single - bit Logic ) Capabilities. On - Chip Flash Program Memory On - Chip Data RAM Bi-directional and Individually Addressable I/O Lines Multiple 16-Bit Timer/Counters Full Duplex UART Multiple Source / Vector / Priority Interrupt Structure On - Chip Oscillator and Clock circuitry. On - Chip EEPROM

Watch Dog Timer POWER MODES OF ATMEL 89C51 ICROCONTROLLER: To exploit the power savings available in CMOS circuitry. Atmel s Flash micro controllers have two software-invited reduced power modes. IDLE MODE: The CPU is turned off while the RAM and other on - chip peripherals continue operating. Inn this mode current draw is reduced to about 15 percent of the current drawn when the device is fully active. POWER DOWN MODE: All on-chip activities are suspended while the on chip RAM continues to hold its data. In this mode, the device typically draws less than 15 Micro Amps and can be as low as 0.6 Micro Amps POWER ON RESET: When power is turned on, the circuit holds the RST pin high for an amount of time that depends on the capacitor value and the rate at which it charges. To ensure a valid reset, the RST pin must be held high long enough to allow the oscillator to start up plus two machine cycles. On power up, VCC should rise within approximately 10ms. The oscillator start-up time depends on the oscillator frequency. For a 10 MHz crystal, the start-up time is typically 1ms.With the given circuit, reducing VCC quickly to 0 causes the RST pin voltage to momentarily fall below 0V. How ever, this voltage is internally l limited and will not harm the device. MEMORY ORGANIZATION:

* Logical Separation of Program and Data Memory * All Atmel Flash micro controllers have separate address spaces for program and data memory as shown in Fig 1.The logical separation of program and data

memory allows the data memory to be accessed by 8 bit addresses . Which can be more quickly stored and manipulated by an 8 bit CPU Nevertheless 16 Bit data memory addresses can also be generated through the DPTR register. Program memory can only be read. There can be up to 64K bytes of directly addressable program memory. The read strobe for external program memory is the Program Store Enable Signal (PSEN) Data memory occupies a separate address space from program memory. Up to 64K bytes of external memory can be

directly addressed in the external data memory space. The CPU generates read and write signals, RD and WR, during external data memory accesses. External program memory and external data memory can be combined by an applying the RD and PSEN signals to the inputs of AND gate and using the output of the fate as the read strobe to the external program/data memory. PROGRAM MEMORY: The map of the lower part of the program memory, after reset, the CPU begins execution from location 0000h. Each interrupt is assigned a fixed location in program memory. The interrupt causes the CPU to jump to that location, where it executes the service routine. External Interrupt 0 for example, is assigned to location 0003h. If external Interrupt 0 is used, its service routine must begin at location 0003h. If the I interrupt in not used its service location is available as general-purpose program memory. The interrupt service locations are spaced at 8 byte intervals 0003h for External interrupt 0, 000Bh for Timer 0, 0013h for External interrupt 1,001Bh for

Timer1, and so on. If an Interrupt service routine is short enough (as is often the case in control applications) it can reside entirely within that 8-byte interval. Longer service routines can use a jump instruction to skip over subsequent interrupt locations. If other interrupts are in use. The lowest addresses of program memory can be either in the on-chip Flash or in an external memory. To make this selection, strap the External Access (EA) pin to either VCC or GND. For example, in the AT89C51 with 4K bytes of on-chip Flash, if the EA pin is strapped to VCC, program fetches to addresses 0000h through 0FFFh are directed to internal Flash. Program fetches to addresses 1000h through FFFFh are directed to external memory.

DATA MEMORY: The Internal Data memory is dived into three blocks namely, Refer Fig The lower 128 Bytes of Internal RAM. The Upper 128 Bytes of Internal RAM. Special Function Register

Internal Data memory Addresses are always 1 byte wide, which implies an address space of only 256 bytes. However, the addressing modes for internal RAM can in fact accommodate 384 bytes. Direct addresses higher than 7Fh access one memory space, and indirect addresses higher than 7Fh access a different Memory Space. The lowest 32 bytes are grouped into 4 banks of 8 registers. Program instructions call out these registers as R0 through R7. Two bits in the Program Status Word (PSW) Select, which register bank, is in use. This architecture allows

more efficient use of code space, since register instructions are shorter than instructions that use direct addressing. The next 16-bytes above the register banks form a block of bit addressable memory space. The micro controller instruction set includes a wide selection of single - bit instructions and this instruction can directly address the 128 bytes in this area. These bit addresses are 00h through 7Fh. either direct or indirect addressing can access all of the bytes in lower 128 bytes. Indirect addressing can only access the upper 128. The upper 128 bytes of RAM are only in the devices with 256 bytes of RAM. The Special Function Register includes Ports latches, timers, peripheral controls etc., direct addressing can only access these register. In general, all Atmel micro controllers have the same SFRs at the same addresses in SFR space as the AT89C51 and other compatible micro controllers. However, upgrades to the AT89C51 have additional SFRs. Sixteen addresses in SFR space are both byte and bit Addressable. The bit Addressable SFRs are those whose address ends in 000B. The bit addresses in this area are 80h through FFh. ADDRESSING MODES: DIRECT ADDRESSING: In direct addressing, the operand specified by an 8-bit address field in the instruction. Only internal data RAM and SFRs can be directly addressed. INDIRECT ADDRESSING: In Indirect addressing, the instruction specifies a register that contains the address of the operand. Both internal and external RAM can indirectly address.

The address register for 8-bit addresses can be either the Stack Pointer or R0 or R1 of the selected register Bank. The address register for 16-bit addresses can be only the 16-bit data pointer register, DPTR.

INDEXED ADDRESSING: Program memory can only be accessed via indexed addressing this addressing mode is intended for reading look-up tables in program memory. A 16 bit base register (Either DPTR or the Program Counter) points to the base of the table, and the accumulator is set up with the table entry number. Adding the Accumulator data to the base pointer forms the address of the table entry in program memory. Another type of indexed addressing is used in the case jump instructions. In this case the destination address of a jump instruction is computed as the sum of the base pointer and the Accumulator data. REGISTER INSTRUCTION: The register banks, which contains registers R0 through R7, can be accessed by instructions whose opcodes carry a 3-bit register specification. Instructions that access the registers this way make efficient use of code, since this mode eliminates an address byte. When the instruction is executed, one of four banks is selected at execution time by the row bank select bits in PSW. REGISTER - SPECIFIC INSTRUCTION: Some Instructions are specific to a certain register. For example some instruction always operates on the Accumulator, so no address byte is needed to

point OT ir. In these cases, the opcode itself points to the correct register. Instruction that register to Accumulator as A assemble as Accumulator - specific Opcodes.

IMMEDIATE CONSTANTS: The value of a constant can follow the opcode in program memory For example. MOV A, #100 loads the Accumulator with the decimal number 100. The same number could be specified in hex digit as 64h. PROGRAM STATUS WORD: Program Status Word Register in Atmel Flash Micro controller:

CY

AC

F0

RS1 RS0 OV

---

PSW 7

PSW 0

PSW 6 PSW 5 PSW 4

PSW 1 PSW 2 PSW 3

PSW 0:

Parity of Accumulator Set By Hardware To 1 if it contains an Odd number of 1s, Otherwise it is reset to 0. PSW1: User Definable Flag PSW2: Overflow Flag Set By Arithmetic Operations PSW3: Register Bank Select 1.1 PSW4: 1.2 PSW5: General Purpose Flag. PSW6: Auxiliary Carry Flag Receives Carry Out from Bit 1 of Addition Operands PSW7: Carry Flag Receives Carry Out From Bit 1 of ALU Operands. The Program Status Word contains Status bits that reflect the current sate of the CPU. The PSW shown if Fig resides in SFR space. The PSW contains the Carry Bit, The auxiliary Carry (For BCD Operations) the two - register bank select bits, the Overflow flag, a Parity bit and two user Definable status Flags. Register Bank Select

The Carry Bit, in addition to serving as a Carry bit in arithmetic operations also serves the as the Accumulator for a number of Boolean Operations .The bits RS0 and RS1 select one of the four register banks. A number of instructions register to these RAM locations as R0 through R7.The status of the RS0 and time determines which of the four banks is selected.

RS1 bits at execution

The Parity bit reflect the Number of 1s in the Accumulator .P=1 if the Accumulator contains an even number of 1s, and P=0 if the Accumulator contains an even number of 1s. Thus, the number of 1s in the Accumulator plus P is always even. Two bits in the PSW are uncommitted and can be used as general-purpose status flags. INTERRUPTS The AT89C51 provides 5 interrupt sources: Two External interrupts, twotimer interrupts and a serial port interrupts. The External Interrupts INT0 and INT1 can each either level activated or transistion - activated, depending on bits IT0 and IT1 in Register TCON. The Flags that actually generate these interrupts are the IE0 and IE1 bits in TCON. When the service routine is vectored to hardware clears the flag that generated an external interrupt only if the interrupt WA transition activated. If the interrupt was level - activated, then the external requesting source (rather than the on-chip hardware) controls the requested flag. Tf0 and Tf1 generate the Timer 0 and Timer 1 Interrupts, which are set by a rollover in their respective Timer/Counter Register (except for Timer 0 in Mode 3). When a timer interrupt is generated, the on-chip hardware clears the flag that generated it when the service routine is vectored to. The logical OR of RI and TI generate the Serial Port Interrupt. Neither of these flag is cleared by hardware when the service

routine is vectored to. In fact, the service routine normally must determine whether RI or TI generated the interrupt an the bit must be cleared in software. In the Serial Port Interrupt is generated by the logical OR of RI and TI. Neither of these flag is cleared by hardware when the service routine is vectored to. In fact, the service routine normally must determine whether RI to TI generated the interrupt and the bit must be cleared in software.

IE: Interrupt Enable Register

EA

ET2 ES

ET1 EX1 ET0 EX0

Enable bit = 1 enabled the interrupt Enable bit = 0 disables it.

Symbol

Position

Function

EA

IE.

Global enable / disable all interrupts.

If EA = 0, no interrupt will be Acknowledge. If EA = 1, each interrupt source is individually enabled to disabled by setting or clearing its enable bit

IE.6

Undefined / reserved

ET2

IE.5

Timer 2 Interrupt enable Bit

ES

IE.4

Serial Port Interrupt enabled bit.

ET1

IE.3

Timer 1 Interrupt enable bit.

EX1

IE.2

External Interrupt 1 enable bit.

ET0

IE.1

Timer 0 Interrupt enable bit.

EX0

IE.0

External Interrupt 0 enable bit.

OSCILLATOR AND CLOCK CIRCUIT: XTAL1 and XTAL2 are the input and output respectively of an inverting amplifier which is intended for use as a crystal oscillator in the pierce configuration, in the frequency range of 1.2 MHz to 12 MHz. XTAL2 also the input to the internal clock generator. To drive the chip with an internal oscillator, one would ground XTAL1 and XTAL2. Since the input to the clock generator is divide by two flip flop there are no requirements on the duty cycle of the external oscillator signal. However, minimum high and low times must be observed. The clock generator divides the oscillator frequency by 2 and provides a tow phase clock signal to the chip. The phase 1 signal is active during the first half to each clock period and the phase 2 signals are active during the second half of each clock period. CPU TIMING: A machine cycle consists of 6 states. Each stare is divided into a phase / half, during which the phase 1 clock is active and phase 2 half. Arithmetic and Logical operations take place during phase1 and internal register - to register transfer take place during phase 2

Trends and developments in micro controller The manner in which the use of micro controllers is shaping our lives is breathtaking. Today, this versatile device can be found in a variety of control applications. CVTs, VCRs, CD players, microwave ovens, and automotive engine systems are some of these. A micro controller unit (MCU) uses the microprocessor as its central processing unit (CPU) and incorporates memory, timing reference, I/O peripherals, etc on the same chip. Limited computational capabilities and enhanced I/O are special features. The micro controller is the most essential IC for continuous process- based applications in industries like chemical, refinery, pharmaceutical automobile, steel, and electrical, employing programmable logic systems (DCS). PLC and DCS thrive on the programmability of an MCU. There are many MCU manufacturers. To understand and apply general concepts, it is necessary to study one type in detail. This specific knowledge can be used to understand similar features of other MCUs. Micro controller devices have many similarities. When you look at the differences, they are not so great either. Most common and popular MCUs are considered to be mature and well-established products, which have their individual adherents and devotees. There are a number of variants within each family to satisfy most memory, I/O, data conversion, and timing needs of enduser applications. The MCU is designed to operate on application-oriented sensor data-for example, temperature and pressure of a blast furnace in an industrial process that is fed through its serial or operated on under the control of software and stored in ROM. Appropriate signals are fed via output ports to control external devices and systems. Applications of Microcontrollers Microcontrollers are designed for use in sophisticated real time applications such as

1. Industrial Control 2. Instrumentation and 3. Intelligent computer peripherals They are used in industrial applications to control Motor Robotics Discrete and continuous process control In missile guidance and control In medical instrumentation Oscilloscopes Telecommunication Automobiles For Scanning a keyboard Driving an LCD For Frequency measurements Period Measurements

7.2.3 LCD DISPLAY

INTRODUCTION: Liquid crystal displays (LCDs) have materials which combine the properties of both liquids and crystals. Rather than having a melting point, they have a temperature range within which the molecules are almost as mobile as they would be in a liquid, but are grouped together in an ordered form similar to a crystal. An LCD consists of two glass panels, with the liquid crystal material sand witched in between them. The inner surface of the glass plates are coated with transparent electrodes which define the character, symbols or patterns to be displayed polymeric layers are present in between the electrodes and the liquid crystal, which makes the liquid crystal molecules to maintain a defined orientation angle. One each polarisers are pasted outside the two glass panels. These polarisers would rotate the light rays passing through them to a definite angle, in a particular direction When the LCD is in the off state, light rays are rotated by the two polarisers and the liquid crystal, such that the light rays come out of the LCD without any orientation, and hence the LCD appears transparent. When sufficient voltage

is applied to the electrodes, the liquid crystal molecules would be aligned in a specific direction. The light rays passing through the LCD would be rotated by the polarisers, which would result in activating / highlighting the desired characters.

The LCDs are lightweight with only a few millimeters thickness. Since the LCDs consume less power, they are compatible with low power electronic circuits, and can be powered for long durations. The LCDs dont generate light

and so light is needed to read the display. By using backlighting, reading is possible in the dark. The LCDs have long life and a wide operating temperature range. Changing the display size or the layout size is relatively simple which makes the LCDs more customer friendly. The LCDs used exclusively in watches,

calculators and measuring instruments are the simple seven-segment displays, having a limited amount of numeric data. The recent advances in technology have resulted in better legibility, more information displaying capability and a wider temperature range. These have resulted in the LCDs being extensively used in telecommunications and entertainment electronics. The LCDs have even started replacing the cathode ray tubes (CRTs) used for the display of text and graphics, and also in small TV applications.

POWER SUPPLY:

The power supply should be of +5V, with maximum allowable transients of 10mv. To achieve a better / suitable contrast for the display, the voltage (VL) at pin 3 should be adjusted properly. A module should not be inserted or removed from a live circuit. The ground terminal of the power supply must be isolated properly so that no voltage is induced in it. The module should be isolated from the other circuits, so that stray voltages are not induced, which could cause a flickering display.

HARDWARE: Develop a uniquely decoded E strobe pulse, active high, to accompany each module transaction. Address or control lines can be assigned to drive the RS and R/W inputs. Utilize the Hosts extended timing mode, if available, when transacting with the module. Use instructions, which prolong the Read and Write or other appropriate data strobes, so as to realize the interface timing requirements. If a parallel port is used to drive the RS, R/W and E control lines, setting the E bit simultaneously with RS and R/W would violate the modules set up time. A separate instruction should be used to achieve proper interfacing timing requirements. MOUNTING: Cover the display surface with a transparent protective plate, to protect the polarizer. Dont touch the display surface with bare hands or any hard materials.

This will stain the display area and degrade the insulation between terminals. Do not use organic solvents to clean the display panel as these may advesely affect tape or with absorbant cotton and petroleum benzene. The processing or even a

slight deformation of the claws of the metal frame will have effect on the connection of the output signal and cause an abnormal display. Do not damage or modify the pattern wiring, or drill attachment holes in the PCB. When assembling the module into another equipment, the space between the module and the fitting plate should have enough height, to avoid causing stress to the module surface.

Make sure that there is enough space behind the module, to dissipate the heat generated by the ICs while functioning for longer durations. When an electrically powered screwdriver is used to install the module, ground it properly. While cleaning by a vacuum cleaner, do not bring the sucking mouth near the module. Static electricity of the electrically powered driver or the vacuum cleaner may destroy the module. ENVIRONMENTAL PRECAUTIONS: Operate the LCD module under the relative condition of 40C and 50% relative humidity. Lower temperature can cause retardation of the blinking speed of the display, while higher temperature makes the overall display discolor. When the temperature gets to be within the normal limits, the display will be normal. Polarization degradation, bubble generation or polarizer peel-off may occur with high temperature and humidity. Contact with water or oil over a long period of time may cause deformation or colour fading of the display. Condensation on the terminals can cause electro-chemical reaction disrupting the terminal circuit.

TROUBLE SHOOTING

INTRODUCTION: When the power supply is given to the module, with the pin 3 (VL) connected to ground, all the pixels of a character gets activated in the following manner: All the characters of a single line display, as in CDM 16108. The

first eight characters of a single line display, operated in the two-line display mode, as in CDM 16116. The first line of characters of a two-line display as in CDM 16216 and 40216. The first and third line of characters of a four-line display operated in the two-line display mode, as in CDM 20416. If the above mentioned does not Make sure that the

occur, the module should be initialized by software.

control signals E , R/W and RS are according to the interface timing requirements.

IMPROPER CHARACTER DISPLAY: When the characters to be displayed are missing between, the data read/write is too fast. A slower interfacing frequency would rectify the problem. When uncertainty is there in the start of the first characters other than the specified ones are rewritten, check the initialization and the software routine. In a multi-line display, if the display of characters in the subsequent lines doesnt take place properly, check the DD RAM addresses set for the corresponding display lines. When it is unable to display data, even though it is present in the DD RAM, either the display on/off flag is in the off state or the display shift function is not set properly. When the display shift is done simultaneous with the data writa operation, the data may not be visible on the display. If a character not found

in the font table is displayed, or a character is missing, the CG ROM is faulty and the controller IC have to be changed If particular pixels of the characters are missing, or not getting activated properly, there could be an assembling problem in the module. In case any other problems are encountered you could send the module to our factory for testing and evaluation.

1.2.1 CRYSTALONICS DISPLAY

INTRODUCTION: Crystalonics dot matrix (alphanumeric) liquid crystal displays are available in TN, STN types, with or without backlight. The use of C-MOS LCD controller and driver ICs result in low power consumption. These modules can be interfaced with a 4-bit or 8-bit micro processor /Micro controller. The built-in controller IC has the following features: Correspond to high speed MPU interface (2MHz) 80 x 8 bit display RAM (80 Characters max) 9,920 bit character generator ROM for a total of 240 character fonts. 208 character fonts (5 x 8 dots) 32 character fonts (5 x 10 dots) 64 x 8 bit character generator RAM 8 character generator RAM 8 character fonts (5 x 8 dots) 4 characters fonts (5 x 10 dots) Programmable duty cycles 1/8 for one line of 5 x 8 dots with cursor 1/11 for one line of 5 x 10 dots with cursor 1/16 for one line of 5 x 8 dots with cursor Wide range of instruction functions display clear, cursor home, display on/off, cursor on/off, display character blink, cursor shift, display shift. Automatic reset circuit, that initializes the controller / driver ICs after power on. BUSY FLAG:

When the busy flag is1, the controller is in the internal operation mode, and the next instruction will not be accepted. When RS = 0 and R/W = 1, the busy flag is output to DB7. The next instruction must be written after ensuring that the busy flag is 0. ADDRESS COUNTER: The address counter allocates the address for the DD RAM and CG RAM read/write operation when the instruction code for DD RAM address or CG RAM address setting, is input to IR, the address code is transferred from IR to the address counter. After writing/reading the display data to/from the DD RAM or CG RAM, the address counter increments/decrements by one the address, as an internal operation. The data of the address counter is output to DB0 to DB6 while R/W = 1 and RS = 0. DISPLAY DATA RAM (DD RAM) The characters to be displayed are written into the display data RAM (DD RAM), in the form of 8 bit character codes present in the character font table. The extended capacity of the DD RAM is 80 x 8 bits i.e. 80 characters. CHARATCER GENERATOR ROM (CG ROM) The character generator ROM generates 5 x 8 dot 5 x 10 dot character patterns from 8 bit character codes. It generates 208, 5 x 8 dot character patterns and 32, 5 x 10 dot character patterns. CHARACTER GENERATOR RAM (CG RAM)

In the character generator RAM, the user can rewrite character patterns by program. For 5 x 8 dots, eight character patterns can be written, and for 5 x 10 dots, four character patterns can be written. INTERFACING THE MICROPROCESSOR CONTROLLER: The module, interfaced to the system, can be treated as RAM input/output, expanded or parallel I/O.Since there is no conventional chip select signal, developing a strobe signal for the enable signal (E) and applying appropriate signals to the register select (RS) and read/write (R/W) signals are important.The module is selected by gating a decoded module address with the host processors read/write strobe. The resultant signal, applied to the LCDs enable (E) input, clocks in the data.The E signal must be a positive going digital strobe, which is active while data and control information are stable and true. The falling edge of the enable signal enables the data / instruction register of the controller. All module timings are referenced to specific edges of the E signal. The E signal is applied only when a specific module transaction is desired.The read and write strobes of the host, which provides the E signals, should not be linked to the modules R/W line. An address bit which sets up earlier in the hosts machine cycle can be used as R/W.When the host processor is so fast that the strobes are too narrow to serve as the E pulse a. Prolong these pulses by using the hosts Ready input b. Prolong the host by adding wait states c. Decrease the Hosts Crystal frequency. Inspite of doing the above mentioned, if the problem continues, latch both the data and control information and then activate the E signal

When the controller is performing an internal operation he busy flag (BF) will set and will not accept any instruction. The user should check the busy flag or should provide a delay of approximately 2ms after each instruction.The module presents no difficulties while interfacing slower MPUs.The liquid crystal display module can be interfaced, either to 4-bit or 8-bit MPUs. For 4-bit data interface, the bus lines DB4 to DB7 are used for data transfer, while DB0 to DB3 lines are disabled. The data transfer is complete when the 4-bit data has been transferred twice. The busy flag must be checked after the 4-bit data has been transferred twice. Two more 4-bit operations then transfer the busy flag and address counter data.For 8-bit data interface, all eight-bus lines (DB0 to DB7) are used.

A liquid crystal display (LCD) is a thin, flat electronic visual display that uses the light modulating properties of liquid crystals (LCs). LCs do not emit light directly. They are used in a wide range of applications including: computer monitors, television, instrument panels, aircraft cockpit displays, signage, etc. They are common in consumer devices such as video players, gaming devices, clocks, watches, calculators, and telephones. LCDs have displaced cathode ray tube(CRT) displays in most applications. They are usually more compact, lightweight,

portable, less expensive, more reliable, and easier on the eyes. They are available in a wider range of screen sizes than CRT and plasma displays, and since they do not use phosphors, they cannot suffer image burn-in.LCDs are more energy efficient and offer safer disposal than CRTs. Its low electrical power consumption enables it to be used in battery-powered electronic equipment. It is an electronically-modulated optical device made up of any number of pixels filled with liquid crystals and arrayed in front of a light source (backlight) or reflector to produce images in colour or monochrome. The earliest discovery leading to the development of LCD technology, the discovery of liquid crystals, dates from 1888. By 2008, worldwide sales of televisions with LCD screens had surpassed the sale of CRT units

7.2.4 VIBRATION SENSOR: A piezoelectric sensor is a device that uses the piezoelectric effect to measure pressure, acceleration, strain or force by converting them to an electrical signal.

Electrical properties

Schematic symbol and electronic model of a piezoelectric sensor A piezoelectric transducer has very high DC output impedance and can be modeled as a proportional voltage source and filter network. The voltage V at the source is directly proportional to the applied force, pressure, or strain.[2] The output signal is then related to this mechanical force as if it had passed through the equivalent circuit.

Frequency response of a piezoelectric sensor; output voltage vs applied force A detailed model includes the effects of the sensor's mechanical construction and other non-idealities.[3] The inductance Lm is due to the seismic mass and inertia of the sensor itself. Ce is inversely proportional to the mechanical elasticity of the sensor. C0 represents the static capacitance of the transducer, resulting from an inertial mass of infinite size.[3] Ri is the insulation leakage resistance of the transducer element. If the sensor is connected to a load resistance, this also acts in parallel with the insulation resistance, both increasing the high-pass cutoff frequency.

In the flat region, the sensor can be modeled as a voltage source in series with the sensor's capacitance or a charge source in parallel with the capacitance For use as a sensor, the flat region of the frequency response plot is typically used, between the high-pass cutoff and the resonant peak. The load and leakage

resistance need to be large enough that low frequencies of interest are not lost. A simplified equivalent circuit model can be used in this region, in which Cs represents the capacitance of the sensor surface itself, determined by the standard formula for capacitance of parallel plates.[3][4] It can also be modeled as a charge source in parallel with the source capacitance, with the charge directly proportional to the applied force, as above.[2] 1.1 1.2 Sensing materials Two main groups of materials are used for piezoelectric sensors: piezoelectric ceramics and single crystal materials. The ceramic materials (such as PZT ceramic) have a piezoelectric constant / sensitivity that is roughly two orders of magnitude higher than those of single crystal materials and can be produced by inexpensive sintering processes. The piezoeffect in piezoceramics is "trained", so unfortunately their high sensitivity degrades over time. The degradation is highly correlated with temperature. The less sensitive crystal materials (gallium phosphate, quartz, tourmaline) have a much higher when carefully handled, almost infinite long term stability.

7.2.5 AMPLIFIER: An ELECTRONIC AMPLIFIER is a device for increasing the power of a signal. It does this by taking energy from a power supply and controlling the output to match the input signal shape but with a larger amplitude. In this sense, an amplifier may be considered as modulating the output of the power supply. Here we use inverting amplifier as a gain amplifier. We can change the gain by adjusting the value of feedback resistance value. As the open loop DC gain of an operational amplifier is extremely high we can afford to lose some of this gain by connecting a suitable resistor across the amplifier from the output terminal back to the inverting input terminal to both reduce and control the overall gain of the amplifier. This then produces and effect known commonly as Negative Feedback, and thus produces a very stable Operational Amplifier system. Negative Feedback is the process of "feeding back" some of the output signal back to the input, but to make the feedback negative we must feed it back to the "Negative input" terminal using an external Feedback Resistor called Rf. This feedback connection between the output and the inverting input terminal produces a closed loop circuit to the amplifier resulting in the gain of the amplifier now being called its Closed-loop Gain.

7.2.6 KEY A key is an instrument that is used to operate a lock. A typical key consists of two parts: the blade, which slides into the keyway of the lock and distinguishes between different keys, and the bow, which is left protruding so that torque can be applied by the user. The blade is usually intended to operate one specific lock or a small number of locks that are keyed alike. Keys provide an inexpensive, though imperfect, method of access control for access to properties like buildings and vehicles. As such, keys are an essential feature of modern living in the developed world, and are common around the globe. It is common for people to carry the set of keys they need for their daily activities around with them, often linked by a keyring adorned by key fobs and known as a keychain. Types of keys House keys A house key is the most common sort of key. There are two main forms. The older form is for lever locks, where a pack of flat levers (typically between two and five) are raised to different heights by the key whereupon the slots or gates of the levers line up and permit a bolt to move back and forth, opening or closing the lock. The teeth or bittings of the key have flat tops rather than being pointed. Lever lock keys tend to be bigger and less convenient for carrying, although lever locks tend to be more secure. These are still common in many European countries.

The more recent form of house key is that for a pin-tumbler or wafer-tumbler lock. When held upright as if to open a door, a series of grooves on either side of the key (the key's blade) limits the type of lock the key can slide into. As the key slides into the lock, the grooves on the blade of the key align with the wards in the keyway allowing or denying entry to the cylinder. Then, a series of pointed teeth and notches on the blade called bittings allow pins or wafers to move up and down until they are in line with the shear line of the inner and outer cylinder, allowing the cylinder or cam to rotate freely inside the lock and the lock to open. These are predominate in the United States of America.[1] Car key

Car key in ignition.

Car ignition and steering wheel lock

Main article: Power door locks A car key or an automobile key is a key used to open and/or start an automobile. Modern key designs are usually symmetrical, and some use grooves on both sides, rather than a cut edge, to actuate the lock. It has multiple uses for the automobile with which it was sold. A car key can open the doors, as well as start the ignition, open the glove compartment and also open the trunk (boot) of the car. Some cars come with an additional key known as a valet key that starts the ignition and opens the drivers side door, but prevents the valet from gaining access to valuables that are located in the trunk or the glove box. Some valet keys, particularly those to high-performance vehicles, go so far as to restrict the engine's power output to prevent joyriding.[2] Recently, features such as coded immobilizers have been implemented in newer vehicles. More sophisticated systems make ignition dependent on electronic devices, rather than the mechanical keyswitch. Ignition switches/locks are combined with security locking of the steering column (in many modern vehicles) or the gear lever (such as in Saab Automobile vehicles). In the latter, the switch is between the seats, preventing damage to the driver's knee in the event of a collision. Keyless entry systems, which use either a door-mounted keypad or a remote control in place of a car key, are becoming a standard feature on many new cars. Some of them are handsfree. Some high tech automotive keys are billed as theft deterrents. Mercedes-Benz uses a key that, rather than have a cut metal piece to start the car, uses an encoded infrared beam that communicates with the car's computer. If the codes match, the car can be started. These keys can be expensive to replace, if lost, and can cost up

to US$400. Some car manufacturers like Land Rover and Volkswagen use a 'switchblade' key where the key is spring-loaded out of the fob when a button is pressed. This eliminates the need for a separate key fob. This type of key has also been known to be confiscated by airport security officials.[3] A switchblade key is basically the same as any other car key. The only difference is its appearance. The switchblade key is designed to fold away inside the fob when it is not being used. To release the key from the fob you simply push a button on the side of your fob that triggers the keys release. Switchblade keys have become very popular recently because of their smart compact look. Because switchblade keys are only developed for new car models they are usually equipped with a programmed transponder chip. Master key A master key is intended to operate a set of several locks. Usually, there is nothing special about the key itself, but rather the locks into which it will fit. These locks also have keys that are specific to each one (the change key) and cannot operate any of the others in the set. Locks that have master keys have a second set of the mechanism used to operate them that is identical to all of the others in the set of locks. For example, master keyed pin tumbler locks will have two shear points at each pin position, one for the change key and one for the master key. A far more secure (and more expensive) system has two cylinders in each lock, one for the change key and one for the master key. Larger organizations, with more complex "grandmaster key" systems, may have several masterkey systems where the top level grandmaster key works in all of the locks in the system.

A practical attack exists to create a working master key for an entire system given only access to a single master-keyed lock, its associated change key, a supply of appropriate key blanks, and the ability to cut new keys. This is described in Cryptology and Physical Security: Rights Amplification in Master-Keyed Mechanical Locks. Locksmiths may also determine cuts for a replacement master key, when given several different key examples from a given system. Control key A control key is a special key used in removable core locking systems. The control key enables a user with very little skill to remove from the cylinder, quickly and easily, a core with a specific combination and replace it with a core with a different combination. In Small Format Interchangeable Cores (SFIC), similar to those developed by Frank Best of the Best Lock Corporation, the key operates a separate shear line, located above the operating key shear line. In Large Format Removable Cores (LFRC), the key may operate a separate shear line or the key may work like a master key along the operating shear line and also contact a separate locking pin that holds the core in the cylinder. SFIC's are interchangeable from one brand to another, while LFRC's are not. Transponder key Transponder keys may also be called chip keys. Transponder keys are automotive ignition keys with signal-emitting circuits built inside. When the key is turned in the ignition cylinder, the car's computer transmits a radio signal to the transponder circuit. The circuit has no battery; it is energized by the

radio signal itself. The circuit typically has a computer chip that is programmed to respond by sending a coded signal back to the car's computer. If the circuit does not respond or if the code is incorrect, the engine will not start. Many cars immobilize if the wrong key is used by intruders. Chip Keys successfully protect cars from theft in two ways: forcing the ignition cylinder won't start the car, and the keys are difficult to duplicate. This is why chip keys are popular in modern cars and help decrease car theft. Many people who have transponder keys are not aware of the fact because the circuit is hidden inside the plastic head of the key. On the other hand, General Motors produced what are known as VATS keys (Vehicle Anti-Theft System) during the 1990s, which are often erroneously believed to be transponders but actually use a simple resistor, which is visible in the blade of the key. If the value of the resistor is wrong, or the key is a normal key without a resistor, the circuit of the car's electrical system will not allow the engine to be started. Double-sided key

SentrySafe four-sided key A double-sided key is very similar to a house or car key with the exception that it has two sets of teeth, an upper level standard set of teeth and a lower, less defined

set of teeth beside it. This makes the double-sided key's profile and its corresponding lock look very similar to a standard key while making the attempt to pick the lock more difficult. Four-sided key A four-sided key (also known a cross or cruciform key) has four sides, making it not only harder to duplicate and the lock harder to pick, but it is also physically more durable. Paracentric key A paracentric key is designed to open a paracentric lock. It is distinguishable by the contorted shape of its blade, which protrudes past the centre vertical line of the key barrel. Instead of the wards on the outer face of the lock simply protruding into the shape of the key along the spine, the wards protrude into the shape of the key along the entire width of the key, including along the length of the teeth.[4] Patented by the Yale lock company in 1898, paracentric cylinders are not exceptionally difficult to pick, but this requires some skill and know-how. Internal cut key An internal cut (also known as "Sidewinder" or "Laser Cut") key has a rectangular blade with a wavy groove cut up the center of the face of blade, at constant depth. Typically the key has an identical wavy groove on the back of the blade, making it symmetrical so it works no matter which way it is inserted. Also referred to as the inner profile or sidewinder. These keys must be cut by special key cutting machines made for them. [5]

Abloy key Main article: disc tumbler lock Abloy keys are cut from a metal half-cylinder. The cuts are made at different angles, so when the key is turned in the lock it rotates each disk a different amount. Nearly all the houses in Finland use Abloy keys, although they are also widely used in various locales worldwide. These locks are considered very secure and almost impossible to pick.[6][7][8] Dimple key A dimple key has a rectangular blade with various cone-shaped dimples drilled into the face of the blade at various depths. Typically the lock has 2 rows of pins that match up with 2 rows of dimples. Typically the key has the same dimple pattern on the back of the blade, making it symmetrical so it works no matter which way it is inserted.[9][10] Kaba and Dom are manufactures of dimpled keys. These keys are considered very secure and almost impossible to pick.[citation needed] Skeleton key

A warded lock fits both its key and skeleton keys its size or smaller.

A skeleton key (or passkey) is a very simple design of key that usually has a cylindrical shaft (sometimes called a shank) and a single, minimal flat, rectangular tooth or bit. Skeleton keys are also usually distinguished by their bow, or the part one would grasp when inserting the key, which can be either very plain or extremely ornate. A skeleton key is designed to circumvent the wards in warded locks. Warded locks and their keys provide minimal security and only a slight

deterrent as any key with a shaft and tooth that has the same or smaller dimensions will open the lock. However, warded keys were designed to only fit a matching lock and the skeleton key would often fit many. Many other objects that can fit into the lock may also be able to open it. Due to its limited usefulness, this type of lock fell out of use after more complicated types became easier to manufacture. In modern usage, the term "skeleton key" is often misapplied to ordinary bit keys and barrel keys, rather than the correct definition: a key, usually with minimal features, which can open all or most of a type of badly designed lock. Bit keys and barrel keys can be newlyminted (and sold by restoration hardware companies) or antique stores. They were most popular in the late 1800s, although they continued to be used well into the 20th century and can still be found today in use, albeit in vintage homes and antique furniture. A bit key is distinguished from a barrel key in that a bit key usually has a solid shank, whereas a barrel shafted key can be made either by drilling out the shank from the bit end or by folding metal into a barrel shape when forging the key. Tubular key

A tubular key A tubular key (sometimes referred to as a barrel key when describing a vintage or antique model) is one that is designed to open a tubular pin tumbler lock. It has a hollow, cylindrical shaft that is usually much shorter and has a larger diameter than most conventional keys. Antique or vintage-style barrel keys often closely resemble the more traditional skeleton key but are a more recent innovation in keymaking. In modern keys of this type, a number of grooves of varying length are built into the outer surface at the end of the shaft. These grooves are parallel to the shaft and allow the pins in the lock to slide to the end of the groove. A small tab on the outer surface of the shaft prevents the pins in the lock from pushing the key out and works with the hollow center to guide the key as it is turned. The modern version of this type of key is harder to duplicate as it is less common and requires a different machine from regular keys. These keys are most often seen in home alarm systems, vending machines, and bicycle locks, in the United States. These keys typically come in seven and eight-pin versions as well as miniature versions which are used on computers. Tubular keys were invented by the Ace lock company in Chicago.[citation needed] Zeiss key A Zeiss key (also known as a Cruciform key) is a cross between a house key and a tubular key. It has three sets of teeth at 90 degrees to each other with a flattened fourth side. Though this type of key is easy to duplicate, the extra sets of teeth deter lockpicking attempts. Do Not Duplicate key

A keychain, a simple way to hold keys A Do Not Duplicate key (or DND key, for short) is one that has been stamped "do not duplicate" and/or "duplication prohibited" or similar by a locksmith or manufacturer as a passive deterrent to discourage a retail key cutting service from duplicating a key without authorization or without contacting the locksmith or manufacturer who originally cut the key. More importantly, this is a key control system for the owner of the key, such as a maintenance person or security guard, to identify keys that should not be freely distributed or used without authorization. Though it is intended to prevent unauthorized key duplication, copying DND keys remains a common security problem. There is no direct legal implication in the US for someone who copies a key that is stamped do not duplicate (unless it is an owned key), but there are patent restrictions on some key designs (see "restricted keys"). The Associated Locksmiths of America, ALOA, calls DND keys "not effective security", and "deceptive because it provides a false sense of security." United States Code 18 USC Sec. 1704 deals with United States Post Office keys, and 18 USC Sec. 1386 deals with United States Department of Defense keys. Restricted key A restricted keyblank is a keyway and blank for which a manufacturer has set up a restricted level of sales and distribution. Restricted keys

are often protected by patent, which prohibits other manufacturers from making unauthorized productions of the key blank. In many cases, customers must provide proof of ID before a locksmith will cut additional keys using restricted blanks. These days, many restricted keys have special in-laid features, such as magnets, different types of metal, or even small computer chips to prevent duplication. Magnetic key A magnetic keyed lock is a locking mechanism whereby the key utilizes magnets as part of the locking and unlocking mechanism. A magnetic key would use from one to many small magnets oriented so that the North / South Poles would equate to a combination to push or pull the lock's internal tumblers thus releasing the lock. This is a totally passive system requiring no electricity or electronics to activate or deactivate the mechanism. Using several magnets at differing polarity / orientations and different strengths can allow thousands of different combinations per key.[11] Keycard A keycard is a flat, rectangular plastic card with identical dimensions to that of a credit card or driver's license which stores a physical or digital signature which the door mechanism accepts before disengaging the lock. There are several popular type of keycards in use including the mechanical holecard, bar code, magnetic stripe, Wiegand wire embedded cards, smart card (embedded with a read/write electronic microchip), and RFID proximity cards.Keycards are frequently used in hotels as an alternative to mechanical keys

7.2.7 RS232: In telecommunications, RS-232 is a standard for serial binary data interconnection between a DTE (Data terminal equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in computer serial ports. Scope of the Standard: The Electronic Industries Alliance (EIA) standard RS-232-C [3] as of 1969 defines: Electrical signal characteristics such as voltage levels, signaling rate, timing and slew-rate of signals, voltage withstand level, short-circuit behavior, maximum stray capacitance and cable length Interface mechanical characteristics, pluggable connectors and pin identification Functions of each circuit in the interface connector Standard subsets of interface circuits for selected telecom applications The standard does not define such elements as character encoding (for example, ASCII, Baudot or EBCDIC), or the framing of characters in the data stream (bits per character, start/stop bits, parity). The standard does not define protocols for error detection or algorithms for data compression. The standard does not define bit rates for transmission, although the standard says it is intended for bit rates lower than 20,000 bits per second. Many modern devices can exceed this speed (38,400 and 57,600 bit/s being common, and 115,200 and 230,400 bit/s making occasional appearances) while still using RS232 compatible signal levels.

Details of character format and transmission bit rate are controlled by the serial port hardware, often a single integrated circuit called a UART that converts data from parallel to serial form. A typical serial port includes specialized driver and receiver integrated circuits to convert between internal logic levels and RS-232 compatible signal levels.

7.2.8 GSM MODEM A GSM modem is a specialized type of modem which accepts a SIM card, and operates over a subscription to a mobile operator, just like a mobile phone. From the mobile operator perspective, a GSM modem looks just like a mobile phone. For the purpose of this document, the term GSM modem is used as a generic term to refer to any modem that supports one or more of the protocols in the GSM evolutionary family, including the 2.5G technologies GPRS and EDGE, as well as the 3G technologies WCDMA, UMTS, HSDPA and HSUPA. A GSM modem exposes an interface that allows applications such as NowSMS to send and receive messages over the modem interface. The mobile operator charges for this message sending and receiving as if it was performed directly on a mobile phone. To perform these tasks, a GSM modem must support an extended AT command set for sending/receiving SMS messages, as defined in the ETSI GSM 07.05 and and 3GPP TS 27.005 specifications. GSM modems can be a quick and efficient way to get started with SMS, because a special subscription to an SMS service provider is not required. In most parts of the

world, GSM modems are a cost effective solution for receiving SMS messages, because the sender is paying for the message delivery. A GSM modem can be a dedicated modem device with a serial, USB or Bluetooth connection, such as the Falcom Samba 75 used in this document. (Other manufacturers of dedicated GSM modem devices include Wavecom, Multitech and iTegno.) To begin, insert a GSM SIM card into the modem and connect it to an available USB port on your computer. A GSM modem could also be a standard GSM mobile phone with the appropriate cable and software driver to connect to a serial port or USB port on your computer. Any phone that supports the extended AT command set for sending/receiving SMS messages, as defined in ETSI GSM 07.05 and/or 3GPP TS 27.005, can be supported by the Now SMS & MMS Gateway. Note that not all mobile phones support this modem interface. Due to some compatibility issues that can exist with mobile phones, using a dedicated GSM modem is usually preferable to a GSM mobile phone. This is more of an issue with MMS messaging, where if you wish to be able to receive inbound MMS messages with the gateway, the modem interface on most GSM phones will only allow you to send MMS messages. This is because the mobile phone automatically processes received MMS message notifications without forwarding them via the modem interface. It should also be noted that not all phones support the modem interface for sending and receiving SMS messages. In particular, most smart phones, including Blackberries, iPhone, and Windows Mobile devices, do not support this GSM modem interface for sending and receiving SMS messages at all at all.

Additionally, Nokia phones that use the S60 (Series 60) interface, which is Symbian based, only support sending SMS messages via the modem interface, and do not support receiving SMS via the modem interface. When you install your GSM modem, or connect your GSM mobile phone to the computer, be sure to install the appropriate Windows modem driver from the device manufacturer. To simplify configuration, the Now SMS & MMS Gateway will communicate with the device via this driver. If a Windows driver is not available for your modem, you can use either the Standard or Generic 33600 bps modem driver that is built into windows. A benefit of utilizing a Windows modem driver is that you can use Windows diagnostics to ensure that the modem is communicating properly with the computer. The Now SMS & MMS gateway can simultaneously support multiple modems, provided that your computer hardware has the available communications port resources.

7.2.9 KEYPAD: A numeric keypad, or numpad for short, is the small, palm-sized, seventeen key section of a computer keyboard, usually on the very far right. The numeric keypad features digits 0 to 9, addition (+), subtraction (-), multiplication (*) and division (/) symbols, a decimal point (.) and Num Lock and Enter keys. Laptop keyboards often do not have a numpad, but may provide numpad input by holding a modifier key (typically lapelled "Fn") and operating keys on the standard keyboard.

Particularly large laptops (typically those with a 17 inch screen or larger) may have space for a real numpad, and many companies sell separate numpads which connect to the host laptop by a USB connection.

Numeric keypads usually operate in two modes: when Num Lock is off, keys 8, 6, 2, 4 act like an arrow keys and 7, 9, 3, 1 act like Home, PgUp, PgDn and End; when Num Lock is on, digits keys produce corresponding digits. These, however, differ from the numeric keys at the top of the keyboard in that, when combined with the Alt key on a PC, they are used to enter characters which may not be otherwise available: for example, Alt-0169 produces the copyright symbol. These are referred to as Alt codes.

On Apple Computer Macintosh computers, which lack a Num Lock key, the numeric keypad always produces only numbers. The num lock key is replaced by the clear key.

Numeric keypads usually operate in two modes: when Num Lock is off, keys 8, 6, 2, 4 act like an arrow keys and 7, 9, 3, 1 act like Home, PgUp, PgDn and End; when Num Lock is on, digits keys produce corresponding digits. These,

however, differ from the numeric keys at the top of the keyboard in that, when combined with the Alt key on a PC, they are used to enter characters which may not be otherwise available: for example, Alt-0169 produces the copyright symbol. These are referred to as Alt codes.

7.2.10 RF TRANSMITTER RECEIVER Radio frequency (RF) radiation is a subset of electromagnetic radiation with a wavelength of 100km to 1mm, which is a frequency of 3 KHz to 300 GHz,[1] respectively. This range of electromagnetic radiation constitutes the radio spectrum and corresponds to the frequency of alternating current electrical signals used to produce and detect radio waves. RF can refer to electromagnetic oscillations in either electrical circuits or radiation through air and space. Like other subsets of electromagnetic radiation, RF travels at the speed of light. 1.3 Radio communication In order to receive radio signals, for instance from AM/FM radio stations, a radio antenna must be used. However, since the antenna will pick up thousands of radio signals at a time, a radio tuner is necessary to tune in to a particular frequency (or frequency range).[2] This is typically done via a resonator (in its simplest form, a circuit with a capacitor and an inductor). The resonator is configured to resonate at a particular frequency (or frequency band), thus amplifying sine waves at that radio frequency, while ignoring other sine waves. Usually, either the inductor or the capacitor of the resonator is adjustable, allowing the user to change the frequency at which it resonates.[3]

1.4 1.5 Special properties of RF electrical signals Electrical currents that oscillate at RF have special properties not shared by direct current signals. One such property is the ease with which they can ionize air to create a conductive path through air. This property is exploited by 'high frequency' units used in electric arc welding, although strictly speaking these machines do not typically employ frequencies within the HF band. Another special property is an electromagnetic force that drives the RF current to the surface of conductors, known as the skin effect. Another property is the ability to appear to flow through paths that contain insulating material, like the dielectric insulator of a capacitor. The degree of effect of these properties depends on the frequency of the signals.

Radio spectrum Radio spectrum refers to the part of the electromagnetic spectrum corresponding to radio frequencies that is, frequencies lower than around 300 GHz (or, equivalently, wavelengths longer than about 1 mm). Different parts of the radio spectrum are used for different radio transmission technologies and applications. Radio spectrum is typically government regulated in developed countries, and in some cases is sold or licensed to operators of private radio transmission systems (for example, cellular telephone operators or broadcast television stations). Ranges of allocated frequencies are often referred to by their provisioned use (for example, cellular spectrum or television spectrum)

1.6 1.7 Bands Band name ITU band Frequency and wavelength in air Natural and man-made waves microhertz, from sun, earth, planets, Example uses

Abbr

electromagnetic subHertz subHz 0 < 3 Hz (millihertz, nanohertz) ionosphere, etc[citation needed] Extremely low frequency Super low frequency Ultra low frequency ELF 1

> 100,000 km

330

Hz

100,000 km 10,000 km

Communication with submarines

SLF

30300 10,000 km 1000 km 3003000 1000 km 100 km

Hz

Communication with submarines

ULF 3

Hz

Communication within mines

Very low frequency

VLF 4

330 100 km 10 km

kHz

Submarine avalanche

communication, beacons, wireless

heart rate monitors, geophysics

Low frequency Medium frequency

LF

30300 10 km 1 km 3003000 1 km 100 m

kHz Navigation, time signals, AM longwave broadcasting, RFID kHz

MF

AM (medium-wave) broadcasts

High frequency

HF

330 100 m 10 m

MHz

Shortwave broadcasts, amateur radio and over-the-horizon

aviation communications, RFID FM, television broadcasts and line-of-sight ground-to-aircraft aircraft-to-aircraft

Very high frequency

VHF 8

30300 10 m 1 m

MHz and

communications. Land Mobile and Maritime Mobile

communications Television microwave Ultra high frequency UHF 9 3003000 1 m 100 mm MHz phones, ovens, wireless broadcasts, mobile LAN,

Bluetooth, GPS and two-way radios such as Land Mobile, FRS and GMRS radios

Super high frequency Extremely EHF 11 SHF 10

330 100 mm 10 mm

GHz Microwave

devices,

wireless

LAN, most modern radars

30300

GHz Radio

astronomy,

high-

high frequency

10 mm 1 mm

frequency microwave radio relay

Terahertz imaging a potential replacement for X-rays in some 3003,000 1 mm 100 m GHz medical applications, ultrafast molecular dynamics, condensedmatter physics, terahertz timedomain spectroscopy, terahertz computing/communications

Terahertz THz

12

1.7.1 Notes

Above 300 GHz, the absorption of electromagnetic radiation by Earth's atmosphere is so great that the atmosphere is effectively opaque, until it becomes transparent again in the infrared and optical window frequency ranges.

The ELF, SLF, ULF, and VLF bands overlap the AF (audio frequency) spectrum, which is approximately 2020,000 Hz. However, sounds are transmitted by atmospheric compression and expansion, and not by electromagnetic energy.

The SHF and EHF bands are sometimes not considered to be a part of the radio spectrum, forming their own microwave spectrum.

7.2.11 ENCODER AND DECODER An encoder is a device, circuit, transducer, software program, algorithm or person that converts information from one format or code to another, for the purposes of standardization, speed, secrecy, security, or saving space by shrinking size. A decoder is a device which does the reverse of an encoder, undoing the encoding so that the original information can be retrieved. The same method used to encode is usually just reversed in order to decode. In digital electronics, a decoder can take the form of a multiple-input, multipleoutput logic circuit that converts coded inputs into coded outputs, where the input and output codes are different. e.g. n-to-2n, binary-coded decimal decoders. Enable inputs must be on for the decoder to function, otherwise its outputs assume a single "disabled" output code word. Decoding is necessary in applications such as data multiplexing, 7 segment display and memory address decoding. The example decoder circuit would be an AND gate because the output of an AND gate is "High" (1) only when all its inputs are "High." Such output is called as "active High output". If instead of AND gate, the NAND gate is connected the output will be "Low" (0) only when all its inputs are "High". Such output is called as "active low output".

A slightly more complex decoder would be the n-to-2n type binary decoders. These type of decoders are combinational circuits that convert binary information from 'n' coded inputs to a maximum of 2n unique outputs. We say a maximum of 2n outputs because in case the 'n' bit coded information has unused bit combinations, the

decoder may have less than 2n outputs. We can have 2-to-4 decoder, 3-to-8 decoder or 4-to-16 decoder. We can form a 3-to-8 decoder from two 2-to-4 decoders (with enable signals). Similarly, we can also form a 4-to-16 decoder by combining two 3-to-8 decoders. In this type of circuit design, the enable inputs of both 3-to-8 decoders originate from a 4th input, which acts as a selector between the two 3-to-8 decoders. This allows the 4th input to enable either the top or bottom decoder, which produces outputs of D(0) through D(7) for the first decoder, and D(8) through D(15) for the second decoder. A decoder that contains enable inputs is also known as a decoder-demultiplexer. Thus, we have a 4-to-16 decoder produced by adding a 4th input shared among both decoders, producing 16 outputs.

7.2.12 TRAFFIC LIGHTS: Traffic lights, which may also be known as stoplights, traffic lamps, traffic signals, stop-and-go lights[robotsor semaphore] are signaling devices positioned at road intersections, pedestrian crossings and other locations to control competing flows of traffic. Traffic lights have been installed in most cities around the world. They assign the right of way to road users by the use of lights in standard colors (Red - Yellow - Green), using a universal color code (and a precise sequence, for those who are color blind). Typically traffic lights consist of a set of three colored lights: red, yellow and green. In a typical cycle,

Illumination of the green light allows traffic to proceed in the direction denoted, Illumination of the yellow light denoting if safe to, prepare to stop short of the intersection, and

Illumination of the red signal prohibits any traffic from proceeding.

Usually, the red light contains some orange in its hue, and the green light contains some blue, to provide some support for people with red-green color blindness.

History

On December 10, 1868, the first traffic lights were installed outside the British Houses of Parliament in London, by the railway engineer J. P. Knight. They resembled railway signals of the time, with semaphore arms and red and green gas lamps for night use. The gas lantern was turned with a lever at its base so that the

appropriate light faced traffic. Unfortunately, it exploded on 2 January 1869, injuring[3] or killing[4] the policeman who was operating it. The modern electric traffic light is an American invention.[5] As early as 1912 in Salt Lake City, Utah, policeman Lester Wire invented the first red-green electric traffic lights. On 5 August 1914, the American Traffic Signal Company installed a traffic signal system on the corner of East 105th Street and Euclid Avenue in Cleveland, Ohio.[6][7] It had two colors, red and green, and a buzzer, based on the design of James Hoge, to provide a warning for color changes. The design by James Hoge[8] allowed police and fire stations to control the signals in case of emergency. The first four-way, three-color traffic light was created by police officer William Potts in Detroit, Michigan in 1920.[9] In 1922, T.E. Hayes patented his "Combination traffic guide and traffic regulating signal" (Patent # 1447659). Ashville, Ohio claims to be the location of the oldest working traffic light in the United States, used at an intersection of public roads until 1982 when it was moved to a local museum.[10] The first interconnected traffic signal system was installed in Salt Lake City in 1917,[citation needed] with six connected intersections controlled simultaneously from a manual switch. Automatic control of interconnected traffic lights was introduced March 1922 in Houston, Texas.[11] The first automatic experimental traffic lights in England were deployed in Wolverhampton in 1927.[12] The color of the traffic lights representing stop and go might be derived from those used to identify port (red) and starboard (green) in maritime rules governing right of way, where the vessel on the left must stop for the one crossing on the right. Timers on traffic lights originated in Taipei, Taiwan, and brought to the US after an engineer discovered its use. Though uncommon in most American urban areas, timers are still used in some other Western Hemisphere countries. Timers are useful for drivers/pedestrians to plan if there is enough time to attempt to cross the intersection before the light turns red and conversely, the amount of time before the light turns green.

7.3 OVERALL CIRCUIT DIAGRAM:

7.4. OVERALL CIRCUIT DIAGRAM DESCRIPTION:

7.4.1 POWER SUPPLY: Block diagram The ac voltage, typically 220V rms, is connected to a transformer, which steps that ac voltage down to the level of the desired dc output. A diode rectifier then provides a full-wave rectified voltage that is initially filtered by a simple capacitor filter to produce a dc voltage. This resulting dc voltage usually has some ripple or ac voltage variation. A regulator circuit removes the ripples and also remains the same dc value even if the input dc voltage varies, or the load connected to the output dc voltage changes. This voltage regulation is usually obtained using one of the popular voltage regulator IC units.

TRANSFORMER RECTIFIER

FILTER

IC REGULATOR

LOAD

1.7.1.1.1.1

Block diagram (Power supply)

Working principle Transformer The potential transformer will step down the power supply voltage (0230V) to (0-6V) level. Then the secondary of the potential transformer will be connected to the precision rectifier, which is constructed with the help of op amp. The advantages of using precision rectifier are it will give peak voltage output as DC, rest of the circuits will give only RMS output.

Bridge rectifier When four diodes are connected as shown in figure, the circuit is called as bridge rectifier. The input to the circuit is applied to the diagonally opposite corners of the network, and the output is taken from the remaining two corners. Let us assume that the transformer is working properly and there is a positive potential, at point A and a negative potential at point B. the positive potential at point A will forward bias D3 and reverse bias D4. The negative potential at point B will forward bias D1 and reverse D2. At this time D3 and D1 are forward biased and will allow current flow to pass through them; D4 and D2 are reverse biased and will block current flow. The path for current flow is from point B through D1, up through RL, through D3, through the secondary of the transformer back to point B. this path is indicated by the solid arrows. Waveforms (1) and (2) can be observed across D1 and D3.

One-half cycle later the polarity across the secondary of the transformer reverse, forward biasing D2 and D4 and reverse biasing D1 and D3. Current flow will now be from point A through D4, up through RL, through D2, through the secondary of T1, and back to point A. This path is indicated by the broken arrows. Waveforms (3) and (4) can be observed across D2 and D4. The current flow through RL is always in the same direction. In flowing through RL this current develops a voltage corresponding to that shown waveform (5). Since current flows through the load (RL) during both half cycles of the applied voltage, this bridge rectifier is a full-wave rectifier. One advantage of a bridge rectifier over a conventional full-wave rectifier is that with a given transformer the bridge rectifier produces a voltage output that is nearly twice that of the conventional full-wave circuit. This may be shown by assigning values to some of the components shown in views A and B. assume that the same transformer is used in both circuits. The peak voltage developed between points X and y is 1000 volts in both circuits. In the conventional full-wave circuit shownin view A, the peak voltage from the center tap to either X or Y is 500 volts. Since only one diode can conduct at any instant, the maximum voltage that can be rectified at any instant is 500 volts. The maximum voltage that appears across the load resistor is nearly-but never exceeds-500 v0lts, as result of the small voltage drop across the diode. In the bridge rectifier shown in view B, the maximum voltage that can be rectified is the full secondary voltage, which is 1000 volts. Therefore, the peak output voltage across the load resistor is nearly 1000 volts. With both circuits using the same transformer, the bridge rectifier circuit produces a higher output voltage than the conventional full-wave rectifier circuit.

IC voltage regulators Voltage regulators comprise a class of widely used ICs. Regulator IC units contain the circuitry for reference source, comparator amplifier, control device, and overload protection all in a single IC. IC units provide regulation of either a fixed positive voltage, a fixed negative voltage, or an adjustably set voltage. The regulators can be selected for operation with load currents from hundreds of milli amperes to tens of amperes, corresponding to power ratings from milli watts to tens of watts.

Circuit diagram (Power supply)

A fixed three-terminal voltage regulator has an unregulated dc input voltage, Vi, applied to one input terminal, a regulated dc output voltage, Vo, from a second terminal, with the third terminal connected to ground. The series 78 regulators provide fixed positive regulated voltages from 5 to 24 volts. Similarly, the series 79 regulators provide fixed negative regulated voltages from 5 to 24 volts. For ICs, microcontroller, LCD --------- 5 volts For alarm circuit, op-amp, relay circuits ---------- 12 volts

7.4.2 LCD WITH PIC MICRO CONTROLLER:

We connect the lcd display with PIC through PORT D.

PORTD AND TRISD REGISTER :

PORTD is an 8-bit wide bi-directional port. The corresponding data direction register is TRISD. Setting a TRISD bit (=1) will make the corresponding PORTD pin an input, i.e., put the corresponding output driver in a hi-impedance mode. Clearing a TRISD bit (=0) will make the corresponding PORTD pin an output. PORTD AND TRISD REGISTERS: This section is not applicable to the 28-pin devices. PORTD is an 8-bit port with Schmitt Trigger input buffers. Each pin is individually configurable as an input or output. PORTD can be configured as an 8bit wide microprocessor Port (parallel slave port) by setting control bit PSPMODE (TRISE<4>). In this mode, the input buffers are TTL.

PORTD FUNCTIONS

SUMMARY OF REGISTERS ASSOCIATED WITH PORTD

a) Any read or write of PORTD. This will end the mismatch condition. b) Clear flag bit RBIF. A mismatch condition will continue to set flag bit RBIF. Reading PORTD will end the mismatch condition, and allow flag bit RBIF to be cleared. The interrupt on change feature is recommended for wake-up on key depression operation and operations where PORTD is only used for the interrupt on change feature. Polling of PORTD is not recommended while using the interrupt on change feature. This interrupt on mismatch feature, together with software configurable pullups on these four pins, allow easy interface to a keypad and make it possible for wake-up on key depression

7.4.3 VIBRATION

Piezo Electric Sensor:

A piezoelectric sensor is a device that uses the piezoelectric effect to measure pressure, acceleration, strain or force by converting them to an electrical signal. Piezo Electric Effect: Piezoelectricity is the ability of crystals and certain ceramic materials to generate a voltage in response to applied mechanical stress. Piezoelectricity was discovered by Pierre Curie and the word is derived from the Greek piezein, which means to squeeze or press.

The piezoelectric effect is reversible in that piezoelectric crystals, when subjected to an externally applied voltage, can change shape by a small amount. (For instance, the deformation is about 0.1% of the original dimension in PZT.) The effect finds useful applications such as the production and detection of sound, generation of high voltages, electronic frequency generation, microbalance, and ultra fine focusing of optical assemblies. Application: Piezoelectric sensors have proven to be versatile tools for the measurement of various processes. They are used for quality assurance, process control and process development in many different industries.

Piezo electric sensors are also seen in nature. Bones act as force sensors. Once loaded, bones produce charges proportional to the resulting internal torsion or displacement. Those charges stimulate and drive the build up of new bone material. This leads to the strengthening of structures where the internal displacements are the greatest. With time, this causes weaker structures to increase their strength and stability as material is laid down proportional to the forces affecting the bone. Circuit Description: Vibration circuit is used to sense the mechanical vibration. This circuit is constructed with 1. Piezo electric plate. 2. Operational amplifier 3. 555 IC timer Piezo electric plate is the special type of sensor which is used to sense the mechanical vibration. Piezo electric plate converts the mechanical vibration to electrical signal. The converted electrical signal is in the range of small milli voltage signal. Then the electrical signal voltage is given to amplifier unit through 0.1uf capacitor in order to filter the noise signal. The amplifier circuit is constructed with operational amplifier LM 741. The amplified output is in the form of AC signal the diode is used to rectify the negative signal.

7.4.4 RS232:

In telecommunications, RS-232 is a standard for serial binary data interconnection between a DTE (Data terminal equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in computer serial ports. Scope of the Standard:

The Electronic Industries Alliance (EIA) standard RS-232-C [3] as of 1969 defines: Electrical signal characteristics such as voltage levels, signaling rate, timing and slew-rate of signals, voltage withstand level, short-circuit behavior, maximum stray capacitance and cable length Interface mechanical characteristics, pluggable connectors and pin identification Functions of each circuit in the interface connector Standard subsets of interface circuits for selected telecom applications The standard does not define such elements as character encoding (for example, ASCII, Baudot or EBCDIC), or the framing of characters in the data stream (bits per character, start/stop bits, parity). The standard does not define protocols for error detection or algorithms for data compression. The standard does not define bit rates for transmission, although the standard says it is intended for bit rates lower than 20,000 bits per second. Many modern devices can exceed this speed (38,400 and 57,600 bit/s being common, and 115,200 and 230,400 bit/s making occasional appearances) while still using RS232 compatible signal levels. Details of character format and transmission bit rate are controlled by the serial port hardware, often a single integrated circuit called a UART that converts data from parallel to serial form. A typical serial port includes specialized driver and receiver integrated circuits to convert between internal logic levels and RS-232 compatible signal levels.

Circuit working Description:

In this circuit the MAX 232 IC used as level logic converter. The MAX232 is a dual driver/receiver that includes a capacive voltage generator to supply EIA 232 voltage levels from a single 5v supply. Each receiver converts EIA-232 to 5v TTL/CMOS levels. Each driver converts TLL/CMOS input levels into EIA-232 levels.

In this circuit the microcontroller transmitter pin is connected in the MAX232 T2IN pin which converts input 5v TTL/CMOS level to RS232 level.

Then T2OUT pin is connected to reviver pin of 9 pin D type serial connector which is directly connected to PC. In PC the transmitting data is given to R2IN of MAX232 through transmitting pin of 9 pin D type connector which converts the RS232 level to 5v TTL/CMOS level. The R2OUT pin is connected to receiver pin of the microcontroller. Likewise the data is transmitted and received between the microcontroller and PC or other device vice versa. 7.4.5 ENCODER WITH RF TRANSMITTER:

Encoder: In this circuit HT 640 is used as encoder. The 3 18 encoders are a series of CMOS LSIs for remote control system application. They are capable of encoding 18 bits of information which consists of N address bit and 18-N data bits. Each address/data input is externally trinary programmable if bonded out. It is otherwise set floating internally. Various packages of the 318 encoders offer flexible combination of programmable address/data is transmitted together with the header bits via an RF or an infrared transmission medium upon receipt of a trigger signal. The capability to select a TE trigger type further enhances the application flexibility of the 318 series of encoders. In this circuit the input signal to be encoded is given to AD7-AD0 input pins of encoder. Here the input signal may be from key board, parallel port, microcontroller or any interfacing device. The encoder output address pins are shorted so the output encoded signal is the combination of (A0-A9) address signal and (D0-D7) data signal. The output encoded signal is taken from 8 th which is connected to RF transmitter section.

RF Transmitter: When ever the high output pulse is given to base of the transistor BF 494, the transistor is conducting so tank circuit is oscillated. The tank circuit is consists of L2 and C4 generating 433 MHz carrier signal. Then the modulated signal is given LC filter section. After the filtration the RF modulated signal is transmitted through antenna.

7.4.6 DECODER WITH RF RECIVER:

RF Receiver: The RF receiver is used to receive the encoded data which is transmitted by the RF transmitter. Then the received data is given to transistor which acts as amplifier. Then the amplified signal is given to carrier demodulator

section in which transistor Q1 is turn on and turn off conducting depends on the signal. Due to this the capacitor C14 is charged and discharged so carrier signal is removed and saw tooth signal is appears across the capacitor. Then this saw tooth signal is given to comparator. The comparator circuit is constructed by LM558. The comparator is used to convert the saw tooth signal to exact square pulse. Then the encoded signal is given to decoder in order to get the decoded original signal.

Decoder: In this circuit HT648 is used as decoder. The 318 decoder are a series of CMOS LSIs for remote control system application. They are paired with 318 series of encoders. For proper operation a pair of encoder/decoder pair with the same number of address and data format should be selected. The 318 series of decoder receives serial address and data from that series of encoders that are transmitted by a carrier using an RF or an IR transmission medium. It then compares the serial input data twice continuously with its local address. If no errors or unmatched codes are encountered, the input data codes are decoded and then transferred to the output pins. The VT pin also goes high to indicate a valid transmission. The 318 decoders are capable of decoding 18 bits of information that consists of N bits of address and 18-N bits of data. To meet various applications they are arranged to provide a number of data pins whose range is from 0 t08 and an address pin whose range is from 8 to 18. In addition, the 318 decoders provide various combinations of address/ data numbering different package. In this circuit the received encoded signal is 9th pin of the decoder. Now the decoder separate the address (A0-A9) and data signal (D0-D7). Then the output data signal is given to microcontroller or any other interfacing device.

7.4.7 RELAY:

Circuit description: This circuit is designed to control the load. The load may be motor or any other load. The load is turned ON and OFF through relay. The relay ON and OFF is controlled by the pair of switching transistors (BC 547). The relay is connected in the Q2 transistor collector terminal. A Relay is nothing but electromagnetic switching device which consists of three pins. They are Common, Normally close (NC) and Normally open (NO).

The relay common pin is connected to supply voltage. The normally open (NO) pin connected to load. When high pulse signal is given to base of the Q1 transistors, the transistor is conducting and shorts the collector and emitter terminal and zero signals is given to base of the Q2 transistor. So the relay is turned OFF state. When low pulse is given to base of transistor Q1 transistor, the transistor is turned OFF. Now 12v is given to base of Q2 transistor so the transistor is conducting and relay is turned ON. Hence the common terminal and NO terminal of relay are shorted. Now load gets the supply voltage through relay.

Voltage Signal from Microcontroller or PC

Transistor Q1

Transistor Q2

Relay

1 0

on off

off on

off on

8.ADVANTAGES LOW COST RELIABILITY EASY TO IMPLEMENTATION

9.APPLICATIONS

CONCLUSION The progress in science & technology is a non-stop process. New things and new technology are being invented. As the technology grows day by day, we can imagine about the future in which thing we may occupy every place.

The proposed system based on Atmel microcontroller is found to be more compact, user friendly and less complex, which can readily be used in order to perform. Several tedious and repetitive tasks. Though it is designed keeping in mind about the need for industry, it can extended for other purposes such as commercial & research applications. Due to the probability of high technology (Atmel microcontroller) used this AUTOMATIC AMBULANCE RESCUE SYSTEM CORDIALITY SERVICES is fully software controlled with less hardware circuit. The feature makes this system is the base for future systems.

The principle of the development of science is that nothing is impossible. So we shall look forward to a bright & sophisticated world.

REFERENCE

MILL MAN J and HAWKIES C.C. INTEGRATED ELECTRONICS MCGRAW HILL, 1972

ROY CHOUDHURY D, SHAIL JAIN, LINEAR INTEGRATED CIRCUIT, New Age International Publishers, New Delhi,2000

THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEM by Mohammad Ali Mazidi.

WEBSITES:

http://www.atmel.com/

http://www.microchip.com/

www.8052.com

http://www.beyondlogic.org

http://www.ctv.es/pckits/home.html

http://www.aimglobal.org/

You might also like