Sei sulla pagina 1di 91

INTRODUCTION

There is a drastic increase in the number of vehicles in these days which also cause a steep rise in the number of accidents with a lot of people losing their lives. According to the World Health Organization, an estimated 1.2 million people lose their lives every year due to car accidents. India's road accident records 16 % of the world's road accident deaths, whereas India has only 1 % of the world's road vehicles. It is due to the increase in the number of vehicles without a subsequent increase in the road facilities required for it. In most of the accident cases, the victims lose their live because of the unavailability of medical facilities at the right time. In large companies with a large number of vehicles, the drivers use the companys vehicles even for their own purposes and impact a loss to the company. To solve problems like these, this project came into existence. This project is mainly used to track the position of the Vehicle by the owner or can also be used in the public transportation system by the people to know the location of the buses or trains. In case of any accident, the system sends automated messages to the pre-programmed numbers. We can send messages to any number of mobiles. The owner of the vehicle, Police to clear the traffic, Ambulance to save the people can be informed by this device. This uses a GPS (Global Positioning System) to know the exact position of the vehicle with an accuracy of a few feet. GSM is used to receive SMS from the user and reply the position of the vehicle through a SMS. This can also be used for other purposes such as asset tracking, Stolen Vehicle recovery, Fleet management, Field Service Management, Field Sales etc. Industries not traditionally known to use vehicle tracking systems have started to use it in creative ways to improve their processes or businesses. The hospitality industry has caught on to this technology to improve customer service. For example, a luxury hotel in Singapore has been known to install vehicle tracking system in their limousines to ensure they can welcome their VIPs when they reach the hotel. Vehicle tracking systems have also been used in food delivery and car rental companies.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

MICROC0NTROLLER
A microcontroller is a computer with most of the necessary support chips on board. All computers have several things in common, namely: A central processing unit (CPU) that executes programs. Some random-access memory (RAM) where it can store data that is variable. Some read only memory (ROM) where programs to be executed can be stored. Input and output (I/O) devices that enable communication to be established with the outside world i.e. connection to devices such as keyboard, mouse, monitors and other peripherals. There are a number of other common characteristics that define microcontrollers. If a computer matches a majority of these characteristics, then it can be classified as a microcontroller. Microcontrollers may be: Embedded inside some other device (often a consumer product) so that they can control the features or actions of the product. Another name for a microcontroller is therefore an embedded controller. Dedicated to one task and run one specific program. The program is stored in ROM and generally does not change. A low-power device, a battery-operated microcontroller might consume as little as 50 milli-watts. A microcontroller may take an input from the device it is controlling and controls the device by sending signals to different components in the device. A microcontroller is often small and low cost. The components may be chosen to minimize size and to be as inexpensive as possible. The actual processor used to implement a microcontroller can vary widely. In many products, such as microwave ovens, the demand on the CPU is fairly low and price is an important consideration. In these cases, manufacturers turn to dedicated microcontroller chips devices that were originally designed to below cost, small, low-power, embedded CPUs. The Intel 8051 is good examples of such chip. A typical low-end microcontroller chip might have 1000 bytes of ROM and 20 bytes of RAM on the chip, along with eight I/O pins. Micro-controllers may not implement an external address or data bus as they integrate RAM and non-volatile memory on the same chip as the CPU. Using fewer pins, the chip can be placed in a much smaller, cheaper package. Integrating the memory and other peripherals on a single chip and testing them as a unit increases the cost of that chip, but often results in decreased net cost of the embedded system as a whole. Even if the cost of a CPU that has integrated peripherals is slightly more than the cost of a CPU and external peripherals, having fewer chips typically allows a smaller and cheaper circuit board, and reduces the labor required to assemble and test the circuit board. A micro-controller is a single integrated circuit, commonly with the following features: Central processing unit - ranging from small and simple 4-bit processors to complex 32- or 64-bit Volatile memory (RAM) for data storage ROM, EPROM, EEPROM or Flash memory for program and operating parameter storage Discrete input and output bits, allowing control or detection of the logic state of an individual package pin
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 2

Serial input/output such as serial ports (UART) Other serial communications interfaces like IC, Serial Peripheral Interface etc, Peripherals such as timers, event counters, PWM generators etc. Clock generator - often an oscillator for a quartz timing crystal, resonator or RC circuit Many include analog-to-digital converters, some include digital-to-analog converters In-circuit programming and debugging support

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

ATMEGA328
INTRODUCTION:
The computer on one hand is designed to perform all the general purpose tasks on a single machine like you can use a computer to run a software to perform calculations or you can use a computer to store some multimedia file or to access internet through the browser, whereas the microcontrollers are meant to perform only the specific tasks, for e.g., switching the AC off automatically when room temperature drops to a certain defined limit and again turning it ON when temperature rises above the defined limit. There are number of popular families of microcontrollers which are used in different applications as per their capability and feasibility to perform the desired task, most common of these are 8051, AVR and PIC microcontrollers. In this we will introduce you with AVR family of microcontrollers.

History of AVR:
AVR was developed in the year 1996 by Atmel Corporation. The architecture of AVR was developed by Alf-Egil Bogen and Vegard Wollan. AVR derives its name from its developers and stands for Alf-Egil Bogen Vegard Wollan RISC microcontroller, also known as Advanced Virtual RISC. AVR microcontrollers are available in three categories: Tiny AVR Less memory, small size, suitable only for simpler applications Mega AVR These are the most popular ones having good amount of memory (upto 256 KB), higher number of in-built peripherals and suitable for moderate to complex applications. Xmega AVR Used commercially for complex applications, which require large program memory and high speed?

FEATURE:
RISC Architecture with CISC Instruction set Powerful C and assembly programming Scalable Same powerful AVR microcontroller core Low power consumption Both digital and analog input and output interfaces

DESCRIPTION:
The Atmel ATmega48/88/328 provides the following features: 4K/8K/16K bytes of InSystem Programmable Flash with Read-While-Write capabilities, 256/512/512 bytes
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 4

EEPROM, 512/1K/1K bytes SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three flexible Timer/Counters with compare modes, internal and external interrupts, a serial programmable USART, a byte-oriented 2wire Serial Interface, an SPI serial port, a 6-channel 10-bit ADC (8 channels in TQFP and QFN/MLF packages), a programmable Watchdog Timer with internal Oscillator, and five software selectable power saving modes. The Idle mode stops the CPU while allowing the SRAM, Timer/Counters, USART, 2-wire Serial Interface, SPI port, and interrupt system to continue functioning. The Power-down mode saves the register contents but freezes the Oscillator, disabling all other chip functions until the next interrupt or hardware reset. In Power-save mode, the asynchronous timer continues to run, allowing the user to maintain a timer base while the rest of the device is sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except asynchronous timer and ADC, to minimize switching noise during ADC conversions. In Standby mode, the crystal/resonator Oscillator is running while the rest of the device is sleeping. This allows very fast start-up combined with low power consumption. The ATmega48, ATmega88 and ATmega328 differ only in memory sizes, boot loader support, and interrupt vector sizes. Table 2-1 summarizes the different memory and interrupts vector sizes for the three devices.

ATmega88 and ATmega328 support a real Read-While-Write SelfProgramming mechanism. There is a separate Boot Loader Section, and the SPM instruction can only execute from there. In ATmega48, there is no Read-While-Write support and no separate Boot Loader Section. The SPM instruction can execute from the entire Flash.

PROCESSOR ARCHITECTURE:

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

AVR follows Harvard Architecture format in which the processor is equipped with separate memories and buses for Program and the Data information. Here while an instruction is being executed, the next instruction is pre-fetched from the program memory.

ALU:
The high-performance AVR ALU operates in direct connection with all the 32 general purpose working registers. Within a single clock cycle, arithmetic operations between general purpose registers or between a register and an immediate are executed. The ALU operations are divided into three main categories arithmetic, logical, and bitfunctions. Some implementations of the architecture also provide a powerful multiplier supporting both signed/unsigned multiplication and fractional format.

In-system reprogrammable flash program memory:


The ATmega48/88/328 contains 4K/8K/16K bytes On-chip In-System Reprogrammable Flash memory for program storage. Since all AVR instructions are 16 or 32 bits wide, the Flash is organized as 2K/4K/8K 16. For software security, the Flash Program memory space is divided into two sections, Boot Loader Section and Application Program Section in ATmega88 and ATmega328.

EEPROM data memory:


The Atmel ATmega48 /88/328 contains 256/512/512 bytes of data EEPROM memory. It is organized as a separate data space e, in which single bytes can be read and written. The EEPROM has an endurance of at least 100,000 write/erase cycles. The access between the EEPROM and the CPU is described in the following, specifying the EEPROM Address Registers, the EEPROM Data Register, and the EEPROM Control Register.
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 6

Program counter:
A program counter is a register in a computer processor that contains the address (location) of the instruction being executed at the current time. As each instruction gets fetched, the program counter increases its stored value by 1. After each instruction is fetched, the program counter points to the next instruction in the sequence. When the computer restarts or is reset, the program counter normally reverts to 0. In computing, a program is a specific set of ordered operations for a computer to perform. An instruction is an order given to a computer processor by a program. Within a computer, an address is a specific location in memory or storage. A register is one of a small set of data holding places that the processor uses. Program counter is very important feature in the microcontrollers.

RAM:
RAM stands for random access memory. This type of memory storage is temporary and volatile. You might have heard that if your system is working slowly you say that increase the RAM processing will increase. Let us understand in detail. Let us consider two cases to execute a task first the complete task is execute at one place(A), second the task is distributed in parts and the small tasks are executed at different places(A,B C)and finally assembled. It is clear the work will be finished in second case earlier. The A, B, C basically represent different address allocation for temporary processing. This is the case with RAM also if you increase the RAM the address basically increases for temporary processing so that no data has to wait for its turn. On major importance of the RAM is address allocations. However the storage is temporary every time u boot your system the data is lost but when you turn on the system The BIOS fetch number of addresses available in the RAM. This memory supports read as well as write operations both.

Instruction execution section (IES):


It has the most important unitinstruction register and instruction decoder to control the flow of the instruction during the processings.

INPUT/OUTPUT PORTS:
To interact with the physical environment there are different input and output ports in every system like in PC we have VGA port to connect the monitor, USB port for flash memory connections and many more ports. Similarly ATMEGA 328 has its input and output ports with different configurations depending on the architecture like only input, only output and bi-directional input output ports. The accessing of this port is referred as input output interface design for microcontrollers. IT has analog input port, analog output port, digital input port ,digital output port, serial communication pins, timer execution pins etc.

Analog Comparator & A/D converters:


The major question is that how a controller manage to detect variation of voltage inspite it could not understand the voltage but understand only digital sequence Most of the physical quantities around us are continuous. By continuous we mean that the quantity can take any value between two extreme. For example the atmospheric temperature can take any value (within certain range). If an electrical
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 7

quantity is made to vary directly in proportion to this value (temperature etc) then what we have is Analogue signal. Now we have we have brought a physical quantity into electrical domain. The electrical quantity in most case is voltage. To bring this quantity into digital domain we have to convert this into digital form. For this a ADC or analog to digital converter is needed. Most modern MCU including AVRs has an ADC on chip. An ADC converts an input voltage into a number. An ADC has a resolution. A 10 Bit ADC has a range of 0-1023. (2^10=1024) The ADC also has a Reference voltage (ARef). When input voltage is GND the output is 0 and when input voltage is equal to ARef the output is 1023. So the input range is 0-ARef and digital output is 0-1023.

Inbuilt ADC of AVR:


Now you know the basics of ADC let us see how we can use the inbuilt ADC of AVR MCU. The ADC is multiplexed with PORTA that means the ADC channels are shared with PORTA. The ADC can be operated in single conversion and free running more. In single conversion mode the ADC does the conversion and then stop. While in free it is continuously converting. It does a conversion and then start next conversion immediately after that.

ADC Pre-scalar:
The ADC needs a clock pulse to do its conversion. This clock generated by system clock by dividing it to get smaller frequency. The ADC requires a frequency between 50 KHz to 200 KHz. At higher frequency the conversion is fast while a lower frequency the conversion is more accurate. As the system frequency can be set to any value by the user (using internal or externals oscillators) (In board a 16MHz crystal is used). So the Pre-scalar is provided to produces acceptable frequency for ADC from any system clock frequency. System clock can be divided by 2, 4,16,32,64,128 by setting the Pre-scalar.

ADC Channels:
The ADC in ATmega328 has 6 channels that mean you can take samples from eight different terminals. You can connect up to 8 different sensors and get their values separately.

PIN DIAGRAM & DESCRIPTION:

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

PIN DESCRIPTION:
VCC: Digital supply voltage. GND: Ground. Port B (PB7:0) XTAL1/XTAL2/TOSC1/TOSC2 Port B is an 8-bit bi-directional I/O port with internal pull- up resistors (selected for each bit). The Port B output buffers have symmetrical drive characteristics with both high sink and source Capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running. Depending on the clock selection fuse settings, PB6 can be used as input to the inverting Oscillator amplifier and input to the internal clock operating circuit. Depending on the clock selection fuse settings, PB7 can be used as output from the inverting Oscillator amplifier. If the Internal Calibrated RC Oscillator is used as chip clock source, PB7.6 is used as TOSC2.1 input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set. Port C (PC5:0): Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The PC5.0 output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes active, even if the clock is not running.
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 9

