• Home
  • Electrical
    • Power Electronics
  • Electronics
    • General Electronics
  • Embedded systems
    • Arduino
    • ARM Cortex
    • Raspberry Pi
  • Robotics
  • Android
  • Others
    • Communications
    • Sensor Based
    • Solar
  • Engineering Projects

Buy Electronics & Electrical Projects in Europe

Buy Electronic Kits & Electrical Projects in Russia, France, Spain, Sweden, Germany, Norway, United Kingdom, Switzerland, Denmark and the rest of Europe.

Interfacing GPS Module With 8051 Microcontroller

October 31, 2014 by Tarun Agarwal 4 Comments

GPS Module

GPS Module

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.

Interfacing the GSM Modem with the Microcontroller

Interfacing the GSM Modem with the Microcontroller

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.

Interfacing the GSM Modem with the Microcontroller Circuit

Interfacing the GSM Modem with the Microcontroller Circuit

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.

Download Chapter 9 in PDF

<< Previous Chapter Next Chapter >>

Filed Under: Communications

About Tarun Agarwal

Tarun Agarwal is the Chief Customer Support Officer at Edgefx Technologies Pvt Ltd. He has 8 years of experience in Customer Support, Operations and Administration.

Comments

  1. Micha Scheunemann says

    September 18, 2016 at 6:45 am

    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!

    Reply
    • Tarun Agarwal says

      October 27, 2016 at 11:27 am

      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

      Reply
  2. Nisha Goodin says

    November 4, 2016 at 8:00 am

    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

    Reply
    • Tarun Agarwal says

      January 27, 2017 at 9:53 am

      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

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search Here!

Join our Loyal Fan Base!




Recent Posts

  • Explanation of Silicon Controlled Rectifier and Its Applications
  • 8051 Microcontroller Architecture, Function and its Applications
  • Thermal Imager Sensor Working and Its Application
  • Tutorial on RS232 Serial Interface
  • Security System with the Smart Card Authentication
  • About LM386 Audio Amplifier Circuit Working and Applications
  • Solar Energy based Water Purification Systems
  • How Bluetooth Technology Works

Download Ebook Worth 99$





Follow Us

Copyright © 2021 · Magazine Pro Theme on Genesis Framework · WordPress · Log in