You are on page 1of 49

1

CANDIDATE’S DECLARATION

This is to certify that Aadhar Gupta, Yogesh Kalyan and Prince has built their major project
“Accident Detection And Location Messaging System”; in partial fulfillment of the
requirement for the award of degree B.Tech. in Electronics & Communication Engineering
at Indo Global College of Engineering, Abhipur. The students has worked to learn all the
details mentioned in this project report.

Signature of Project Incharge Members of Project

Prof. R.K. Kanwar Aadhar Gupta - 1245346

Dr. Hardeep Singh Yogesh Kalyan - 1245362

Er. Abhishek Thakur Prince - 1314846


2

ABSTRACT

In highly populated Countries like India, during accidents, people lose their lives due to
unavailability of proper medical facilities at the right time. This project senses any accident in
the vehicle and intimates pre-programmed numbers like the owner of the vehicle, ambulance,
police etc. The GSM technology is used to send the position of the vehicle as a SMS to those
numbers. And also the position of the vehicle can be obtained by the owner of the vehicle or
anyone with proper permission by sending an SMS to a number. Most of the companies wants
to keep track of their vehicles, with this equipment we can keep track of the vehicle by
periodically sending SMS and the position of the vehicle is sent by the GSM modem as a SMS
to the user.

To know the position of the vehicle, the owner sends a request through a SMS. This is received
by a GSM modem in the device and processed by the Spartan processor and the processor
sends command to a GPS module in the device. The GPS module responds with coordinates
position of the vehicle. This position is sent to the user as a SMS to the user with date, time,
latitude and longitude positions.

When there is an accident, the accelerometer sensor detects the change in position and sends a
signal to the processor. The processor analyses the signal and finds there is an accident.

It immediately sends the position of the vehicle and also the information that there is an
accident, to pre-programmed numbers such as the owner of the vehicle, police, ambulance etc.
So the ambulance arrives in time and the police can arrive in time to clear the traffic. This
reduces the time taken by ambulance to arrive and also traffic can be cleared easily
3

ACKNOWLEDGEMENT

Apart from my efforts, the success of this project depends largely on the encouragement and
guidelines of many others. I take this opportunity to express my gratitude to the people who
have been instrumental in the successful completion of this training report.

I would like to show my greatest appreciation to Prof.Rajesh Kanwar, Dr Hardeep Singh &
Er. Abhishek Thakur. I can’t say thank you enough for his tremendous support and help. I
feel motivated and encouraged every time I attend his meeting. Without his encouragement and
guidance this project would not have materialized.

The guidance and support received from our project-work coordinators was vital for the
success of the dissertation. Without the wise counsel and able guidance, it would have been
impossible to complete the dissertation in this manner I am grateful for his/ her constant
support and help.

I express gratitude to other faculty members of ECE Department, IGCE, Abhipur for their
intellectual support throughout the project completion. Finally, I am indebted to all whosoever
have contributed in this project work.

Aadhar Gupta

Yogesh Kalyan

Prince
4

LIST OF FIGURES

Figure No. Description Page No.

1.1 Block diagram for Accident detection and location messaging 12


system.
2.1 Circuit diagram for Accident Detection and Location Messaging 14
System
3.1(a) (a)Beeper (about 3kHz) 19

3.1(b) circuit symbol 19

3.1(c) Buzzer (about 400Hz) 19

3.2 Potentiometer Symbol 20

3.3 Resistance

3.4 Various type of Capacitor

3.5.1 general PCB 23

3.5.2 general PCB 23

3.5.3 printed circuit board 24

3.6 crystal oscillator 24

3.7 liquid crystal display 25

3.8 Transistor types 25

3.9 Arduino UNO 26

3.10 Pin Diagram of ATMega328p 28

3.11 Arduino mapping 28

4.1 TINA-TI Schematic Editor Display 29

4.2 Building a Circuit with TINA-TI 30

4.3 Active and Passive Component Selection 31

4.4 Wiring Components Together 33


5

4.5 DC Analysis with Voltages/Currents Table Displayed 35

4.6 Additional TINA Analysis Capabilities 36

4.7 Virtual Instrumentation Testing 37

5.1 GPS module integrated with patch antenna 39

5.2 block diagram of GPS L80 40

5.3 pin diagram of GPS L80 40

5.4 pin description of the GPS L80 41

5.5 connection of serial interfaces 42

5.6 RS- 232 level shift circuit 43

5.7 interfacing GPS with Arduino 44

6.1 . GSM 900A module 46

6.2 pin diagram of GSM module 47

6.3 block diagram and working 48

6.4 interfacing with Arduino 49

7.1 51
shortcuts or key features used in Arduino
7.2 uploading menu 53

7.3 boards used in arduino IDE 57


6

LIST OF TABLES

Table No. Description Page No.

1 component list 13

2 resistor values colour table 21

3 specification of GSM 47

4 Pin specification of GSM 47


7

NOMENCLATURE

Sr. No Abbreviation Description