PC6/RESET: If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical characteristics of PC6 differ from those of the other pins of Port C. If the RSTDISBL Fuse is un-programmed, PC6 is used as a Reset input. A low level on this pin for longer than the minimum pulse length will generate a Reset, even if the clock is not running. Shorter pulses are not guarantee to generate a reset. Port D (PD7:0): Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port D output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes active, even if the clock is not running. AVCC: AVCC is the supply voltage pin for the A/D Converter PC3:0, and ADC7:6. It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter. Note that PC6.4 use digital supply voltage, VCC. AREF: AREF is the analog reference pin for the A/D Converter

MINIMUM INTERFACE CIRCUIT FOR ATMEGA328 CONTROLLER:


According the minimum interface discussed for the microcontrollers earlier, the minimum interface circuit for ATMEGA328 is:

THINGS TO REMEMBER ABOUT ATMEGA328 CONTROLLERS :


INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 10

The ATMEGA controllers are strong controllers but you have to take some small points in mind always like: When you go for the programming of atmega328 consider the pin no. as configures in red color in Pin diagram. Use the proper pin for proper input output interface that analog input should be configured at analog pin analog output should be configured on PWM pins and likewise the digital inputs and outputs

PROGRAMMING OF MICROCONTRLLER:
1ST MICROCONTROLLER: TO CONTROL GPS & ACCELEROMETER void setup() { pinMode(12,OUTPUT); digitalWrite(12,LOW);// will be used to make emergency switch low pinMode(emergency_sw,INPUT); digitalWrite(emergency_sw,HIGH); // will go low if emergency switch is pressed. pinMode(led,OUTPUT); digitalWrite(led,LOW); blink(); pinMode(emergency_pin,OUTPUT); // WILL GO HIGH IN CASE OF EMERGENCY pinMode(busy,OUTPUT); // WILL REMAIN HIGH TILL THIS CONTROLLER IS BUSY. digitalWrite(emergency_pin,LOW); // WILL GO HIGH IN CASE OF EMERGENCY digitalWrite(busy,HIGH);// remain high till proper configuration.
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 11

accelero.begin(21, 20, 14, 22, A3, A2, A1); accelero.setARefVoltage(3.3); //sets the AREF voltage to 3.3V accelero.setSensitivity(LOW); //sets the sensitivity to +/-6G accelero.calibrate(); Serial.begin(9600); nss.begin(9600); Serial.println("Testing GPS "); digitalWrite(busy,LOW);// CALIBERATION OF THIS SYSTEM DONE } void loop() { bool newdata = false; unsigned long start = millis(); while (millis() - start < 1000) { if (feedgps()) newdata = true; } digitalWrite(busy,HIGH);// CALIBERATION OF THIS SYSTEM DONE gpsdump(gps); check_accel(); digitalWrite(busy,LOW);// CALIBERATION OF THIS SYSTEM DONE if(digitalRead(emergency_pin)==HIGH) { delay(1000); digitalWrite(emergency_pin,LOW); } boolean a=digitalRead(emergency_sw); a=!a; digitalWrite(emergency_pin,a); // inform other controller for emergency } static void gpsdump(TinyGPS &gps) { float flat, flon; unsigned long age; Serial.print('G'); //-------------------------------------------------------------INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 12

if(gps.satellites()==( TinyGPS::GPS_INVALID_SATELLITES)) { Serial.print('I'); digitalWrite(led,LOW); } else { digitalWrite(led,HIGH); // Serial.print(gps.satellites()); // Serial.print(' '); } //--------------------------------------------------------------if(gps.f_speed_kmph()==( TinyGPS::GPS_INVALID_F_SPEED)) { Serial.print('I'); digitalWrite(led,LOW); } else { digitalWrite(led,HIGH); int spd=gps.f_speed_kmph(); Serial.print(spd); Serial.print(','); } //--------------------------------------------------------------gps.f_get_position(&flat, &flon, &age); if(flat==(TinyGPS::GPS_INVALID_F_ANGLE)) { Serial.print('I'); digitalWrite(led,LOW); } else { Serial.print(flat); Serial.print(','); Serial.print(flon); digitalWrite(led,HIGH); } //------------------------------------------------------------------} static bool feedgps() { while (nss.available()) { if (gps.encode(nss.read())) return true;
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 13

} return false; } void check_accel() { x = accelero.getXAccel(); y = accelero.getYAccel(); z = accelero.getZAccel(); if((abs(x)>=200)||(abs(y)>=200)) // in case of tilting of vehicle { digitalWrite(emergency_pin,HIGH); delay(1000); //wait here } Serial.print('A'); Serial.print((x)); Serial.print(','); Serial.print((y)); Serial.print(','); Serial.print(z); Serial.print("(.01)g"); } void blink() { digitalWrite(led,HIGH); delay(100); digitalWrite(led,LOW); } 2ND MICROCONTROLLER: TO CONTROL GSM MODULE void setup() { pinMode(led_pin,OUTPUT); // pin configurations pinMode(buzz_pin,OUTPUT); pinMode(emergency_pin,INPUT); pinMode(busy,INPUT); lcd.begin(16, 2); // lcd initialization lcd.print("GSM Based System"); gsm.begin(200); // gsm baud rate Serial.begin(4800); // serial communication init byte s=search_modem(); // search for modem to be connected.
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 14

blocking if(s>0) s=configure_modem(); // configure the modem else { lcd.clear(); lcd.print("Cofiguration Failed"); lcd.setCursor(0,1); lcd.print("Please Reset"); while(1); } if(s>0) { s=del_sms(); // keep the location 1 clear. } else { lcd.clear(); lcd.print("Insert SIM and"); lcd.setCursor(0,1); lcd.print("Restart"); while(1); } lcd.clear(); lcd.print("GSM Based System"); indicate(100); if(EEPROM.read(0)!=0) // if not registered yet then the default number should be... { Serial.println("Number not registered yet"); EEPROM.write(1,'9'); //default number can be changed to any other number EEPROM.write(2,'6'); EEPROM.write(3,'9'); EEPROM.write(4,'6'); EEPROM.write(5,'3'); EEPROM.write(7,'4'); EEPROM.write(8,'9'); EEPROM.write(9,'0'); EEPROM.write(10,'5'); } } void loop() { if(gsm.available()>2)// check for any sms arrival { indicate(1000); int k=check_sms();
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 15

if(k==1) k=read_sms(); if(k==1) k=del_sms(); // clear the location for next sms to arrive } else // other operations { if(Serial.available()) { char ch=Serial.read(); Serial.print(ch); if(ch=='G') { indicate(); sms2send="GPS:"; lcd.clear(); } else if(ch=='A') { lcd.setCursor(0,1); // put the acclelerometer data on 2nd row sms2send="A:"; } else if(ch=='I') { lcd.clear(); lcd.print("No GPS data"); delay(1000); } else { sms2send=sms2send+String(ch); lcd.print(ch); } }// IF SERIAL AVAILABLE if((digitalRead(emergency_pin)==HIGH)&&(digitalRead(busy) ==LOW))// SEND ONLY WHEN THE COMPLETE INFORMATION IS GOT { send_sms(); indicate(200); while(digitalRead(emergency_pin)); } } } byte search_modem() // will keep on searching for modem unless it is found { Serial.println("Searching the Modem");
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 16

lcd.clear(); lcd.print(" Testing modem...."); lcd.setCursor(0,1); char ch[50]; int n=0; gsm.println("AT"); // activate the modem while(1) { if(gsm.available()) { ch[n]=gsm.read(); if((ch[n-1]=='O')&&(ch[n]=='K')) //ok if modem is there { lcd.print("Testing Done..."); return 1; } n++; if(n>40) n=0; } } }// search ends byte configure_modem() // initial configuration of modem { char ch[50]; int n=0; lcd.clear(); lcd.print("Configuring Modem...."); gsm.println("AT"); delay(10); gsm.println("ATE0"); // turn off echo delay(500); gsm.println("AT+CMGF=1"); //set the sms format as text delay(500); gsm.println("AT+CNMI=2,1,0,0,1"); // indicates the arrival of sms delay(1000); gsm.flush(); gsm.println("AT"); while(1) { if(gsm.available()) { ch[n]=gsm.read(); if((ch[n-1]=='O')&&(ch[n]=='K')) //ok if modem is there { lcd.clear(); lcd.print("Cofigured.....");
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 17

return 1; } n++; if(n>40) n=0; } else { n=0; lcd.clear(); lcd.print("Confi Failed.."); lcd.setCursor(0,1); lcd.print("Please Reset"); } } } int check_sms() { char ch[20]; int n=0; byte flag=0; // indicates the arrival of sms if(gsm.available()) { delay(1000);// wait for all serial data to arrive. while(gsm.available()) // read all serial data. { ch[n]=gsm.read(); if((ch[n-3]=='C')&&(ch[n-2]=='M')&&(ch[n-1]=='T')&&(ch [n]=='I')) { flag=1; lcd.clear(); lcd.print("SMS Arrived"); } n++; if(n>19) n=0; } if(flag==1) return 1; else { gsm.flush(); // clear unuseful data return 0; } } }
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 18

byte read_sms() { char ch[100]; int n=0; int m=0; int digit=0; byte temp=0;// to read the sms byte temp1=0; // to read the mobile number lcd.clear(); lcd.print("Reading SMS...."); lcd.setCursor(0,1); gsm.println("AT+CMGR=1"); // command to read the sms at loction 1 while(1) { if(gsm.available()) { ch[n]=gsm.read(); // Serial.print(ch[n]); if((ch[n-1]=='O')&&(ch[n]=='K')) // successful reading of SMS { for(int i=0;i<=n;i++) // extract sms part { if(temp1==2) // + sign arrives with second + sign { temp_mob[digit]=ch[i+2]; // digits after +91 digit++; if(digit==10) temp1=0; // reading of mobile number finished } if(ch[i]=='*') // terminating character stop reading { temp=0; sms_length=m-1; } if(temp==1) // store sms part in sms variable { sms[m]=ch[i]; m++; } if(ch[i]=='#') //starting character start reading temp=1; if(ch[i]=='+')// mobile number starts with +91 temp1++; }// end of for loop Serial.print("mobile number "); for(int i=0;i<=9;i++)
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 19

{ Serial.print(char(temp_mob[i])); } register_user(); //function to register the user. lcd.print("Reading Successful.."); return 1; } n++; if(n>=100) n=0; } } } byte del_sms() { char ch[20]; int n=0; lcd.clear(); lcd.print("Removing SMS.."); lcd.setCursor(0,1); gsm.println("AT+CMGD=1"); // command to delete the sms at loction 1 while(1) { if(gsm.available()) { delay(1000); while(gsm.available()) { ch[n]=gsm.read(); if((ch[n-1]=='O')&&(ch[n]=='K')) { lcd.print("SMS Deleted.."); return 1; } n++; if(n>19) n=0; } lcd.print("Error..."); return 0; } } } void indicate(int d) // indicate with led and buzzer { digitalWrite(buzz_pin,HIGH); digitalWrite(led_pin,HIGH);
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 20

delay(d); digitalWrite(buzz_pin,LOW); digitalWrite(led_pin,LOW); } void indicate() // indicate with led { digitalWrite(led_pin,HIGH); delay(20); digitalWrite(led_pin,LOW); } int register_user() // register user/ save number in EEPROM { Serial.print("sms"); Serial.println(sms); if((sms[0]=='A')&&(sms[1]=='B')&&(sms[2]=='C')) { lcd.clear(); lcd.println("Registration...."); EEPROM.write(0,0); // to indicate that the user has been registered delay(100); EEPROM.write(1,sms[3]); delay(100); EEPROM.write(2,sms[4]); delay(100); EEPROM.write(3,sms[5]); delay(100); EEPROM.write(4,sms[6]); delay(100); EEPROM.write(5,sms[7]); delay(100); EEPROM.write(6,sms[8]); delay(100); EEPROM.write(7,sms[9]); delay(100); EEPROM.write(8,sms[10]); delay(100); EEPROM.write(9,sms[11]); delay(100); EEPROM.write(10,sms[12]); delay(100); sms2send="This number is registered"; send_sms(); } } byte send_sms() { char ch[20]; int n=0;
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 21

byte number=0; lcd.clear(); lcd.print("Sending SMS.."); lcd.setCursor(0,1); gsm.print("AT+CMGS="); delay(100); number=EEPROM.read(1); // first digit of the mobile number lcd.print(char(number)); gsm.print(number); number=EEPROM.read(2); // second digit of the mobile number lcd.print(char(number));// DISPLAY THIS DATA IN LCD gsm.print(number); number=EEPROM.read(3); lcd.print(char(number)); gsm.print(number); number=EEPROM.read(4); lcd.print(char(number)); gsm.print(number); number=EEPROM.read(5); lcd.print(char(number)); gsm.print(number); number=EEPROM.read(6); lcd.print(char(number)); gsm.print(number); number=EEPROM.read(7); lcd.print(char(number)); gsm.print(number); number=EEPROM.read(8); lcd.print(char(number)); gsm.print(number); number=EEPROM.read(9); lcd.print(char(number)); gsm.print(number); number=EEPROM.read(10); // 10th digit of the mobile number lcd.print(char(number)); gsm.println(number); delay(1000); gsm.println(sms2send); delay(100); gsm.print(char(26)); // ascii code for ctrl^z while(1) { if(gsm.available()) { ch[n]=gsm.read(); Serial.print(char(ch[n])); if((ch[n-3]=='C')&&(ch[n-2]=='M')&&(ch[n-1]=='G')&&(ch
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 22

[n]=='S')) { lcd.print("Sent"); delay(1000); gsm.flush();// clear all other data return 1; } if((ch[n-3]=='E')&&(ch[n-2]=='R')&&(ch[n-1]=='R')&&(ch [n]=='O')) { lcd.print("Error"); delay(1000); gsm.flush();// clear all other data return 0; } n++; if(n>=20) n=0; } }

ACCELEROMETER
INTRODUCTION:
An accelerometer is a device that measures non-gravitational accelerations. Accelerometers are sensitive to both linear acceleration and the local gravitational field. The former provides information on taps and other handset motions allowing the development of 'gesture' user interfaces while the latter provides information on the accelerometer orientation. Accelerometer sensors measure the difference between any linear acceleration in the accelerometers reference frame and the earth's gravitational field vector.

Accelerometers have multiple applications in industry and science. Highly sensitive accelerometers are components of inertial navigation systems for aircraft and missiles. Accelerometers are used to detect and monitor vibration in rotating machinery. Accelerometers are used in tablet computers and digital cameras so that images on screens are always displayed upright.

APPLICATIONS:
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 23

There are lots of applications of applications of accelerometers in various fields: Engineering: Accelerometers can be used to measure vehicle acceleration. They allow for evaluation of overall vehicle performance and response. This information can then be used to make adjustments to various vehicle subsystems as needed. Biology: Accelerometers are also increasingly used in the biological sciences. High frequency recordings of bi-axial or tri-axial acceleration (>10 Hz) allows the discrimination of behavioral patterns while animals are out of sight. Industry: Accelerometers are also used for machinery health monitoring to report the vibration and its changes in time of shafts at the bearings of rotating equipment such as turbines, pumps, fans, rollers, compressors and cooling towers.

ACCESSORIES
ADAPTER:
The adapters are the device that has inbuilt circuitry for converting the 230V AC in to desired DC like +5V adapter, +12V adapter. This consists of inbuilt circuit for HIGH AC to low voltage DC conversion.

DIP BASIS:
The case outlines of the plastic and ceramic Dual In-line Packages (DIPs) are nearly identical. The lead configuration consists of two rows of leads, both with 100 mil pitch. The plastic DIP is shown in Figure. If the DIP base is of 18 pin then 9 lines will be in one side and 9 on other side. The IC bases of have round cut from the left of which the pin 1 of base is considered similar is the case with integrated chips.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

24

The DIP base depends on number of pins of the IC and ranges from 4pin configuration to 40 pin configuration. They are available in different pin configuration and size depending on IC need.

POWER JACK:
Power Jack is basically a connector to connect the adapter output to the board directly. It has the proper connection designed to connect with the adapter as well as out connection to connect to the board. It has three terminals output 1 Vcc, 2 GND and 3 No connection.

SWITCHES:
In electrical engineering, a switch is an electrical component that can break an electrical circuit, interrupting the current or diverting it from one conductor to another. The most familiar form of switch is a manually operated electromechanical device with one or more sets of electrical contacts, which are connected to external circuits. Each set of contacts can be in one of two states: either "closed" meaning the contacts are touching and electricity can flow between them, or "open", meaning the contacts are separated and the switch is non-conducting. The mechanism actuating the transition between these two states (open or closed) can be either a " toggle" (flip switch for continuous "on" or "off"). or " momentary" (push-for "on" or push-for "off") type.
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 25

CAPACITOR
INTRODUCTION:
The function of capacitors is to store electricity, or electrical energy. The capacitor also functions as filter, passing AC, and blocking DC. The capacitor is constructed with two electrode plates separated by insulator. They are also used in timing circuits because it takes time for a capacitor to fill with charge. They can be used to smooth varying DC supplies by acting as reservoir of charge. The capacitor's function is to store electricity, or electrical energy. The capacitor also functions as a filter, passing alternating current (AC), and blocking direct current (DC). This symbol ( )is used to indicate a capacitor in a circuit diagram. The capacitor is constructed with two electrode plates facing each other but separated by an insulator. When DC voltage is applied to the capacitor, an electric charge is stored on each electrode. While the capacitor is charging up, current flows. The current will stop flowing when the capacitor has fully charged. Commercial capacitors are generally classified according to the dielectric. The most used are mica, paper, electrolytic and ceramic capacitors. Electrolytic capacitors use a molecular thin oxide film as the dielectric resulting in large capacitance values. There is no required polarity, since either side can be the most positive plate, except for electrolytic capacitors. These are marked to indicate which side must be positive to maintain the internal electrolytic action that produces the dielectric required to form the capacitance. It should be noted that the polarity of the

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

26

charging source determines the polarity of the changing source determines the polarity of the capacitor voltage.

ACTUAL CAPACITANCE:
This is a measure of a capacitors ability to store charge. A large capacitance means that more charge can be stored. It is measured in farad, F. 1F is very large, so prefixes are used to show the smaller values. Three prefixes are used, u (micron), n (Nano), and p (Pico). 1uf=10-6 f 1nf=10-9 f 1pf=10-12 f Sometimes, a three-digit code is used to indicate the value of a capacitor. There are two ways in which the capacitance can be written one uses letters and numbers, the other uses only numbers. In either case, there are only three characters used. [10n] and [103] denote the same value of capacitance. The method used differs depending on the capacitor supplier. In the case that the value is displayed with the three-digit code, the 1st and 2nd digits from the left show the 1st figure and the 2nd figure, and the 3rd digit is a multiplier which determines how many zeros are to be added to the capacitance. Pico farad (pF) units are written this way. For example, when the code is [103], it indicates 10 x 103, or 10,000pF = 10 nano-farad (nF) = 0.01 microfarad (F). If the code happened to be [224], it would be 22 x 104 = or 220,000pF = 220nF = 0.22F. Values under 100pF are displayed with 2 digits only. For example, 47 would be 47pF. The capacitor has an insulator (the dielectric) between 2 sheets of electrodes. Different kinds of capacitors use different materials for the dielectric.

BREAKDOWN VOLTAGE:
When using a capacitor, you must pay attention to the maximum voltage which can be used. This is the "breakdown voltage." The breakdown voltage depends on the kind of capacitor being used. You must be especially careful with electrolytic capacitors because the breakdown voltage is comparatively low. The breakdown voltage of electrolytic capacitors is displayed as Working Voltage. The breakdown voltage is the voltage that when exceeded will cause the dielectric (insulator) inside the capacitor to break down and conduct. When this happens, the failure can be catastrophic.

TYPES OF CAPACITOR:
There are various types of capacitors available in the market. Some of them are as follows: Mica Capacitor Paper Capacitor Ceramic Capacitor
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 27

Variable Capacitor Electrolytic Capacitor Tantalum Capacitor Film Capacitor Here we used only two types of capacitor i.e. ceramic capacitor & electrolytic capacitor. 1. Polarized capacitors 2. Un-polarized capacitors

POLARIZED CAPACITORS:
These are the capacitors having polarity. Basically these are of larger values than 1uf. For example below is the diagram of capacitor of 220 microfarad and having breakdown voltage 25V. Electrolytic capacitors are polarized and they must be connected the correct way round, at least one of their leads will be marked + or -. They are not damaged by heat when soldering. There are two designs of electrolytic capacitors; axial where the leads are attached to each end (220F in picture) and radial where both leads are at the same end (10F in picture). Radial capacitors tend to be a little smaller and they stand upright on the circuit board. It is easy to find the value of electrolytic capacitors because they are clearly printed with their capacitance and voltage rating. The voltage rating can be quite low (6V for example) and it should always be checked when selecting an electrolytic capacitor. If the project parts list does not specify a voltage, choose a capacitor with a rating which is greater than the project's power supply voltage. 25V is a sensible minimum for most battery circuits.

UNPOLARIZED CAPACITORS:
Small value capacitors are un-polarized and may be connected either way round. They are not damaged by heat when soldering, except for one unusual type (polystyrene). They have high voltage ratings of at least 50V, usually 250V or so. It can be difficult to find the values of these small capacitors because there are many types of them and several different labeling systems.

Many small value capacitors have their value printed but without a multiplier, so you need to use experience to work out what the multiplier should be. For example 0.1 means 0.1F = 100nF. Sometimes the multiplier is used in place of the decimal point: For example: 4n7 means 4.7nF.
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 28

VARIABLE CAPACITORS:
Variable capacitors are mostly used in radio tuning circuits and they are sometimes called 'tuning capacitors'. They have very small capacitance values, typically between 100pF and 500pF (100pF = 0.0001F). Many variable capacitors have very short spindles which are not suitable for the standard knobs used for variable resistors and rotary switches. It would be wise to check that a suitable knob is available before ordering a variable capacitor.

METHODS OF MAKING CAPACITORS:


One way of making capacitors is to use the two poly-silicon layers in our process. We create a parallel plate capacitor with poly1 and poly2 (electrode) forming the two parallel sides. The silicon dioxide between the two poly layers is thin enough to yield good capacitance values per unit area. This is called a poly-poly capacitor.

CRYSTAL OSCILLATOR
INTRODUCTION:
A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers. The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits designed around them were called "crystal oscillators". A crystal oscillator is an electronic circuit that produces electrical oscillations at a particular designed frequency determined by the physical characteristics of one or more crystals, generally of quartz, positioned in the circuit feedback loop. A piezoelectric effect causes a crystal such as quartz to vibrate and resonate at a particular frequency. The quartz crystal naturally oscillates at a particular frequency, its fundamental frequency that can be hundreds of megahertz. The crystal oscillator is generally used in various forms such as a frequency generator, a frequency modulator and a frequency converter. The crystal oscillator utilizes crystal having excellent piezoelectric characteristics, in which crystal functions as a stable mechanical vibrator. There are many types of crystal oscillators. One of them is a crystal oscillator employing an inverting amplifier including a CMOS (complementary metal oxide semiconductor) circuit, and used, for example, as a reference signal
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 29

source of a PLL (phase-pocked poop) circuit of a mobile phone. Crystal oscillator circuits using crystal have a number of advantages in actual application since crystals show high frequency stability and stable temperature characteristic as well as excellent processing ability. Temperature-compensated crystal oscillators, in which variation in oscillation frequency that arises from the frequency-temperature characteristic of the quartz-crystal unit is compensated, find particularly wide use in devices such as wireless phones used in a mobile environment. A surface mounting crystal oscillator is used mainly as a frequency reference source particularly for a variety of portable electronic devices such as portable telephones because of its compact size and light weight.

COMMONLY USED CRYSTAL FREQUENCIES:


The Crystals can be manufactured for oscillation over a wide range of frequencies, from a few kilohertz up to several hundred megahertz. Many applications call for a crystal oscillator frequency conveniently related to some other desired frequency, so certain crystal frequencies are made in large quantities and stocked by electronics distributors.

CRYSTAL OSCILATORS OF DIFFERENT FREQUENCIES WITH USES:


Frequency (MHz) 0.032768 1.8432 2.4576 3.2768 3.575611 3.579545 3.582056 3.6864 4.096 Primary uses Real-time clocks, quartz watches and clocks; allows binary division to 1 Hz signal (215 1 Hz) UART clock; allows integer division to common baud rates. (= 213 32 52. 16 115200 baud or 96 16 1200 baud) UART clock; allows integer division to common baud rates up to 38400 Allows binary division to 100 Hz (32768 100 Hz, or 215 100 Hz) PAL M color subcarrier NTSC M color subcarrier. Because these are very common and inexpensive they are used in many other applications, for example DTMF generators PAL N color subcarrier UART clock (2 1.8432 MHz); allows integer division to common baud rates Allows binary division to 1 kHz (212 1 kHz)

CRYSTAL OSCILLATORS USED IN MICROCONTROLLER:


INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 30

A microcontroller is disclosed that includes a crystal oscillator circuit that is programmable to provide multiple different levels of start-up current. In the present embodiment, the crystal oscillator circuit includes logic devices for receiving programming indicating one of a plurality of different start-up current levels and a resistor chain. The logic devices are coupled to the resistor chain for controlling the resistance of the oscillator circuit such that, upon receiving programming indicating a particular start-up current level, the crystal oscillator circuit generates a corresponding start-up current. In addition, the crystal oscillator circuit includes provision for selecting one of a plurality of different levels of capacitance. Furthermore, the crystal oscillator circuit includes a gate pass that includes circuitry for assuring predetermined start-up conditions are met. A feedback loop that includes an amplifier provides for steady-state operations that have low power consumption.

APPLICATIONS:
A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers.

Virtually all microprocessors, micro-controllers, PICs and CPU's generally operate using a QUARTZ CRYSTAL OSCILLATOR as its frequency determining device to generate their clock waveform because as we already know, crystal oscillators provide the highest accuracy and frequency stability compared to resistorcapacitor(RC), inductor-capacitor (LC) oscillators. Quartz crystals are manufactured for frequencies from a few kilohertz up to several hundred Megahertz.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

31

DIODE BRIDGE
INTRODUCTION:
A diode bridge is an arrangement of four (or more) diodes in a bridge circuit configuration that provides the same polarity of output for either polarity of input. When used in its most common application, for conversion of an alternating current (AC) input into a direct current (DC) output, it is known as a bridge rectifier. A bridge rectifier provides full-wave rectification from a two-wire AC input, resulting in lower cost and weight as compared to a rectifier with a 3-wire input from a transformer with a center-tapped secondary winding.

The essential feature of a diode bridge is that the polarity of the output is the same regardless of the polarity at the input. The diode bridge circuit is also known as the Graetz circuit after its inventor, physicist Leo Graetz.

BASIC OPERATION:
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 32

According to the conventional model of current flow originally established by Benjamin Franklin and still followed by most engineers today, current is assumed to flow through electrical conductors from the positive to the negative pole. In actuality, free electrons in a conductor nearly always flow from the negative to the positive pole. In the vast majority of applications, however, the actual direction of current flow is irrelevant. Therefore, in the discussion below the conventional model is retained. In the diagrams below, when the input connected to the left corner of the diamond is positive, and the input connected to the right corner is negative, current flows from the upper supply terminal to the right along the red (positive) path to the output, and returns to the lower supply terminal via the blue (negative) path.

In each case, the upper right output remains positive and lower right output negative. Since this is true whether the input is AC or DC, this circuit not only produces a DC output from an AC input, it can also provide what is sometimes called "reverse polarity protection".

RECTIFIERS:
A rectifier is an electrical device that converts alternating current (AC), which periodically reverses direction, to direct current (DC), which flows in only one direction. The process is known as rectification. The simple process of rectification produces a type of DC characterized by pulsating voltages and currents: HALF-WAVE RECTIFICATION: In half wave rectification of a single-phase supply, either the positive or negative half of the AC wave is passed, while the other half is blocked. Because only one half of the input waveform reaches the output, mean voltage is lower. Half-wave rectification requires a single diode in a single-phase supply, or three in a three-phase supply. Rectifiers yield a unidirectional but pulsating direct current; half-wave rectifiers produce far more ripple than full-wave rectifiers, and much more filtering is needed to eliminate harmonics of the AC frequency from the output.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

33

FULL WAVE RECTIFIER: A full-wave rectifier converts the whole of the input waveform to one of constant polarity(positive or negative) at its output. Full-wave rectification converts both polarities of the input waveform to DC (direct current), and yields a higher mean output voltage. Two diodes and a center tapped transformer, or four diodes in a bridge configuration and any AC source (including a transformer without center tap), are needed. Single semiconductor diodes, double diodes with common cathode or common anode, and four-diode bridges, are manufactured as single components.

BRIDGE RECTIFIER: A bridge rectifier makes use of four diodes in a bridge arrangement to achieve fullwave rectification. This is a widely used configuration, both with individual diodes wired as shown and with single component bridges where the diode bridge is wired internally.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

34

CURRENT FLOW IN BRIDGE RECTIFIER:

EMBEDDED SYSTEM
INTRODUCTION:
Embedded Systems are components integrating software and hardware jointly and specifically designed to provide given functionalities.
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 35

A combination of computer hardware and software, and perhaps additional mechanical or other parts, designed to perform a dedicated function. In some cases, embedded systems are part of a larger system or product, as in the case of an antilock braking system in a car. Such equipment is electrical or battery powered. The chip controls one or more functions of the equipment, such as remembering how long it has-been since the device last received maintenance. An Embedded System is a special-purpose computer system designed to perform one or a few dedicated functions, often with real- time computing constraints. An embedded system is an application that contains at least one programmable computer (typically in the form of a microcontroller, a microprocessor or digital signal processor chip) and which is used by individuals who are, in the main, unaware that the system is computer-based.
Embedded systems are designed to do some specific task, rather than be a generalpurpose computer for multiple tasks. Some also have real time performance constraints that must be met, for reason such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs.

An embedded system is not always a separate block - very often it is physically built-in to the device it is controlling. The software written for embedded systems is often called firmware, and is stored in read-only memory or flash convector chips rather than a disk drive. It often runs with limited computer hardware resources: small or no keyboard, screen, and little memory.

MAJOR BUILDING BLOCKS OF EMBEDDED SYSTEM:


The major building blocks of an embedded system are listed below: Microcontrollers / digital signal processors (DSP) Integrated chips Real time operating system (RTOS) - including board support package and device drivers
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 36

Industry-specific protocols and interfaces Printed circuit board assembly Usually, an embedded system requires mechanical assembly to accommodate all the above components and create a product or a complete embedded device. A controller is used to control some process. At one time, controllers were built exclusively from logic components, and were usually large, heavy boxes.

Real time system:


A system where correctness depends not only on the correctness of the logical result of the computation, but also on the result delivery time. It responds in a timely, predictable way to unpredictable external stimuli arrivals. The real Time Systems can be further divided into two types: Soft Real-Time System: Compute output response as fast as possible, but no specific deadlines that must be met. Hard Real-Time System: Output response must be computed by specified deadline or system.

EXAMPLE OF EMBEDDED SYSTEM:

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

37

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

38

CHARACTERISTICS OF EMBEDDED SYSTEM:


Must be dependable: Reliability (t) = probability of system working correctly provided that is was working at t=0 Maintainability (d) = probability of system working correctly d time units after error occurred. Availability: probability of system working at time t Safety: no harm to be caused Security: confidential and authentic communication Even perfectly designed systems can fail if the assumptions about the work load and possible errors turn out to be wrong. Making the system dependable must not be an after-thought, it must be considered from the very beginning. 1. Must be Efficient: Energy efficient Code-size efficient (especially for systems on a chip) Run-time efficient Weight efficient Cost-efficient 2. Dedicated user interface & Dedicated towards a certain application: Knowledge about behavior at design time can be used to minimize resources and to maximize robustness.
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 39

3. Many ES must meet real-time constraints : A real-time system must react to stimuli from the controlled object (or the operator) within t he time interval dictated by the environment. For real-time systems, right answers arriving too late (or even too early) are wrong. 4. Frequently connected to physical environment through sensors and actuators 5. Hybrid systems (analog + digital parts). 6. Typically, ES are reactive systems : A reactive system is one which is in continual interaction with is environment and executes at a pace determined by that environment.

COMPARISION:
Embedded Systems General Purpose Computing

Few applications that are known at Broad class of applications. design-time. Not programmable by end user Programmable by end user. Fixed run-time requirement (additional Faster is better. computing power not useful). Criteria: 1. Cost 2. Power consumption 3. Predictability Criteria: 1. Cost 2. Average speed

EMBEDDED SYSTEM HARDWARE:

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

40

We learnt that the hardware elements: (i) Processor (ii) Basic circuit elements: power source, clock, reset, timers, memory, glue circuit for the elements linking and interfaces (iii) Keypad, LCD display matrix or touch screen (iv) IO communication elements: buses (serial and parallel), interfaces for network interface, ADC, DAC, pulse dialer, modem, Bluetooth, 802.11, as per the application (v) Interrupt handler Embedded system hardware basically consists of three main elements: Input System: Input system is the basically used to interact with external environment or type of input the user want to give. There can be various type of the input system depending upon the user or system need. Some of the examples are sensor interfaces (IR, LDR etc.), UART interface (for communication with PC), Wireless interfaces for various type of wireless communication etc. These interfaces have also a good circuit design and should be properly designed so that it can easily interact with the next unit. Processing Unit: The next unit is the processing unit that consist either analog circuit to process the input or to make the system perform good and user dependant (as per program) uses the microcontroller interface circuit. The main function of this unit is to take the input, process it and generate the desired output as per the program (done by user) to control the output unit. Output unit: The output unit consists of the circuit interface to generate and control the desired output. For example the relay driving unit, motor driver unit, alarm systems, Display units etc. The figure below shows an example of embedded system hardware :

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

41

TYPICAL ARCHITECTURE OF EMBEDDED SYSTEM:

ELEMENTS OF EMBEDDED DESIGN SYSTEM:


INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 42

The design of embedded system includes three things: 1. Hardware: Embedded system hardware basically consists of three main elements: Input System: Input system is the basically used to interact with external environment or type of input the user want to give. There can be various type of the input system depending upon the user or system need. Some of the examples are sensor interfaces (IR, LDR etc.), UART interface (for communication with PC), Wireless interfaces for various type of wireless communication etc. These interfaces have also a good circuit design and should be properly designed so that it can easily interact with the next unit. Processing Unit: The next unit is the processing unit that consist either analog circuit to process the input or to make the system perform good and user dependant (as per program) uses the microcontroller interface circuit. The main function of this unit is to take the input, process it and generate the desired output as per the program (done by user) to control the output unit. Output unit: The output unit consists of the circuit interface to generate and control the desired output. For example the relay driving unit, motor driver unit, alarm systems, Display units etc. 2. Embedded Software (Compilers): Embedded software is computer software that plays an integral role in the electronics it is supplied with. Embedded software's principal role is not information technology (i.e. it is not about information and the technologies related to providing information services), but rather the interaction with the physical world. It's written for machines that are not, first and foremost, computers. Manufacturers 'build in' embedded software in the electronics in cars, telephones, audio equipment, robots, appliances, toys, security systems, pacemakers, televisions and digital watches, for example. This software can become very sophisticated in applications such as airplanes, missiles, and process control systems. Varying hardware requires different embedded system depending upon the architecture. Linker Program (software): In computer science, a linker or link editor is a program that takes one or more objects generated by a compiler and combines them into a single executable program (hex code). These are inter-linked with the compilers. 3. These are the Flash program that is capable of reading from the controllers writing to the hardware controllers to the HEX code.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

43

GLOBLE POSITION SYSTEM (GPS)


INTRODUCTION:
A GPS tracking unit is a device that uses the Global Positioning System to determine the precise location of a vehicle, person, or other asset to which it is attached and to record the position of the asset at regular intervals. The recorded location data can be stored within the tracking unit, or it may be transmitted to a central location data base, or internet-connected computer, using a cellular (GPRS), radio, or satellite modem embedded in the unit. This allows the asset's location to be displayed against a map backdrop either in real-time or when analyzing the track later, using customized software. A GPS tracking system uses the GNSS (Global Navigation Satellite System) network. This network incorporates a range of satellites that use microwave signals which are transmitted to GPS devices to give information on location, vehicle speed, time and direction. So, a GPS tracking system can potentially give both real-time and historic navigation data on any kind of journey. A GPS tracking system can work in various ways. From a commercial perspective, GPS devices are generally used to record the position of vehicles as they make their journeys. Some systems will store the data within the GPS tracking system itself (known as passive tracking) and some send the information to a centralized database or system via a modem within the GPS system unit on a regular basis (known as active tracking). A PASSIVE GPS TRACKING SYSTEM will monitor location and will store its data on journeys based on certain types of events. So, for example, this kind of GPS system may log data such as turning the ignition on or off or opening and closing doors. The data stored on this kind of GPS tracking system is
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 44

usually stored in internal memory or on a memory card which can then be downloaded to a computer at a later date for analysis. In some cases the data can be sent automatically for wireless download at predetermined points/times or can be requested at specific points during the journey. AN ACTIVE GPS TRACKING SYSTEM is also known as a real-time system as this method automatically sends the information on the GPS system to a central computer or system in real-time as it happens. This kind of system is usually a better option for commercial purposes such as fleet tracking and individual vehicle tracking as it allows the company to know exactly where their vehicles are, whether they are on time and whether they are where they are supposed to be during a journey. This is also a useful way of monitoring the behavior of employees as they carry out their work and of streamlining internal processes and procedures for delivery fleets.

WHAT IS GPS?
The Global Positioning System (GPS) is actually a constellation of 27 Earth-orbiting satellites (24 in operation and three extras in case one fails). The U.S. military developed and implemented this satellite network as a military navigation system, but soon opened it up to everybody.

Each of these 3,000- to 4,000-pound solar-powered satellites circles the globe at about 12,000 miles (19,300 km), making two complete rotations every day. The orbits are arranged so that at anytime, anywhere on Earth, there are at least four satellites "visible" in the sky.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

45

A GPS receiver's job is to locate four or more of these satellites, figure out the distance to each, and use this information to deduce its own location. This operation is based on a simple mathematical principle called trilateration. In order to make the simple calculation of the location, then, the GPS receiver has to know two things: The location of at least three satellites above you The distance between you and each of those satellites The GPS receiver figures both of these things out by analyzing high frequency, low-power radio signals from the GPS satellites. Better units have multiple receivers, so they can pick up signals from several satellites simultaneously. You can use maps stored in the receiver's memory, connect the receiver to a computer that can hold more detailed maps in its memory, or simply buy a detailed map of your area and find your way using the receiver's latitude and longitude readouts. Some receivers let you download detailed maps into memory or supply detailed maps with plug-in map cartridges. A standard GPS receiver will not only place you on a map at any particular location, but will also trace your path across a map as you move. If you leave your receiver on, it can stay in constant communication with GPS satellites to see how your location is changing. With this information and its built-in clock, the receiver can give you several pieces of valuable information: How far you've traveled (odometer) How long you've been traveling Your current speed (speedometer) Your average speed A "bread crumb" trail showing you exactly where you have traveled on the map The estimated time of arrival at your destination if you maintain your current speed

TYPES OF GPS TRACKING SYSTEM:


There are currently three categories of GPS tracking units: Data Loggers Data loggers are usually the most basic type of GPS tracking; a GPS data logger simply logs the position of the object at regular intervals and retains it in an internal memory. Usually, GPS loggers have flash memory on board to record data that is logged. The flash memory can then be transferred and accessed using USB or accessed on the device itself. Data Pushers Data Pushers are GPS tracking units that are mainly used for security purposes. A data pusher GPS tracking unit sends data from the device to a central database at regular intervals, updating location, direction, speed and distance. Data pushers are common in fleet control to manage trucks and other vehicles. For instance, delivery vehicles can be located instantly and their progress
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 46

can be tracked. Other uses include the ability to track valuable assets. If valuable goods are being transported or even if they reside in a specific location, they can constantly be monitored to avoid theft. Data pushers are also common for espionage type tasks. It is extremely easy to watch the movements of an individual or valuable asset. This particular use of GPS tracking has become an important issue in the field of GPS tracking, because of its potential for abuse. Data Pullers The last category of GPS tracking units is the data pusher units. These types of units push data or send data when the unit reach a specific location or at specific intervals. These GPS units are usually always on and constantly monitoring their location. Most, if not all data puller unit also allow data pushing (the ability to query a location and other data from a GPS tracking unit).

FEATURES OF GPS:
Generally all of the GPS Tracking System has some of the common features that are listed below: GSM/GPRS Module - It is used to send the location to the user online. In some case, if the user wants the location through the internet then this module is very useful. By the help of the GSM/GPRS module, we can send data real time. It can be seen on the internet enabled any device as a PC, mobile phone, PDA etc. Track Playback - Animates your driver's daily driven route so that you can follow every move. The track animation line is color coded to indicate the speed your driver was traveling during his route. Idle Time Report - Gives you an accurate report detailing when your driver was stopped and has left the engine running on the vehicle. This report was designed with input from our existing customers who were concerned about high fuel bills. Track Detail - Provides you with a split screen view when reviewing your driver's route. Stop and transit times, as well as speed information, are displayed in the bottom pane. You can easily toggle between stops by clicking the stop number on the track detail pane.

In Figure1, as the zoom increases, so does map detail. Street names are listed as well as geographic markers (schools, airports, creeks, railways, parks, etc.).
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 47

At the street level, we can clearly see stops marked by a red stop sign. Clicking on these stops pops up a summary of the stop: stop number, time, location, and duration. This makes it a breeze to determine where and when your employees were at certain locations

Figure 1.

Figure 2.

Speed Bar - Your drivers route is color coded when it is displayed on the map. The colors represent a 10 MPH or 5 MPH speed range. This allows you to see how fast your driver was driving in a specific area. In the figure2, we have an example of a zoom in progress; also notice the speed bar and the color coded route. Determining employee speeds is extremely easy to accomplish. Mileage By State - Breaks down mileage by state boundaries to assist with DOT reporting. Group Reporting - Allows you to set vehicles up into groups for faster and easier reporting. Geo Fencing It allows us to limit some region of area and if your vehicle goes beyond the boundary of that region then urgent message will be sent by the system to the manager to control the driver. So that the time and money can be saved by this system. Ignition ON/OFF detection The system can save the information about the engine that it is in working condition or stop by ignition ON/OFF detection so that the manager can know for how many times the driver stopped the fleet and for how many time. So much time can be saved. SMS / GPRS Communication - The location about the fleet or the person can be send by SMS or email by this facility. On-Line and Off-Line tracking Every user has different requirement and as per the requirement the data can be viewed real-time or it can be saved in the unit and when the vehicle reach to its manager, manager can download data and see the route of the vehicle and every other detail that can be seen by the real-time. Buzzer for alerting the driver Some system uses the buzzer system to alert the driver that he is going out of the boundary or the speed is very high,
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 48

or anything that is restricted. So that the driver is able to know that he is going wrong. Monitoring digital events If you need to know when a piece of machinery was turned On/Off or when a door was Open/Shut, this system will provide you with best options.

APPLICATION OF GPS: Fleet control:


For example, a delivery or taxi company may put such a tracker in every of its vehicles, thus allowing the staff to know if a vehicle is on time or late, or is doing its assigned route. The same applies for armored trucks transporting valuable goods, as it allows pinning point the exact site of a possible robbery.

Stolen vehicle searching:


Owners of expensive cars can put a tracker in it, and "activate" them in case of theft. "Activate" means that a command is issued to the tracker, via SMS or otherwise, and it will start acting as a fleet control device, allowing the user to know where the thieves are.

Animal control:
When put on a wildlife animal (e.g. in a collar), it allows scientists to study its activities and migration patterns. Vaginal implant transmitters are used to mark the location where pregnant females give birth.[1] Animal tracking collars may also be put on domestic animals, to locate them in case they get lost.

Race control:
In some sports, such as gliding, participants are required to have a tracker with them. This allows, among other applications, for race officials to know if the participants are cheating, taking unexpected shortcuts or how far apart they are. This use has been featured in the movie "Rat Race", where some millionaires see the position of the racers in a wall map.

Espionage/surveillance:
When put on a person, or on his personal vehicle, it allows the person monitoring the tracking to know his/her habits. This application is used by private investigators, and also by some parents to track their children.

Internet Fun:

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

49

Some Web 2.0 pioneers have created their own personal web pages that show their position constantly, and in real-time, on a map within their website. These usually use data push from a GPS enabled cell phone.

Sport:
Sport enthusiast carries it while practicing an outdoors sport, e.g. jogging or backpacking. When they return home, they download the data to a computer, to calculate the length and duration of the trip, or to over-impose their paths over a map with the aid of GIS software.

Difference between Navigation AND Tracking:


A GPS navigation device is any device that receives Global Positioning System (GPS) signals for the purpose of determining the present location. These devices are used in military, commercial aviation, and consumer product applications. Navigation system is sed to guide the person to find his/her route. The GPS navigation device is used to know the exact location of their own that has that device and there is no need to send the information to the other computer or some other person. The device also has an extremely detailed map data and navigation software inside it allowing the user to search for a destination address and point of interest, and then get graphical map instructions supported by voice prompts.

GPS MODULE PIN DIAGRAM:

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

50

COMMAND DATA FORMAT:

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

51

GGA-Global positioning system fixed data Format-

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

52

GLL: Geographic Longitude/Latitude Format:

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

53

GSM
GSM (Groupe Spciale Mobile, now named Global System for Mobile Communications) is a 2nd Generation cellular mobile system innovated in Europe by ETSI (European Telecommunications Standardization Institute). It is now a family name of a number of systems including 2.5G and 3G systems such as: PCS (Personal Cellular System/Service) North American GSM HSCSD (High-Speed Circuit Switched Data) GSM with high-speed data by bundling up to four voice equivalentchannels GPRS (General Packet Radio Services) GSM enhancement in cell-phone software and network hardware andsoftware to support packet switching (the one used by the Internet) EDGE (Enhanced Data rates for GSM Evolution) a technique to achieve better compression of data on the airinterface EGPRS (EDGE based GPRS) UMTS (Universal Mobile Telecommunications Service) 3G System based on W-CDMA (Wideband Code Division Multiple Access) HSPA (High Speed Packet Access) Data speed enhancement for 3G systems

The development of GSM started in 1982 when a study group Group Special Mobile was formed during Conference of European Posts and Telegraphs (CEPT) this group was to develop a Pan-European public cellular system in the 900 MHz range. Some of the basic criteria for their proposed system were: In 1989, GSM responsibility was transferred to European Telecommunication Standards Institute (ETSI) and commercial service was started in mid 1991. Although GSM was standardized in Europe, now it is operational in other continents also. The acronym GSM now aptly stands for Global System for Mobile Communication.

CELLULAR MOBILE SYSTEM:


Cellular radio was devised in order to make better use of limited resource of Radio Spectrum. Each Megahertz of spectrum will only support a comparatively a small number of simultaneous conversations and the same frequency must be reused many times in order to meet the capacity needed for national or regional service. Cellular radio achieves this by creating a honeycomb of cells over the region and assigning frequencies and power levels in such a way that the same frequency can be reused for different conversation two or three cells away. Although most of the countries in Europe had their own analogue cellular system, they were not compatible with each other. So with the development in Political, Commercial and Industrial areas there arose a necessity for uniformity in cellular communication Cellular mobile communication has generations:
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 54

1. First generation: Analog radio; mostly telephony only, virtually no data capability other than special device with analog modem. This generation is now mostly obsolete. 2. Second Generation: Digital radio and short messaging; this is now the main stream system. Recently a variety of technique has been innovated and employed to enhance data capability of 2G systems. The data capability includes Internet access and picture sharing. These systems are called 2.5G systems. High end cell phones and services are now available with 2.5G capabilities. 3. Third Generation: Digital system with multimedia services including video phone and relatively higher speed (say up to 1 Mbps) Internet access. A slow roll off of 3G system has been started in advanced networks of developed and rapidly developing countries. 4. Fourth Generation: Digital system with voice-over-IP (VOIP) technology (Note that the voice for G1, 2 and 3 are circuit-switched). That is, the services are integrated into all IP network. This is expected to be future network and not coming any time soon.

GSM TECHNOLOGY:
One of the most important conclusions from the early tests of the new GSM technology was that the new standard should employ Time Division Multiple Access (TDMA) technology. This ensured the support of major corporate players like Nokia, Ericsson and Siemens, and the flexibility of having access to a broad range of suppliers and the potential to get product faster into the marketplace. After a series of tests, the GSM digital standard was proven to work in 1988. With global coverage goals in mind, being compatible with GSM from day one is a prerequisite for any new system that would add functionality to GSM. As with other 2G systems, GSM handles voice efficiently, but the support for data and Internet applications is limited. A data connection is established in just the same way as for a regular voice call; the user dials in and a circuit-switched connection continues during the entire session. If the user disconnects and wants to re-connect, the dial-in sequence has to be repeated. This issue, coupled with the limitation that
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 55

users are billed for the time that they are connected, creates a need for packet data for GSM. The digital nature of GSM allows the transmission of data (both synchronous and asynchronous) to or from ISDN terminals, although the most basic service support by GSM is telephony. Speech, which is inherently analog, has to be digitized. The method employed by ISDN, and by current telephone systems for multiplexing voice lines over high-speed trunks and optical fiber lines, is Pulse Coded Modulation (PCM). From the start, planners of GSM wanted to ensure ISDN compatibility in services offered, although the attainment of the standard ISDN bit rate of 64 Kbit/s was difficult to achieve, thereby belying some of the limitations of a radio link. The 64 Kbit/s signal, although simple to implement, contains significant redundancy. Since its inception, GSM was destined to employ digital rather than analog technology and operate in the 900 MHz frequency band. Most GSM systems operate in the 900 MHz and 1.8 GHz frequency bands, except in North America where they operate in the 1.9 GHz band. GSM divides up the radio spectrum bandwidth by using a combination of Time- and Frequency Division Multiple Access (TDMA/FDMA) schemes on its 25 MHz wide frequency spectrum, dividing it into 124 carrier frequencies (spaced 200 Khz apart). Each frequency is then divided into eight time slots using TDMA, and one or more carrier frequencies are assigned to each base station. The fundamental unit of time in this TDMA scheme is called a burst period and it lasts 15/26 ms (or approx. 0.577 ms). Therefore the eight time slots are actually burst periods, which are grouped into a TDMA frame, which subsequently form the basic unit for the definition of logical channels. One physical channel is one burst period per TDMA frame. The development of standards and systems spans well beyond the technical realm and often into the political; this is best exemplified by what happened with GSM. Shortly after the suitability of TDMA for GSM was determined, a political battle erupted over the question of whether to adopt a wide-band or narrow-band TDMA solution. Whereas France and Germany supported a wide-band solution, the Scandinavian countries favored a narrow-band alternative. These governmental preferences were clearly a reflection of the respective countries domestic equipment manufacturers as German and French manufacturers SEL and Alcatel had invested substantially into wide-band technology, whereas their Scandinavian counterparts Ericsson and Nokia poured resources into the narrow-band alternative. Italy and the UK, in turn, were the subjects of intense lobbying on behalf of the two camps with the result of frequently changing coalitions. The culmination of this controversy between the two camps was a CEPT (Conference des Administrations Europeans des Posts et Telecommunications) Meeting in Madeira in February 1987. The Scandinavian countries finally convinced Italy, the UK and a few smaller states of the technical superiority of narrow-band technology and left Germany and France as the only proponents of the wide-band alternative. Since CEPT followed purely intergovernmental procedures, however, decisions had to be taken unanimously, and Germany and France were able to veto a decision that would have led to the adoption of narrow-band TDMA as the technology underlying the GSM project.
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 56

A unique feature of GSM is the Short Message Service (SMS), which has achieved wide popularity as what some have called the unexpected killer application of GSM. SMS is a bi-directional service for sending short alphanumeric message in a store-and-forward process. SMS can be used both point-to-point as well as in cell-broadcast mode. (Further information in Section 3.5) Supplementary services are provided on top of tele-services or bearer services, and include features such as, inter alia, call forwarding, call waiting, caller identification, three-way conversations, and call-barring. The most novel and far-reaching feature of GSM is that it provides most of Europes cellular phone users with a choice choice of network and choice of operator. Also, international roaming was and continues to be the cornerstone of GSM. For this to be possible, all networks and handsets have to be identical. With many manufacturers creating many different products in many different countries, each type of terminal has been put through a rigorous approval regime. However, at the time, no approval process was available, and it took nearly a year before the handheld terminals were tested and fit for market entry. Another of GSMs most attractive features is the extent to which its network is considered to be secure. All communications, both speech and data, are encrypted to prevent eavesdropping, and GSM subscribers are identified by their Subscriber Identity Module (SIM) card (which holds their identity number and authentication key and algorithm). While the choice of algorithm is the responsibility of individual GSM operators, they all work closely together through the Memorandum of Understanding (MOU) (to be described in greater detail in section 2.2.2) to ensure security of authentication. This smartcard technology minimizes the necessity for owning terminals - as travelers can simply rent GSM phones at the airport and insert their SIM card. Since its the card rather than the terminal that enables network access, feature access and billing, the user is immediately on-line.

SYSTEM ARCHITECTURE:
The functional architecture of a GSM system can be broadly classified into Mobile Station (MS) Base Station Subsystem (BSS) Network and Switching Subsystem (NSS) Operation Subsystem (OSS) The MS and the BSS communicate via the Um interface or radio link. The BSS communicates with Mobile Service Switching Center across the A interface.

MOBILE STATION:
This may be a standalone piece of equipment for certain services or support the connection of external terminals. The MS consists of the Mobile Equipment (ME) and a Subscriber Identity Module (SIM).The ME is uniquely identified by the International Mobile Equipment Identity (IMEI), but it need not be personally assigned to one subscriber, The SIM which is a smart card provides personal mobility and the user can access the subscriber services. The subscriber can operate on any terminal just by inserting the SIM card in that GSM terminal. SIM card contains the International Mobile Subscriber Identity (IMSI) used to identify the
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 57

subscriber to the system, a secret key for authentication and other security informations. SIM card may be protected against unauthorized use by a password.

BASE STATIONSUBSYSTEM:
The BSS is composed of three parts, Base Transceiver Station (BTS) and U3ase Station Controller (BSC). These two communicate across the standardized Abis interface. The third part is Transponder and Rate Adaptation Unit (TRAU).

Base Transceiver Station:


This provides the GSM radio coverage within a cell. It comprises of radio transmitting and receiving equipment and associated signal processing units. This complements the radio features of ME.

Base Station Controller:


This manages the radio resources for one or more BTSs. It handles radio channel set-up, Handovers and frequency hopping. Handovers between BTSs belonging to different BSCs however can involve MSCs but are still managed by the original serving BSC. It controls the transmission of information about Local Area Codes (LAC), signaling channel configuration and informations about neighboring cells.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

58

Trans-coder and Rate Adaptation Unit:


This is responsible for trans-coding between GSM encoded speech at I 3KPS and fixed network speech at 64KPS. Similarly it performs rate adaptation of GSM data services. Although it is a part of BSS, it is located at MSC Sites. This is to benefit from the lower rate coding and consequent saving in transmission costs.

NETWORK AND SWITCHING SUBSYSTEM:


NSS in GSM uses an Intelligent Network (The central component of NSS is the Mobile Service Switching Center (MSC). It is supported by Interworking functions (JWF), Home Location Register (HLR), Visitor Location Register (VLR), Gateway MSC (GMSC) and Signal Transfer Point (STP).

Mobile Service Switching Center:


It acts like a switching node and additionally provides all the functionality needed to handle a mobile subscriber such as registration, authentication, location updating. Handovers and call routing to a roaming subscribe. These functions are provided in conjunction with several functional entities. An MSC controls several BSCs.

Inter Working Function, (IWF):


A gateway for MSC to interface with external networks for communications with users outside GSM. The role of IWF depends upon the type of user data and the network to which it interfaces.

Home Location Register (HLR):


It consists of a computer without switching capabilities. It is a database, which contains subscriber information related to the subscribers current locations but not the actual location. HLR has two divisions Authentication Center (AuC) and Equipment Identity Register (EIR). The AuC manages the security data for subscriber authentication. The EIR database carry information about certain MEs. The security procedure is discussed later.

Visitor Location Register (VLR):


It links to one or more MSCs, temporarily storing subscription data currently served by its corresponding MSC. VLR holds more current subscriber location than lILR. Although VLR is an independent unit, it is always implemented together with the MSC.

Gateway MSC GMSC):


In order to set-up a requested call, the call is initially routed to a GMSC which finds the correct HLR.GMSC has an interface with external network for gate-waying and the network operates the full signaling system 7 (SS7) between NSS Machines.
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 59

Signaling Transfer Point:


It acts as a standalone node to optimize the cost of the signaling transport among MSC/VLR, GMSC and HLR.

MORE POINTS: Operating subsystem:


There are three area of OSS Network operation and maintenance function. Subscription management including charging and billing. Mobile Equipment and Management.

Layer modeling:
Transmission Radio resource management Mobility managemen Communication management Operation, administration and maintenance

Radio link aspects:


The International Telecommunication Union (ITU) which manages Allocation of radio spectrum has allocated the bands 890-915MHz for the uplink (MS To BS) and 960MHz for the downlink (BS To MS) for mobile networks.

Multiple access and channel structure:


Due to the scarcity of radio spectrum, a method must be devised to divide bandwidth among as many users as possible. GSM uses a combination of FDMA TDMA. FDMA part involves the division by frequency of the 25M1-lz bandwidth into carrier frequencies of 200 KHz bandwidth. One or more carrier frequencies is then divided in time using TDMA scheme.

Traffic channels:
This is also called physical channel. This is used to carry speech and data traffic: They are of three kinds TCH/F (full rate): Transmits the speech code of 13 KBPS or Three data mode 12,6 and 3.6 1KBPS. TCIH/H(half rate):Transmits the speech code of 7 1KBPS or Two data modes 6 3.6 1KBPS TCI-118( 1/8th rate): Used for low rate signaling channels, Common channels and channels. They are also called Stand Alone Dedicated Control Channel(SDCCH)

Cell selection:
Using the best cell from an MS depends on three factors The level of signal received by the MS. The maximum transmission power of the MS.
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 60

Two parameters P1 and P2 specified by the cell C1 = A-max (B, 0) A B = = received level average-P 1 P2-Max RF power of the MS. P1 P2 = = A value between 110 and 48dBm A value between 13 and 43dBm

Call selection algorithm is as follows. The SIM must be inserted. The strongest Cl is chosen by obtaining Cl from the candidate cells. All cells must not be barred from service

MOBILITY MANAGEMENT:
This layer handles the functions that arise from the mobility of the subscribers as well as the authentication and security aspects.

LOCATION UPDATING:
The mobile phone receives constantly information send by the network. This information includes identification of the area where the mobile is currently located. In order to keep track of its location, the mobile stores the ID of the area in which it is currently registered. Every time the network broadcasts the ID of the area, the mobile compares this, information to the area ID stored in its memory. When the two IDs are no longer the same, the mobile sends the network a request, i.e. Registration inquiry to the area it has entered. The network receives the request and registers the mobile in the new area, a new VLR. Simultaneously, a subscriber HLR is informed about the new location and the data of the subscriber is cleared from the previous VLR.

AUTHENTICATION AND SECURITY:


Authentication involves two functional entities: -SIM and AuC. Each subscriber is given a secret key, one copy of which is stored in SIM card and the other in AuC. During Authentication, the AUC, a 128 bit random number RANI) that is send o lie Mobile. Both mobile and the AuC then uses the RAND in conjunction with the subscribers secret key and a ciphering algorithm cal lcd A3, to generate a 32 bit long signal response (SRES) that is send back to AuC. lf both numbers match the subscriber is authenticated.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

