Go Down

Topic: Neo-6M GPS shield - update faster than 1Hz (Read 8349 times) previous topic - next topic

escuta

Here's the exact device that I'm using:

http://produto.mercadolivre.com.br/MLB-734485234-modulo-gps-para-arduino-e-raspberry-ublox-neo-6m-quadcoptero-_JM

I'm using it with a Arduino 9 Axes Motion Shield.

When testing just now with your update code, I had the GPS's Tx connected to arduino pin 4 and the Rx attached to 3. The Motion shield was still attached.

When working with my code, i connect the GPS's Tx to 8 and the Rx to 9.

I'll try a little later running this without the motion shield

escuta

Removed the motion shield and ran ubloxRate again. Same result. Any change in the Tx and Rx wiring just results in no data whatsoever being received and displayed.

One thing that sort of works is the command '3' which results in gibberish printed to the screen. So it seems that the device did receive the message to change the baud rate. The only thing is, is that when I reset the monitor to 38400 baud, and additionally enter '1' as requested, the ASCII still is not displayed correctly.  I can only get the correct display of data when device and monitor are set to 9600 baud.


-dev

This is a 3.3V device, so you really need to shift the Arduino's 5V levels down to 3.3V.  This is strongly recommended for connecting the Arduino transmitting pin (9 or whatever, outputs minimum of 3.9V) ) to the GPS RX pin (max allowed is 3.6V) .  A resistor divider will work.

Connecting the Arduino receiving pin to the GPS TX pin usually works, but it may not be reliable.  The Arduino requires 3.5V, but the GPS TX only outputs 2.9V.  To be fully "in spec", you have to use a diode or transistor.  Level-shifting modules are usually bi-directional.  This post describes a few ways to do "level-shifting".

It is possible that you have damaged the GPS RX pin, but the GPS TX pin is obviously working.

Do you have a 3.3V TTL Serial-to-USB converter?  (Also called "FTDI" USB module.)  If you connect the GPS device to the PC with that module, you could try the u-center Windows app to see if the NEO-6M is responding.

