Thursday, October 7, 2010

Connecting GPS-module to Arduino

introConnecting GPS-module to Arduino

This is a simple Instructable for the people who'd like to know how to connect and use their GPS module with an Arduino.

I am using an Arduino Duemilanove and an EM-406A GPS module.
NOTE: The breadboard is not necessary but makes the job a lot easier.
29072010736.jpg29072010733.jpg

step 1Customizing the GPS

Firstly, we need to make the GPS useable in our custom environment.

Cut the connecting plug of the furthest side of the GPS' connection wires.
Now it is your choice to extend them with longer wires, make sure to connect them thoroughly.

Remove the plastic off the ends of the wires.

See the images below.
Customizing the GPS

step 2Connecting the GPS to the Arduino

Now that your GPS-module is ready, we can go ahead.

Connect your GPS wires to the Arduino like on this schematic below. Where "pin 5" gets used as "TX" and "pin 3" as "RX".

Any available pins on your Arduino may be used. Just be sure to connect the right wire to the right pin.

The gray wire is left aside unconnected.
schem.jpg29072010734.jpg29072010733.jpg

step 3The Coding

Doing the coding for your Arduino is simple, you can copy the sample code and/or edit it for your own use.

See the downloadable ZIP-file for the code. Remember to upload it!

This code sends all strings received from the GPS through serial to your computer (Serial Monitor)
Note: See comments in coding for filtering of certain strings
loading...
GPS.zip76 KB

step 4Testing

Now that you are setup and ready to run your project, make sure the code has been uploaded to the Arduino and that all wires and connections are rightly fitted.

Switch on the Arduino and switch on your Serial-Monitor. Wait for the message "Started" to appear on your monitor screen. If all your connections are perfect, the red light will be shining stable and you will start seeing messages like this appear underneath each other:

$GPGÓA,A,3,31,24,22,18,,,,,,,,,7.8,6.1,5.0*32
$GPÒÍC,185812.000,A,3352.6122,S,01836.9292,E,0.45,143.17,280710,,*18
$ÇPGÇÁ,185813.000,3352.6124,S,01836.9293,E,1,04,6.0,236.5,M,32.7,M,,0000*4A
$GPÇÓA,A,3,31,24,22,18,,,,,,,,,7.8,6.0,5.0*33
$GPÒMC,185813.000,A,3352.6124,S,01836.9293,E,0.46,139.24,280710,,*10
$GÐÇGA,185814.000,3352.6118,Ó,01836.9288,Å,1,04,6.0,238.0,Í,32.7,M,,0000*43
$ÇÐGSA,A,3,31,24,22,18,,,,,,,,,7.8,6.0,5.0*33
$ÇPRMÃ,185814.000,Á,3352.6118,S,01836.9288,Å,0.45,163.36,280710,,*1D
$GPÇÇA,185815.000,3352.6113,S,01836.9284,Å,1,04,6.0,239.4,Í,32.7,M,,0000*40


Remember to scroll down manually if it reaches the end of the screen!

The GPS will only give through the coordinates when the red-onboard light is flashing. (Meaning it has a fix.)

Use your GPS manual to decode these messages. It delivers great data such as coordinates, UTC time, height above sea-level etc.

Have fun and let me know if I made any mistakes!
Related Posts Plugin for WordPress, Blogger...
Disclaimer: All the information in this blog is just gathered from different sites in the web and placed here and I am not the owner for these content

Popular Projects

Followers

My Blog List

Give Support

Give Support
Encourage me Through Comments & by Following