61

CALL MANAGEMENT:
This layer is responsible for call control, supplementary service management and short message service management.

CALL CONTROL:
Call control functions set up calls, maintain calls and release calls.

CALL ROUTING:
The directory number dialed to reach a mobile subscriber is called the mobile subscriber ISDN (MSISDN) which is defined by E.164 numbering plan. This number includes country code and national destination code, which identifies the subscribers operator. The first few digits of the remaining subscriber number may identify the subscribers HLR. An incoming mobile terminating call is directed to the GMSC. GMSC contains a table linking MSISDN to their corresponding HLR. The GMSC queries the called subscribers HLR for a Mobile Station Roaming Number (MSRN). The HLR typically stores only the SS7 address of the subscribers current VLR and so HLR queries the current VLR, which will temporarily allocate an MSRN from its pool for the call. This MSRN is returned to the HLR and back to GMSE, which can then route the call to the new MSC. At the new MSC the IMISI corresponding to the MSRN is looked up and the mobile is paged in its current location area.

SUPPLEMENTARY SERVICE MANAGEMENT:


GSM provides services like call waiting, call forwarding and automatic canceling. SSM is a point to point management service.

SHORT MESSAGE SERVICE:


SMS allows alphanumeric text messages to be sent to and from a mobile phone via a service center using SACCH. The size of the single short message is limited to 160 characters. The received short messages are normally stored in SIM. The two functions of SMS are Mobile originating short message. Mobile terminating short message.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

