HOMECOURSESSTUDENTSDONATIONSVIDEOSEVENTSTUTORIALSLINKSNEWSCONTACT


TUTORIALS 》 Using a GPS Sensor

A GPS receiver uses satellites to pinpoint locations, so as long as you have a GPS receiver and a clear view of the sky, you'll never be lost again!

Have a look at this amazing site to know more about a GPS Sensor: http://electronics.howstuffworks.com :: How GPS Receivers Work

I would suggest have a look at how the GPS receiver generates a Pseudo Random Code which has a mention in the given site. The GPS system uses an array of satellites orbiting around the earth and sending time information. It picks up the signal transmitted from the satellites, calculates the time it took for the signal to arrive, and by identifying the position of satellites, triangulates the position on the surface of the globe. It uses the standard NMEA protocol (http://www.nmea.org) to transmit the position data via serial port. Let us start exploring the world of GPS!

GPS Satellites


Here is a list of components needed:


Here are some images of this module:


Image Source: http://www.alselectro.com/images/GPS_3_thumb_0cdckk0l.jpg


Image Source: https://cdn.instructables.com/F0J/9T8J/IOT2UO46/F0J9T8JIOT2UO46.MEDIUM.jpg


Image Source: http://module143.com/image/cache/catalog/skg13bl-500x500.jpg


The connections are as follows:

Skylab SKG13BL GPS Receiver



GND of GPS ------------ GND of Arduino
3.3V of GPS ------------- 3.3V on Arduino

Note: Skylab SKG13BL: It is always a good practice to read the Datasheet. So here you go: http://www.alselectro.com/files/SkyLab_Datasheet.pdf
Note : You can even use a 12V Power source, but here we are using 3.3V.

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).

The last simple connection involves connecting the TLL from GPS to Arduino Board:
Rx of GPS -------- Tx of Arduino (Pin 3)
Tx of GPS --------- Rx of Arduino (Pin 4)

* Refer Pg.8 of the Datasheet.

Now, connect the G Mouse to the GPS Receiver and connect the Arduino board to the PC via USB.


Libraries/Dependencies:
Here are the required libraries we need to install.
Install the TinyGPS Library from here: http://arduiniana.org/libraries/tinygps/
Install the Software Serial Library: https://www.arduino.cc/en/Reference/SoftwareSerial


Please take care of the following:

  • Do not connect the GPS Module to Multiple Power Supplies.
  • Place the G Mouse at a spot where it can see the sky.
  • Please go through the Datasheet.
  • You can even use Putty to obtain output (in Windows) - http://www.putty.org/
  • If the code shows error, make sure to keep the Baud Rate to 9600.
  • If you face port or driver problem,
    Do this (in Windows): Control Panel > System and Security > System > Device Manager > Ports > Arduino UNO > Update Driver Software > Browse computer manually and choose the Arduino IDE folder.


Source code:
Download the code HERE.
Kindly remember to refer the previous step in case of Port Error.


Output:
The code will give the Latitude and Longitude. Make sure to divide the output by 10^6 to get correct coordinates.

You can also visit sites likes to map the points:


So here is the output it generates:

Position: lat: 26865785 lon: 80906375 Position: lat: 26865785 lon: 80906375 Position: lat: 26865785 lon: 80906375 Position: lat: 26865783 lon: 80906375 Position: lat: 26865783 lon: 80906375 Position: lat: 26865783 lon: 80906375 Position: lat: 26865783 lon: 80906375 Position: lat: 26865783 lon: 80906373 Position: lat: 26865783 lon: 80906373 Position: lat: 26865783 lon: 80906373 Position: lat: 26865783 lon: 80906373 Position: lat: 26865783 lon: 80906373 Position: lat: 26865783 lon: 80906373 Position: lat: 26865783 lon: 80906373 Position: lat: 26865783 lon: 80906373 Position: lat: 26865783 lon: 80906372 Position: lat: 26865783 lon: 80906372 Position: lat: 26865783 lon: 80906370 Position: lat: 26865783 lon: 80906370 Position: lat: 26865783 lon: 80906370 Position: lat: 26865783 lon: 80906370 Position: lat: 26865783 lon: 80906372 Position: lat: 26865783 lon: 80906372 Position: lat: 26865783 lon: 80906375


About me: Saumitra Kapoor
My name is Saumitra Kapoor and I am in love with Electronics, Circuits, Wires and Devices. I started learning everything about it long back from wherever I could and I haven’t stopped since. I try to read a lot, build fun projects and come up with tutorials.


Featured Video:



Suggested Topics:


☆ Tutorials :: Arduino UNO Projects ↗


☆ Tutorials :: Network Software Development ↗


☆ Tutorials :: Research and Projects ↗


☆ Tutorials :: Linux (user-space), Systems Architecture ↗


☆ Tutorials :: Linux Kernel Software Development ↗


☆ Tutorials :: Linux Kernel Internals (PDFs) - by Ramin Farajpour ↗


☆ Tutorials :: Software Development (Programming) Tools ↗


☆ Tutorials :: Embedded Projects ↗

Join The Linux Channel :: Facebook Group ↗

Visit The Linux Channel :: on Youtube ↗


Join a course:

💎 Linux, Kernel, Networking and Device Drivers: PDF Brochure
💎 PhD or equivalent (or Post Doctoral) looking for assistance: Details
💎 ... or unlimited life-time mentorship: Details


💗 Help shape the future: Sponsor/Donate


Recommended Topics:
Featured Video:
Watch on Youtube - [84/0] 0x1fd Home Lab | Black+Decker VH802 800-Watt Bagless Vacuum Cleaner and Blower | Unboxing & Review ↗


Trending Video:
Watch on Youtube - [19572/0] Teardown D-Link DGS-1008A 8-port 1-Gbps Ethernet Switch ↗



Recommended Video:
Watch on Youtube - [921/0] 193 Linux Kernel /proc Interface - create a directory in /proc file-system ↗