You are on page 1of 56

One of the tools we use most when debugging our projects is serial input/output.

Serial is very easy to implement, and it allows you to send/receive any data you need from your microcontroller to a computer's serial port so it can be viewed using a terminal emulator. These two devices are compatible from a software perspective, however you can't just hook a microcontroller up to a computer because the hardware interfaces are not compatible. Most microcontrollers these days have built in UARTs (universally asynchronous receiver/transmitter) that can be used to receive and transmit data serially. UARTs transmit one bit at a time at a specified data rate (i.e. 9600bps, 115200bps, etc.). This method of serial communication is sometimes referred to as TTL serial (transistor-transistor logic). Serial communication at a TTL level will always remain between the limits of 0V and Vcc, which is often 5V or 3.3V. A logic high ('1') is represented by Vcc, while a logic low ('0') is 0V. The serial port on your computer (if it's lucky enough to have one, they're quickly becoming a relic) complies with theRS-232 (Recommended Standard 232) telecommunications standard. RS-232 signals are similar to your microcontroller's serial signals in that they transmit one bit at a time, at a specific baud rate, with or without parityand/or stop bits. The two differ solely at a hardware level. By the RS-232 standard a logic high ('1') is represented by a negative voltage anywhere from -3 to -25V while a logic low ('0') transmits a positive voltage that can be anywhere from +3 to +25V. On most PCs these signals swing from -13 to +13V.

More recent laptop computers have USB ports instead of serial ports. This converter will plug into your USB port and provide a COM port for your GPS receiver. Use with a USB hub to get multiple com ports.

Introduction: Microcontroller: A microcontroller is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications. Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, toys and other embedded systems. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and

processes. Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems. Some microcontrollers may use four-bit words and operate at clock rate frequencies as low as 4 kHz, for low power consumption (single-digit milliwatts or microwatts). They will generally have the ability to retain functionality while waiting for an event such as a button press or other interrupt; power consumption while sleeping (CPU clock and most peripherals off) may be just nanowatts, making many of them well suited for long lasting battery applications. Other microcontrollers may serve performance-critical roles, where they may need to act more like a digital signal processor(DSP), with higher clock speeds and power consumption. The first single-chip microprocessor was the 4-bit Intel 4004 released in 1971, with the Intel 8008 and other more capable microprocessors becoming available over the next several years. However, both processors required external chips to implement a working system, raising total system cost, and making it impossible to economically computerize appliances. The Smithsonian Institution says engineers Gary Boone and Michael Cochran succeeded in creating the first microcontroller in 1971. The result of their work was the TMS 1000, which went commercial in 1974. It combined read-only memory, read/write memory, processor and clock on one chip and was targeted at embedded systems. Partly in response to the existence of the single-chip TMS 1000, Intel developed a computer system on a chip optimized for control applications, the Intel 8048, with commercial parts first shipping in 1977. It combined RAM and ROM on the same chip. This chip would find its way into over one billion PC keyboards, and other numerous applications. At that time Intel's President, Luke J. Valenter, stated that the microcontroller was one of the most successful in the company's history, and expanded the division's budget over 25%. Most microcontrollers at this time had two variants. One had an erasable EPROM program memory, with a transparent quartz window in the lid of the package to allow it to be erased by exposure to ultraviolet light. The other was a PROM variant which was only programmable once; sometimes this was signified with the designation OTP, standing for "one-time programmable". The PROM was actually exactly the same type of memory as the EPROM, but because there was no way to expose it to ultraviolet light, it could not be erased. The erasable versions required ceramic packages with quartz windows, making them significantly more

expensive than the OTP versions, which could be made in lower-cost opaque plastic packages. For the erasable variants, quartz was required, instead of less expensive glass, for its transparency to ultravioletglass is largely opaque to UVbut the main cost differentiator was the ceramic package itself. In 1993, the introduction of EEPROM memory allowed microcontrollers (beginning with the Microchip PIC16x84) to be electrically erased quickly without an expensive package as required for EPROM, allowing both rapid prototyping, and In System Programming. (EEPROM technology had been available prior to this time, but the earlier EEPROM was more expensive and less durable, making it unsuitable for low-cost mass-produced microcontrollers.) The same year, Atmel introduced the first microcontroller using Flash memory, a special type of EEPROM. Other companies rapidly followed suit, with both memory types. Cost has plummeted over time, with the cheapest 8-bit microcontrollers being available for under $0.25 in quantity (thousands) in 2009 and some 32-bit microcontrollers around $1 for similar quantities. Nowadays microcontrollers are cheap and readily available for hobbyists, with large online communities around certain processors. In the future, MRAM could potentially be used in microcontrollers as it has infinite endurance and its incremental semiconductor wafer process cost is relatively low. EMBEDDED SYSTEM DESIGN: A microcontroller can be considered a self-contained system with a processor, memory and peripherals and can be used as an embedded system. The majority of microcontrollers in use today are embedded in other machinery, such as automobiles, telephones, appliances, and peripherals for computer systems. While some embedded systems are very sophisticated, many have minimal requirements for memory and program length, with no operating system, and low software complexity. Typical input and output devices include

switches, relays, solenoids, LED's, small or custom LCD displays, radio frequency devices, and sensors for data such as temperature, humidity, light level etc. Embedded systems usually have no keyboard, screen, disks, printers, or other recognizable I/O devices of a personal computer, and may lack human interaction devices of any kind.

Interrupts: Microcontrollers must provide real time (predictable, though not necessarily fast) response to events in the embedded system they are controlling. When certain events occur, an interrupt system can signal the processor to suspend processing the current instruction sequence and to begin an interrupt service routine (ISR, or "interrupt handler"). The ISR will perform any processing required based on the source of the interrupt before returning to the original instruction sequence. Possible interrupt sources are device dependent, and often include events such as an internal timer overflow, completing an analog to digital conversion, a logic level change on an input such as from a button being pressed, and data received on a communication link. Where power consumption is important as in battery operated devices, interrupts may also wake a microcontroller from a low power sleep state where the processor is halted until required to do something by a peripheral event. Programs: Typically microcontroller programs must fit in the available on-chip program memory, since it would be costly to provide a system with external, expandable, memory. Compilers and assemblers are used to convert high-level language and assembler language codes into a compact machine code for storage in the microcontroller's memory. Depending on the device, the program memory may be permanent, read-only memory that can only be programmed at the factory, or program memory may be field-alterable flash or erasable read-only memory. Manufacturers have often produced special versions of their microcontrollers in order to help the hardware and software development of the target system. Originally these included EPROM versions that have a "window" on the top of the device through which program memory can be erased by ultraviolet light, ready for reprogramming after a programming ("burn") and test cycle. Since 1998, EPROM versions are rare and have been replaced by EEPROM and flash, which are easier to use (can be erased electronically) and cheaper to manufacture. Other versions may be available where the ROM is accessed as an external device rather than as internal memory, however these are becoming increasingly rare due to the widespread availability of cheap microcontroller programmers.

The use of field-programmable devices on a microcontroller may allow field update of the firmware or permit late factory revisions to products that have been assembled but not yet shipped. Programmable memory also reduces the lead time required for deployment of a new product. Where hundreds of thousands of identical devices are required, using parts programmed at the time of manufacture can be an economical option. These "mask programmed" parts have the program laid down in the same way as the logic of the chip, at the same time. A customizable microcontroller incorporates a block of digital logic that can be personalized in order to provide additional processing capability, peripherals and interfaces that are adapted to the requirements of the application. For example, the AT91CAP from Atmel has a block of logic that can be customized during manufacture according to user requirements. Other microcontroller features: Microcontrollers usually contain from several to dozens of general purpose input/output pins (GPIO). GPIO pins are software configurable to either an input or an output state. When GPIO pins are configured to an input state, they are often used to read sensors or external signals. Configured to the output state, GPIO pins can drive external devices such as LEDs or motors. Many embedded systems need to read sensors that produce analog signals. This is the purpose of the analog to digital converter (ADC). Since processors are built to interpret and process digital data, i.e. 1s and 0s, they are not able to do anything with the analog signals that may be sent to it by a device. So the analog to digital converter is used to convert the incoming data into a form that the processor can recognize. A less common feature on some microcontrollers is a digital to analog (DAC) that allows the processor to output analog signals or voltage levels. In addition to the converters, many embedded microprocessors include a variety of timers as well. One of the most common types of timers is the Programmable Interval Timer (PIT). A PIT may either count down from some value to zero, or up to the capacity of the count register, overflowing to zero. Once it reaches zero, it sends an interrupt to the processor indicating that it has finished counting. This is useful for devices such as thermostats, which periodically test the temperature around them to see if they need to turn the air conditioner on, the heater on, etc.

