Manual Access of GPS Ublox Neo 6M With Raspberry Pi B+

by sfeelectronics in Circuits > Raspberry Pi

6248 Views, 4 Favorites, 0 Comments

Manual Access of GPS Ublox Neo 6M With Raspberry Pi B+

raspberry-pi-module-b512mb-ram.jpg

Raspberry Pi is a very compatible mini PC for various modules that are quite easy to use. Basically it's almost the same as PC but can be controlled with GPIO from Raspberry Pi. Raspberry Pi is also support with several lines of communication, one of which is the line of communication Serial / UART.

Here is tutorial about how to use Ublox Neo 6M GPS Module with Raspberry Pi with Serial / UART Communication.

Materials You Need

raspberry-pi-module-b512mb-ram.jpg
ublox-neo-6m-for-arduino-ruspberry.jpg
pl2303-usb-to-ttl.jpg
5pcs-female-to-female-jumper-cable.jpg

You will need:

  • Raspberry Pi Module B+512MB RAM
  • Ublox Neo 6M for Arduino Raspberry
  • PL2303 USB to TTL
  • Female To Female Jumper Cable

Using PL2303 (not GPIO)

raspi.png

  • Connect each components as the schematic above.
  • Check serial communication of PL2303 whether it has been detected by Raspberry Pi or not by giving commands on the terminal as follows:

ls /dev/ttyUSB*

the output of the command will provide information in which USB that PL2303 is detected

  • Install GPS Daemon client with commands as follows:
  • Check serial communication of PL2303 whether it has been detected by Raspberry Pi or not by giving commands on the terminal as follows:

sudo apt-get install gpsd gpsd-clients python-gps

  • Do a manual command to run GPSD Daemon Socket with command as follows:

sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock

ttyUSB0 can be changed according to port detected by Raspberry Pi

  • The command to view data from GPS, do the following command:

cgps -s

It will show results from longitude, latitude, zone, time etc. To exit the view, click CTRL + Z / C.

Using GPIO Raspberry Pi

raspi2.png

  • Connect each components as schematic above.
  • Enable Serial Pin on Start -> Preference -> Raspi Configuration -> Enable Serial Port
  • Edit cmdline.txt to enable serial port with command as follows:

$ sudo nano /boot/cmdline.txt

  • Remove "console = ttyAMA0,115200" then save (CTRL + X) and Y then ENTER.
  • Do a manual start of GPS Daemon with command as follows:

$ sudo killall gpsd

$ sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock

  • To see the gps data do the following command:

cgps -s