62

STRENTHS OF GSM:
Compatibility with ISDN using rate adaptation box. Use of SIM cards. Control of transmission power. Frequency hopping. Discontinuous transmission. Mobile assisted handover.

SERVICE PROVIDED BY THE GSM:


Basic service supported by GSM is telephony. The speech is digitized and then transmitted. There is also an emergency service. Data services offered by GSM areData transfer at 9.6KBPS, ISDN, PSPDN, CSPDN, group3 facsimile and short message service. In addition to voice calls, GSM networks also provide many other services, and we are familiar with most of them. Theres the ubiquitous SMS-the capability to send short text messages from one phone to another. There are the data services, which exploit GSMs digital nature. This allows one to access the Internet from a GSM phone, and many service providers are offering this service. You can send email from the handset and lots more. One limitation of GSM is that currently it has a maximum data transfer rate of only 9 kbps but new development like HSCSD (high-speed circuit switched data) and GPRS (general packet-switched radio) are pushing this up quite a bit.

APPLICATIONS: Access control devices:


Now access control devices can communicate with servers and security staff through SMS messaging. Complete log of transaction is available at the head-office Server instantly without any wiring involved and device can instantly alert security personnel on their mobile phone in case of any problem.

Transaction terminals:
EDC machines, POS terminals can use SMS messaging to confirm transactions from central servers. The main benefit is that central server can be anywhere in the
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 63