A dedicated Pulse Width Modulation (PWM) block makes it possible for the CPU to control power converters, resistive loads, motors, etc., without using lots of CPU resources in tight timer loops. Universal Asynchronous Receiver/Transmitter (UART) block makes it possible to receive and transmit data over a serial line with very little load on the CPU.

Higher Integration: 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, in addition to tending to decrease the defect rate for the finished assembly.

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 processors

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

serial input/output such as serial ports (UARTs) other serial communications interfaces like IC, Serial Peripheral Interface and Controller Area Network for system interconnect

peripherals such as timers, event counters, PWM generators, and watchdog

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

This integration drastically reduces the number of chips and the amount of wiring and circuit board space that would be needed to produce equivalent systems using separate chips. Furthermore, on low pin count devices in particular, each pin may interface to several internal peripherals, with the pin function selected by software. This allows a part to be used in a wider variety of applications than if pins had dedicated functions. Micro-controllers have proved to be highly popular in embedded systems since their introduction in the 1970s. Some microcontrollers use a Harvard architecture: separate memory buses for instructions and data, allowing accesses to take place concurrently. Where a Harvard architecture is used, instruction words for the processor may be a different bit size than the length of internal memory and registers; for example: 12-bit instructions used with 8-bit data registers. The decision of which peripheral to integrate is often difficult. The microcontroller vendors often trade operating frequencies and system design flexibility against time-to-market requirements from their customers and overall lower system cost. Manufacturers have to balance the need to minimize the chip size against additional functionality. Microcontroller architectures vary widely. Some designs include general-purpose

microprocessor cores, with one or more ROM, RAM, or I/O functions integrated onto the package. Other designs are purpose built for control applications. A micro-controller instruction set usually has many instructions intended for bit-wise operations to make control programs more compact. For example, a general purpose processor might require several instructions to test a bit in a register and branch if the bit is set, where a micro-controller could have a single instruction to provide that commonly required function. Microcontrollers typically do not have a math coprocessor, so floating point arithmetic is performed by software. Accelerometer ADXL335:

GENERAL DESCRIPTION : The ADXL335 is a small, thin, low power, complete 3-axis accelerometer with signal conditioned voltage outputs. The product measures acceleration with a minimum full-scale range of 3 g. It can measure the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion, shock, or vibration. The user selects the bandwidth of the accelerometer using the CX, CY, and CZ capacitors at the XOUT, YOUT, and ZOUT pins. Bandwidths can be selected to suit the application, with a range of 0.5 Hz to 1600 Hz for the X and Y axes, and a range of 0.5 Hz to 550 Hz for the Z axis. The ADXL335 is available in a small, low profile, 4 mm 4 mm 1.45 mm, 16-lead, plastic lead frame chip scale package (LFCSP_LQ) FEATURES: 3-axis sensing Small, low profile package 4 mm 4 mm 1.45 mm LFCSP Low power : 350 A (typical) Single-supply operation: 1.8 V to 3.6 V

10,000 g shock survival Excellent temperature stability BW adjustment with a single capacitor per axis PIN CONFIGURATION AND FUNCTION DESCRIPTIONS OF ADXL335:

Pin Function Descriptions Pin No.


1 2 3 4 5 6 7 8 9

Mnemonic NC ST COM NC COM COM COM ZOUT NC

Description No Connect1. Self-Test. Common. No Connect1. Common. Common. Common. Z Channel Output. No Connect1.

10 11 12 13 14 15 16 EP

YOUT NC XOUT NC VS VS NC Exposed Pad

Y Channel Output. No Connect1. X Channel Output. No Connect1. Supply Voltage (1.8 V to 3.6 V). Supply Voltage (1.8 V to 3.6 V). No Connect1. Not internally connected. Solder for mechanical integrity.

APPLICATIONS: Cost sensitive, low power, motion- and tilt-sensing applications Mobile devices Gaming systems Disk drive protection Image stabilization Sports and health devices HARDWARE COMPONETS: ATMEGA8: PINDIAGRAM:

.BLOCK DIAGRAM

FEATURES: High-performance, Low-power AVR 8-bit Microcontroller

Advanced RISC Architecture 130 Powerful Instructions Most Single-clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static Operation Up to 16 MIPS Throughput at 16 MHz On-chip 2-cycle Multiplier High Endurance Non-volatile Memory segments 8K Bytes of In-System Self-programmable Flash program memory 512 Bytes EEPROM 1K Byte Internal SRAM Write/Erase Cycles: 10,000 Flash/100,000 EEPROM Data retention: 20 years at 85C/100 years at 25C Optional Boot Code Section with Independent Lock Bits In-System Programming by On-chip Boot Program True Read-While-Write Operation Programming Lock for Software Security Peripheral Features Two 8-bit Timer/Counters with Separate Prescaler, one Compare Mode One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode Real Time Counter with Separate Oscillator Three PWM Channels 8-channel ADC in TQFP and QFN/MLF package Eight Channels 10-bit Accuracy 6-channel ADC in PDIP package Six Channels 10-bit Accuracy Byte-oriented Two-wire Serial Interface Programmable Serial USART Master/Slave SPI Serial Interface Programmable Watchdog Timer with Separate On-chip Oscillator On-chip Analog Comparator

