P. 1


|Views: 121|Likes:
Published by Umesh Patel

More info:

Published by: Umesh Patel on Nov 06, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less






  • Embedded Systems:
  • The Evolution of Mobile Telephone Systems
  • Description:
  • Pin description
  • Port 2
  • Port 3
  • XTAL1
  • XTAL2
  • Definition of GSM:
  • History
  • GSM Frequencies
  • StandardGeneration Frequency band Throughput
  • Second Generation of Mobile Networks (2G)
  • TDMA in brief:
  • Advantages of TDMA:
  • Disadvantages of TDMA:
  • Introduction to Modem:
  • GSM Modem:
  • Fig: Block diagram for the project design
  • Transformer:
  • Rectifier:
  • Voltage regulator:
  • RS232 CABLE:
  • 3.5.1 LED and LDR arrangement
  • 3.5.2 Precision Centigrade Temperature Sensor
  • Features
  • 4.3.1 C file
  • 4.3.2 UART
  • Software Tools Required
  • 5.2 Conclusion
  • Working procedure:


1 Aim
The main aim of this project is to provide security to the vehicles. The system automatically locks the vehicle as soon as it receives a predefined message from the user.

1.2 Features
• • • • • • • • The controlling unit contains the microcontroller and the GSM modem interfaced to it. The controlling unit will be fixed to the vehicle. The microcontroller continuously checks whether it has received any message from the modem. The modem provides the communication interface. The GSM modem is a wireless modem that works with a GSM wireless network Whenever anyone tries to unlock or take away the vehicle, immediately a message will be sent to the user mobile. The user, after checking the message, can respond immediately to save his vehicle. The microcontroller retrieves this message from the modem by issuing certain AT and T commands to the modem. Thus, after receiving the message from the modem, the microcontroller automatically locks the vehicle. This will be done perfectly without the involvement of any human.

1.3 Applications
• • •
• •

using GPS tracking system we can detect the vehicle any where in the global automatic reduction of vehicle speed where an obstacle on the way to present loss in an accident diction of aichohol for a driver and limit the speed of the vechile not more than 40km/hr
The GSM Modem supports popular "AT" command set so that users can develop applications quickly Uses GSM technology for following applications:

1. Access control devices: 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 2. Transaction terminals: EDC (Electronic Data Capturing) machines can use SMS messaging to confirm transactions from central servers. The main benefit is that central server can be anywhere in the world 3. Supply Chain Management: With a central server in your head office with GSM capability, you can receive instant transaction data from all your branch offices, warehouses and business associates with nil downtime and low cost. Limitations • • • • The control kit should be placed inside the vehicle far away from the temperature Care should be taken such that all components in the control kit must be in condition Must and should specify the predefined messages in the source program The gsm frequencys must be considered

literature survey THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEMS -Muhammad ali mazidi -janice gillispie mazidi THE 8051 MICROCONTROLLER ARCHITECTURE,PROGRAMING AND APPLICATIONS -Kenneth j.Ayala -Ramesh s.gaonkar ELECTRONIC COMPONENTS INTRDUCTION TO GSM -D.V.Prasad -Lawrence Harte

1.4 Organization of the Thesis
In view of the proposed thesis work explanation of theoretical aspects and algorithms used in this work are presented as per the sequence described below. Chapter 1 describes a brief review of introduction of the project.

Chapter 2 discusses the theoretical chapters of project. Chapter 3 describes the hardware design considerations. Chapter 4 explains about software implementations. Chapter 5 describes about application implementation. Chapter 6 gives results and conclusions

Chapter 2 Theoretical chapter
Embedded Systems: An embedded system can be defined as a computing device that does a specific focused job. Appliances such as the air-conditioner, VCD player, DVD player, printer, fax machine, mobile phone etc. are examples of embedded systems. Each of these appliances will have a processor and special hardware to meet the specific requirement of the application along with the embedded software that is executed by the processor for meeting that specific requirement. The embedded software is also called “firm ware”. The desktop/laptop computer is a general purpose computer. You can use it for a variety of applications such as playing games, word processing, accounting, software development and so on. In contrast, the software in the embedded systems is always fixed listed below: · Embedded systems do a very specific task, they cannot be programmed to do different things. Embedded systems have very limited resources, particularly the memory. Generally, they do not have secondary storage devices such as the CDROM or the floppy disk. Embedded systems have to work against some deadlines. A specific job has to be completed within a specific time. In some embedded systems, called real-time systems, the deadlines are stringent. Missing a deadline may cause a catastrophe-loss of life or damage to property. Embedded systems are constrained for power. As many embedded systems operate through a battery, the power consumption has to be very low. · Some embedded systems have to operate in extreme environmental conditions such as very high temperatures and humidity.

Following are the advantages of Embedded Systems: 1. They are designed to do a specific task and have real time performance constraints which must be met. 2. They allow the system hardware to be simplified so costs are reduced. 3. They are usually in the form of small computerized parts in larger devices which serve a general purpose. 4. The program instructions for embedded systems run with limited computer hardware resources, little memory and small or even non-existent keyboard or screen. The Evolution of Mobile Telephone Systems Cellular is one of the fastest growing and most demanding telecommunications applications. Today, it represents a continuously increasing percentage of all new telephone subscriptions around the world. Currently there are more than 45 million cellular subscribers worldwide, and nearly 50 percent of those subscribers are located in the United States. The concept of cellular service is the use of low power transmitters where frequencies can be reused within a geographic area. The idea of cell based mobile radio service was formulated in the United States at Bell Labs in the early 1970s. Cellular systems began in the United States with the release of the advanced mobile phone service (AMPS) system in 1983. The AMPS standard was adopted by Asia, Latin America and Oceanic countries, creating the largest potential market in the world for cellular. In the early 1980s, most mobile telephone systems were analog rather than digital, like today's newer systems. One challenge facing analog systems was the inability to handle the growing capacity needs in a cost efficient manner. As a result, digital technology was welcomed. The advantages of digital systems over analog systems include ease of signaling, lower levels of interference, integration of transmission and switching and increased ability to

