zakk
Posts: 3
Joined: Thu Feb 13, 2020 10:56 pm

How to set up GY-NEO6MV2 GPS ?

Thu Feb 13, 2020 11:24 pm

Hi

I am a beginner and I need to add a GPS location to my university project.

I bought a GY NEO 6M V2.

I thought it will be quite easy but now after reading few tutorials I am a little bit confused.
because everybody say something different.

Somebody say connect to 3.3V somebody say 5V... ( on seller side I found it should work with 3-5V power supply,so I would prefer to use 3,3V)
And sometimes they even don´t use both RX and TX pins.
https://sparklers-the-makers.github.io/ ... pberry-pi/

Usually they are modifying some system files (I am a little bit scared, when I am now sure what I exactly doing and I don´t want to mess up my system) but for example in this tutorial https://www.xarg.org/2016/06/neo6mv2-gp ... pberry-pi/ they only change one system option (in graphic enviroment).

Does anybody know some good tutorial which is good and actual and I can trust it and follow step by step or say my what should I do ?

I am using a RPi Zero WH with Raspbian 10 and want to use Python code to read GPS data.

Thank You.

User avatar
topguy
Posts: 6178
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: How to set up GY-NEO6MV2 GPS ?

Fri Feb 14, 2020 1:24 pm

Usually they are modifying some system files (I am a little bit scared, when I am now sure what I exactly doing and I don´t want to mess up my system) but for example in this tutorial https://www.xarg.org/2016/06/neo6mv2-gp ... pberry-pi/ they only change one system option (in graphic enviroment).
This guide is a bit old, so the options in "raspi-config" ( called from shell or console, so not really a GUI program ) may have changed a little. But other than that this seems like a good guide. Its "raspi-config" that modifies the systemfiles for you.

You dont really need to send anything to the GPS to get it working so Tx on Pi side doesnt really need to be connected, but having the option to send commands to tune GPS behavior is not a bad thing.

zakk
Posts: 3
Joined: Thu Feb 13, 2020 10:56 pm

Re: How to set up GY-NEO6MV2 GPS ?

Fri Feb 14, 2020 3:12 pm

So when I disable serial in raspi-config it will do for me everything what I have to do manually (by modifying files and commands) in other tutorials?

And I don´t have to do anything else and start to read from "/dev/ttyAMA0" in Python or whatever.. ?

User avatar
topguy
Posts: 6178
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: How to set up GY-NEO6MV2 GPS ?

Sat Feb 15, 2020 3:06 pm

Its going to be "/dev/ttyAMA0" or "/dev/serial0" I belive. You can just look in the "/dev" and see what you have.

If you want someone to be very precise, you have to tell us which Pi model and Raspbian version you are using.

zakk
Posts: 3
Joined: Thu Feb 13, 2020 10:56 pm

Re: How to set up GY-NEO6MV2 GPS ?

Sun Feb 16, 2020 6:22 pm

I am using Pi Zero WH with rasbian 10 (buster) as I wrote in my first question or it is not enough informations ?

Today I tried to conect gps after a half of day i finally to start blinking (red so I hope is good, or red means something is wrong?)

So in raspi-config I disabled both :The serial login shell is disabled and The serial interface is disabled
And when I look in /dev there is no serial0 and Serial1->ttyAMA0. And when I trie to print "/dev/ttyAMA0" or "/dev/serial0" there is nothing.

So i tried to turn off only the first option The serial login shell is disabled and The serial interface is enabled then when I look in / dev there is serial0 -> ttyS0 and serial1 -> ttyAMA0. And still no output.. I also trie to cat dev/ttyS0 a "the comand is running" but the line is empty.

I don't know what does Serial0/1 and ttyAMA0/ttyS0 means so I I don't know what is required setting (when I print ls-l /dev).

User avatar
bensimmo
Posts: 4227
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: How to set up GY-NEO6MV2 GPS ?

Sun Feb 16, 2020 10:44 pm

Serial Port Enabled
Serial Console Disabled.
Reboot

Use /dev/serial0

e.g.
cat /dev/serial0

And you should get list of NMEA data.

Or install gpsmon
(Have you installed anything yet gpsd?)
You may need to install it using
sudo apt-get update
sudo apt-get install gpsd-clients gpsd

Then
gpsmon
or
gosmon /dev/serial0
should give you a graphical view.
If that works, get programming.


Note if it fails to show data or stops then
sudo killall gpsd
And see if you can get data from the port.

Note : I may well have missed something, like stoping gpsd service but not sure that is needed at this stage (or with serial UART).
Have fun finding out

Note2: You can use 3v3 or 5v, move to 5v only if it is loosing power.

Note3: remember TX goes to RX, RX to TX

emma1997
Posts: 511
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: How to set up GY-NEO6MV2 GPS ?

Tue Feb 18, 2020 2:19 am

zakk wrote:
Sun Feb 16, 2020 6:22 pm
Today I tried to conect gps after a half of day i finally to start blinking (red so I hope is good, or red means something is wrong?)
Blinking indicates lock and is good. You might find moving the module far away from the Pi helps finding satellites much quicker (or at all). Neo6m is one of my favorites but will not work when too close to most MCU due to radiated noise. My Pi4 is exceptionally bad in that respect. If anything at all is plugged into USB3 it never locks.

Specially during initial almanac acquisition stage. I need to extend at least 20cm away with STM32 or ESP and 2 meters or more with Pi w/o extreme shielding/antenna measures. Arduino not too bad running from 8mhz internal clock. Otherwise prepare for a long wait.

I suggest connecting to just a battery and nothing else then go out to a wide open field to get first lock or for diagnostics. Blink should start in 5-10 minutes depending on location and weather.

Return to “Interfacing (DSI, CSI, I2C, etc.)”