Special Microcontroller Features Power-on Reset and Programmable Brown-out Detection Internal Calibrated RC Oscillator External and Internal Interrupt Sources Five Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, and Standby I/O and Packages 23 Programmable I/O Lines 28-lead PDIP, 32-lead TQFP, and 32-pad QFN/MLF Operating Voltages 2.7 - 5.5V (ATmega8L) 4.5 - 5.5V (ATmega8) Speed Grades 0 - 8 MHz (ATmega8L) 0 - 16 MHz (ATmega8) Power Consumption at 4 MHz, 3V, 25C Active: 3.6 mA Idle Mode: 1.0 mA Power-down Mode: 0.5 A Pin Descriptions VCC Digital supply voltage. GND Ground. Port B (PB7..PB0) 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..PC0) Port C is an 7-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port C 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. 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 unprogrammed, 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 guaranteed to generate a Reset. Port D (PD7..PD0) 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. RESET- Reset input. A low level on this pin for longer than the minimum pulse length will generate a AVCC- AVCC is the supply voltage pin for the A/D Converter, Port C (3..0), and ADC (7..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 Port C (5..4) use digital supply voltage, VCC.

AREF- AREF is the analog reference pin for the A/D Converter. ADC7..6 (TQFP and QFN/MLF Package Only) In the TQFP and QFN/MLF package, ADC7..6 serve as analog inputs to the A/D converter. These pins are powered from the analog supply and serve as 10-bit ADC channels

UART: A Universal Asynchronous Receiver/Transmitter, abbreviated UART , is a piece of computer hardware that translates data between parallel and serial forms. UARTs are commonly used in conjunction with communication standards such as EIA, RS-232, RS-422 or RS-485.

The universal designation indicates that the data format and transmission speeds are configurable. The electric signaling levels and methods (such as differential signaling etc.) are handled by a driver circuit external to the UART. A UART is usually an individual (or part of an) integrated circuit used for serial communications over a computer or peripheral device serial port. UARTs are now commonly included in microcontrollers. A dual UART, or DUART, combines two UARTs into a single chip. Many modern ICs now come with a UART that can also communicate synchronously; these devices are called USARTs (universal

synchronous/asynchronous receiver/transmitter).

RS232: In telecommunications, RS-232 is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in computer serial ports. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and pinout of connectors. An RS-232 serial port was once a standard feature of a personal computer, used for connections to modems, printers, mice, data storage, uninterruptible, and other peripheral devices. However, the low transmission speed, large voltage swing, and large standard connectors motivated development of the universal serial bus, which has displaced RS-232 from most of its peripheral interface roles. Many modern personal computers have no RS-232 ports and must use an external

USB-to-RS-232 converter to connect to RS-232 peripherals. RS-232 devices are still found, especially in industrial machines or scientific instruments.

Pinouts The following table lists commonly used RS-232 signals and pin assignments.[3] Signal DE8P8C ("RJ45") 10P10C ("RJ50") D 9 MM TI National Abbreviat DT DC B- (TI J Yo Cyclade Cyclade Digi[ AInstrumen 6] s[4] s[4] ion E E 25 Ast [5] ts 561 574) TxD RxD 2 3 3 2 2 5 6 5 3 6 3 6 8 9 4 7 5 6 Origin

Name

Transmit ted Data Received Data Data Terminal Ready Carrier Detect Data Set Ready Ring Indicator Request

DTR

20

9 10 (alt 2) 2 (alt 10) 1 3

DCD

2 7

10

DSR

6 1

RI RTS

22 4

9 7

2 4

10 2

To Send Clear To Send Common Ground Protectiv e Ground CTS G PG 5 8 5 3,4 7 4 8 4,5 5 4 3 6 6 5 1 8 7 4

common 7 common 1

The signals are named from the standpoint of the DTE, for example, an IBM-PC compatible serial port. The ground signal is a common return for the other connections; it appears on two pins in the Yost standard but is the same signal. The DB-25 connector includes a second "protective ground" on pin 1. Connecting this to pin 7 (signal reference ground) is a common practice but not essential. The RS-232 standard is used by many specialized and custom-built devices. This list includes some of the more common devices that are connected to the serial port on a PC. Some of these such as modems and serial mice are falling into disuse while others are readily available. Serial ports are very common on most types of microcontroller, where they can be used to communicate with a PC or other serial devices.

Dial-up modems GPS receivers (typically NMEA 0183 at 4,800 bit/s) Bar code scanners and other point of sale devices LED and LCD text displays Satellite phones, low-speed satellite modems and other satellite based transceiver devices Flat-screen (LCD and Plasma) monitors to control screen functions by external computer, other AV components or remotes

Test and measuring equipment such as digital multimeters and weighing systems Updating Firmware on various consumer devices. Some CNC controllers Uninterruptible power supply Stenography or Stenotype machines.

Software debuggers that run on a second computer. Industrial field buses Printers Computer terminal, teletype Older digital cameras Networking (Macintosh AppleTalk using RS-422 at 230.4 kbit/s) Serial mouse Older GSM mobile phones Some Telescopes

GSM THEORY:

In recent years, vehicle thefts are increasing at an alarming rate around the world. People have started to use the theft control systems installed in their vehicles. The commercially available anti-theft vehicular systems are very expensive. Here, we make a modest attempt to design & develop a simple, low cost vehicle theft control scheme using an inbuilt microcontroller. This scheme involves a microcontroller & a mobile for the communication purposes The Global System for Mobile communications (GSM) is the most popular standard for mobile phones in the world. Over billion people use GSM service across the world. The usability of the GSM standard makes international roaming very common between mobile phone operators, enabling subscribers to use their phones in many parts of the world. GSM differs significantly from its predecessors in that both signaling and speech channels are digital, which means that it is considered a second generation (2G) mobile phone system. This fact has also meant that data communication was built into the system from very early on. We start off exploring the existing scenarios and later we move towards the proposed architecture, describing the various modules in detail and the working methodology. Finally we present the simulation results and the various component details. The concept of this paper has been implemented as a small prototype model.

GSM module is used to establish communication between a computer and a GSM-GPRS system. Global System for Mobile communication (GSM) is an architecture used for mobile communication in most of the countries. Global Packet Radio Service (GPRS) is an extension of GSM that enables higher data transmission rate. GSM/GPRS module consists of a GSM/GPRS modem assembled together with power supply circuit and communication interfaces (like RS-232, USB, etc) for computer. The MODEM is the soul of such modules.

Wireless MODEMs:

Wireless MODEMs are the MODEM devices that generate, transmit or decode data from a cellular network, for establishing communication between the cellular network and the computer. These are manufactured for specific cellular network (GSM/UMTS/CDMA) or specific cellular data standard (GSM/UMTS/GPRS/EDGE /HSDPA) or technology (GSM/SIM). Wireless MODEMs like other MODEM devices use serial communication to interface with and need Hayes compatible AT Commands for communication with the computer (any microprocessor or microcontroller system).

GSM MODEM:

GSM/GPRS MODEM is a class of wireless MODEM devices that are designed for communication of a computer with the GSM and GPRS network. It requires a SIM (Subscriber Identity Module) card just like mobile phones to activate communication with the network. Also they have IMEI (International Mobile Equipment Identity) number similar to mobile phones for their identification. A GSM/GPRS MODEM can perform the following operations:

1. 2. 3.

Receive, send or delete SMS messages in a SIM. Read, add, search phonebook entries of the SIM. Make, Receive, or reject a voice call.

The MODEM needs AT commands, for interacting with processor or controller, which are communicated through serial communication. These commands are sent by the

controller/processor. The MODEM sends back a result after it receives a command. Different AT commands supported by the MODEM can be sent by the processor/controller/computer to interact with the GSM and GPRS cellular network.

GSM Module: A GSM/GPRS module assembles a GSM/GPRS modem with standard communication interfaces like RS-232 (Serial Port), USB etc., so that it can be easily interfaced with a computer or a microprocessor / microcontroller based system. The power supply circuit is also built in the module that can be activated by using a suitable adaptor.

Mobile Station (Cell phones and SIM):

A mobile phone and Subscriber Identity Module (SIM) together form a mobile station. It is the user equipment that communicates with the mobile network. A mobile phone comprises of Mobile Termination, Terminal Equipment and Terminal Adapter.

Mobile Termination is interfaced with the GSM mobile network and is controlled by a baseband processor. It handles access to SIM, speech encoding and decoding, signaling and other network related tasks. The Terminal Equipment is an application processor that deals with handling operations related to keypad, screen, phone memory and other hardware and software services embedded into the handset. The Terminal Adapter establishes communication between the Terminal Equipment and the Mobile Termination using AT commands. The communication with the network in a GSM/GPRS mobile is carried out by the baseband processor.

Difference between GSM mobile and GSM/GPRS module:

A GSM mobile is a complete system in itself with embedded processors that are dedicated to provide an interface between the user and the mobile network. The AT commands are served between the processors of the mobile termination and the terminal equipment. The mobile handset can also be equipped with a USB interface to connect with a computer, but it may or may not support AT commands from the computer or an external processor/controller.

The GSM/GPRS module, on the other hand, always needs a computer or external processor/controller to receive AT commands from. GSM/GPRS module itself does not provide any interface between the user and the network, but the computer to which module is connected is the interface between user and network.

An advantage that GSM/GPRS modules offer is that they support concatenated SMS which may not be supported in some GSM mobile handsets. Also some mobile handsets cant receive MMS when connected to a computer.

Applications of GSM/GPRS module: The GSM/GPRS module demonstrates the use of AT commands. They can feature all the functionalities of a mobile phone through computer like making and receiving calls, SMS, MMS etc. These are mainly employed for computer based SMS and MMS services.

AT Commands: AT commands are used to control MODEMs. AT is the abbreviation for Attention. These commands come from Hayes commands that were used by the Hayes smart modems. The Hayes commands started with AT to indicate the attention from the MODEM. The dial up and wireless MODEMs (devices that involve machine to machine communication) need AT commands to interact with a computer. These include the Hayes command set as a subset, along with other extended AT commands. AT commands with a GSM/GPRS MODEM or mobile phone can be used to access following information and services: 1. 2. 3. 4. 5. Information and configuration pertaining to mobile device or MODEM and SIM card. SMS services. MMS services. Fax services. Data and Voice link over mobile network.

The Hayes subset commands are called the basic commands and the commands specific to a GSM network are called extended AT commands.

Command, Information response and Result Codes: The AT commands are sent by the computer to the MODEM/ mobile phone. The MODEM sends back an Information Response i.e. the information requested by or pertaining to the action initiated by the AT command. This is followed by a Result Code. The result code tells about the successful execution of that command.

EXECUTION OF AT COMMANDS BLOCK DIAGRAM.

There are also unsolicited Result Codes that are returned automatically by the MODEM to notify the occurrence of an event. For example the reception of a SMS will force MODEM to return an unsolicited result code.

AT commands' syntax: Case Sensitivity The AT commands are generally used in uppercase letters. However some MODEMs and mobile phones allow both uppercase and small case letters. Single Command The AT commands include a prefix AT which indicates the beginning of the command to MODEM; and a carriage return which indicates the end of the command.

AT COMMANDS SYNTAX However string AT itself is not the part of the command. For example in ATD, D is the command name not ATD. The extended AT commands have a + in the command name. For example: AT+CGMI<Carriage return> Command Line Multiple AT commands can be sent to MODEM in a single command line. The commands in a line are separated by a semi-colon (;).

For example: AT+CGMI; +CBS<Carriage return> String in Command Line Strings in a command line are enclosed in double quotes.

For example: AT+CGML=ALL<Carriage return>

AT COMMAND LINE. Information Response and Result Code: The Information Response and Result Codes, returned by the MODEM, have a carriage return and line feed in the beginning as well as at the end.

For example: <Carriage return><Line feed>OK<Carriage return><Line feed> <Carriage return><Line feed>ERROR<Carriage return><Line feed> <Carriage return><Line feed>+CBC: 0, 60<Carriage return><Line feed> etc.

Sequence of Execution In the command line, the command appearing first is executed first. The execution then follows for second appeared command and so on. The execution of commands in a command line takes place in sequential manner. If an error occurs in the execution of a command, an error result code is returned by the MODEM and the execution of the command line is terminated irrespective of presence of other commands next in the command line.

Types of commands: There are four types of AT commands: 1) 2) 3) 4) Test commands Read commands Set commands Execution commands.