world. Today you need local servers in every city with multiple telephone lines. You save huge infrastructure costs as well as per transaction cost.

Supply Chain Management:


Today SCM require huge IT infrastructure with leased lines, networking devices, data centre, workstations and still you have large downtimes and high costs. You can do all this at a fraction of the cost with GSM M2M technology. A central server in your head office with GSM capability is the answer, you can receive instant transaction data from all your branch offices, warehouses and business associates with nil downtime and low cost.

INTRODUCTION TO GSM MODULE:

Designed for global market, SIM300 is a Tri-band GSM/GPRS engine that works on frequencies EGSM 900 MHz, DCS 1800 MHz and PCS 1900 MHz SIM300 features GPRS multi-slot class10/ class 8 (optional) and supports the GPRS coding schemes CS-1, CS-2, CS-3 and CS-4.With a tiny configuration of 40mm x 33mm x 2.85mm, SIM300 can fit almost all the spacere quirements in our applications, such as smart phone, PDA phone and other mobile devices. In this hardware SIM300 is only interfaced with RS232, Regulated power Supply 4.0V SIM Tray Antenna with LED indications. A: SIM300 module interface B: SIM card interface C: headset interface D: Download switch, turn on or off download function E: VBAT switch, switch the voltage source from the adaptor or external battery F: PWRKEY key, turn on or turn off SIM300 G: RESET key H: expand port, such as keypad port, main and debug serial port, display port I: MAIN serial port for downloading, AT command transmitting, data exchanging
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 64