1 GSM Global System for Mobile
2 GPRS Global Packet Radio Service
3 GPS Global Positioning System
4 MODEM Modulator and demodulator
5 DTR Data terminal ready
6 CTS Clear to send
7 RTS Request to send
8 LED Light emitting diode
9 SMD Surface mounted devices
10 DCE Data communication equipment
11 DTE Data Terminal Equipment
12 UART Universal asynchronous receiver and transmitter
13 PCB Printed circuit board
14 LCD Liquid crystal display
8

TABLE OF CONTENTS

Page no.

Declaration i

Abstract ii

Acknowledgement iii

List of Figures iv

List of Tables vi

Nomenclature

Chapter 1: INTRODUCTION
1.1 INTRODUCTION 11
1.2 BLOCK DIAGRAM 12
1.3 COMPONENT LIST 13
Chapter 2: Circuit Diagram and Working of Project
2.1 Circuit Diagram 14
2.2 CIRCUIT EXPLANATION 14
2.3 WORKING 15
2.4 CODE 16
Chapter 3: COMPONENT DESCRIPTION
3.1 Buzzer and Beeper 19
3.2 Variable Resistors 19
3.3 Light Emitting Diodes (LEDs) 20
3.3.1 Connecting and soldering 20
3.4 Resistor 20
3.5 CAPACITOR 22
3.6 PCB 22
3.6.1 General PCB 22
3.6.2 General PCB 23
3.6.3 23
Printed Circuit Board
9

3.7 CRYSTAL OSCILLATOR 24


3.8 Liquid Crystal Display 24
3.9 Transistor 25
3.10 ARDUINO 25
3.10.1 PIN DIAGRAM 28
Chapter 4: TINA-Texas Instruments
4.1 TINA (simulation) 29
4.1.1 Building a Circuit with TINA-TI 30
4.2 Adding Passive and Active Components 31
4.3 Arranging and Wiring Components 32
4.4 Analysis Capabilities 33
4.5 DC Analysis 34
4.6 Transient Analysis 35
4.7 Test and Measurement 36
Chapter 5: Global positioning system (GPS)
5.1 GPS Module 38
5.2 Block Diagram 39
5.3 Applications 40
5.4 Pin assignment 40
5.5 Pin Defination 41
5.6 UART Interface 42
5.6.1 UART port 42
5.7 Interfacing with the GPS to the Arduino 44
Chapter 6: Global system for mobile
6.1 GSM/GPRS Module 45
6.2 GSM/GPRS MODEM 45
6.3 GSM Sim 900A 45
6.4 Features 46
6.5 Applications 46
6.6 Specifications 47
6.7 Pin Specification 47
6.7 Working 47
6.8 Testing GSM module 48
6.9 Interfacing the Modem with ARDUINO 48
6.10 Circuit Configuration 49
6.11 Description 49
Chapter 7: Arduino Development Environment (IDE)
7.1 Introduction 51
7.2 Sketch 52
7.3 Tools 52
7.4 Sketchbook 53
7.5 Tabs, Multiple Files, and Compilation 53
7.6 Uploading 53
7.7 Libraries 54
10

7.8 54
Third-Party Hardware
7.9 55
Serial Monitor
7.10 56
boards

Chapter - 1
INTRODUCTION
1.1 INTRODUCTION:
This project can be used to control the thefting of vehicles, track the thefted vehicles
and finding the location of vehicle and also implement the scene of accident alarm
system. In this we are trying to program a GPS/GSM module incorporating an accelerometer to
report occurrences of accident automatically via the GSM communication platform (using SMS
messaging) to the nearest agencies such as hospitals, police stations, fire services and so on,
giving the exact position of the point where the crash had occurred
Every single location in the entire globe can be specified in terms of geographical coordinates.
The geographical coordinate is a system which specifies any given location on the earth surface
as latitude and longitude. There are devices which can read the geographical coordinates of a
place with the help of the signals received from a number of satellites orbiting the earth. The
system of satellites which helps in the positioning of a place is called Global Positioning
System (GPS). The devices which can read the geographical coordinates of a place with the
help of at least four GPS satellites are called GPS Receiver or simply GPS module.
The GPS module continuously produces a set of data regarding the position of the earth surface
where it is situated which includes the current position with respect to the equator of the earth
in terms of Latitude and Longitude. This data can be decoded and printed into the readable
format with the help of a microcontroller only. In this project the data regarding the
11

geographical coordinate is extracted from the GPS output with the help of the Arduino. The
Arduino can be used as a stand-alone board of which the output or inputs can be taken from the
boards or given to the board. They can communicate using standard communication ports like
USART, TWI, SPI etc. which enables them to be connected with various kinds of devices. The
Arduino board is designed for easy prototyping and the IDE used for coding is very simple and
provides so many libraries for interfacing with common external devices.

A Accident Detection and Location Messaging System is an passenger and driver


safety system designed to reduce the severity of an accident. Also known as post-crash
system, this system uses collision detection sensors to detect a dangerous life-threatening crash.
Once the detection is done, these systems gather the location and time through GPS and send
message regarding help following with the location and accident time to the near-ones and the
ambulance or police. It is best suited for emergency help. It is an active safety system, whose
operation is based on signals and information gathered from the sensors and GPS module, and
they typically alert the near- vehicle's current state.
The main aim of the project Accident detection and Location messaging system is to
inform the ambulance and police or near-ones of the accident site and arrange for necessary
steps to control the situation. This system may prove itself as a life saver for many people and
the system is well efficient and worthy to be implemented in ones in a dangerous situation.
These systems actively seek out information in regards to the real scenario.
1.2 BLOCK DIAGRAM:
12

