GPS or Global Positioning System is a satellite navigation system or a wireless module that furnishes location and time information in all climate conditions to the user. GPS is used for navigation in planes, ships, cars and trucks as well. The system gives critical abilities to military and civilian users around the globe. GPS provides continuous real time, 3-dimensional positioning, navigation and timing worldwide.
How GPS Determines Position
The working/operation of global positioning system is based on the ‘trilateration’ mathematical principle. The position is determined from the distance measurements to satellites. From the figure, the four satellites are used to determine the position of the receiver on the earth. The target location is confirmed by the 4th satellite. And three satellites are used to trace the location. The fourth satellite is used to confirm the target location of each of those space vehicles. A Global positioning system consists of a satellite, a controlling station,a monitoring station and a receiver. The GPS receiver takes the information from the satellite and uses the method of triangulation to determine a user’s exact position.
Steps for Interfacing a GPS Module With the Microcontroller
Step1: Testing Procedure of GPS Module
Connect a power supply to the GPS receiver and wait until it is registered with the GPS network. Once registered, the GPS provides satellite signals to the user.
The GPS module consists of two LEDs such as green and red LEDs for the indication of network connection where in the Red-LED is ON for no network and the green LED for network availability as similar to the GSM modem.
Step2: Interfacing the GPS Modem with the Microcontroller
The GPS receiver is interfaced to the microcontroller through MAX-232 device with the help of RS-232 cable for serial data communication. The MAX-232 device is used to convert the TTL/COM logic levels to the RS-232 logic levels during the serial communication of the microcontroller to the GSM modem.
The RS-232 defines the interfacing between the data terminal equipment and the data communication equipment using a serial binary-data exchange. The RS-232 cable is commonly available with the 9 or 25 pin wiring and has jumpers to provide ‘handshaking’ pins for those devices that require it.
Step3: Program to the Microcontroller
Receiving: voidRx_Char() { while(RI==1); //wait for RI flag to receive any character Ch=SBUF; // capture the character from SBUF into Ch variable RI=0; //clear RI flag for further reception }
WAP for GPS Modem to the Microcontroller
Here is a watchdog timer, which monitors the data from the GPS modem, and the GPS module resets for every 15 sec if it doesn’t receive the accurate data. This process runs for 10 minutes, and once it gets the accurate data, the timer turns off.
#include<reg51.h> sbit a=P2^1; int count; void serial() interrupt 2 { TR1=1; SBUF==p; count++; } void main() { SCON=0x50; TMOD=0x20; IE=0x92; WDTRST=0x84; TH1=0xfd; TR1=1;
while(1) {
for(i=0;i<4;i++) { WDTRST=0x1E; WDTRST=0xE1; } count<=12; a=1; } } }
Step4: Circuit Connections
The 5v DC power supply is given the 40th pin of the microcontroller to run the circuit. The GPS modem is interfaced to the10th pin of the microcontroller with the help of the MAX-232 device for transmitting and receiving the information serially.An LCD display connected to the port0 of the microcontroller displays the predefined information, and the crystal oscillator connected to the 18thand19th pins of the microcontroller provides the clock pulses. The Reset button connected to the 9th pin of the microcontroller reboots the controller when it does not function properly.
Working Procedure
The GPS module communicates with the microcontroller by longitude and latitude points through a UART protocol where in it needs two basic signals: TXD (transmit), GND(ground). These GPS receivers not only track the exact location, but also compute the velocity and time.
The GPS module is used to track a vehicle’s position on the earth based on the longitude and latitude points. And,the microcontroller is programmed with the predefined locations using longitude and latitude points.
GPS modules continuously send the data to the microcontroller serially. The microcontroller compares this data to the predefined stored data, and if finds the match, announces the location name and displays it on the LCD.
Wow, incredible blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your website is wonderful, let alone the content!
Hi Micha Scheunemann
Thank you so much for your feedback
And once again please visit our international website http://www.efxkits.com/
For more details please contact to Mr. Niranjan on +91 990851885 or you can email us on info@edgefxkits.in
Your style is so unique compared to many other people. Thank you for publishing when you have the opportunity,Guess I will just make this bookmarked.2
Hi Nisha
Thanks for your appreciation
And once again please visit our international website http://www.efxkits.com/
For more details please contact to Mr. Niranjan on +91 9908518885 or you can email us on info@edgefxkits.in