Many, many seller listings say "5V compatible", but it usually means that VCC can take 5V, not the GPS RX pin.  Because GPS RX pin is connected directly to the NEO-6M chip, you must be careful.  Some shields do have on-board resistors or transistors to shift the levels, but yours does not.
Really, I used to be /dev.  :(

escuta

Thanks /dev, yes, I was beginning to come to the same conclusion. I had indeed originally used the 5v source because I read the GPS would take it. More's better, right? Very imprudent of me. I'll buy another GPS, not so expensive, even here in Brazil. At least this discussion helped me to improve accuracy in the readings, using those signed longs. I'll check out a 3.3V TTL Serial-to-USB converter. I already have the u-centre, running in Linux under wine. I'll let you know how I get on with the new Neo when it arrives. Thanks for all the help, i really appreciate it. All the best!

escuta

#19
Apr 26, 2017, 08:00 pm Last Edit: Apr 26, 2017, 08:30 pm by escuta
Hello, back again. The new GPS unit arrived. I wired it up to the arduino with VCC connected to 3.3V, ground to ground and Tx and Rx of the GPS wired to pins 4 and 3 of the arduino respectively. Testing with your ubloxRate code results in the same behaviour as the last GPS unit, ie. it transmits GPS data but doesn't respond to any configuration messages. I notice when the serial monitor window is first opened, the following message:

ubloxRate.INO: started
Looking for GPS device on NeoSWSerial( RX pin 4, TX pin 3 )
Status,UTC Date/Time,Lat,Lon,Hdg,Spd,Alt,Sats,Rx ok,Rx err,Rx chars,
3,2000-01-01 17:46:19.00,-156592950,-477405433,,,101390,8,2,0,122,
etc......

The "Rx ok,Rx err" is curious.

Here is the print out running NMEADiagnostic.ino if that's any help:

,08,34,320,21,10,09,098NMEAdiagnostic.INO: started
Looking for GPS device on SoftwareSerial( RX pin 4, TX pin 3 )

____________________________

Checking 9600 baud...
Received GSV
Received RMC
Received VTG
Received ZDA
Received GGA
Received GLL
Received GSA
Received GSV
Received GSV
Received GSV
Received GSV
Received RMC
Received VTG
Received ZDA
Received GGA
Received GLL
Received GSA
Received GSV
Received GSV
Received GSV
Received GSV


**** NMEA sentence(s) detected!  ****
Received data:
32382C3239312C32322C32362C30372C3034352C2C32372C31392C3335372C32 28,291,22,26,07,045,,27,19,357,2
352C33312C34362C3130332C33382A37440D0A2447504753562C342C342C3133 5,31,46,103,38*7D..$GPGSV,4,4,13
2C33322C31312C3134322C32382A34370D0A244750524D432C3138323532312E ,32,11,142,28*47..$GPRMC,182521.
3030302C412C313534352E353636322C532C30343735302E343235382C572C30 000,A,1545.5662,S,04750.4258,W,0
2E31342C3335352E39332C3236303431372C2C2C412A36390D0A244750565447 .14,355.93,260417,,,A*69..$GPVTG
2C3335352E39332C542C2C4D2C302E31342C4E2C302E32362C4B2C412A33350D ,355.93,T,,M,0.14,N,0.26,K,A*35.
0A2447505A44412C3138323532312E3030302C32362C30342C323031372C3030 .$GPZDA,182521.000,26,04,2017,00
2C30302A35460D0A2447505458542C30312C30312C30312C414E54454E4E4120 ,00*5F..$GPTXT,01,01,01,ANTENNA

Device baud rate is 9600

GPS data fields received:

  Status,UTC Date/Time,Lat,Lon,Hdg,Spd,Alt,Sats,Rx ok,Rx err,Rx chars,
  3,2017-04-26 18:25:23.00,-156594267,-477404333,35593,230,100550,9,21,0,1274,

** NMEAdiagnostic completed **



Any suggestions?

Thanks,


-dev

#20
Apr 26, 2017, 09:53 pm Last Edit: Apr 26, 2017, 09:54 pm by /dev
Quote from: escuta
Any suggestions?
Run NMEAorder.ino and make sure NMEAGPS_cfg.h has the correct LAST_SENTENCE_IN_INTERVAL.  I have seen the ublox device reject configuration commands if you send them while it is still sending characters.

Quote from: escuta
I wired it up to the arduino with VCC connected to 3.3V, ground to ground and Tx and Rx of the GPS wired to pins 4 and 3 of the arduino respectively.
Did you forget about reply #17?

Quote
This is a 3.3V device, so you really need to shift the Arduino's 5V levels down to 3.3V.  This is strongly recommended for connecting the Arduino transmitting pin (9 or whatever, outputs minimum of 3.9V) ) to the GPS RX pin (max allowed is 3.6V) .  A resistor divider will work.
I hope you haven't damaged the GPS RX pin again!  There's a schematic in that link.  It describes how to pick the resistor values for the Arduino TX-to-GPS RX connection (R1 and R2).  Some folks use a 10K in series (i.e., between Arduino TX and GPS RX).

BTW, I have never seen a ublox device emit this sentence:

    $GPTXT,01,01,01,ANTENNA...

... so that's a little curious.
Really, I used to be /dev.  :(

-dev

#21
Apr 27, 2017, 04:00 pm Last Edit: Apr 28, 2017, 02:29 pm by -dev
From the data in your Reply #13, it looks like ZDA should be the LAST_SENTENCE_IN_INTERVAL.

Regarding the $GPTXT, it looks like warning messages were enabled.  I don't know why "ANTENNA OK" is a warning message.  :-/  It can only be enabled by a UBX binary command.  Maybe the manufacturer turned it on to make sure the unit was ok.  You might be able to turn it off with

      gps.send_P( &tee, F("PUBX,40,TXT,0,0,0,0,0,0") );

If that doesn't work, you'll have to send the binary message:

Code: [Select]
const unsigned char ubxConfigInf[] PROGMEM =
  { 0x06,0x02,10,0,1,0,0,0,0,0,0,0,0,0 }; // disable all NMEA test,dbg,notice,warning and error msgs

    ...

          sendUBX( ubxConfigInf, sizeof(ubxConfigInf) );

Cheers,
/dev
Really, I used to be /dev.  :(

escuta

Quote
Did you forget about reply #17?
I must be trying to do too many things at once. I didn't read it properly. I've now bought the parts in the diagram: a diode and 3 resistors where R1 = 2.2k, R2 = 4.7k and R3 = 2.2k

Is this OK? I know next to nothing about electronics, sorry.

A question about the diagram: Do the VCC and GND connections of the GPS remain unattached?

Thanks again

-dev

Quote
Do the VCC and GND connections of the GPS remain unattached?
No, attach the Arduino 5V pin to VCC and the Arduino GND pin to GND.  This module has a voltage regulator to provide 3.3V to the GPS chip, so you have to provide 5V to the module on the VCC pin.
Really, I used to be /dev.  :(

escuta

With the circuit wired up and attached i ran NMEAorder.ino

It gave the error:

ERROR: LAST_SENTENCE_IN_INTERVAL is incorrectly set to NMEAGPS::NMEA_GLL!
 
so i changed NMEAGPS_cfg.h to have NMEAGPS::NMEA_ZDA as the LAST_SENTENCE_IN_INTERVAL

Ran it again with success.

This however stops me from running ubloxRate.ino which requires NMEAGPS::NMEA_GLL to be defined as LAST_SENTENCE_IN_INTERVAL

I can of course run my own code which attempts to change the update rate on setup. Unfortunately there is no change. I can receive GPS data however the GPS unit itself seems unresponsive to messages.

So perhaps I really have burnt out 2 units...

-dev

Quote from: escuta
i changed NMEAGPS_cfg.h to have NMEAGPS::NMEA_ZDA ...  This however stops me from running ubloxRate.ino
Oops, yes.  I think I have a change to ubloxrate.ino to fix that.

Try using GLL for LAST_SENTENCE.  Then press 'e' to get echo, and then press '0' several times.  Press '0' at random times with respect to when the GPS sends data: while the characters come in, between batches, etc.  If you're using the Serial Monitor window, you have to press ENTER to actually send what you've typed.

Does it ever stop sending all the sentences? 

Quote
Unfortunately there is no change
Do you have a 3.3V TTL Serial-to-USB converter?  Then you could hook the GPS to your PC and try ucenter.  If you can't change the configuration with ucenter, either, the RX pin is burnt out.

I suppose there is a possibility that it is a counterfeit GPS device that does not implement those commands.  The only way to know for sure is to connect it safely and correctly, using either a 3.3V USB converter with ucenter, or level-shift the 5V Arduino signals with your sketch.

If you have to order parts, I would suggest throwing in a level-shifting module.  They can also be used for an SD card interface.

Cheers,
/dev
Really, I used to be /dev.  :(

escuta

Quote
Try using GLL for LAST_SENTENCE.  Then press 'e' to get echo, and then press '0' several times.  Press '0' at random times with respect to when the GPS sends data: while the characters come in, between batches, etc.  If you're using the Serial Monitor window, you have to press ENTER to actually send what you've typed.

Does it ever stop sending all the sentences? 
No, unfortunately not. That level shifting module looks good. I'll try and buy a USB converter in town next week, or buy one online and test out with the ucentre. Thanks again!

amitchell

I have the same situation than escuta.
Did you made any progress in order to get more than 1Hz?

Thanks!

amitchell

I've been reading this post for a week and I still can't run faster than 1Hz. I might burnt out RX GPS pin too, since I made the same. How can I check it for sure?

-dev

Quote
How can I check it for sure?
Send it commands to turn sentences off:

Code: [Select]
gps.send_P ( &gpsPort, F ("PUBX,40,GLL,0,0,0,0,0,0") );
Do that for several sentences: GGA, RMC, ZDA, VTG. If it stops sending those sentences, you know it received the commands correctly.

Before setting the higher update rate, you must

  • disable all sentences,
  • wait a little (100ms or so),
  • set the baud rate (flush, then wait 250ms or so),
  • set the update rate (wait), and
  • enable the sentences you need.

This is what ubloxrate.INO does.
Really, I used to be /dev.  :(

Go Up