Fig.1 Block diagram for Accident detection and location messaging system.

Accident Detection and Location Messaging System is a system that makes use of GPS and
GSM technologies. Here GPS is used for taking the coordinates of the accident site and the
GSM is used for sending the coordinates along with a message regarding help to the fed phone
number. The control unit here used is an Arduino board that does all the processing and control
tasks. A lcd is provided here for the user that will show the user the location , time and
emergency steps to be followed on when accident occurs.

A Accident Detection and Location Messaging System is an passenger and driver


safety system designed to reduce the severity of an accident. Also known as post-crash
system, this system uses collision detection sensors to detect a dangerous life-threatening crash.
Once the detection is done, these systems gather the location and time through GPS and send
message regarding help following with the location and accident time to the near-ones and the
ambulance or police. It is best suited for emergency help. It is an active safety system, whose
operation is based on signals and information gathered from the sensors and GPS module, and
they typically alert the near-ones in a dangerous situation. These systems actively seek out
information in regards to the vehicle's current state.
13

1.3 COMPONENT LIST

S.NO. COMPONENT QUANTITY

1. ARDUINO BOARD 1

2. VIBRATION SENSOR or REED 1


SWITCH
3. BUZZER 1

4. LCD 16X2 1

5 GSM MODULE 1

6 GPS MODULE 1

7 TACTILE SWITCH 1

8 BATTERY 12V 1

9 BRIDGE RECTIFIER 1

10 REGULATOR IC LM7805 1

11 CAPACITOR (1000uF,100uF) 1,2

Table 1: component list


14

Chapter -2
Circuit Diagram and Working of Project

2.1Circuit Diagram :

Fig2.1. Circuit diagram for Accident Detection and Location Messaging System

2.2 CIRCUIT EXPLANATION:


1. The circuitry of Accident Detection and Messaging System is as show as above.
2. The Tx pin of Arduino is directly connected with Rx pin of GSM module and the Rx pin of
Arduino is directly connected with the Tx pin of GPS receiver.
3. The output pin of collision sensor is connected with digital pin 2 of Arduino. A buzzer is
connected to pin no 4 and 6. And a tactile switch is provided at pin no 3.
4. The 16x2 LCD’s data pins are connected with the arduino’s pin number 7,8,9,10 and
command pin rs, r/w and en of LCD are connected with arduino’s pin number 13,12 an 11
respectively.
5. In case of GSM module we are using its RXD pin only and for GPS module we are only
using the TXD pin.
15

6. The RXD of GSM module is connected to the TXD pin of Arduino and the TXD pin of GPS
module is connected to the RXD pin of Arduino.

2.3 WORKING:

When a collision occurs, The collision sensor is set to HIGH and arduino receives a digital
value 1. This will excite the controller to read the location of the vehicle from the GPS module.
And then the Arduino will send a message including time and location with message regarding
help to the number fed in the program by default. The sending of message is done by using the
GSM module.
A Tactile Switch and a buzzer is also there in the circuit. On collision before sending message
the arduino will wait for some time for the user input. In this time period the buzzer will be in
ON state alerting the driver that it will be sending message after the buzzer stops. In case there
is no need for help the driver has the option to press the tactile switch. This will cancel the
message to send.
And if the switch is not pressed in the time period , the message will be sent to the number
asking for help.
To gather information from GPS we will be using the NEMA commands. And for the GSM
module operation we will be using AT commands. Both of this modules interact with the
arduino using serial communication. In this project we have been using the UART serial
communication.

2.4 CODE :

#include<LiquidCrystal.h>

LiquidCrystal lcd(7,6,5,4,3,2);

#define accident_sense 12

char str[70];

char *test="$GPGGA";

char logitude[10];

char latitude[10];

int i,j,k;

int temp;//int Ctrl+z=26; //for sending msg


16

int led=13;

void setup()

lcd.begin(16,2);

Serial.begin(9600);

pinMode(vibrate_sense, INPUT);

pinMode(led, OUTPUT);

lcd.setCursor(0,0);

lcd.print("accident detection & ");

lcd.setCursor(0,1);

lcd.print("Location Messaging");

delay(3000);

void loop()

if (digitalRead(accident_sense)==1)

digitalWrite(led,LOW);

for(i=18;i<27;i++) //extract latitude from string