which has been written in the C language. The implementation of the project design can be divided in two parts. we have used the Orcad design software for PCB circuit design. the Keil µv3 software development tool to write and compile the source code. − Hardware implementation − Firmware implementation Hardware implementation deals in drawing the schematic on the plane paper according to the application. The Proload programmer has been used to write this compile code into the microcontroller. The firmware implementation is explained in the next chapter. In the present work. carrying out the PCB layout of the schematic tested on breadboard. The table below shows the worldwide development of mobile telephone systems. The firmware part deals in programming the microcontroller so that it can control the operation of the IC’s used in the implementation.meet capacity demands. . testing the schematic design over the breadboard using the various IC’s to find if the design meets the objective. finally preparing the board and testing the designed hardware.

RAM and number of I/O ports in microcontrollers makes them ideal for many applications in which cost and space are critical. ROM. The block diagram discusses about the required components of the design and working condition is explained using circuit diagram and system wiring diagram. Microcontrollers: Microprocessors and microcontrollers are widely used in embedded systems products. A microcontroller has a CPU in addition to a fixed amount of RAM. I/O ports and a timer embedded all on a single chip. It was popular in the 1980s and early 1990s. Features of AT89S52: . Data larger than 8 bits has to be broken into 8-bit pieces to be processed by the CPU. single chip microcontroller (µC) which was developed by Intel in 1980 for use in embedded systems. The Intel 8051 is Harvard architecture. Flash and NVRAM. Infineon Technologies and Maxim Integrated Products. Microcontroller is a programmable device.The project design and principle are explained in this chapter using the block diagram and circuit diagram. but today it has largely been superseded by a vast range of enhanced devices with 8051-compatible processor cores that are manufactured by more than 20 independent manufacturers including Atmel. meaning that the CPU can work on only 8 bits of data at a time. The fixed amount of on-chip ROM. 8051 is an 8-bit processor. 8051 is available in different memory types such as UV-EPROM.

Dual data pointer. the Atmel AT89s52 is a powerful microcomputer. 256 x 8-bit Internal RAM. Full Duplex UART Serial Channel. Low-power Idle and Power-down Modes. Power-off flag.0V to 5. The . 4. The on chip flash allows the program memory to be reprogrammed in system or by a conventional non volatile memory programmer. 32 Programmable I/O Lines. Description: The AT89s52 is a low-voltage. high-performance CMOS 8-bit microcomputer with 8K bytes of Flash programmable memory.8K Bytes of Re-programmable Flash Memory. which provides a highly flexible and costeffective solution to many embedded control applications. By combining a versatile 8-bit CPU with Flash on a monolithic chip. Watchdog timer. Fast programming time. RAM is 256 bytes. In addition. Eight Interrupt Sources. The device is manufactured using Atmel’s high density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set. Flexible ISP programming (byte and page mode). Fully Static Operation: 0 Hz to 33 MHz’s Three-level Program Memory Lock. Three 16-bit Timer/Counters. the AT89s52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. Interrupt recovery from power down mode.5V Operating Range.

The power-down mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset. The voltage source is +5V. Pin description Vcc Pin 40 provides supply voltage to the chip. Port 0 .Idle Mode stops the CPU while allowing the RAM. timer/counters. serial port and interrupt system to continue the functioning. GND Pin 20 is the ground.

As inputs. each pin can sink eight TTL inputs. Port 1 also receives the low-order address bytes during Flash programming and verification. as shown in the following table.1/T2EX). The Port 1 output buffers can sink/source four TTL inputs. As . P0 has internal pull-ups. When 1s are written to port 0 pins. respectively. they are pulled high by the internal pull-ups and can be used as inputs. In addition. In this mode. When 1s are written to Port 1 pins. As an output port.1 can be configured to be the timer/counter 2 external count input (P1. Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups.0 and P1.Port 0 is an 8-bit open drain bidirectional I/O port. Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. P1. Port 0 can also be configured to be the multiplexed low-order address/data bus during accesses to external program and data memory. the pins can be used as high impedance inputs. they are pulled high by the internal pull-ups and can be used as inputs. The Port 2 output buffers can sink/source four TTL inputs. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during Program verification. External pull-ups are required during program verification Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. When 1s are written to Port 2 pins.0/T2) and the timer/counter 2 trigger input (P1.

Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this application. The DISRTO bit in SFR AUXR (address 8EH) can . as shown in the following table. This pin drives high for 98 oscillator periods after the Watchdog times out. The port also receives the high-order address bits and some control signals during Flash programming and verification. Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI). Port 2 uses strong internal pull-ups when emitting 1s.inputs. RST Reset input A high on this pin for two machine cycles while the oscillator is running resets the device. When 1s are written to Port 3 pins. As inputs. Port 2 emits the contents of the P2 Special Function Register. The Port 3 output buffers can sink/source four TTL inputs. they are pulled high by the internal pull-ups and can be used as inputs. Port 3 receives some control signals for Flash programming and verification. Port 3 also serves the functions of various special features of the AT89S52. Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups.

PSEN Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S52 is executing code from external program memory. EA should be strapped to VCC for internal program executions. ALE operation can be disabled by setting bit 0 of SFR location 8EH. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming. This pin is also the program pulse input (PROG) during Flash programming. that if lock bit 1 is programmed. ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. EA will be internally latched on reset. except that two PSEN activations are skipped during each access to external data memory. ALE/PROG Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. ALE is active only during a MOVX or MOVC instruction. With the bit set.be used to disable this feature. that one ALE pulse is skipped during each access to external data memory. the RESET HIGH out feature is enabled. In normal operation. In the default state of bit DISRTO. PSEN is activated twice each machine cycle. however. . Note. Note. EA/VPP External Access Enable EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. Otherwise. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. If desired. however.