J: DEBUG serial port K: hole for fixing the antenna L: source adapter interface M: light N: buzzer O: headphones interface P: hole for fixing the SIM300

AT COMMAND FORMATS:
A command line is a string of characters sent from a DTE to the modem (DCE) while the modem is in a command state. A command line has a prefix, a body, and a terminator. Each command line (with the exception of the A/ command) must begin with the character sequence AT and must be terminated by a carriage return. Commands entered in upper case or lower cases are accepted, but both the A and T must be of the same case, i.e., AT or at. The default terminator is the ENTER key <CR> character. Characters that precede the AT prefix are ignored. The command line interpretation begins upon receipt of the ENTER character. Characters The following section describes the AT-Command set. The commands can be tried out by connecting a GSM modem to one of the PCs COM ports. Type in the testcommand, adding CR + LF (Carriage return + Line feed = \r\n) before executing. Table 2-1 gives an overview of the implemented AT-Commands in this application. The use of the commands is described in the later sections.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

65

LIQUID CRYSTAL DISPLAY(LCD)


INTRODUCTION:
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments and other multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of displaying special & even custom characters (unlike in seven segments), animations and so on. A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data. The command register stores the command instructions given to the LCD. A command is an instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position, controlling display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD.

Features:
5 x 8 dots with cursor Built-in controller (KS 066 or Equivalent) + 5V power supply (Also available for + 3V) 1/16 duty cycle B/L to be driven by pin 1, pin 2 or pin 15, pin 16 or A.K (LED) N.V. optional for + 3V power supply

Pin Description:

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

66