{ latitude[j]=str[i];

j++;

for(i=30;i<40;i++) //extract longitude from string

logitude[k]=str[i];

k++;

lcd.setCursor(0,0); //display latitude and longitude on 16X2 lcd display


17

lcd.print("Lat(N)");

lcd.print(latitude);

lcd.setCursor(0,1);

lcd.print("Lon(E)");

lcd.print(logitude);

delay(100);

Serial.begin(9600);

Serial.println("AT+CMGF=1"); //select text mode

delay(10);

Serial.println("AT+CMGS=\"9023155807\""); // enter receipent number

Serial.println("Accident Happend at Place:");

Serial.print("Latitude(N): "); //enter latitude in msg

Serial.println(latitude); //enter latitude value in msg

Serial.print("Longitude(E): "); //enter Longitude in Msg

Serial.println(logitude); //enter longitude value in msg

Serial.print("Help Please");

Serial.write(26); //send msg Ctrl+z=26

temp=0;

i=0;

j=0;

k=0;

delay(20000); // next reading within 20 seconds

Serial.begin(9600);

digitalWrite(led,HIGH);

void serialEvent()

{
18

while (Serial.available()) //Serial incomming data from GPS

char inChar = (char)Serial.read();

str[i]= inChar; //store incomming data from GPS to temparary string str[]

i++;

if (i < 7)

if(str[i-1] != test[i-1]) //check for right string

i=0;

if(i >=60)

break;

}
19

CHAPTER – 3

COMPONENT DESCRIPTION

3.1 Buzzer and Beeper

These devices are output transducers converting electrical energy to sound. They contain an
internal oscillator to produce the sound which is set at about 400Hz for buzzers and about 3kHz
for beepers. Buzzers have a voltage rating but it is only approximate, for example 6V and 12V
buzzers can be used with a 9V supply. Their typical current is about 25mA.
Beepers have wide voltage ranges, such as 3-30V, and they pass a low current of about 10mA.
Buzzers and beepers must be connected the right way round, their red lead is positive (+).

Figure 3.1: (a)Beeper (about 3kHz), (b) circuit symbol , (c) Buzzer (about 400Hz)

3.2 Variable Resistors:

Variable resistors used as potentiometers have all three terminals connected.

This arrangement is normally used to vary voltage, for example to set the switching point of a
circuit with a sensor, or control the volume (loudness) in an amplifier circuit. If the terminals at
the ends of the track are connected across the power supply then the wiper terminal will
provide a voltage which can be varied from zero up to the maximum of the supply.

Figure 3.2 : Potentiometer Symbol

3.3 Light Emitting Diodes (LEDs)

Example: Circuit symbol:

Function

LEDs emit light when an electric current passes through them.


20

3.3.1 Connecting and soldering

LEDs must be connected the correct way round, the diagram may be labelled a or + for anode
and k or - for cathode (yes, it really is k, not c, for cathode!). The cathode is the short lead and
there may be a slight flat on the body of round LEDs. If you can see inside the LED the cathode
is the larger electrode (but this is not an official identification method).

LEDs can be damaged by heat when soldering, but the risk is small unless you are very slow.
No special precautions are needed for soldering most LEDs.

3.4 Resistor:
A resistor is a two-terminal electronic component that produces a voltage across its terminals
that is proportional to the electric current through it in accordance with Ohm's law:
V=IR
Where I is the current through the conductor in units of amperes, V is the potential difference
measured across the conductor in units of volts, and R is the resistance of the conductor in units
of ohms.

Figure 3.3: Resistance

Units: The ohm (symbol: Ω) commonly used multiples and submultiples in electrical and
electronic usage are the milliohm (1x10-3), kilo-ohm (1x103), and mega-ohm (1x106).

The reciprocal of resistance R is called conductance G = 1/R and is measured in siemens (SI
unit), sometimes referred to as a mho.
Each color corresponds to a certain digit, progressing from darker to lighter colors, as shown in
the chart below.
3rd band 4th band Temp.
Color 1st band 2nd band
(multiplier) (tolerance) Coefficient

Black 0 0 ×100
21

Brown 1 1 ×101 ±1% (F) 100 ppm

Red 2 2 ×102 ±2% (G) 50 ppm

Orange 3 3 ×103 15 ppm

Yellow 4 4 ×104 25 ppm

Green 5 5 ×105 ±0.5% (D)

Blue 6 6 ×106 ±0.25% (C)

Violet 7 7 ×107 ±0.1% (B)

Gray 8 8 ×108 ±0.05% (A)

White 9 9 ×109

Gold ×10-1 ±5% (J)

Silver ×10-2 ±10% (K)

None ±20% (M)

Table 2: resistor values color table

3.5 CAPACITOR:
Capacitor passive electronic component consisting of a pair of conductors separated by a
dielectric. When a voltage potential difference exists between the conductors, an electric field
is present in the dielectric. This field stores energy and produces a mechanical force between
the plates. An ideal capacitor is characterized by a single constant value, capacitance, which is
measured in farads.
C=Q/V
where C is capacitance, Q is charge and V denotes the voltage applied.
22

Figure 3.4 : Various type of Capacitor

3.6 PCB
3.6.1 General PCB
Buy a large sheet (or two) and cut it up as required. You can cut it neatly to size using a junior
hacksaw, cutting along the lines of holes is easiest. For quickness you can break it over the
edge of a workbench along the lines of holes - take care though because this needs a fairly large
force and the edges will be rough. You may need to use a large pair of pliers to nibble away
any jagged parts.

Avoid handling General PCB that you are not planning to use immediately because sweat from
your hands will corrode the copper tracks and this will make soldering difficult unless you
clean the board first.

Figure 3.5.1: general PCB

3.6.2 General PCB

General PCB has parallel strips of copper track on one side. The strips are 0.1" (2.54mm)
apart and there are holes every 0.1" (2.54mm). General PCB requires no special preparation
other than cutting to size. It can be cut with a junior hacksaw, or simply snap it along the lines
of holes by putting it over the edge of a bench or table and pushing hard.
23

Figure 3.5.2 :
general PCB

3.6.3 Printed Circuit Board


Printed circuit boards have copper
tracks connecting the holes where the
components are placed. They are designed specially for each circuit and make construction
very easy. However, producing the
PCB requires special equipment so this
method is not recommended if you are
a beginner unless the PCB is provided for
you

Figure 3.5.3 : printed circuit board

3.7 CRYSTAL OSCILLATOR

A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating
crystal of piezoelectric material to create an electrical signal with a very precise frequency.
This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a
stable clock signal for digital integrated circuits, and to stabilize frequencies for radio
transmitters and receivers. The most common type of piezoelectric resonator used is the quartz
crystal, so oscillator circuits designed around them were called "crystal oscillators".
24

Figure 3.6 : crystal oscillator

3.8 Liquid Crystal Display

A liquid crystal display (LCD) is a thin, flat panel used for electronically displaying
information such as text, images, and moving pictures. Its uses include monitors for computers,
televisions, instrument panels, and other devices ranging from aircraft cockpit displays, to
every-day consumer devices such as video players, gaming devices, clocks, watches,
calculators, and telephones. Among its major features are its lightweight construction, its
portability, and its ability to be produced in much larger screen sizes than are practical for the
construction of cathode ray tube (CRT) display technology. Its low electrical power
consumption enables it to be used in battery-powered electronic equipment.

Figure 3.7 : liquid crystal display

3.9 Transistor :

In electronics, a transistor is a semiconductor device commonly used to amplify or switch


electronic signals. A transistor is made of a solid piece of a semiconductor material, with at
least three terminals for connection to an external circuit. The bipolar junction
transistor(BJT) was the first type of transistor to be mass-produced. Bipolar transistors are so
named because they conduct by using both majority and minority carriers. The three terminals
of the BJT are named emitter, base, and collector. The BJT consists of two p-n junctions: the
base–emitter junction and the base–collector junction, separated by a thin region of
semiconductor known as the base region.
25

Figure 3.8 : Transistor types:

3.10 ARDUINO:

Arduino is a tool for making computers that can sense and control more of the physical world
than your desktop computer. It's an open-source physical computing platform based on a
simple microcontroller board, and a development environment for writing software for the
board.

Figure 3.9:. Arduino UNO

The Arduino programming language is an implementation of Wiring, a similar physical


computing platform, which is based on the Processing multimedia programming environment.
Arduino simplifies the process of working with micro-controllers. Arduino has many
advantages such as:
26

1. Inexpensive

2. Cross platform

3. Simple and clear programming environment

4. Open source and extensible software

5. Open source hardware.

Some of the Advantages/Features of Arduino:


 High speed RISC AVR CPU.
 Compact size board.
 Easily programmable and applicable.
 Directly programmable through USB.
 Support more speed than 8051, PIC and some AVR controllers.
 Applications such as MP3 player, Polar Plotter, Automatic Head Tracking using IR
Sensors.

Features:
1. High Performance, Low Power AVR8-Bit Microcontroller
2. Advanced RISC Architecture
3. 131 Powerful Instructions – Most Single Clock Cycle Execution
4. 32 x 8 General Purpose Working Registers
5. Fully Static Operation
6. Up to 20 MIPS Throughput at 20 MHz
7. On-chip 2-cycle Multiplier
8. High Endurance Non-volatile Memory Segments
Peripheral Features:
 Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode
 One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and CaptureMode
 Real Time Counter with Separate Oscillator
 Six PWM Channels
 8-channel 10-bit ADC in TQFP and QFN/MLF package Temperature Measurement
 6-channel 10-bit ADC in PDIP Package Temperature Measurement
 Programmable Serial USART
 Master/Slave SPI Serial Interface
 Byte-oriented 2-wire Serial Interface (Philips I2C compatible)
27

 Programmable Watchdog Timer with Separate On-chip Oscillator


 On-chip Analog Comparator
 Interrupt and Wake-up on Pin Change

Special Microcontroller Features:


 Power-on Reset and Programmable Brown-out Detection
 Internal Calibrated Oscillator
 External and Internal Interrupt Sources
 Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby,and
Extended Standby

3.10.1 PIN DIAGRAM :

Figure 3.10. Pin Diagram of ATMega328p


28

Fig.3.11. Arduino mapping


29

CHAPTER 4

TINA-Texas Instruments

4.1 TINA (simulation):


Once the software is downloaded to your system, select the program through the Windows
Start menu or click on the TINA-TI icon on your desktop that was created during the
installation. The first screen appears as shown in Figure 4.1.

Figure 4.1. TINA-TI Schematic Editor Display

Figure 1 shows the schematic editor layout. The empty workspace on the sheet is the design
window where you build the test circuit. Below the Schematic Editor title bar is an operational
menu row with selections such as file operations, analytical operations, test and measurement
equipment selection, etc. Located just below the menu row is a row of icons associated with
different file and TINA tasks. The final row of icons allows you to select a specific component
group. These component groups contain basic passive components, semiconductors, and even
sophisticated device macro-models. These groups are accessed to build the circuit schematic.
30

4.1.1 Building a Circuit with TINA-TI:

To illustrate how easy it is to use TINA-TI, we will build an analog circuit and demonstrate
some of the circuit analysis capabilities.
For this example, a high-output, 1 kHz sine wave oscillator circuit is selected. A search through
a circuit application handbook provides a number of op amp-based designs. We will build and
simulate a Wien-bridge oscillator with amplitude stabilization using the software. A Texas
Instruments' OPA743 12V CMOS op amp is selected for the circuit application. This amplifier
is well-suited for this design, and provides very good dc and ac performance. It operates with
supplies of 3.5V to 12V; our example requires ±5V (10V).
Select the Spice Macros tab (see Figure 2, step 1) and then the op amp symbol (step 2) to
access the OPA743 macro-model. When the op amp model list appears, scroll down and click
on the OPA743 (step3).
Then click OK. The op amp symbol appears in the circuit workspace. With the mouse, drag the
symbol into position (step 4). It is locked into position on the circuit workspace by clicking the
left mouse button.
Figure 4. 2. Building a Circuit with TINA-TI
Other op amp models may be selected using the Insert->Macro... menu. Additionally, macros
and a wide variety of pre-built analog and SMPS circuits can be accessed through the Insert
menu.
(Insert->Macro...TinaTI_7.0->Examples).

4.2. Adding Passive and Active Components:

Component selection is easily accomplished by clicking on a component group from the lower
row of tabs:
Basic, Switches, Meters and so forth. These tabs provide a wide variety of passive components,
sources, meters, relays, semiconductors, and the previously-mentioned circuit macros. Click on
the schematic symbol for a particular component and drag it into position in the circuit
workspace. A left mouse button click locks it into place.
In our example, shown in Figure 3, we select a resistor from the Basic tab group (step 1 and
step 2), then position it next to the op amp symbol. TINA-TI designates this resistor as R1. The
initial value of R1 is 1kW, but this value can be changed as needed. A double-click with the left
mouse button on the R1 symbol produces the associated component table (step 3).
31

Figure 4.3. Active and Passive Component Selection


The resistor value and other component characteristics may be altered by selecting the
individual parameter boxes and changing the respective values. Select the component
parameter box and highlight the value you wish to change. Enter a new value by typing over
the value that is shown. In Figure 4, for example, the value for R1 has been changed from 1k to
4.7k for this circuit. Once you have finished setting the parameters, click OK to close the table.
Similar parametric tables are available for passive devices, sources, semiconductors, and other
component types.
A handy component that is displayed in the Basic group is the jumper, as shown in Figure 4. It
looks like a sideways letter T. The jumper may be used to connect similar, related circuit
functions such as V+, V–, or any other circuit point that has multiple connections. Using the
jumper reduces wiring clutter. Note that common jumpers must be labeled with the same label
name for TINA-TI to connect them together.

4.3. Arranging and Wiring Components:

Once all components are selected and properly positioned, they can be wired together. Each
component has nodes where circuit connections are needed. TINA displays these nodes with a
small red x. (The x looks more like two small lines at the wiring node than the alpha character.)
32

Wiring components to each other is easily done by placing the mouse pointer over a node
connection and holding the left mouse button down. A wire is drawn as the mouse is moved
along the circuit space grid. Release the mouse button when the wire reaches the intended end
connection point. Figure 4 illustrates the TINA-TI software wiring function.
A handy component that is displayed in the Basic group is the jumper, as shown in Figure 4. It
looks like a sideways letter T. The jumper may be used to connect similar, related circuit
functions such as V+, V–, or any other circuit point that has multiple connections. Using the
jumper reduces wiring clutter. Note that common jumpers must be labeled with the same label
name for TINA-TI to connect them together.

Figure 4.4. Wiring Components Together


33

The wiring function also may be accessed from the Insert menu, or the icon that looks like a
small pencil.

4.4. Analysis Capabilities:

When the circuit schematic entry is complete, the circuit is nearly ready for simulation. The
analysis process begins by selecting the Analysis menu. A list of different types of analyses—
such as ac, dc, transient, or noise—appears. Highlight any one of these evaluations to access
additional options and selections.
The first option under the Analysis menu is an Error Rules Check (ERC). Selecting this feature
runs this check on the circuit; a pop-up window then lists any circuit errors. If an error is listed
in the window, clicking on that error line highlights the error point in the schematic. The error
window also lists other types of circuit errors that are found during the analysis.
Even if the ERC is not selected, TINA automatically performs a check at the start of a
simulation.
Upon selecting one type of analysis to perform, another window appears that displays different
setting selections that are associated with that particular analysis. Nominal settings are initially
provided; these parameters may be set as needed for the desired output.
Once all of the selections are made, click OK to begin the analysis. The first analysis
performed on a circuit is generally a dc analysis. This test provides a reality check so that
normal dc operating conditions can be verified. The TINA-TI DC Analysis function can be set
to calculate nodal voltages, provide a table of dc voltage and current results, generate a dc
sweep of the circuit, or perform a temperature analysis.
The temperature analysis works in combination with the Analysis > Mode > temperature-
stepping selections.

4.5. DC Analysis:

Follow these steps (illustrated in Figure 4.5) to perform a dc analysis.


1. Click on the Analysis menu.
2. Select DC Analysis.
3. Click on Table of DC Results. The Voltages/Currents table appears.
4. Use the mouse pointer as a probe to test the circuit nodes.
The probed node and measured value are displayed in red in the Voltages/Currents table, as
shown in
Figure 5.
34

Figure 4.5. DC Analysis with Voltages/Currents Table Displayed

4.6. Transient Analysis:

Sophisticated ac frequency and time domain simulations may also be performed. Use the
Analysis function to access the different choices. A traditional ac transfer characteristic plot of
gain and phase versus frequency may be selected, as well as transient, Fourier or noise
analyses. The example shown in Figure 6 is a transient analysis performed on the example
Wien-bridge oscillator circuit. The simulation transient analysis result is also shown in Figure
6. It illustrates the Wien-bridge oscillator startup and steady-state performance. The display in
the actual window may be edited with axis labeling, scales, background grid color, and so forth,
all set as desired by the individual user.
Follow these steps (marked in Figure 4.6) to perform a transient analysis.
1. Click on the Analysis menu.
2. Select Transient.
3. The Transient Analysis dialog box appears. Enter start and end times, and other parameters
as desired.
4. Click OK to run the analysis.
35

Figure 4.6. Additional TINA Analysis Capabilities

4.7. Test and Measurement:

The TINA-TI software generates post-simulation results in tables and plots, depending on the
type of analysis performed. Additionally, the software can be placed in a pseudo-real-time
simulation mode where virtual instruments can be used to observe the output(s) while the
circuit is operating.
For example, Figure 4.7 shows a virtual oscilloscope that is used to observe the steady-state
output of the Wien-bridge oscillator circuit. In the same way, a virtual signal analyzer can be
used together with an amplifier circuit so that the harmonic performance of a simulation can be
observed. To access the virtual oscilloscope, select T&M (step 1 in Figure 4.7), and then
Oscilloscope (step 2). Place the cursor at the output of the simulated circuit, and adjust the
controls in the virtual oscilloscope dialog box as needed (step 3).
The T&M selection options also include a virtual ac/dc multimeter, function generator, and an
X-Y recorder. The function generator may be adjusted in combination with a virtual
oscilloscope or analyzer.
36

Figure 4.7. Virtual Instrumentation Testing


37

Chapter 5

Global positioning system (GPS)

5.1 GPS Module

L80 is an ultra compact GPS POT (Patch on Top) module with an embedded 15.0 × 15.0 ×
4.0mm patch antenna. This space-saving design makes L80 the perfect module for the
miniature devices. Adopted by LCC package and integrated with patch antenna, L80 has
exceptional performance both in acquisition and tracking.

Combining advanced AGPS called EASY™ (Embedded Assist System) and proven Always
Locate technology, L80 achieves the highest performance and fully meets the industrial
standard. EASY technology ensures L80 can calculate and predict orbits automatically using
the ephemeris data (up to 3 days) stored in internal flash memory, so L80 can fix position
quickly even at indoor signal levels with low power consumption. With Always Locate
technology, L80 can adaptively adjust the on/off time to achieve balance between positioning
accuracy and power consumption according to the environmental and motion conditions.

L80 module combines with many advanced features including EASY, AIC, LOCUS,
AlwaysLocateTM and Antenna Supervisor. These features are beneficial to accelerate TTFF,
improve sensitivity, save consumption and detect antenna status for GPS system. The module
supports various location, navigation and industrial applications including autonomous GPS,
SBAS (including WAAS, EGNOS, MSAS, and GAGAN), QZSS, and AGPS.

L80 simplifies the device’s design and cost because of embedded Patch Antenna and LNA.
Furthermore, L80 not only supports automatic antenna switching function, which can achieve
switching between external active antenna and internal patch antenna but also supports external
active antenna detection and short protection. The detection and notification of different
external active antenna status will be shown in the NMEA message including external active
antenna connection, open circuit for antenna and antenna shortage. So host can query the
external active antenna status timely and conveniently. L80 simplifies the device’s design and
cost because of embedded Patch Antenna and LNA. Furthermore, L80 not only supports
automatic antenna switching function, which can achieve switching between external active
antenna and internal patch antenna but also supports external active antenna detection and short
protection.
38

Figure 5.1 : GPS module integrated with patch antenna

L80 module is a SMD type module with the compact 16mm × 16mm × 6.45mm form factor,
which can be embedded in your applications through the 12-pin pads with 2.54mm pitch. It
provides necessary hardware interfaces between the module and main board. L80 supports
automatic antenna switching function. It can achieve the switching between internal patch
antenna and external active antenna.

L80 simplifies the device’s design and cost because of embedded Patch Antenna and LNA.
Furthermore, L80 not only supports automatic antenna switching function, which can achieve
switching between external active antenna and internal patch antenna but also supports external
active antenna detection and short protection.

Moreover, it keeps positioning during the switching process. With its tiny design, high
precision and sensitivity, L80 is perfectly suitable for a broad range of M2M applications such
as portable device, automotive, personal tracking, security and industrial PDA, especially
suitable for special applications, like GPS mouse and OBD.

5.2 Block Diagram :

The following figure shows a block diagram of L80 module. It consists of a single chip GPS IC
which includes RF part and Baseband part, a SPDT, a patch antenna, a LNA, a SAW filter, a
TCXO, a crystal oscillator, short protection and antenna detection circuit for active antenna.
39

Figure 5.2 : block diagram of GPS L80

5.3 Applications :

The module is equipped with a 12-pin 2.54mm pitch SMT pad that connects to your application
platform.

5.4 Pin assignment:

Figure 5.3 : pin diagram of GPS L80


40

5.5 Pin Defination:


41

Figure 5.4 : pin description of the GPS L80

5.6 UART Interface :

The module provides one universal asynchronous receiver& transmitter serial port. The module
is designed as a DCE (Data Communication Equipment), following the traditional DCE-DTE
(Data Terminal Equipment) connection. The module and the client (DTE) are connected
through the following signals shown as following figure. It supports data baud-rate from
4800bps to 115200bps.

5.6.1 UART port:

TXD1: Send data to the RXD signal line of DTE. RXD1: Receive data from the TXD
signal line of DTE.

Figure 5.5 : connection of serial interfaces

This UART port has the following features:


42

1. UART port can be used for firmware upgrade, NMEA output and PMTK proprietary
commands input.

2. UART port supports the following data rates: 4800, 9600, 14400, 19200, 38400, 57600,
115200. The default setting is 9600bps, 8 bits, no parity bit, 1 stop bit.

3.Hardware flow control and synchronous operation are not supported.

The UART port does not support the RS-232 level but only CMOS level. If the module’s
UART port is connected to the UART port of a computer, it is necessary to add a level shift
circuit between the module and the computer.

Figure 5.6 : RS- 232 level shift circuit


43

5.7 Interfacing with the GPS to the Arduino

Figure5. 7 : interfacing GPS with Arduino

1. Connect your GPS wires to the Arduino like on this schematic below. Where "pin 5"
gets used as "TX" and "pin 3" as "RX".
2. Any available pins on your Arduino may be used. Just be sure to connect the right wire
to the right pin.
3. The gray wire is left aside unconnected.
44

Chapter- 6
Global System For Mobile
6.1 GSM/GPRS Module :

GSM/GPRS 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.

6.2 GSM/GPRS 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. Receive, send or delete SMS messages in a SIM.
2. Read, add, search phonebook entries of the SIM.
3. 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.

6.3 GSM Sim 900A

GSM/GPRS Modem-RS232 is built with Dual Band GSM/GPRS engine- SIM900A, works on
frequencies 900/ 1800 MHz. The Modem is coming with RS232 interface, which allows you
connect PC as well as microcontroller with RS232 Chip(MAX232). The baud rate is
45

configurable from 9600-115200 through AT command. The GSM/GPRS Modem is having


internal TCP/IP stack to enable you to connect with internet via GPRS. It is suitable for SMS,
Voice as well as DATA transfer application in M2M interface. The onboard Regulated Power
supply allows you to connect wide range unregulated power supply . Using this modem, you
can make audio calls, SMS, Read SMS, attend the incoming calls and internet ect through
simple AT commands.

Figure 6.1. GSM 900A module

6.4 Features

• Dual band GSM/GPRS 900/1800MHz.


• Configurable baud rate.
• SIM card holder.
• Built in network status LED.
• Inbuilt powerful TCP/IP protocol stack for internet data transfer over GPRS.

6.5 Applications

• Access control devices.

• Supply chain management.


46

6.6 Specifications

Parameter Value
Operating voltage +12v DC
weight <140g
47

Table 3: specification of GSM

6.7 Pin Specification

Pin Name Details


1 GND Power supply ground
2 tx transmitter
3 rx receiver
4 Line_r & Line_l Line input
5 Spk_p & spk_n Speaker positive & negative
6 Mic_p & mic_n Mic positive & negative
7 DTR Data terminal ready
8 CTS Clear to send
9 RTS Request to send
48

Figure6 2: pin diagram of GSM module


6.8 Working

Unlike mobile phones, a GSM modem doesn’t have a keypad and display to interact
with. It just accepts certain commands through a serial interface and acknowledges for
those. These commands are called as AT commands. There are a list of AT commands to
instruct the modem to perform its functions. Every command starts with "AT". That’s why
they are called as AT commands. AT stands for attention.

In our simple project, the program waits for the mobile number to be entered
through the keyboard. When a ten digit mobile number is provided, the program instructs
the modem to send the text message using a sequence of AT commands

Figure 6.3 : block diagram and working

6.9 Testing GSM module :


• The GSM modem can be tested by connecting it with a PC. The modem is equipped
with a RS232 cable. Just use a Serial to USB converter and connect it with the PC.
• Now you can proceed with sending the commands to the modem using any serial
communication program like Hyperterminal, minicom etc. Ensure the serial
49

You might also like