RESULT CODE DESCRIPTION OK Successful execution of a command ERROR Execution of a command failed +CMS ERROR Message service failure with return of a error code UN SOLICITED RESULT CODES +CDS Notify receipt of SMS status report of a new message to computer +CMT Notify forwarding of a new SMS to computer +CMTI Notify recipient of a message status Interfacing MODEM/Mobile phone with Windows platform:

The Windows (XP and lower versions) comes with an application called HyperTerminal for data communication through serial port of the computer. The interfacing of the GSM/GPRS module with the serial port of the computer involves following steps: Connect RS-232 port of GSM module with the serial port of the computer. Insert a SIM card in the module. Open HyperTerminal from Start -> All Programs -> Accessories -> Communications -

> HyperTerminal. Enter a name for the connection and press OK.

Now select the communication port (COM) at which GSM module is connected. Create a new connection set on HyperTerminal. Set parameters, like baud rate as 9600, handshaking mode as none, parity bit as none, stop bit as 1 and data bit as 8.

GLOBAL POSITIONING SYSTEM


The Global Positioning System (GPS) is a space-based satellite navigation system that provides location and time information in all weather conditions, anywhere on or near the Earth where there is an unobstructed line of sight to four or more GPS satellites. The system provides critical capabilities to military, civil and commercial users around the world. It is maintained by the United States government and is freely accessible to anyone with a GPS receiver. The GPS project was developed in 1973 to overcome the limitations of previous navigation systems,[1] integrating ideas from several predecessors, including a number of classified engineering design studies from the 1960s. GPS was created and realized by the U.S. Department of Defense (DoD) and was originally run with 24 satellites. It became fully operational in 1994. Roger L. Easton is generally credited as its inventor. Advances in technology and new demands on the existing system have now led to efforts to modernize the GPS system and implement the next generation of GPS III satellites and Next Generation Operational Control System (OCX).[2] Announcements from the Vice President and the White House in 1998 initiated these changes. In 2000, U.S. Congress authorized the modernization effort, referred to as GPS III. In addition to GPS, other systems are in use or under development. The Russian Global Navigation Satellite System (GLONASS) was developed contemporaneously with GPS, but suffered from incomplete coverage of the globe until the mid-2000s. There are also the planned European Union Galileo, Chinese Compass navigation system, and Indian Regional Navigational Satellite System.