Sequence of writing to the LCD:


The sequence for writing to the LCD is: To begin, E is low Select the register to write to by setting RS high (data) or low (control) Write the eight bits of data to the LCD Set the Enable signal high then low again. There are certain minimum timing requirements that must be followed when writing to the LCD, such as data setup times and Enable signal pulse width. These are in the order of tens and hundreds of nanoseconds. LCD displays have a busy flag that is set while it is executing a control command. This flag is not accessible because the R/W line has been tied low (write). This is not such a problem because all commands have a maximum execution time. We simply wait for this time to pass before accessing the LCD again, eliminating the need to check the flag and thereby saving on an I/O line. For example: The Clear Display command has an execution time of approx. 1.6mS. After sending this command to the LCD we simply wait 2mS before continuing on. This ensures that the command has finished. Characters to be displayed are written into the LCDs data RAM memory. The amount of RAM available depends on the type of LCD. Lets us consider a LCD having 80 bytes of RAM. An internal address counter holds the address of the next byte to write to.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

67

These 80 bytes are broken up into two blocks of 40 bytes. The address range of the first block is from 00h to 27h and the second block from 40h to 67h. After power up and initialization address 00h is the first character of the top line and address 40h is the first character of the bottom line. The address counter is set to address 00h and is automatically incremented after each byte is written. Only the first 16 bytes of each line are visible. If we now start writing data to the LCD it will be stored from address 00h on but only the first 16 characters will be visible. To display the rest of the characters we need to scroll the display. Scrolling simply mean changing the start address of each line. If we scroll left one position address 01h becomes the first character of the top line and address 41h the first character of the bottom line. Scrolling right does the opposite addresses 27h and 67h become the first characters of the top and bottom lines. Each block of addresses wrap around in a circular manner. The next address after 27h is 00h; the next address after 67h is 40h. If we scroll left 40 times we will bring address 00h back into view as the last character on the top line. The address ranges of each block are not continuous. There is a gap of 24 bytes between the ends of the first block (27h) and the start of the second (40h). So, if we keep writing characters to the display the first 40 will be stored in addresses 00h to 27h, the next 24 will be lost and the next 40 will be stored at addresses 40h to 67h. The internal address counter is directly accessible so we can set the next address to write to. This is how the characters are written to the second line of the LCD. For example, we can send 5 characters to the first line, set the address counter to 40h and then start writing characters to the second line

LCD Interface Diagram:

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

68

Above is the connection diagram of LCD in 4-bit mode, where we only need 6 pins to interface an LCD. D4-D7 is the data pins connection and Enable and Register select are for LCD control pins. We are not using Read/Write (RW) Pin of the LCD, as we are only writing on the LCD so we have made it grounded permanently. If you want to use it, then you may connect it on your controller but that will only increase another pin and does not make any big difference. Potentiometer RV1 is used to control the LCD contrast. The unwanted data pins of LCD i.e. D0-D3 are connected to ground.

LIGHT EMITTING DIODE (LED)


INTRODUCTION:
A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting. Appearing as practical electronic components early LEDs emitted low-intensity red light, but modern versions are available across the visible, ultraviolet, and infrared wavelengths, with very high brightness.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

69

When a light-emitting diode is forward-biased (switched on), electrons are able to recombine with electron holes within the device, releasing energy in the form of photons. This effect is called electroluminescence and the color of the light (corresponding to the energy of the photon) is determined by the energy gap of the semiconductor. A LED is often small in area (less than 1 mm2), and integrated optical components may be used to shape its radiation pattern. LEDs present many advantages over incandescent light sources including lower energy consumption, longer lifetime, improved physical robustness, smaller size, and faster switching. LEDs powerful enough for room lighting are relatively expensive and require more precise current and heat management than compact fluorescent lamp sources of comparable output. Light-emitting diodes are used in applications as diverse as aviation lighting, automotive lighting, advertising, general lighting, and traffic signals. LEDs have allowed new text, video displays, and sensors to be developed, while their high switching rates are also useful in advanced communications technology. Infrared LEDs are also used in the remote control units of many commercial products including televisions, DVD players and other domestic appliances.

FEATURES AND BENEFIT:


Efficiency: LEDs emit more light per watt than incandescent light bulbs. The efficiency of LED lighting fixtures is not affected by shape and size, unlike fluorescent light bulbs or tubes. Color: LEDs can emit light of an intended color without using any color filters as traditional lighting methods need. This is more efficient and can lower initial costs. Size: LEDs can be very small (smaller than 2 mm2) and are easily attached to printed circuit boards. On/Off time: LEDs light up very quickly. A typical red indicator LED will achieve full brightness in under a microsecond. LEDs used in communications devices can have even faster response times.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

70

Cycling: LEDs are ideal for uses subject to frequent on-off cycling, unlike fluorescent lamps that fail faster when cycled often, or HID lamps that requires a long time before restarting. Dimming: LEDs can very easily be dimmed either by pulse-width modulation or lowering the forward current. Cool light: In contrast to most light sources, LEDs radiate very little heat in the form of IR that can cause damage to sensitive objects or fabrics. Wasted energy is dispersed as heat through the base of the LED. Slow failure: LEDs mostly fail by dimming over time, rather than the abrupt failure of incandescent bulbs. Lifetime: LEDs can have a relatively long useful life. One report estimates 35,000 to 50,000 hours of useful life, though time to complete failure may be longer. Fluorescent tubes typically are rated at about 10,000 to 15,000 hours, depending partly on the conditions of use, and incandescent light bulbs at 1,000 to 2,000 hours. Several DOE demonstrations have shown that reduced maintenance costs from this extended lifetime, rather than energy savings, is the primary factor in determining the payback period for an LED product. Shock resistance: LEDs, being solid-state components, are difficult to damage with external shock, unlike fluorescent and incandescent bulbs, which are fragile. Focus: The solid package of the LED can be designed to focus its light. Incandescent and fluorescent sources often require an external reflector to collect light and direct it in a usable manner. For larger LED packages total internal reflection (TIR) lenses are often used to the same effect. However, when large quantities of light is needed many light sources are usually deployed, which are difficult to focus or collimate towards the same target.

APPLICATIONS:
In general, all the LED products can be divided into two major parts, the public lighting and indoor lighting. LED uses fall into four major categories:

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

71

Visual signals where light goes more or less directly from the source to the human eye, to convey a message or meaning. Illumination where light is reflected from objects to give visual response of these objects. Measuring and interacting with processes involving no human vision. Narrow band light sensors where LEDs operate in a reverse-bias mode and respond to incident light, instead of emitting light

LED Specifications:

The terminal identification of the LED can be done by the three methods: 1. Check the biasing through multi-meter. In forward bias the Led will glow that is positive connected to the positive (anode) and negative connected o the negative that is (cathode) The big terminal is anode (+) and the small leg is cathode (-).

2.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

72

3.

Third way is to check the upper surface of the LED the flat surface is always cathode and the spherical surface is cylindrical.

PCB DESIGNING & FABRICATION


Introduction: What is a PCB BOARD?
A printed circuit board, or PCB, is used to mechanically support and electrically connect electronic components using conductive pathways, tracks or signal traces etched from copper sheets laminated onto a non-conductive substrate. It is
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 73

also referred to as printed wiring board (PWB) or etched wiring board. Printed circuit boards are used in virtually all but the simplest commercially produced electronic devices. A PCB populated with electronic components is called a printed circuit assembly (PCA), printed circuit board assembly or PCB Assembly (PCBA). In informal use the term "PCB" is used both for bare and assembled boards, the context clarifying the meaning. Alternatives to PCBs include wire wrap and point-to-point construction. PCBs must initially be designed and laid out, but become cheaper, faster to make, and potentially more reliable for high-volume production since production and soldering of PCBs can be automated. Much of the electronics industry's PCB design, assembly, and quality control needs are set by standards published by the IPC organization. PCBs are inexpensive, and can be highly reliable. They require much more layout effort and higher initial cost than either wire-wrapped or point-to-point constructed circuits, but are much cheaper and faster for high-volume production. Much of the electronics industry's PCB design, assembly, and quality control needs are set by standards that are published by the IPC organization. Printed Circuit Boards are primarily an insulating material used as base, into which conductive strips are printed. The base material is generally fiberglass, and the conductive connections are e generally copper and are made through an etching process. The main PCB board is called the motherboard; the smaller attachment PCB boards are called daughter boards or daughter cards

What is PCB Board Design?


PCB board design defines the electrical pathways between components. It is derived from a schematic representation of the circuit. When it is derived, or imported from a schematic design, it translates the schematic symbols and libraries into physical components and connections

Units:
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 74

PCB Boards are primarily designed in imperial units (inches) as opposed to metric units (mm). A thousands of an inch is called mil (not to be confused with mm), where: 100 mils = 0.1 inch = 2.54 mm. The reason for using imperial units in a PCB document is because most of the components were manufactured according to imperial pin spacing. The practice continues even today.

Flow chart for steps of PCB design:


PCB Designing includes the following steps:PROCESSING

CLEANSING

PRINTING

ETCHING

DRILLING

SOLDERING MASKING

Processing:
The layout of a PCB has to incorporate all the information on the board before one can go on to the artwork preparation. This means that a concept that clearly defines all the details of the circuit and partly also of the final equipment, is a prerequisite before the actual layout can start. The detail circuit diagram is very important for the layout designer and he must also be familiar with the design concept and with the philosophy behind the equipment. The General Considerations areINSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 75

Layout scale: Depending on the accuracy required, artwork should be produced at a 1:1 or 2:1 or even 4:1 scale. The layout is best prepared on the same scale as the artwork. This prevents all the problems which might be caused by redrawing of layout to the artwork scale. Grid system or Graph Paper: It is commonly accepted practice to use these for designing. Board types: There are two side of a PCB board Component side & Solder side. Depending on these board are classified asSingle-sided Boards: These are used where costs have to be kept at a minimum & a particular Circuit can be accommodated on such board. To jump over conductor tracks, components have to be utilized. If this is not feasible, jumper wires are used. (Jumper wires should be less otherwise double-sided PCB should be considered. Double-sided Boards: These are made with or without plated through holes. Plated through holes are fairly expensive.

Cleaning:
The cleaning of the copper surface prior to resist application is an essential step for any type of PCB process using etches or plating resist. After scrubbing with the abrasive, a water rinse will remove most of the remaining slurry.

Scrubbing Water Rinse Wet Brushing Acid dip Final Rinse Drying

Pumice/ Acid Slurry Tap Water Tap Water Hydrochloric AcidHCl De-ionized Water Oven or Blowing of air.

Etching:
It is of utmost importance to choose a suitable Etchant Systems. There are many factors to be considered:INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 76

Etching speed Copper solving capacity Etchant price Pollution character

Operation characteristics of different etchants:


Factor Etchant FeCl3 CuCl2 Chromic acid Alkaline ammonia High High High High Corrosiveness Neutralization disposition problem Medium Low High Medium Low Medium High Medium Toxicity Required ventilation Low Medium High High Operation cost Medium Low High High

Table: Characteristics of different etchants: We have uses FeCl3 (Conc. 120 g/litre 0.1 M) for etching. Reactions Involved:FeCl3 + 3H 2O FeCl3 + Cu FeCl3 + CuCl Fe(OH)3 + 3HCl (Free acid attack to copper) FeCl2 FeCl2 + CuCl + CuCl2
77

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

CuCl2 + Cu

2CuCl

Drilling:
Drilling is a cutting process that uses a drill bit to cut or enlarge a hole of circular cross-section in solid materials. The drill bit is a rotary cutting tool, often multipoint. The bit is pressed against the work-piece and rotated at rates from hundreds to thousands of revolutions per minute. This forces the cutting edge against the work-piece, cutting off chips from what will become the hole being drilled.

Exceptionally, specially-shaped bits can cut holes of non-circular crosssection; a square cross-section is possible. The importance of hole drilling into PCBs has further gone with electronic component miniaturization and its need for smaller holes diameters (diameters less than half the board thickness) and higher package density. The following hole diameter tolerances have been generally accepted wherever no other specifications are mentioned. Hole Diameter Hole Diameter Tungsten Carbide. (D) <= 1mm (D) > 3 mm + / - 0.05 mm + / 0.1 mm

Drill bits are made up of high-speed steel (HSS), Glass epoxy material,

Component placement:
Component placement is an extremely important function of the designer. Components should be placed according to their connections to other components, thermal considerations, mechanical requirements, as well as signal integrity and rout- ability.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

78

Components which have connections to each other should be placed in the same vicinity. For example, a processor should be placed very close to the RAM and Flash ICs on which it relies. Components should also be placed on a grid, usually a 100 mil grid, in order to provide for a symmetric flow of routing where tracks and components are lined up

Soldering:
Soldering is a process in which two or more metal items are joined together by melting and then flow a filler metal (solder) into the joint, the filler metal having a lower melting point than the work-piece. Soldering differs from welding in that soldering does not involve melting the work pieces. In brazing, the filler metal melts at a higher temperature, but the work piece metal does not melt. Formerly nearly all solders contained lead, but environmental concerns have increasingly dictated use of lead-free alloys for electronics and plumbing purposes. Flux should be removed after Soldering. It is done through washing by 0.51 % HCl followed by Neutralization in dilute alkali to remove corrosive flux. On-corrosive is removed by Iso-Propanal.

Electronic soldering connects electrical wiring and electronic components to printed circuit boards (PCBs). Soldering filler materials are available in many different alloys for differing applications. In electronics assembly, the eutectic alloy of 63% tin and 37% lead (or 60/40, which is almost identical in melting point) has been the alloy of choice.

Masking:
It is done for the protection of conductor track from Oxidation. Solder mask or solder resist is a lacquer-like layer of polymer that provides a permanent protective coating
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 79

for the copper traces of a printed circuit board (PCB) and prevents solder from bridging between conductors, thereby preventing short circuits. Solder mask was created primarily to facilitate wave soldering used in mass assembly. Solder mask is traditionally green but is now available in many colors.

Solder mask comes in different media depending upon the demands of the application. The lowest-cost solder mask is epoxy liquid that is silkscreened through the pattern onto the PCB. Other types are the liquid photo-image able solder mask (LPSM) inks and dry film photo-image able solder mask (DFSM). LPSM can be silkscreened or sprayed on the PCB, exposed to the pattern and developed to provide openings in the pattern for parts to be soldered to the copper pads. DFSM is vacuum- laminated on the PCB then exposed and developed. All three processes go through a thermal cure of some type after the pattern is defined.

Designing of the PCB layout:


A PCB layout is required to place components on the PCB so that the component area can be minimized and the components can be placed in an efficient manner. The components can be placed in two ways, either manually or by software. The manual procedure is quiet cumbersome and is very inefficient. The other method is by the use of computer software. This method is advantageous as it saves time and valuable copper area. There are various softwares available for this purpose like Express PCB Pad2pad Protel PCB PCB design e.t.c.

Many of them are loaded with auto routing and auto placement facility. The software that we have used here is EXPRESS PCB. This software has a good interface, easy editing options and a wide range of components.

RESISTANCE
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 80

Introduction:
There is always some resistance in every circuit. A circuit is always made up of some wire, so there will be some resistance there. Even the battery has parts that offer resistance to the flow of electrons. The only circuits that come near to zero resistance are superconductors. This resistance that is from the parts of the circuit itself (especially the battery) is called internal resistance. This internal resistance is usually drawn into a circuit diagram ( schematic) as shown in Figure 1. Notice the squiggly line just before the positive terminal of the battery? Thats to show the internal resistance of the circuit. That symbol, drawn any other place in the circuit, represents an actual resistor placed in the circuit. A resistor is a device found in circuits that has a certain amount of resistance. Why would you ever want to add resistance to a circuit by using a resistor? The most common reason is that we need to be able to adjust the current flowing through a particular part of the circuit. If voltage is constant, then we can change the resistor to change the current. I=V R If V is constant and we change R, I will be different.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

81

Actual Resistors:
The Example 1: What is the resistance of this resistor? Notice that the colors on this resistor are (in order) Red, Green, Orange, and Silver. 1. The first line is the first digit Red = 2

2. The second line is the second digit Green = 5


3. The third line is the multiplier Orange = 10 3 4. The last line (if any) is the tolerance Silver = } 10% So the final answer would be 25 x 103 10% Yes, I know it's not proper scientific notation this way. You can also write it as 25000 (notice there are three zeros), or even 2.5 x 10 2 .