respectively. since the input to the internal clocking circuitry is through a divide-by-two flip-flop. They are identified as Timer 0. Timer 1 and Timer 2 and can be independently .XTAL2 Output from the inverting oscillator amplifier. There are no requirements on the duty cycle of the external clock signal. but minimum and maximum voltage high and low time specifications must be observed. XTAL1 and XTAL2 are the input and output. of an inverting amplifier that can be configured for use as an on-chip oscillator. 16-bit timers/ counters. XTAL2 should be left unconnected while XTAL1 is driven. UART The Atmel 8051 Microcontrollers implement three general purpose. To drive the device from an external clock source. Either a quartz crystal or ceramic resonator may be used.

Timer 0 and Timer 1 have four operating modes from which to select which are selected by bit-pairs (M1. Timer registers can be accessed to obtain the current count or to enter preset values. it should be held for at least one full peripheral cycle. the timer/counter runs for a programmed length of time and then issues an interrupt request. the timer/counter counts negative transitions on an external pin. by selecting the divided-down peripheral clock or external pin Tx as the source for the counted signal.configured to operate in a variety of modes as a timer or as an event counter. For timer operation (C/Tx# = 0). otherwise the behavior of the timer/counter is unpredictable. For counter operation (C/Tx# = 1). 1) connected in cascade to form a 16-bit timer. When operating as a counter. i. A basic operation consists of timer registers THx and TLx (x= 0. when THx overflows it sets the timer overflow flag (TFx) in TCON register. M0) in TMOD. the counter issues an interrupt request. TRx bit must be cleared when changing the mode of operation. FOSC / 12 mode. The four operating modes are described below. has three modes of operation: ‘capture’. In addition to the “timer” or “counter” selection. The C/T control bit (in TCON register) selects timer operation or counter operation. the timer register counts the negative transitions on the Tx external input pin. The timer register is incremented once every peripheral cycle (6 peripheral clock periods).e. Timer 2. Setting the TRx does not clear the THx and TLx timer registers. When operating as a timer. After a preset number of counts. Mode 3 is different. the timer register counts the divided-down peripheral clock. 1and 2 are the same for both timer/counters. in standard mode or FOSC / 6 in X2 mode. ‘auto-reload’ and ‘baud rate generator’. Setting the run control bit (TRx) in TCON register turns the timer on by allowing the selected input to increment TLx. When TLx overflows it increments THx. Modes 0. The external input is . but to ensure that a given level is sampled at least once before it changes. There are no restrictions on the duty cycle of the external input signal. They can be read at any time but TRx bit must be cleared to preset their values. The various operating modes of each timer/counter are described in the following sections. otherwise the behavior of the timer/counter is unpredictable. The timer clock rate is FPER / 6.

together with the transmission of SMS (Short Message Service). a memorandum of understanding was signed by 13 countries to develop a common cellular telephone system across Europe. .800 MHz frequency band. GSM. GSM uses a variation of Time Division Multiple Access (TDMA) and is the most widely used of the three digital wireless telephone technologies (TDMA. GSM digitizes and compresses data. and CDMA). digital cellular technology used for transmitting mobile voice and data services. It operates at either the 900 MHz or 1. then sends it down a channel with two other streams of user data.sampled every peripheral cycle.e. In 1987. each in its own time slot. i. the counter is incremented.6 kbit/s. Since it takes 2 cycles (12 peripheral clock periods) to recognize a negative transition. GSM (Global System for Mobile communication) is a digital mobile telephone system that is widely used in Europe and other parts of the world. When the sample is high in one cycle and low in the next one. Finally the system created by SINTEF lead by Torleiv Maseng was selected. GSM Technology: Definition of GSM: GSM (Global System for Mobile communications) is an open. the European Conference of Postal and Telecommunications Administrations (CEPT) created the Group Special Mobile (GSM) to develop a standard for a mobile telephone system that could be used across Europe. It supports voice calls and data transfer speeds of up to 9. the maximum count rate is FPER / 12. FOSC / 24 in standard mode or FOSC / 12 in X2 History In 1982.

The first GSM network was launched in 1991 by Radiolinja in Finland with joint technical infrastructure maintenance from Ericsson. E-GSM. providing 124 RF channels (channel numbers 1 to 124) spaced at 200 kHz. . and the frame duration is 4. GSM Frequencies GSM networks operate in a number of different frequency ranges (separated into GSM frequency ranges for 2G and UMTS frequency bands for 3G). uses 880–915 MHz (uplink) and 925–960 MHz (downlink). There are eight radio timeslots (giving eight burst periods) grouped into what is called a TDMA frame. over a million subscribers were using GSM phone networks being operated by 70 carriers across 48 countries. This 'extended GSM'. The channel data rate for all 8 channels is 270. GSM service was available in more than 100 countries and has become the de facto standard in Europe and Asia. GSM-900 uses 890–915 MHz to send information from the mobile station to the base station (uplink) and 935–960 MHz for the other direction (downlink). adding 50 channels (channel numbers 975 to 1023 and 0) to the original GSM-900 band. Duplex spacing of 45 MHz is used.In 1989. As of the end of 1997. Most 3G GSM networks in Europe operate in the 2100 MHz frequency band. Time division multiplexing is used to allow eight full-rate or sixteen half-rate speech channels per radio frequency channel. GSM responsibility was transferred to the European Telecommunications Standards Institute (ETSI) and phase I of the GSM specifications were published in 1990.615 ms. In some countries the GSM-900 band has been extended to cover a larger frequency range. The rarer 400 and 450 MHz frequency bands are assigned in some countries where these frequencies were previously used for first-generation systems. Most 2G GSM networks operate in the 900 MHz or 1800 MHz bands. By the end of 1993.833 Kbit/s. Some countries in the Americas (including Canada and the United States) use the 850 MHz and 1900 MHz bands because the 900 and 1800 MHz frequency bands were already allocated. Half rate channels use alternate frames in the same timeslot.

Allows simultaneous transfer of voice and high-speed digital data.2-345. Mobile Telephony Standards Standard Generation GSM GPRS EDGE UMTS 1G The first generation of mobile telephony (written 1G) operated using analogue communications and portable devices that were relatively large. The 850MHz band is also used for GSM and 3G in Australia. It used primarily the following standards: • AMPS (Advanced Mobile Phone System).144-2 Mbps kbps . It was used primarily in the 2G 2. which appeared in 1976 in the United States. Canada and many South American countries. This gives consumers seamless and same number connectivity in more than 218 countries. Terrestrial GSM networks now cover more than 80% of the world’s population.6 kbps 48 kbps 171 kbps 384 0. Allows simultaneous transfer of voice and digital data.6 kbps 21.5G 2. GSM’s international roaming capability allows users to access the same services when travelling abroad as at home.75G 3G Frequency band Allows transfer of voice or lowvolume digital data.8GHz bands in Europe and the 1. By having harmonized spectrum across most of the globe. was the first cellular network standard. Throughput 9. GSM satellite roaming has also extended service access to areas where terrestrial coverage is not available. GSM operates in the 900MHz and 1.4-171.6 kbps 9. Allows transfer of voice or moderate-volume digital data.9GHz and 850MHz bands in the US.2 kbps 43.The transmission power in the handset is limited to a maximum of 2 watts in GSM850/900 and 1 watt in GSM1800/1900.

In the United States.Americas. The first-generation cellular networks were made obsolete by the appearance of an entirely digital second generation. Second Generation of Mobile Networks (2G) The second generation of mobile networks marked a break with the first generation of cellular telephones by switching from analogue to digital. this system was largely used in England and then in Asia (Hong-Kong and Japan). the frequency band used is the 1900 MHz band. TDMA (Time Division Multiple Access) uses a technique of time division of communication channels to increase the volume of data transmitted simultaneously. however. . • • CDMA (Code Division Multiple Access) uses a spread spectrum technique that allows a radio signal to be broadcast over a large frequency range. in New Zealand and in the Asia-Pacific region. Using the 900 MHz frequency band. This first-generation analogue network had weak security mechanisms which allowed hacking of telephones lines. • ETACS (Extended Total Access Communication System) is an improved version of the TACS standard developed in the United Kingdom that uses a larger number of communication channels. The main 2G mobile telephony standards are: • GSM (Global System for Mobile communications) is the most commonly used standard in Europe at the end of the 20th century and supported in the United States. • TACS (Total Access Communication System) is the European version of the AMPS model. Portable telephones that are able to operate in Europe and the United States are therefore called tri-band. This standard uses the 900 MHz and 1800 MHz frequency bands in Europe. TDMA technology is primarily used on the American continent. Russia and Asia.

it is possible to transmit voice and low volume digital data. 144 Kbps with total coverage for mobile use 3. video-conferencing or high-speed internet access. 2. 6. it is often referred to as 2.5G The EDGE (Enhanced Data Rates for Global Evolution) standard. Extensions have been made to the GSM standard to improve throughput.With the 2G networks. 3G offers data rates of more than 144 Kbit/s. for Short Message Service) or multimedia messages (MMS. quadruples the throughput improvements of GPRS with its theoretical data rate of 384 Kbps. billed as 2.75G. 384 Kbps with medium coverage for pedestrian use. One of these is the GPRS (General Packet Radio System) service which allows theoretical data rates on the order of 114 Kbit/s but with throughput closer to 40 Kbit/s in practice. 2 Mbps with reduced coverage area for stationary use. The most important of these characteristics are: 1. for example text messages (SMS. the EDGE standard allows maximum theoretical data rates of 473 Kbit/s. thereby allowing the access for multimedia applications. 4. The GSM standard allows a maximum data rate of 9. for Multimedia Message Service). but it has been limited in order to comply with the IMT-2000 (International Mobile Telecommunications-2000) specifications from the ITU (International Telecommunications Union). 3G .6 kbps. 5. World compatibility. thereby allowing the access to multimedia uses such as video transmission. As this technology does not fit within the "3G" category. Compatibility of 3rd generation mobile services with second generation networks. In reality. 3G The IMT-2000 (International Mobile Telecommunications for the year 2000) specifications from the International Telecommunications Union (ITU) defined the characteristics of 3G (third generation of mobile telephony). High transmission data rate.

5G"). GSM Standards: . Introduction to the GSM Standard The GSM (Global System for Mobile communications) network is at the start of the 21st century. with data rates that can range from 384 Kbps to 2 Mbps. portable telephones that are able to operate in both Europe and the United States are called tri-band while those that operate only in Europe are called bi-band. however. HSDPA technology uses the 5 GHz frequency band and uses WCDMA encoding.networks use different frequency bands than the previous networks: 1885-2025 MHz and 2110-2200 MHz. In the United States. UMTS technology uses 5 MHz bands for transferring voice and data. In Europe. It is called as Second Generation (2G) standard because communications occur in an entirely digital mode. it was called as Group Special Mobile and later. The main 3G standard used in Europe is called UMTS (Universal Mobile Telecommunications System) and uses WCDMA (Wideband Code Division Multiple Access) encoding. (considered as "3. for Short Message Service) or multimedia messages (MMS. which is able to reach data rates on the order of 8 to 10 Mbps. For this reason. the frequency band used is the 1900 MHz band. for Multimedia Message Service). the GSM standard uses the 900 MHz and 1800 MHz frequency bands. HSDPA (High Speed Downlink Packet Access) is a third generation mobile telephony protocol. it became an international standard called "Global System for Mobile communications" in 1991. the most commonly used mobile telephony standard in Europe. unlike the first generation of portable telephones. The GSM standard allows a maximum throughput of 9. When it was first standardized in 1982.6 kbps which allows transmission of voice and low-volume digital data like text messages (SMS.

TDMA in brief: In late1980’s. which allows eight simultaneous calls on the same radio frequency. . as a search to convert the existing analog network to digital as a means to improve capacity. TDMA allows the users to share the same frequency channel by dividing the signal into different time slots. There are three basic principles in multiple access.GSM uses narrowband TDMA. The most complex implementation using TDMA principle is of GSM’s (Global System for Mobile communication). Each user takes turn in a round robin fashion for transmitting and receiving over the channel. FDMA (Frequency Division Multiple Access). All three principles allow multiple users to share the same physical channel. Here. TDMA (Time Division Multiple Access). and CDMA (Code Division Multiple Access). Unlike TDMA. users can only transmit in their respective time slot. Time Division Multiplex Access is a type of multiplexing where two or more channels of information are transmitted over the same link by allocating a different time interval for the transmission of each channel. To reduce the effect of co-channel interference. where a call jumps from one channel to another channel in a short interval. in CDMA several users can transmit over the channel at the same time. fading and multipath. But the two competing technologies differ in the way user sharing the common resource. the GSM technology can use frequency hoping. CDMA uses a spread spectrum technology that is it spreads the information contained in a particular signal of interest over a much greater bandwidth than the original signal. the cellular telecommunications industry association chose TDMA over FDMA.

whenever the user moves from one site to another. since it transmits only portion of the time during conversations. The switch then uses this information for making better choices for handoff at appropriate times. TDMA handset performs hard handoff. It has an ability to carry 64 kbps to 120 Mbps of data rates. it breaks the connection and then provides a new connection with the new site. i. . 4. Since the cell size grows smaller. 2. This allows the operator to do services like fax. Advantages of TDMA: There are lots of advantages of TDMA in cellular technologies. it proves to save base station equipment. The TDMA handset constantly monitors the signals coming from other sites and reports it to the switch without caller’s awareness. It can easily adapt to transmission of data as well as voice communication.e. 1. space and maintenance. 3. Handoff occurs when a call is switched from one cell site to another while travelling.TDMA systems still rely on switch to determine when to perform a handoff. It provides users with an extended battery life. Since TDMA technology separates users according to time. it ensures that there will be no interference from simultaneous transmissions.. voice band data and SMS as well as bandwidth intensive application such as multimedia and video conferencing.

So. Disadvantages of TDMA: One major disadvantage using TDMA technology is that the users has a predefined time slot. To overcome this distortion. Once the time limit is expired. a time limit can be used on the system. there are cells with a radius of a few hundred meters. In a cellular network. the higher is the available bandwidth. The concept of cellular network Mobile telephone networks are based on the concept of cells. the signal is ignored. Cellular networks are based on the use of a central transmitter-receiver in each cell. while huge cells of up to 30 kilometers provide coverage in rural areas. When moving from one cell site to other. called a "base station" (or Base Transceiver Station. Likewise. adjacent cells cannot use the same . if all the time slots in the cell in which the user is currently in are already occupied. written BTS). circular zones that overlap to cover a geographical area. each cell is surrounded by 6 neighbouring cells (thus a cell is generally drawn as a hexagon).TDMA is the most cost effective technology to convert an analog system to digital. if all the time slots in this cell are full the user might be disconnected. in highly populated urban areas. The smaller the radius of a cell. To avoid interference. The second problem in TDMA is that it is subjected to multipath distortion. the user will not receive a dial tone.

their location and establishment of communications with other subscribers. the user terminal is called a mobile station. This code can be protected using a 4-digit key called a PIN code. the base station controllers are themselves physically connected to the Mobile Switching Centre (MSC). Each SIM card also has a unique (and secret) identification number called IMSI (International Mobile Subscriber Identity). which is responsible for managing user identities. Finally. managed by the telephone network operator.frequency. The MSC is generally connected to databases that provide additional functions: . The SIM card therefore allows each user to be identified independently of the terminal used during communication with a base station. The terminals (devices) are identified by a unique 15-digit identification number called IMEI (International Mobile Equipment Identity). All the base stations of a cellular network are connected to a base station controller (BSC) which is responsible for managing distribution of the resources. Communications occur through a radio link (air interface) between a mobile station and a base station. A mobile station is made up of a SIM (Subscriber Identity Module) card allowing the user to be uniquely identified and a mobile terminal. The MSC belongs to a Network Station Subsystem (NSS). two cells using the same frequency range must be separated by a distance of two to three times the diameter of the cell. Architecture of the GSM Network In a GSM network. In practice. The system consisting of the base station controller and its connected base stations is called the Base Station Subsystem (BSS). which connects them to the public telephone network and the Internet.

The data is maintained as long as the user is in the zone and is deleted when the user leaves or after a long period of inactivity (terminal off). whereas information transmitted over telephone lines is transmitted in the form of analog waves. movement from one operator network to another. 4. A modem is a device or program that enables a computer to transmit data over telephone or cable lines. The Home Location Register (HLR) is a database containing information (geographic position. . 5. The VLR retrieves the data of a new user from the HLR of the user's subscriber zone. GSM networks support the concept of roaming i.) of the subscribers registered in the area of the switch (MSC).1. The Equipment Identify Register (EIR) is a database listing the mobile terminals. The Authentication Centre (AUC) is responsible for verifying user identities. A modem converts between these two forms. Finally. Computer information is stored digitally. Introduction to Modem: Modem stands for modulator-demodulator. 3. 2.e. The cellular network formed in this way is designed to support mobility via management of handovers (movements from one cell to another). administrative information etc. The Visitor Location Register (VLR) is a database containing information of users other than the local subscribers..

At high transmission speeds. most modems can communicate with each other. a number of different protocols for formatting data to be transmitted over telephone lines exist. .34 are official standards. The slowest rate is 300 baud (about 25 cps). the protocols are less standardized. The fastest modems run at 57. However.  Auto-answer: An auto-answer modem enables the computer to receive calls in the absence of the operator. the following characteristics distinguish one modem from another:  Bps: How fast the modem can transmit and receive data. While the modem interfaces are standardized. Consequently. the modem acts like a regular telephone. At slow rates. Modems that support a voice/data switch have a built-in loudspeaker and microphone for voice communication. Obviously. Most modems have built-in support for the more common protocols at slow data transmission speeds at least. There are also modems that come as an expansion board that can be inserted into a vacant expansion slot. Apart from the transmission protocols that they support.  Data compression: Some modems perform data compression. like CCITT V. any external modem can be attached to any computer that has an RS-232 port. there is one standard interface for connecting external modems to computers called RS-232. modems are measured in terms of baud rates. Some. the modem acts like a regular modem. the faster the transmission rate. At higher speeds.600 bps.Fortunately. modems are measured in terms of bits per second (bps). while others have been developed by private companies. In data mode. the modem at the receiving end must be able to decompress the data using the same compression technique. These are sometimes called onboard or internal modems.  Voice/data: Many modems support a switch to change between voice and data modes. which almost all personal computers have. It should be noted that the data cannot be received at a faster rate than it is being sent. the faster the data can be sent and received. although they can achieve even higher data transfer rates by compressing the data. which enables them to send data at faster rates. however. In voice mode.

Like a GSM mobile phone. A wireless modem behaves like a dial-up modem. which mean that they can send and receive faxes. an external GSM modem is connected to a computer through a serial cable or a USB cable. . Typically.  Fax capability: Most modern modems are fax modems. Flash memory: Some modems come with flash memory rather than conventional ROM which means that the communications protocols can be easily updated if necessary. A GSM modem in the form of a PC Card / PCMCIA Card is designed for use with a laptop computer. It should be inserted into one of the PC Card / PCMCIA Card slots of a laptop computer. GSM Modem: A GSM modem is a wireless modem that works with a GSM wireless network. A GSM modem can be an external device or a PC Card / PCMCIA Card. The main difference between them is that a dial-up modem sends and receives data through a fixed telephone line while a wireless modem sends and receives data through radio waves. a GSM modem requires a SIM card from a wireless carrier in order to operate.

1 Introduction Hardware design deals in drawing the schematic on the plane paper according to the application. The project design and principle are explained in this chapter using the block diagram and circuit diagram. Monitoring the charging status and charge level of the battery.A SIM card contains the following information: • • • • • • • Subscriber telephone number (MSISDN) International subscriber number (IMSI. writing and searching phone book entries. Chapter 3 Hardware design considerations 3. International Mobile Subscriber Identity) State of the SIM card Service code (operator) Authentication key PIN (Personal Identification Code) PUK (Personal Unlock Code) Computers use AT commands to control modems. GSM modems support an extended set of AT commands. Both GSM modems and dial-up modems support a common set of standard AT commands. Reading. finally preparing the board and testing the designed hardware. Monitoring the signal strength. The block diagram discusses about the required components . carrying out the PCB layout of the schematic tested on breadboard. These extended AT commands are defined in the GSM standards. In addition to the standard AT commands. testing the schematic design over the breadboard using the various IC’s to find if the design meets the objective. With the extended AT commands. the following operations can be performed: • • • • • Reading. writing and deleting SMS messages. Sending SMS messages.

buzzer 8. 3. lcd display 7.e. gsm modem 9. sensors 4. The a. power supply 2. reset circuit 6.c. crystal circuit 5. max 232 3.3 power supply The input to the circuit is applied from the regulated power supply. micro controller 3. ignition switch 10. 230V from the mains supply is step down by the transformer to 12V and is fed to a ..of the design and working condition is explained using circuit diagram and system wiring diagram.2 components used Fig: Block diagram for the project design The components used are 1. input i.

But these voltages cannot be obtained directly.e. The output obtained from the rectifier is a pulsating d. into pulsating D.c input available at the mains supply i.c voltage.c voltage. the output voltage from the rectifier is fed to a filter to remove any a. Transformer: Usually. Thus the a.C.c components present even after rectification. In this project. Now.. The rectifier may be a half wave or a full wave rectifier. This is done by a transformer. a step down transformer is employed to decrease the voltage to a required level. 230V is to be brought down to the required voltage level. DC voltages are required to operate various electronic equipment and these voltages are 5V. It converts A. Thus.rectifier.C. this voltage is given to a voltage regulator to obtain a pure constant dc voltage. a bridge rectifier is used because of its merits like good stability and full wave rectification. So in order to get a pure d. 9V or 12V. Filter: . Rectifier: The output from the transformer is fed to the rectifier.

Capacitive filter is used in this project. In this project. voltage received at this point changes. Output received from this filter is constant until the mains voltage and load is maintained constant. power supply of 5V and 12V are required. D. However.C. A voltage regulator is an electrical regulator designed to automatically maintain a constant voltage level. But for PC. in order to equal these voltage levels. The voltage levels of microcontroller are logic1 and logic 0 i. it regulates the input applied to it. This IC provides best noise rejection and very reliable against discharges and short circuits.. if either of the two is varied. . The first number 78 represents positive supply and the numbers 05.e. Voltage regulator: As the name itself implies. RS232 voltage levels are considered and they are: logic 1 is taken as -3V to -25V and logic 0 as +3V to +25V.C. MAX232 IC is used. MAX232 IC chips are commonly referred to as line drivers. In order to obtain these voltage levels. So. It removes the ripples from the output of rectifier and smoothens the D. 12 represent the required output voltage levels. logic 1 is +5V and logic 0 is 0V. Thus this IC converts RS232 voltage levels to microcontroller voltage levels and vice versa. Therefore a regulator is applied at the output stage. 7805 and 7812 voltage regulators are to be used. 3. the baud rate and voltage levels of Microcontroller and PC should be the same.4 Max 232 Max232 IC is a specialized circuit which makes standard voltages as required by RS232 standards. To ensure data transfer between PC and microcontroller.

Heart beat is sensed by using a high intensity type LED and LDR. The LED used in this arrangement is a high intensity LED. As sensor. Since the standard was set long before the advent of the TTL logic family. Various noise sources may produce disturbance signals with amplitudes equal or even higher than the amplitude of .5 Sensors The sensors used in this project are Heartbeat and Temperature sensor. The skin may be illuminated with visible (red) using transmitted or reflected light for detection. voltage converters such as MAX232 are used to convert the TTL logic levels to the RS232 voltage levels and vice versa 3.1 LED and LDR arrangement The Heartbeat sensor used in this project is basically a LED and LDR arrangement. 3. The finger is placed between the LED and LDR. For this reason.RS232 CABLE: To allow compatibility among data communication equipment. an interfacing standard called RS232 is used. a photo diode or a photo transistor can be used.5. The very small changes in reflectivity or in transmittance caused by the varying blood content of human tissue are almost invisible. The Heartbeat sensor used is basically a LED and LDR arrangement. its input and output voltage levels are not TTL compatible. to connect any RS232 to a microcontroller system.

The LM35 does not require any external calibration or trimming to provide typical accuracies of ±1⁄4°C at room temperature and ±3⁄4°C over a full −55 to +150°C temperature range. The setup described here uses a red LED for transmitted light illumination and a LDR as detector. The LM35’s low output impedance. less than 0.the pulse signal. Features    Calibrated directly in ° Celsius (Centigrade) Linear + 10. or with plus and minus supplies.2 Precision Centigrade Temperature Sensor LM35 converts temperature value into electrical signals.0 mV/°C scale factor 0. The LM35 requires no external calibration since it is internally calibrated. LM35 series sensors are precision integrated-circuit temperature sensors whose output voltage is linearly proportional to the Celsius temperature. .1°C in still air. 3. With only slight changes in the preamplifier circuit the same hardware and software could be used with other illumination and detection concepts.5°C accuracy guaranteed (at +25°C) . It can be used with single power supplies. and precise inherent calibration make interfacing to readout or control circuitry especially easy. it has very low self-heating. As it draws only 60 μA from its supply. linear output.5. Valid pulse measurement therefore requires extensive preprocessing of the raw signal.

Now if the temperature reaches 70˚C the output voltage will be 0. 0.08°C in still air Nonlinearity only ±1⁄4°C typical Low impedance output.1 W for 1 mA load The characteristic of this LM35 sensor is: For each degree of centigrade temperature it outputs 10milli volts.        Rated for full −55° to +150°C range Suitable for remote applications Low cost due to wafer-level trimming Operates from 4 to 30 volts Less than 60 μA current drain Low self-heating. The arrangement of this sensor in our board is as shown in the figure below.7V which is enough for the transistor junction to be biased. In this we directly connect the output of the sensor to the base of the transistor as of LM35 for every 1˚C rise of temperature the output will increase for 10mV. . Hence the transistor gets on and the output is sensed by the microcontroller. 0.

The Proload programmer has been used to write this compile code into the microcontroller Algorithm Serial Programming Algorithm To program and verify the AT89S52 in the serial programming mode. Chapter 4 Software implementation Introduction The firmware part deals in programming the microcontroller so that it can control the operation of the IC’s used in the implementation. we have used the Orcad design software for PCB circuit design. In the present work.. the Keil µv3 software development tool to write and compile the source code. about 6 to 10 SMS messages per minute. which has been written in the C language.e.Operation: The number of SMS messages that can be processed by a GSM modem per minute is very low i. the following sequence is recommended: .

jjj. void main() { code unsigned char msg1[]="WELCOME".1 C file #include<reg51. lcd_init(). unsigned char a. RST can be set low to commence normal device operation source code 4.b.l2=0. unsigned char GSMdata[43]. UART_init().b1.1. apply a 3 MHz to 33 MHz clock to XTAL1 pin and wait for at least 10 milliseconds. 3.status=0. The frequency of the shift clock supplied at pin SCK/P1.h" #include<string. buz=0.7 needs to be less than the CPU clock at XTAL1 divided by 16.i. If a crystal is not connected across pins XTAL1 and XTAL2. P2^5. MOTOR=0. Power-up sequence: Apply power between VCC and GND pins.h" #include"UART. 5. Any memory location can be verified by using the Read instruction which returns the content at the selected address at serial output MISO/P1.h" #include"eeprom.ccount.control=0. Set RST pin to "H".5. 2.3. sw=1. P2^7.6.c2[]="ate0". 4.h> sbit MOTOR sbit buz sbit sw = = = P2^4. unsigned char mobilenum[]. The Code array is programmed one byte at a time by supplying the address and data together with the appropriate Write instruction.h> #include"lcddisplay.count. At the end of a programming session. . The write cycle is self timed and typically takes less than 1 ms at 5V. unsigned char numcnt.c1[]="at". Enable serial programming by sending the Programming Enable serial instruction to pin MOSI/P1. bit l1=0. lcdcmd(0x85).

msgdisplay("SECURITY SYSTEM"). while(RI==0). send_to_modem("at+cmgf=1").. lcdcmd(0xC0). delay(500). send_to_modem(mobilenum). send_to_modem(c1). delay(100). // not. lcdcmd(0x01). // TO CHECKING GSM MODEM. msgdisplay("GSM modem")..mobilenum[i]). msgdisplay("SYSTEM CONNECTED").msgdisplay(msg1).i<10. ch_send_to_modem('"'). delay(100). lcdcmd(0xc0). a=read_eeprom(0).i++) { write_eeprom(i. . RI=0. if(a==0xff) for(i=0. //to avoid echo signals. } lcdcmd(0x01). enter(). enter(). delay(300). st: lcdcmd(0x01). msgdisplay(mobilenum). while(RI==1) { RI=0. delay(200). msgdisplay("searching for"). send_to_modem(c2). } if(control) { send_to_modem("at+cmgs="). msgdisplay("VEHICLE"). ch_send_to_modem('"'). enter(). lcdcmd(0x01).

lcdcmd(0x01). while(RI==0). b=SBUF. } if(RI==1) { RI=0. MOTOR=1. } if(b=='T') { "). RI=0. if(b=='C') { while(RI==0). goto st. b=SBUF. RI=0. if(b=='M') { while(RI==0).enter(). RI=0. send_to_modem("vehicle on"). b=SBUF. if(l1) { lcdcmd(0x01). b=SBUF. RI=0. } control=l1=l2=0. } while(1) { if((sw==0)&&(status==0)) { buz=0. . while(RI==0). b=SBUF. msgdisplay("vehicle stopped"). send_to_modem("vehicle stopped } if(l2) { lcdcmd(0x01). msgdisplay("vehicle on"). b=SBUF. msgdisplay("vehicle on"). while(sw==0). RI=0. while(RI==0).

if(b=='. b1=b. jjj=0.} { while(RI==0). b=SBUF. ccount+=1. send_to_modem("at+cmgr="). msgdisplay("message reading"). msgdisplay("NEW message "). } mobilenum[10]='\0'. a=1. send_to_modem("at+cmgd="). msgdisplay(gpsdata). a=0. delay(500). delay(100). b=SBUF. ch_send_to_modem(b1).') { if(numcnt<15) { if(numcnt>4) mobilenum[numcnt-5]=b. ch_send_to_modem(b). RI=0. enter(). if(b==10) count+=1. } if(count==2) GSMdata[jjj++]=SBUF. lcdcmd(0x01). ccount=0. while(count!=3) { while(RI==0). numcnt++. if(b=='I') lcdcmd(0x01). count=0. numcnt=0. enter(). lcdcmd(0x01). RI=0. . } else a=0. lcdcmd(0xc0).

l1=1.3. delay(500). SCON=0x50. . void send_to_modem (unsigned char s[]). control=1. TH1=0xFD. TR1=1. buz=0. } if(!strcmp(gpsdata. } } goto st. l2=1."STOP")) { MOTOR=0."123")) { MOTOR=1. if(!strcmp(gpsdata. buz=1.h> void UART_init(void). } } } 4. status=0.msgdisplay(mobilenum). void UART_init(void) { TMOD=0x20. void enter (void). status=1. control=1.2 UART #include<reg51. void ch_send_to_modem (unsigned char single_char).

while(TI==0). SCON=0x50. while(TI==0). TH1=0xFd. } // enter(). TI=0. for(r=0. delay(10). // After sending commands to GSM modem you must be send Enter's ASC values. TR1=1.r++) // to send the command to GSM modem to avoid echo signal { // the command is "ate0". SBUF=single_char. TI=0. } void ch_send_to_modem (unsigned char single_char) { TMOD=0x20. // Enter ASC values are 13 and 10.s[r]!='\0'.} void send_to_modem (unsigned char s[]) { unsigned char r. SBUF=s[r]. SBUF=10. TI=0. TI=0. } void enter (void) { SBUF=13. while(TI==0). delay(100). } . while(TI==0).

1 Hardware implementation 5.2 software implementation Software Tools Required Keil µv3.Chapter 5 Application Implementation 5. The working of each software tool is explained below in detail. Proload are the two software tools used to program microcontroller. Keil Compiler: .

Keil compiler is software used where the machine language code is written and compiled. After compilation. Once the machine code is converted into hex code. that hex code has to be dumped into the microcontroller and this is done by the Proload. the machine source code is converted into hex code which is to be dumped into the microcontroller for further processing. Keil compiler also supports C language code. Proload is a programmer which itself contains a microcontroller in it other than the one which is to be programmed. Proload: Proload is software which accepts only hex files. This microcontroller has a program in .

1 Results . a source is required.it written in such a way that it accepts the hex file from the Keil compiler and dumps this hex file into the microcontroller which is to be programmed. As the Proload programmer kit requires power supply to be operated. Features • • • • • • • • • Supports major Atmel 89 series devices Auto Identify connected hardware and devices Error checking and verification in-built Lock of programs in chip supported to prevent program copying 20 and 40 pin ZIF socket on-board Auto Erase before writing and Auto Verify after writing Informative status bar and access to latest programmed file Simple and Easy to use Works on 57600 speed Chapter 6 Results and Discussions 5. this power supply is given from the power supply circuit designed above. Thus this is accomplished from the power supply board with an output of 12volts. It should be noted that this programmer kit contains a power supply section in the board itself but in order to switch on that power supply.

5. The communication is properly done without any interference between different modules in the design. The mechanism is controlled by the microcontroller.1. The total circuit is completely verified functionally and is following the application software. It can be concluded that the design implemented in the present work provide portability. flexibility and the data transmission is also done with low power consumption. check it for proper connections before switching on the power supply. Software tools like Keil Uvision Simulator. Design is done to meet all the specifications and requirements.2 Conclusion The implementation of GSM based Vehicle Security system is done successfully.Assemble the circuit on the PCB as shown in Fig 5. Continuously reading the output values from the sensors. if they are triggered. After assembling the circuit on the PCB. The performance has been verified both in software simulator and hardware design. Working procedure: GSM based vehicle security system is an Embedded system that provides security to the vehicles using GSM technology. Orcad Lite for the schematic diagram have been used to develop the software code before realizing the hardware. . check the values. Proload to dump the source code into the microcontroller. alert the buzzer and also send the predefined message to the user mobile through GSM modem is the main job carried out by the microcontroller. Circuit is implemented in Orcad and implemented on the microcontroller board.

the user can now send the predefined message in the form of a password to start or stop the vehicle.Prasad -Lawrence Harte http://www.com http://www. Thus. he has to press the ignition switch.gaonkar ELECTRONIC COMPONENTS INTRDUCTION TO GSM -D. the microcontroller detects this and sends the predefined message to the user mobile.PROGRAMING AND APPLICATIONS -Kenneth j.microsoftsearch. the user can have the complete control of the vehicle in his hand.atmel. After the user gets the message to his mobile.Ayala -Ramesh s. the user receives the message from the controlling unit and thus. The motor of the vehicle is operated when the controller receives the message from the user mobile BIBLIOGRAPHY THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEMS -Muhammad ali mazidi -janice gillispie mazidi THE 8051 MICROCONTROLLER ARCHITECTURE. the user can know that someone is trying to take away the vehicle and can immediately send the predefined message to stop the vehicle to the controlling unit.V. If anyone other than the user or the driver presses the switch. When this switch is pressed.com .com http://www.national.The working of the project is as below: Whenever the user wants to start his vehicle.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->