HISTORY The design of GPS is based partly on similar ground-based radio-navigation systems, such as LORAN and the Decca Navigator developed in the early 1940s, and used during World War II. Predecessors In 1956, the German-American physicist Friedwardt Winterberg proposed a test of general relativity (for time slowing in a strong gravitational field) using accurate atomic clocks placed in orbit inside artificial satellites. (To achieve accuracy requirements, GPS uses principles of general relativity to correct the satellites' atomic clocks.) Additional inspiration for GPS came when the Soviet Union launched the first man-made satellite, Sputnik in 1957. Two American physicists, William Guier and George Weiffenbach, at Johns Hopkins's Applied Physics Laboratory (APL), decided on their own to monitor Sputnik's radio transmissions.[5] Within hours they realized that, because of the Doppler effect, they could pinpoint where the satellite was along its orbit from the Doppler shift. The Director of the APL gave them access to their UNIVAC to do the heavy calculations required. The following spring, Frank McClure, the deputy director of the APL, asked Guier and Weiffenbach to investigate the inverse problem pinpointing the user's location given that of the satellite. (The Navy was developing the submarine-launched Polaris missile, which required them to know the submarine's location.) This led them and APL to develop the Transit system.

Official

logo Emblem

of

for NAVSTAR the50th Space GPS Wing

The first satellite navigation system, Transit, used by the United States Navy, was first successfully tested in 1960. It used a constellation of five satellites and could provide a navigational fix approximately once per hour. In 1967, the U.S. Navy developed the Timation satellite that proved the ability to place accurate clocks in space, a technology

required by GPS. In the 1970s, the ground-based Omega Navigation System, based on phase comparison of signal transmission from pairs of stations, became the first worldwide radio navigation system. Limitations of these systems drove the need for a more universal navigation solution with greater accuracy. While there were wide needs for accurate navigation in military and civilian sectors, almost none of those were seen as justification for the billions of dollars it would cost in research, development, deployment, and operation for a constellation of navigation satellites. During the Cold War arms race, the nuclear threat to the existence of the United States was the one need that did justify this cost in the view of the United States Congress. This deterrent effect is why GPS was funded. It is also the reason for the ultra secrecy at that time. The nuclear triad consisted of the United States Navy's submarine-launched ballistic missiles (SLBMs) along with United States Air Force (USAF) strategic bombers and intercontinental ballistic missiles (ICBMs). Considered vital to the nuclear deterrence posture, accurate determination of the SLBM launch position was a force multiplier. Precise navigation would enable United States submarines to get an accurate fix of their positions prior to launching their SLBMs. The USAF with two-thirds of the nuclear triad also had requirements for a more accurate and reliable navigation system. The Navy and Air Force were developing their own technologies in parallel to solve what was essentially the same problem. To increase the survivability of ICBMs, there was a proposal to use mobile launch platforms (such as Russian SS-24 and SS-25) and so the need to fix the launch position had similarity to the SLBM situation. In 1960, the Air Force proposed a radio-navigation system called MOSAIC (Mobile System for Accurate ICBM Control) that was essentially a 3-D LORAN. A follow-on study called Project 57 was worked in 1963 and it was "in this study that the GPS concept was born." That same year the concept was pursued as Project 621B, which had "many of the attributes that you now see in GPS" and promised increased accuracy for Air Force bombers as well as ICBMs. Updates from the Navy Transit system were too slow for the high speeds of Air Force operation. The Navy Research Laboratory continued advancements with their Timation (Time Navigation) satellites, first launched in 1967, and with the third one in 1974 carrying the first atomic clock into orbit.

Another important predecessor to GPS came from a different branch of the United States military. In 1964, the United States Army orbited its first Sequential Collation of Range (SECOR) satellite used for geodetic surveying. The SECOR system included three ground-based transmitters from known locations that would send signals to the satellite transponder in orbit. A fourth ground-based station at an undetermined position could then use those signals to fix its location precisely. The last SECOR satellite was launched in 1969. Decades later during the early years of GPS, civilian surveying became one of the first fields to make use of the new technology, because they could reap benefits of signals from the less-than-complete GPS constellation years before it was declared operational. GPS can be thought of as an evolution of the SECOR system where the ground-based transmitters have been migrated into orbit. Development With these parallel developments in the 1960s, it was realized that a superior system could be developed by synthesizing the best technologies from 621B, Transit, Timation, and SECOR in a multi-service program. During Labor Day weekend in 1973, a meeting of about 12 military officers at the Pentagon discussed the creation of a Defense Navigation Satellite System (DNSS). It was at this meeting that "the real synthesis that became GPS was created." Later that year, the DNSS program was named Navstar. With the individual satellites being associated with the name Navstar (as with the predecessors Transit and Timation), a more fully encompassing name was used to identify the constellation of Navstar satellites, Navstar-GPS, which was later shortened simply to GPS.[12] After Korean Air Lines Flight 007, carrying 269 people, was shot down in 1983 after straying into the USSR's prohibited airspace, in the vicinity of Sakhalin and Moneron Islands, President Ronald issued a directive making GPS freely available for civilian use, once it was sufficiently developed, as a common good. The first satellite was launched in 1989, and the 24th satellite was launched in 1994. Roger L. Easton is widely credited as the primary inventor of GPS. Initially, the highest quality signal was reserved for military use, and the signal available for civilian use was intentionally degraded (Selective Availability). This changed with President Bill Clintonordering Selective Availability to be turned off at midnight May 1, 2000, improving the precision of civilian GPS from 100 meters (330 ft) to 20 meters (66 ft). The executive order signed in 1996 to turn off Selective Availability in 2000 was proposed by the US Secretary of

Defense, William Perry, because of the widespread growth of differential GPS services to improve civilian accuracy and eliminate the US military advantage. Moreover, the US military was actively developing technologies to deny GPS service to potential adversaries on a regional basis. Over the last decade, the U.S. has implemented several improvements to the GPS service, including new signals for civil use and increased accuracy and integrity for all users, all while maintaining compatibility with existing GPS equipment. GPS modernization has now become an ongoing initiative to upgrade the Global Positioning System with new capabilities to meet growing military, civil, and commercial needs. The program is being implemented through a series of satellite acquisitions, including GPS Block III and the Next Generation Operational Control System (OCX). The U.S. Government continues to improve the GPS space and ground segments to increase performance and accuracy. GPS is owned and operated by the United States Government as a national resource. Department of Defense (DoD) is the steward of GPS. Interagency GPS Executive Board (IGEB) oversaw GPS policy matters from 1996 to 2004. After that the National Space-Based Positioning, Navigation and Timing Executive Committee was established by presidential directive in 2004 to advise and coordinate federal departments and agencies on matters concerning the GPS and related systems. The executive committee is chaired jointly by the deputy secretaries of defense and transportation. Its membership includes equivalent-level officials from the departments of state, commerce, and homeland security, the joint chiefs of staff, and NASA. Components of the executive office of the president participate as observers to the executive committee, and the FCC chairman participates as a liaison. The DoD is required by law to "maintain a Standard Positioning Service (as defined in the federal radio navigation plan and the standard positioning service signal specification) that will be available on a continuous, worldwide basis," and "develop measures to prevent hostile use of GPS and its augmentations without unduly disrupting or degrading civilian uses."

Basic concept of GPS A GPS receiver calculates its position by precisely timing the signals sent by GPS satellites high above the Earth. Each satellite continually transmits messages that include

the time the message was transmitted satellite position at time of message transmission

The receiver uses the messages it receives to determine the transit time of each message and computes the distance to each satellite using the speed of light. Each of these distances and satellites' locations define a sphere. The receiver is on the surface of each of these spheres when the distances and the satellites' locations are correct. These distances and satellites' locations are used to compute the location of the receiver using the navigation equations. This location is then displayed, perhaps with a moving map display or latitude and longitude; elevation information may be included. Many GPS units show derived information such as direction and speed, calculated from position changes. In typical GPS operation, four or more satellites must be visible to obtain an accurate result. Four sphere surfaces typically do not intersect. Because of this we can say with confidence that when we solve the navigation equations to find an intersection, this solution gives us the position of the receiver along with accurate time thereby eliminating the need for a very large, expensive, and power hungry clock. The very accurately computed time is used only for display or not at all in many GPS applications, which use only the location. A number of applications for GPS do make use of this cheap and highly accurate timing. These include time transfer, traffic signal timing, and synchronization of cell phone base stations. Although four satellites are required for normal operation, fewer apply in special cases. If one variable is already known, a receiver can determine its position using only three satellites. For example, a ship or aircraft may have known elevation. Some GPS receivers may use additional clues or assumptions such as reusing the last known altitude, dead reckoning, inertial navigation, or including information from the vehicle computer, to give a (possibly degraded) position when fewer than four satellites are visible

Structure
The current GPS consists of three major segments. These are the space segment (SS), a control segment (CS), and a user segment (US). The U.S. Air Force develops, maintains, and operates the space and control segments. GPS satellites broadcast signals from space, and each GPS receiver uses these signals to calculate its three-dimensional location (latitude, longitude, and altitude) and the current time. The space segment is composed of 24 to 32 satellites in medium Earth orbit and also includes the payload adapters to the boosters required to launch them into orbit. The control segment is composed of a master control station, an alternate master control station, and a host of dedicated and shared ground antennas and monitor stations. The user segment is composed of hundreds of thousands of U.S. and allied military users of the secure GPS Precise Positioning Service, and tens of millions of civil, commercial, and scientific users of the Standard Positioning Service

Space segment
The space segment (SS) is composed of the orbiting GPS satellites, or Space Vehicles (SV) in GPS parlance. The GPS design originally called for 24 SVs, eight each in three approximately circular orbits, but this was modified to six orbital planes with four satellites each. The orbits are centered on the Earth, not rotating with the Earth, but instead fixed with respect to the distant stars.[46] The six orbit planes have approximately 55inclination (tilt relative to Earth's equator) and are separated by 60 right ascension of the ascending node (angle along the equator from a reference point to the orbit's intersection). The orbital period is one-half a sidereal day, i.e., 11 hours and 58 minutes. The orbits are arranged so that at least six satellites are always within line of sight from almost everywhere on Earth's surface. The result of this objective is that the four satellites are not evenly spaced (90 degrees) apart within each orbit. In general terms, the angular difference between satellites in each orbit is 30, 105, 120, and 105 degrees apart which, of course, sum to 360 degrees.

Orbiting at an altitude of approximately 20,200 km (12,600 mi); orbital radius of approximately 26,600 km (16,500 mi), each SV makes two complete orbits each sidereal day, repeating the same ground track each day. This was very helpful during development because even with only four satellites, correct alignment means all four are visible from one spot for a few hours each day. For military operations, the ground track repeat can be used to ensure good coverage in combat zones. As of December 2012, there are 32 satellites in the GPS constellation. The additional satellites improve the precision of GPS receiver calculations by providing redundant measurements. With the increased number of satellites, the constellation was changed to a non uniform arrangement. Such an arrangement was shown to improve reliability and availability of the system, relative to a uniform system, when multiple satellites fail. About nine satellites are visible from any point on the ground at any one time (see animation at right), ensuring considerable redundancy over the minimum four satellites needed for a position. Control segment The control segment is composed of 1. a master control station (MCS), 2. an alternate master control station, 3. four dedicated ground antennas and 4. six dedicated monitor stations The MCS can also access U.S. Air Force Satellite Control Network (AFSCN) ground antennas (for additional command and control capability) and NGA (National Geospatial-Intelligence Agency) monitor stations. The flight paths of the satellites are tracked by dedicated U.S. Air Force monitoring stations in Hawaii, Kwajalein, Ascension Island, Diego Garcia, Colorado Springs, Colorado and Cape Canaveral, along with shared NGA monitor stations operated in England, Argentina, Ecuador, Bahrain, Australia and Washington DC. The tracking information is sent to the Air Force Space Command MCS at Schriever Air Force Base 25 km (16 mi) ESE of Colorado Springs, which is operated by the 2nd Space Operations Squadron(2 SOPS) of the U.S. Air Force. Then 2 SOPS contacts each GPS satellite regularly with a navigational update using dedicated or shared (AFSCN) ground antennas (GPS dedicated ground antennas are

located at Kwajalein, Ascension Island, Diego Garcia, and Cape Canaveral). These updates synchronize the atomic clocks on board the satellites to within a few nanoseconds of each other, and adjust the ephemeris of each satellite's internal orbital model. The updates are created by a Kalman filter that uses inputs from the ground monitoring stations, space weather information, and various other inputs. Satellite maneuvers are not precise by GPS standards. So to change the orbit of a satellite, the satellite must be marked unhealthy, so receivers will not use it in their calculation. Then the maneuver can be carried out, and the resulting orbit tracked from the ground. Then the new ephemeris is uploaded and the satellite marked healthy again. The Operation Control Segment (OCS) currently serves as the control segment of record. It provides the operational capability that supports global GPS users and keeps the GPS system operational and performing within specification. OCS successfully replaced the legacy 1970s-era mainframe computer at Schriever Air Force Base in September 2007. After installation, the system helped enable upgrades and provide a foundation for a new security architecture that supported the U.S. armed forces. OCS will continue to be the ground control system of record until the new segment, Next Generation GPS Operation Control System (OCX), is fully developed and functional. The new capabilities provided by OCX will be the cornerstone for revolutionizing GPSs mission capabilities, and enabling Air Force Space Command to greatly enhance GPS operational services to U.S. combat forces, civil partners and myriad of domestic and international users. The GPS OCX program also will reduce cost, schedule and technical risk. It is designed to provide 50% sustainment cost savings through efficient software architecture and PerformanceBased Logistics. In addition, GPS OCX expected to cost millions less than the cost to upgrade OCS while providing four times the capability. The GPS OCX program represents a critical part of GPS modernization and provides significant information assurance improvements over the current GPS OCS program.

OCX will have the ability to control and manage GPS legacy satellites as well as the next generation of GPS III satellites, while enabling the full array of military signals.

Built on a flexible architecture that can rapidly adapt to the changing needs of todays and future GPS users allowing immediate access to GPS data and constellations status through secure, accurate and reliable information.

Empowers the war fighter with more secure, actionable and predictive information to enhance situational awareness.

Enables new modernized signals (L1C, L2C, and L5) and has M-code capability, which the legacy system is unable to do.

Provides significant information assurance improvements over the current program including detecting and preventing cyber attacks, while isolating, containing and operating during such attacks.

Supports higher volume near real-time command and control capabilities.

On September 14, 2011, the U.S. Air Force announced the completion of GPS OCX Preliminary Design Review and confirmed that the OCX program is ready for the next phase of development. The GPS OCX program has achieved major milestones and is on track to support the GPS IIIA launch in May 2014.

Communication:
Main article: GPS signals The navigational signals transmitted by GPS satellites encode a variety of information including satellite positions, the state of the internal clocks, and the health of the network. These signals are transmitted on two separate carrier frequencies that are common to all satellites in the network. Two different encodings are used: a public encoding that enables lower resolution navigation, and an encrypted encoding used by the U.S. military.

Message format :

GPS message format Sub frames 1 23 Description Satellite clock, GPS time relationship Ephemeris (precise satellite orbit) Almanac component (satellite network synopsis, error correction)

45

Each GPS satellite continuously broadcasts a navigation message on L1 C/A and L2 P/Y frequencies at a rate of 50 bits per second . Each complete message takes 750 seconds (12 1/2 minutes) to complete. The message structure has a basic format of a 1500-bit-long frame made up of five subframes, each subframe being 300 bits (6 seconds) long. Subframes 4 and 5 are subcommutated 25 times each, so that a complete data message requires the transmission of 25 full frames. Each subframe consists of ten words, each 30 bits long. Thus, with 300 bits in a subframe times 5 subframes in a frame times 25 frames in a message, each message is 37,500 bits long. At a transmission rate of 50 bps, this gives 750 seconds to transmit an entire almanac message. Each 30-second frame begins precisely on the minute or half-minute as indicated by the atomic clock on each satellite. The first subframe of each frame encodes the week number and the time within the week, as well as the data about the health of the satellite. The second and the third subframes contain the ephemeris - the precise orbit for the satellite. The fourth and fifth subframes contain the almanac, which contains coarse orbit and status information for up to 32 satellites in the constellation as well as data related to error correction. Thus, in order to obtain an accurate satellite location from this transmitted message the receiver must demodulate the message from each satellite it includes in its solution for 18 to 30 seconds. In order to collect all the

transmitted almanacs the receiver must demodulate the message for 732 to 750 seconds or 12 1/2 minutes. All satellites broadcast at the same frequencies. Signals are encoded using code division multiple access (CDMA) allowing messages from individual satellites to be distinguished from each other based on unique encodings for each satellite (that the receiver must be aware of). Two distinct types of CDMA encodings are used: the coarse/acquisition (C/A) code, which is accessible by the general public, and the precise P(Y) code, which is encrypted so that only the U.S. military can access it. The ephemeris is updated every 2 hours and is generally valid for 4 hours, with provisions for updates every 6 hours or longer in non-nominal conditions. The almanac is updated typically every 24 hours. Additionally data for a few weeks following is uploaded in case of transmission updates that delay data upload.

Subframe # Page #

Name

Word # Bits Scale Signed

all

Week Number 3

1-10 1:1

No

all

CA or P On L2 3

11,12 1:1

No

all

URA Index

13-16 1:1

No

all

SV_Health

17-22 1:1

No

all

IODC(MSB)

23,24 1:1

No

all

L2Pdata flag

1:1

No

all

ResW4

2-24 N/A

N/A

all

ResW5

1-24 N/A

N/A

all

ResW6

1-24 N/A

N/A

all

ResW7

1-16 N/A

N/A

all

TGD

17-24 2^-31 Yes

all

IODC (LSB)

1-8

1:1

No

all

TOC

9-24 2^4

No

all

AF2

1-8

2^-55 Yes

all

AF1

9-24 2^-43 Yes

all

AF0

10

1-22 2^-31 Yes

Subframe # Page #

Name

Word # Bits Scale Signed

all

IODE

1-8

1:1

No

all

CRS

9-24 2^-5

Yes

all

Delta N

1-16 2^-43 Yes

all

M0 (MSB)

17-24 2^-31 Yes

all

M0 (LSB)

1-24

all

CUC

1-16 2^-29 Yes

all

e (MSB)

17-24 2^-33 No

all

e (LSB)

1-24

all

CUS

1-16 2^-29 Yes

all

root A (MSB) 8

17-24 2^-19 No

all

root A (LSB) 9

1-24

all

TOE

10

1-16 2^4

No

all

FitInt

10

17

1:1

No

all

AODO

10

18-22 900

No

Subframe # Page #

Name

Word # Bits Scale Signed

all

CIC

1-16 2^-29 Yes

all

Omega 0 (MSB) 3

17-24 2^-31 Yes

all

Omega 0 (LSB) 4

1-24

all

CIS

1-16 2^-29 Yes

all

i0 (MSB)

17-24 2^-31 Yes

all

i0 (LSB)

1-24

all

CRC

1-16 2^-5

Yes

all

Omega (MSB)

17-24 2^-31 Yes

all

Omega (LSB)

1-24

all

Omega Dot

1-24 2^-43 Yes

all

IODE

10

1-8

1:1

No

all

IDOT

10

9-22 2^-43 Yes

Satellite frequencies
GPS frequency overview Band L1 Frequency Description

Coarse-acquisition (C/A) and encrypted precision P(Y) 1575.42 MHz codes, plus the L1 civilian (L1C) and military (M) codes on future Block III satellites. 1227.60 MHz P(Y) code, plus the L2C and military codes on the Block IIR-M and newer satellites.

L2

L3 L4 L5

1381.05 MHz Used for nuclear detonation (NUDET) detection. 1379.913 MHz Being studied for additional ionospheric correction. 1176.45 MHz Proposed for use as a civilian safety-of-life (SoL) signal.

All satellites broadcast at the same two frequencies, 1.57542 GHz (L1 signal) and 1.2276 GHz (L2 signal). The satellite network uses a CDMA spread-spectrum technique where the low-bitrate message data is encoded with a high-rate pseudo-random (PRN) sequence that is different for each satellite. The receiver must be aware of the PRN codes for each satellite to reconstruct the actual message data. The C/A code, for civilian use, transmits data at 1.023 million chips per second, whereas the P code, for U.S. military use, transmits at 10.23 million chips per second. The actual internal reference of the satellites is 10.22999999543 MHz to compensate for relativistic effects that make observers on Earth perceive a different time reference with respect to the transmitters in orbit. The L1 carrier is modulated by both the C/A and P codes, while the L2 carrier is only modulated by the P code. The P code can be encrypted as a so-called P(Y) code that is only available to military equipment with a proper decryption key. Both the C/A and P(Y) codes impart the precise time-of-day to the user. The L3 signal at a frequency of 1.38105 GHz is used to transmit data from the satellites to ground stations. This data is used by the United States Nuclear Detonation (NUDET) Detection System (USNDS) to detect, locate, and report nuclear detonations (NUDETs) in the Earth's atmosphere and near space. One usage is the enforcement of nuclear test ban treaties. The L4 band at 1.379913 GHz is being studied for additional ionospheric correction. The L5 frequency band at 1.17645 GHz was added in the process of GPS modernization. This frequency falls into an internationally protected range for aeronautical navigation, promising little or no interference under all circumstances. The first Block IIF satellite that would provide this signal is set to be launched in 2009.[77] The L5 consists of two carrier components that are in phase quadrature with each other. Each carrier component is bi-phase shift key (BPSK) modulated by a separate bit train. "L5, the third civil GPS signal, will

eventually support safety-of-life applications for aviation and provide improved availability and accuracy." A conditional waiver has recently been granted to LightSquared to operate a terrestrial broadband service near the L1 band. Although LightSquared had applied for a license to operate in the 1525 to 1559 band as early as 2003 and it was put out for public comment, the FCC asked LightSquared to form a study group with the GPS community to test GPS receivers and identify issue that might arise due to the larger signal power from the LightSquared terrestrial network. The GPS community had not objected to the LightSquared (formerly MSV and SkyTerra) applications until November 2010, when LightSquared applied for a modification to its Ancillary Terrestrial Component (ATC) authorization. This filing (SAT-MOD-20101118-00239) amounted to a request to run several orders of magnitude more power in the same frequency band for terrestrial base stations, essentially repurposing what was supposed to be a "quiet neighborhood" for signals from space as the equivalent of a cellular network. Testing in the first half of 2011 has demonstrated that the impact of the lower 10 MHz of spectrum is minimal to GPS devices (less than 1% of the total GPS devices are affected). The upper 10 MHz intended for use by LightSquared may have some impact on GPS devices. There is some concern that this will seriously degrade the GPS signal for many consumer uses. Aviation Week magazine reports that the latest testing (June 2011) confirms "significant jamming" of GPS by LightSquared's system.

Demodulation and decoding

Demodulating and Decoding GPS Satellite Signals using the Coarse/Acquisition Gold code.

Because all of the satellite signals are modulated onto the same L1 carrier frequency, the signals must be separated after demodulation. This is done by assigning each satellite a unique binary sequence known as a Gold code. The signals are decoded after demodulation using addition of the Gold codes corresponding to the satellites monitored by the receiver. If the almanac information has previously been acquired, the receiver picks the satellites to listen for by their PRNs, unique numbers in the range 1 through 32. If the almanac information is not in memory, the receiver enters a search mode until a lock is obtained on one of the satellites. To obtain a lock, it is necessary that there be an unobstructed line of sight from the receiver to the satellite. The receiver can then acquire the almanac and determine the satellites it should listen for. As it detects each satellite's signal, it identifies it by its distinct C/A code pattern. There can be a delay of up to 30 seconds before the first estimate of position because of the need to read the ephemeris data. Processing of the navigation message enables the determination of the time of transmission and the satellite position at this time. For more information see Demodulation and Decoding, Advanced.

Navigation equations The receiver uses messages received from satellites to determine the satellite positions and time sent. The x, y, and z components of satellite position and the time sent are designated as [xi, yi, zi, ti] where the subscript i denotes the satellite and has the value 1, 2, ..., n, where the time of message reception indicated by the on-board clock is where is is When

, the true reception time is

is receiver's clock bias (i.e., clock delay). The message's transit time . Assuming the message traveled at the speed of light, , the distance traveled

. Knowing the distance from receiver to satellite and the satellite's position

implies that the receiver is on the surface of a sphere centered at the satellite's position with radiusequal to this distance. Thus the receiver is at or near the intersection of the surfaces of the spheres if it receives signals from more than one satellite. In the ideal case of no errors, the receiver is at the intersection of the surfaces of the spheres.

The clock error or bias, b, is the amount that the receiver's clock is off. The receiver has four unknowns, the three components of GPS receiver position and the clock bias [x, y, z, b]. The equations of the sphere surfaces are given by:

or in terms of pseudoranges,

, as .

These equations can be solved by algebraic or numerical methods.

Bancroft's method Bancroft's method involves an algebraic as opposed to numerical method and can be used for the case of four or more satellites. Bancroft's method provides one or two solutions for the four unknowns. However when there are two solutions, only one of these two solutions will be a near earth sensible solution. When there are four satellites, we use the inverse of the B matrix. If there are more than four satellites then we use the pseudoinverse of the B matrix since in this case the B matrix is no longer square.

Trilateration The receiver can use trilateration and one dimensional numerical root finding. Satellite position and pseudorange determines a sphere centered on the satellite with radius equal to the pseudorange. Trilateration is used to estimate receiver position based on the intersection of three sphere surfaces so determined. In the usual case of two intersections of three sphere surfaces, the point nearest the surface of the sphere corresponding to the fourth satellite is chosen. Let d denote the signed distance from the current estimate of receiver position to the sphere around the fourth satellite. The notation, d(correction) denotes this as a function of the clock correction. The problem is to determine the correction such that d(correction) = 0. This is the familiar problem of finding the zeroes of a one dimensional non-linear function of a scalar

variable. Iterative numerical methods, such as those found in the chapter on root finding in Numerical Recipes can solve this type of problem.

Multidimensional Newton-Raphson calculations Alternatively, multidimensional root finding methods such as the Newton-Raphson method can be used. The approach is to linearize around an approximate solution, say from iteration k, then solve the linear equations derived from the . Although there is no

quadratic equations above to obtain

guarantee that the method always converges due to the fact that multidimensional roots cannot be bounded, when a neighborhood containing a solution is known as is usually the case for GPS, it is quite likely that a solution will be found. It has been shown that results are comparable in accuracy to those of Bancroft's method.

]Additional methods for more than four satellites

When more than four satellites are available, the calculation can use the four best or more than four, considering number of channels, processing capability, and geometric dilution of precision(GDOP). Using more than four is an over-determined system of equations with no unique solution, which must be solved by least-squares or a similar technique. If all visible satellites are used, the results are as good as or better than using the four best. Errors can be estimated through the residuals. With each combination of four or more satellites, a GDOP factor can be calculated, based on the relative sky directions of the satellites used. As more satellites are picked up, pseudoranges from various 4-way combinations can be processed to add more estimates to the location and clock offset. The receiver then takes the weighted average of these positions and clock offsets. After the final location and time are calculated, the location is expressed in a specific coordinate system such as latitude and longitude, using the WGS 84 geodetic datum or a country-specific system.

Error sources and analysis Main article: Error analysis for the Global Positioning System GPS error analysis examines the sources of errors in GPS results and the expected size of those errors. GPS makes corrections for receiver clock errors and other effects but there are still residual errors which are not corrected. Sources of error include signal arrival time measurements, numerical calculations, atmospheric effects, ephemeris and clock data, multipath signals, and natural and artificial interference. The magnitude of the residual errors resulting from these sources is dependent on geometric dilution of precision. Accuracy enhancement and surveying

Augmentation Integrating external information into the calculation process can materially improve accuracy. Such augmentation systems are generally named or described based on how the information arrives. Some systems transmit additional error information (such as clock drift, ephemera, or ionospheric delay), others characterize prior errors, while a third group provides additional navigational or vehicle information. Examples of augmentation systems include the Wide Area Augmentation System (WAAS), European Geostationary Navigation Overlay Service (EGNOS), Differential GPS, Inertial Navigation Systems (INS) and Assisted GPS.

Precise monitoring:
Accuracy can be improved through precise monitoring and measurement of existing GPS signals in additional or alternate ways. The largest remaining error is usually the unpredictable delay through the ionosphere. The spacecraft broadcast ionospheric model parameters, but errors remain. This is one reason GPS spacecraft transmit on at least two frequencies, L1 and L2. Ionospheric delay is a well-defined function of frequency and the total electron content (TEC) along the path, so measuring the

arrival time difference between the frequencies determines TEC and thus the precise ionospheric delay at each frequency. Military receivers can decode the P(Y)-code transmitted on both L1 and L2. Without decryption keys, it is still possible to use a codeless technique to compare the P(Y) codes on L1 and L2 to gain much of the same error information. However, this technique is slow, so it is currently available only on specialized surveying equipment. In the future, additional civilian codes are expected to be transmitted on the L2 and L5 frequencies (see GPS modernization). Then all users will be able to perform dual-frequency measurements and directly compute ionospheric delay errors. A second form of precise monitoring is called Carrier-Phase Enhancement (CPGPS). This corrects the error that arises because the pulse transition of the PRN is not instantaneous, and thus the correlation (satellite-receiver sequence matching) operation is imperfect. CPGPS uses

the L1 carrier wave, which has a period of is about one-thousandth of the C/A Gold code bit period

, which

of

, to act as an additional clock signal and resolve the

uncertainty. The phase difference error in the normal GPS amounts to 23 metres (6.69.8 ft) of ambiguity. CPGPS working to within 1% of perfect transition reduces this error to 3 centimeters (1.2 in) of ambiguity. By eliminating this error source, CPGPS coupled with DGPS normally realizes between 2030 centimeters (7.912 in) of absolute accuracy. Relative Kinematic Positioning (RKP) is a third alternative for a precise GPS-based positioning system. In this approach, determination of range signal can be resolved to a precision of less than 10 centimeters (3.9 in). This is done by resolving the number of cycles that the signal is transmitted and received by the receiver by using a combination of differential GPS (DGPS) correction data, transmitting GPS signal phase information and ambiguity resolution techniques via statistical testspossibly with processing in real-time (real-time kinematic positioning, RTK).

[Timekeeping Leap seconds While most clocks are synchronized to Coordinated Universal Time (UTC), the atomic clocks on the satellites are set to GPS time (GPST; see the page of United States Naval Observatory). The difference is that GPS time is not corrected to match the rotation of the Earth, so it does not contain leap seconds or other corrections that are periodically added to UTC. GPS time was set to match Coordinated Universal Time (UTC) in 1980, but has since diverged. The lack of corrections means that GPS time remains at a constant offset with International Atomic Time (TAI) (TAI GPS = 19 seconds). Periodic corrections are performed on the on-board clocks to keep them synchronized with ground clocks.[92]
The GPS navigation message includes the difference between GPS time and UTC. As of July 2012, GPS time is 16 seconds ahead of UTC because of the leap second added to UTC June 30, 2012.[93] Receivers subtract this offset from GPS time to calculate UTC and specific timezone values. New GPS units may not show the correct UTC time until after receiving the UTC offset message. The GPS-UTC offset field can accommodate 255 leap seconds (eight bits) that, given the current period of the Earth's rotation (with one leap second introduced approximately every 18 months), should be sufficient to last until approximately the year 2300.

Accuracy
GPS time is theoretically accurate to about 14 nanoseconds.[94] However, most receivers lose accuracy in the interpretation of the signals and are only accurate to 100 nanoseconds.[95][96]

Format
As opposed to the year, month, and day format of the Gregorian calendar, the GPS date is expressed as a week number and a seconds-into-week number. The week number is transmitted as a ten-bit field in the C/A and P(Y) navigation messages, and so it becomes zero again every 1,024 weeks (19.6 years). GPS week zero started at 00:00:00 UTC (00:00:19 TAI) on January 6, 1980, and the week number became zero again for the first time at 23:59:47 UTC on August 21, 1999 (00:00:19 TAI on August 22, 1999). To determine the current Gregorian date, a GPS receiver must be provided with the approximate date (to within 3,584 days) to correctly translate the GPS date signal. To address this concern the modernized GPS navigation message uses a 13-bit field that only repeats every 8,192 weeks (157 years), thus lasting until the year 2137 (157 years after GPS week zero).

Carrier phase tracking (surveying)


Another method that is used in surveying applications is carrier phase tracking. The period of the carrier frequency multiplied by the speed of light gives the wavelength, which is about 0.19 meters for the L1 carrier. Accuracy within 1% of wavelength in detecting the leading edge reduces this component of pseudorange error to as little as 2 millimeters. This compares to 3 meters for the C/A code and 0.3 meters for the P code.

However, 2 millimeter accuracy requires measuring the total phasethe number of waves multiplied by the wavelength plus the fractional wavelength, which requires specially equipped receivers. This method has many surveying applications. Triple differencing followed by numerical root finding, and a mathematical technique called least squares can estimate the position of one receiver given the position of another. First, compute the difference between satellites, then between receivers, and finally between epochs. Other orders of taking differences are equally valid. Detailed discussion of the errors is omitted. The satellite carrier total phase can be measured with ambiguity as to the number of cycles. Let denote the phase of the carrier of satellite j measured by receiver i at time . This notation shows the meaning of the subscripts i, j, and k. The receiver (r), satellite (s), and time (t) come in alphabetical order as arguments of and to balance readability and conciseness, let be a concise abbreviation. Also we define three functions, : , which return differences between receivers, satellites, and time points, respectively. Each function has variables with three subscripts as its arguments. These three functions are defined below. If is a function of the three integer arguments, i, j, and k then it is a valid argument for the functions, : , , and . Also if are valid arguments for the three functions is a valid argument with , with the values defined as

and a and b are constants then values defined as

, , and . Receiver clock errors can be approximately eliminated by differencing the phases measured from satellite 1 with that from satellite 2 at the same epoch.[97] This difference is designated as Double differencing[98] computes the difference of receiver 1's satellite difference from that of receiver 2. This approximately eliminates satellite clock errors. This double difference is:

Triple differencing[99] subtracts the receiver difference from time 1 from that of time 2. This eliminates the ambiguity associated with the integral number of wavelengths in carrier phase provided this ambiguity does not change with time. Thus the triple difference result eliminates practically all clock bias errors and the integer ambiguity. Atmospheric delay and satellite ephemeris errors have been significantly reduced. This triple difference is:

Triple difference results can be used to estimate unknown variables. For example if the position of receiver 1 is known but the position of receiver 2 unknown, it may be possible to estimate the position of receiver 2 using numerical root finding and least squares. Triple difference results for three independent time pairs quite possibly will be sufficient to solve for receiver 2's three position components. This may require the use of a numerical procedure.[100][101] An approximation of receiver 2's position is required to use such a numerical method. This initial value can probably be provided from the navigation message and the intersection of sphere surfaces. Such a reasonable estimate can be key to successful multidimensional root finding. Iterating from three time pairs and a fairly good initial value produces one observed triple difference result for receiver 2's position. Processing additional time pairs can improve accuracy, overdetermining the answer with multiple solutions. Least squares can estimate an overdetermined system. Least squares determines the position of receiver 2 which best fits the observed triple difference results for receiver 2 positions under the criterion of minimizing the sum of the squares.

4.SOFTWARE REQUIREMENT THEORY

Arduino:
Arduino is a single-board microcontroller designed to make the process of using electronics in multidisciplinary projects more accessible. The hardware consists of a simple open source hardware board designed around an 8-bit Atmel AVR microcontroller, though a new model has been designed around a 32-bit Atmel ARM. The software consists of a standard programming language compiler and a boot loader that executes on the microcontroller. Arduino boards can be purchased pre-assembled or do-it-yourself kits. Hardware design information is available for those who would like to assemble an Arduino by hand. There are sixteen official Arduinos that have been commercially produced to date. Numerous hardware variations of the Arduino are being sold by third parties.

History
In 2005, in Ivrea, Italy, a project was initiated to make a device for controlling student-built interaction design projects with less expense than with other prototyping systems available at the time. Founders Massimo Banzi and David Cuartielles named the project after Arduin of Ivrea, the main historical character of the town,[1] and began producing boards in a small factory located in the same region as the computer company Olivetti.[2] The Arduino project is a fork of the open source Wiring platform[3] and is programmed using a Wiring-based language (syntax and libraries), similar to C++ with some slight simplifications and modifications, and a Processing-based integrated development environment (IDE). Arduino was built around the Wiring project of Hernando Barragan. Wiring was Hernando's thesis project at the Interaction Design Institute Ivrea. It was intended to be an electronic version of Processing that used our programming environment and was patterned after the Processing syntax. It was supervised by myself and Massimo Banzi, an Arduino founder. I don't think Arduino would exist without Wiring and I don't think Wiring would exist without Processing. And I know Processing would certainly not exist without Design By Numbers and John Maeda.[3] In October 2008, the Arduino Duemilanove was announced.[4] In March 2009, the Arduinio Mega was announced.[4] As of May 2011, more than 300,000 Arduino units were in use around the world

Software
The Arduino integrated development environment (IDE) is a cross-platform application written in Java, and is derived from the IDE for the Processing programming language and the Wiring projects. It is designed to introduce programming to artists and other newcomers unfamiliar with software development. It includes a code editor with features such as syntax highlighting, brace matching, and automatic indentation, and is also capable of compiling and uploading programs to the board with a single click. There is typically no need to edit makefiles or run programs on a command-line interface.[citation needed] Arduino programs are written in C or C++. The Arduino IDE comes with a software library called "Wiring" from the original Wiring project, which makes many common input/output operations much easier. Users only need define two functions to make a runnable cyclic executive program:
setup(): a function run once at the start of a program that can initialize settings loop(): a function called repeatedly until the board powers off

A typical first program for a microcontroller simply blinks an LED on and off. In the Arduino environment, the user might write a program like this:[13]

The integrated pin 13 LED

#define LED_PIN 13 void setup () { pinMode (LED_PIN, OUTPUT); // enable pin 13 for digital output } void loop () { digitalWrite (LED_PIN, HIGH); // turn on the LED delay (1000); // wait one second (1000 milliseconds) digitalWrite (LED_PIN, LOW); // turn off the LED delay (1000); // wait one second } It is a feature of most Arduino boards that they have an LED and load resistor connected between pin 13 and ground, a convenient feature for many simple tests.[13] The previous code would not be seen by a standard C++ compiler as a valid program, so when the user clicks the "Upload to I/O board" button in the IDE, a copy of the code is written to a temporary file with an extra include header at the top and a very simple main() function at the bottom, to make it a valid C++ program.

The Arduino IDE uses the GNU toolchain and AVR Libc to compile programs, and uses avrdude to upload programs to the board. As the Arduino platform uses Atmel microcontrollers, Atmel's development environment, AVR Studio or the newer Atmel Studio, may also be used to develop software for the Arduino.

You might also like