Variable Resistors:
Adjustable resistors:
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 82

A resistor may have one or more fixed tapping points so that the resistance can be changed by moving the connecting wires to different terminals. Some wire wound power resistors have a tapping point that can slide along the resistance element, allowing a larger or smaller part of the resistance to be used. Where continuous adjustment of the resistance value during operation of equipment is required, the sliding resistance tap can be connected to a knob accessible to an operator. Such a device is called a rheostat and has two terminals. Potentiometers: A common element in electronic devices is a three-terminal resistor with a continuously adjustable tapping point controlled by rotation of a shaft or knob. These variable resistors are known as potentiometers when all three terminals are present, since they act as a continuously adjustable voltage divider. A common example is a volume control for a radio receiver.

Methods of Making Resistors:


There are two main methods that are used to make resistors. The most common is to just have a bunch of wire wound up inside that little cylinder. Known as wirewound resistors, they depend on the fact that a certain length of a certain piece of wire will have a certain resistance. These resistors tend to be very reliable (with low tolerances), but cost more because of the price of metals used in them and the machinery needed to carefully cut and wind the wire. The other type of resistor is made of a piece of Carbon Known as a composition resistor, they depend on the size of the piece of carbon, and the fact that carbon is a metalloid (has some metallike properties) that does conduct electricity. Because they are made from cheap Carbon, composition resistors can cost much less than similar wire-wound resistors. The drawback is that the carbon can be cracked while making them, or become cracked in use. They have higher tolerances because of the uncertainty in cutting the carbon. In some cases it is necessary to have a circuit with resistors that you can adjust. These resistors are known as potentiometers or variable resistors. Often they are just a modified version of a wire-wound resistor, although newer versions use advanced electronics instead. Youve used one if youve ever used a dimmer switch for lights in a room, or played with an electric race car set. Most variable resistors are designed so that by turning a dial or sliding a switch, you change the amount of conducting material the current has to go through. The more conducting material the current has to go through, the higher the resistance less material and the resistance is less.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

83

Watt rating of the resistor and its use:


The watt rating for any resistors is very important factor. It defines that how much current can flow across the resistor at particular voltage without damaging the resistor. According to the watt rating the thickness of the resistor varies. Now we have to take in consideration how much current is going to flow across the resistor and depending upon the rating we can calculate the power or wattage rating of the resistor. Because of this reason only the resistors having same value come in different wattages like 100ohm, 1/4watt (quarter watt), 100ohm, 1/2watt (half watt), 100ohm, 1watt and many more.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

84

VOLTAGE REGULATORS
INTRODUCTION :

A voltage regulator is designed to automatically maintain a constant voltage level. A voltage regulator may be a simple "feed-forward" design or may include negative feedback control loops. It may use an electromechanical mechanism, or electronic components. Depending on the design, it may be used to regulate one or more AC or DC voltages. Electronic voltage regulators are found in devices such as computer power supplies where they stabilize the DC voltages used by the processor and other elements. In automobile alternators and central power station generator plants, voltage regulators control the output of the plant. In an electric power distribution system, voltage regulators may be installed at a substation or along distribution lines so that all customers receive steady voltage independent of how much power is drawn from the line.

Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or variable output voltages. The maximum current they can pass also rates them. Negative voltage regulators are available, mainly for use in dual supplies. Most regulators include some automatic protection from excessive current (over load protection) and over-heating (thermal protection). Many of fixed voltage regulator ICs has 3 leads. They include a hole for attaching a heat sink if necessary.

3-Terminal 1a Positive Voltage Regulators:


Output Current up to 1A Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V Thermal Overload Protection Short Circuit Protection
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 85

Output Transistor Safe Operating Area Protection

Description:
The KA78XX/KA78XXA series of three-terminal positive regulator are available in the TO-220/D-PAK package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltages and currents. The 78xx (sometimes LM78xx) is a family of self-contained fixed linear voltage regulator integrated circuits. The 78xx family is commonly used in electronic circuits requiring a regulated power supply due to their ease-of-use and low cost. For ICs within the family, the xx is replaced with two digits, indicating the output voltage (for example, the 7805 has a 5 volt output, while the 7812 produces 12 volts). The 78xx line is positive voltage regulators: they produce a voltage that is positive relative to a common ground. There is a related line of 79xx devices which are complementary negative voltage regulators. 78xx and 79xx ICs can be used in combination to provide positive and negative supply voltages in the same circuit.

PIN Architecture:

7805, It is a voltage regulator the 78 indicates a positive regulator the 05 indicates the voltage output. At 1 amp if adequate heats sink is provided. Never fear it has thermal protection to shut it down only if the internal heating exceeds the safety zone. It will not destroy itself by removing or reducing the load it will come- back alive after cooling.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

86

NOTE: Every voltage regulator has minimum voltage threshold and Maximum voltage threshold. The minimum threshold input voltage is the should be greater than the output voltage of the regulator like for 7805 it should be greater than +5V. Similarly, the maximum threshold input is also defined for the regulator till which the voltages can be regulated to give the desired output else due to excessive heat the regulator can destroy since beside the regulated voltage the remaining voltage goes as heat loss. So the regulators have heat sink also. Always refer the datasheet for maximum thresholds. Try to put the input voltage minimum as per the requirement like if you require 5 V then put the source of 6V or 9V so that minimum heat is dissipated.

Internal Block Diagram:

Features in Detail:
Output current in Excess of 1.0 A No external component required Internal thermal overload protection Internal short circuit current limiting Output transistor safe-area compensation Output voltage offered in 2% and 4% tolerance Available I n surface mount D2PAK and standard 3-lead transistor packages
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 87

Previous commercial temperature range has been extended

HARDWARE WORKING:
Through this project we are sensing tilt condition, so we will have to install this project on flat surface. Firstly we give the power to GSM and GPS module, At the time of supply power to the GPS and GSM module, we should consider that 5v input power supply is provide to GSM modem and 12v input power supply provide to GPS module, now we will have to wait until GPS system track the satellite, as soon as after tracking LCD display the GPS data (longitude, latitude, speed and angel). Rx Tx pin connected with GSM modem during interfacing and GPS module connected with three pin connector and Rx Tx pin. Common connect ground of GSM modem will connected with GPS module. Now we press the Reset button on GSM and GPS module until LCD show the configuring condition. Latitude, longitude, speed and X, Y, Z co-ordinate show on the LCD, after the configuring mode. Rx Tx and Ground pin are connected with three pin wire in GPS module. In GPS module Bridge Rectifier give the pulsative response in the form of output when receive the input from transformer, after that Capacitor of 1000f filtered the output after removing impulse. 7805 Voltage regulator providing the 5v to whole GPS module and check whether all the components are the working on 5v, and convert the high DC voltage to regulated 5v. LED which is mounted in the back side of voltage regulator is also showing that the voltage which comes from voltage regulator is 5v. A Resistor of 1k in the side of voltage regulator which enable the proper voltage across 7805 voltage regulator. Two Micro-controllers (ATMEGA- 328) are used for input and output processing, Crystal oscillator 16 MHz, which provide the clock frequency to both controller on GPS module. Both micro-controllers are inter-connected with each other for communication. Micro-controller 1 st controls the GPS module and Accelerometer and the 2nd Micro-controller controlling the GSM modem. Data retrieve in GPS module through accelerometer and communicate with another c. Now after retrieving the data is sending to GSM modem. A LED used in the mid of Micro-controller (1st & 2nd ) glow when data coming from the GPS module. Its mean there is connection between GPS module and satellite. For proper contrasts of LCD a preset button is used. A black& white LCD of 162 is interface with 6 pins of Controller. Tilt accelerometer sense the tilt condition on basis of the sensing tilt condition, it provide the different analog voltage in the form of X, Y, Z co ordinate
INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221) 88

which we can read easily. Pin no. 1 of 7805 voltage regulator is equal to input voltage (12~10 V) and pin no. 3 is equal to output voltage i.e. 5v. A voltage of 5v on pin no. 7& 20 in Micro-controller. And voltage of 5v on pin no. 2 & 15 of LCD display. A tilt switch installed from front and connected with tilt accelerometer as soon as tilt switch is pressed, accelerometer will send command to controller, controller send this command to GSM modem. At last GSM modem send command to authorized user that whether the vehicle has caused accident or not.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

89

CONCLUSION
This version of our project will send a reply when we send a SMS and also sends the position of the vehicle in terms of latitude and longitude when there is any accident. It doesnt tell the exact nature of the accident, whether it is severe or just a mild one. With the help of accelerometer sensor, we can tell the exact position of the vehicle. We can predict whether the vehicle is in normal position or upside down. This project can be enhanced in future by modifying in the program to find out the actual position of the vehicle and also in accident prevention. This can also be enhanced by automatically locking all the brakes in case of accident. In many accidents, it becomes severe as the drivers lose control and cant stop the vehicle. During the accident, the accelerometer sensor will triggered due to vibrations which is received and processed by the Spartan processor. The processor should be connected to devices which can lock the brakes when triggered. By this enhancement, we can stop the vehicle and can reduce the impact of the accident. This can be used to prevent vehicle theft. In case of any theft, the owner can track the location of the vehicle. In public transport system, the implementation of this equipment will ease the people. When public transport systems like bus, trains these are installed with this equipment, People can know the location of the vehicle and arrive in the stop in time. Modifying the code, we can make it to send the position of the vehicle periodically to a subscribed mobile number so that companies can keep an eye on their vehicles. Thus we can make use of the available technology to the benefit of the people by saving the lives of the people and helping the owners of the vehicle to keep track of their vehicles.

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

90

REFERENCES
1. Adnan I. Yaqzan, Issam W. Damaj, and Rached N. Zantout (July 24, 2008), GPS Based Vehicle Tracking System-On-Chip, Proceedings of the world Congress on Engineering Vol I WCE 2. Theodore S. Rappaport (2008), Wireless Communication, Prentice Hall PTR . 3. Vijay Kumar Garg, Joseph E. Wilkes (October 1998), Principles and Applications of GSM. 4. www.wikipedia.com 5. www.google.com 6. www.electronicsforyou.com

INSTITUTE OF ENGINEERING & TECHNOLOGY, SITAPUR (221)

91

Potrebbero piacerti anche