Ublox NEO 6M problem

Hello my friends,

I just received a GPS module Ublox neo 6m and I have connected the module to an arduino nano v3.

Pin configuration: 3.3V arduino to Vcc module ; Gnd to Gnd ; TX arduino to RX module ; TX module to RX arduino.

Program:

#include <TinyGPS++.h>
#include <SoftwareSerial.h>
/*
  This sample code demonstrates the normal use of a TinyGPS++ (TinyGPSPlus) object.
  It requires the use of SoftwareSerial, and assumes that you have a
  4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).
*/
static const int RXPin = 30, TXPin = 31;
static const uint32_t GPSBaud = 9600;

// The TinyGPS++ object
TinyGPSPlus gps;

// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);

void setup()
{
 Serial.begin(115200);
 ss.begin(GPSBaud);

 Serial.println(F("FullExample.ino"));
 Serial.println(F("An extensive example of many interesting TinyGPS++ features"));
 Serial.print(F("Testing TinyGPS++ library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
 Serial.println(F("by Mikal Hart"));
 Serial.println();
 Serial.println(F("Sats HDOP Latitude   Longitude   Fix  Date       Time     Date Alt    Course Speed Card  Distance Course Card  Chars Sentences Checksum"));
 Serial.println(F("          (deg)      (deg)       Age                      Age  (m)    --- from GPS ----  ---- to London  ----  RX    RX        Fail"));
 Serial.println(F("---------------------------------------------------------------------------------------------------------------------------------------"));
}

void loop()
{
 static const double LONDON_LAT = 51.508131, LONDON_LON = -0.128002;

 printInt(gps.satellites.value(), gps.satellites.isValid(), 5);
 printInt(gps.hdop.value(), gps.hdop.isValid(), 5);
 printFloat(gps.location.lat(), gps.location.isValid(), 11, 6);
 printFloat(gps.location.lng(), gps.location.isValid(), 12, 6);
 printInt(gps.location.age(), gps.location.isValid(), 5);
 printDateTime(gps.date, gps.time);
 printFloat(gps.altitude.meters(), gps.altitude.isValid(), 7, 2);
 printFloat(gps.course.deg(), gps.course.isValid(), 7, 2);
 printFloat(gps.speed.kmph(), gps.speed.isValid(), 6, 2);
 printStr(gps.course.isValid() ? TinyGPSPlus::cardinal(gps.course.value()) : "*** ", 6);

 unsigned long distanceKmToLondon =
   (unsigned long)TinyGPSPlus::distanceBetween(
     gps.location.lat(),
     gps.location.lng(),
     LONDON_LAT, 
     LONDON_LON) / 1000;
 printInt(distanceKmToLondon, gps.location.isValid(), 9);

 double courseToLondon =
   TinyGPSPlus::courseTo(
     gps.location.lat(),
     gps.location.lng(),
     LONDON_LAT, 
     LONDON_LON);

 printFloat(courseToLondon, gps.location.isValid(), 7, 2);

 const char *cardinalToLondon = TinyGPSPlus::cardinal(courseToLondon);

 printStr(gps.location.isValid() ? cardinalToLondon : "*** ", 6);

 printInt(gps.charsProcessed(), true, 6);
 printInt(gps.sentencesWithFix(), true, 10);
 printInt(gps.failedChecksum(), true, 9);
 Serial.println();
 
 smartDelay(1000);

 if (millis() > 5000 && gps.charsProcessed() < 10)
   Serial.println(F("No GPS data received: check wiring"));
}

// This custom version of delay() ensures that the gps object
// is being "fed".
static void smartDelay(unsigned long ms)
{
 unsigned long start = millis();
 do 
 {
   while (ss.available())
     gps.encode(ss.read());
 } while (millis() - start < ms);
}

static void printFloat(float val, bool valid, int len, int prec)
{
 if (!valid)
 {
   while (len-- > 1)
     Serial.print('*');
   Serial.print(' ');
 }
 else
 {
   Serial.print(val, prec);
   int vi = abs((int)val);
   int flen = prec + (val < 0.0 ? 2 : 1); // . and -
   flen += vi >= 1000 ? 4 : vi >= 100 ? 3 : vi >= 10 ? 2 : 1;
   for (int i=flen; i<len; ++i)
     Serial.print(' ');
 }
 smartDelay(0);
}

static void printInt(unsigned long val, bool valid, int len)
{
 char sz[32] = "*****************";
 if (valid)
   sprintf(sz, "%ld", val);
 sz[len] = 0;
 for (int i=strlen(sz); i<len; ++i)
   sz[i] = ' ';
 if (len > 0) 
   sz[len-1] = ' ';
 Serial.print(sz);
 smartDelay(0);
}

static void printDateTime(TinyGPSDate &d, TinyGPSTime &t)
{
 if (!d.isValid())
 {
   Serial.print(F("********** "));
 }
 else
 {
   char sz[32];
   sprintf(sz, "%02d/%02d/%02d ", d.month(), d.day(), d.year());
   Serial.print(sz);
 }
 
 if (!t.isValid())
 {
   Serial.print(F("******** "));
 }
 else
 {
   char sz[32];
   sprintf(sz, "%02d:%02d:%02d ", t.hour(), t.minute(), t.second());
   Serial.print(sz);
 }

 printInt(d.age(), d.isValid(), 5);
 smartDelay(0);
}

static void printStr(const char *str, int len)
{
 int slen = strlen(str);
 for (int i=0; i<len; ++i)
   Serial.print(i<slen ? str[i] : ' ');
 smartDelay(0);
}

And the results from serial monitor are:

Sats HDOP Latitude   Longitude   Fix  Date       Time     Date Alt    Course Speed Card  Distance Course Card  Chars Sentences Checksum
        (deg)      (deg)       Age                      Age  (m)    --- from GPS ----  ---- to London  ----  RX    RX        Fail
---------------------------------------------------------------------------------------------------------------------------------------
**** **** ********** *********** **** ********** ******** **** ****** ****** ***** ***   ******** ****** ***   0     0         0        
**** **** ********** *********** **** ********** ******** **** ****** ****** ***** ***   ******** ****** ***   0     0         0        
**** **** ********** *********** **** ********** ******** **** ****** ****** ***** ***   ******** ****** ***   0     0         0        
**** **** ********** *********** **** ********** ******** **** ****** ****** ***** ***   ******** ****** ***   0     0         0        
**** **** ********** *********** **** ********** ******** **** ****** ****** ***** ***   ******** ****** ***   0     0         0        
No GPS data received: check wiring
**** **** ********** *********** **** ********** ******** **** ****** ****** ***** ***   ******** ****** ***   0     0         0        
No GPS data received: check wiring
**** **** ********** *********** **** ********** ******** **** ****** ****** ***** ***   ******** ****** ***   0     0         0        
No GPS data received: check wiring
**** **** ********** *********** **** ********** ******** **** ****** ****** ***** ***   ******** ****** ***   0     0         0

I had checked the wires twice and all fine. Why I have this problem?
Something that I observed is that the GPS led module did not get on when module it’s connected to arduino 3.3V.

Thanks

Please read this, especially step 7. You can modify your post to add the [code]...[/code] tags around your program.

Did you google? Here's one result. Although I'd suggest using the NeoGPS library... because I wrote it. :)

Which module is it, or where did you buy it? Some modules require 5V on the VCC pin because they have a 3.3V regulator. The ublox chip on the module is a 3.3V chip; that's why you should use resistors on TX and RX (but not VCC and GND).

Cheers, /dev

Oh, thank you for the tip. Yeah I had read that article but there's no much information about my problem. Do you think it's a problem if I had use 5V of arduino(TX pin) to RX pin from module witch normally plug in at 3.3V?

Let me summarize:

1) You don't want to modify your post.

2) You want to put the 5V Arduino TX into the 3.3V GPS RX.

3) You want to run a 5V module on 3.3V.

4) The linked article isn't helpful, even though it shows you how to wire it ip

5) You don't know why it doesn't work.

Did I miss anything?

Did I miss anything?

Perhaps. The GPS module was probably destroyed by connecting it to a 5V Arduino.

I'm sorry guys for my late answer. Dev, from your questions I had understand what was wrong, and I had rebuild the circuit exactly like in the link. But I have still same result. I saw some videos where that little led from board it's also off when the board it is connected to voltage(so I think that led did not indicate the functionality of the board when you put a voltage on it). I don t know what I do wrong.The RX led from arduino board is flashing about 1 time/s and the TX led is off. I had tried both Vcc for suppling the GPS module(5V and 3.3V) but did not work.

I had tried both Vcc for suppling the GPS module(5V and 3.3V) but did not work.

As we hinted, exposure to 5V was an extremely bad idea.

It is possible that the GPS module survived this abuse. You can test that possibility by powering it with 3.3V and connecting ONLY TX from the GPS module to Softwareserial RX on the Arduino. Do NOT connect anything on the Arduino to RX on the module.

Run this program, after making sure that you have software serial set at the correct baud rate and with the correct pin configuration. It will show you what the GPS module is outputting, if anything, and if the baud rate is correct.

#include <SoftwareSerial.h>

// setup gps serial
int gpsTxPin = 8;
int gpsRxPin = 9;
SoftwareSerial gpsSerial(gpsTxPin, gpsRxPin);

void setup()
{
  Serial.begin(9600);  //set monitor to 9600
 
  gpsSerial.begin(9600); //adjust for GPS unit

  Serial.println("Ready!");
}

void loop()
{
  while(gpsSerial.available())
  {
    char c = gpsSerial.read();
    Serial.print(c);
  }
}

/dev: Which module is it, or where did you buy it?

I still don't know whether the module is 5V or 3.3V. I understand it has a ublox Neo-6M chip on the board, but I don't know if it has a 3.3V regulator, or what. Did it come with an antenna? etc. etc.

I assumed from the first post that this was a 3.3V module, and this (from reply #5) suggests that the module was sending sentences, but did not have a fix.

The RX led from arduino board is flashing about 1 time/s

Of course, [u]everything is out of doors, with a clear view of the sky,[/u] isn't it?

I bought the module from here: http://www.aliexpress.com/item/Ublox-NEO-6M-GPS-Module-Aircraft-Flight-Controller-MWC-IMU-APM2/32338450311.html In description it said: power: 3-5V, and something about soldering a battery. But I have already the battery in her place and it's seems that is welded becouse I can t move it.(also in the picture from the site you can see this)

Ok, so I made the next configuration: 5V arduino to Vcc module ; GND to GND and TX pin from module to D3 from Arduino. I had set monitor and gps unit for 9600. And the results are:

Ready!
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGSV,1,1,00*79
$GPGLL,,,,,,V,N*64
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30

If I power the module with 3.3 from arduino with the same configuration the results are:

Ready!
$GPTXT,01,01,02,u$GPTXT,01,01,02,u$GPTXT,01,01,02,u$GPTXT,01,01,02,

and it continues like this on and on

some photos with module and connections

The module works, at least when powered by 5V, but it does not have a fix.

Are you indoors?

I’m in my room, indoor yes. what are you mean with: ,does not have a fix"?

GPS modules generally do not work indoors.

What? This is funny? Why would you manufacture a GPS who don t work indoor? Hahaha. I saw movies on youtube, same GPS and they are indoor and the module is working. I respect your answer but…I’m sceptic about this. Still…I’m looking for some answers becouse I really want some data from that GPS.

I'll bet you believe everything you see on YouTube.

https://www.youtube.com/watch?v=bgOZLgaLa0g

This module has an on-board 3.3V regulator. It takes 5V in from the VCC pin and provides 3.3V power to the ublox chip. You really should use resistors between the Arduino TX and GPS RX pins. It may work for a while or forever. The spec says no more than 3.6V into the RX pin. The Arduino outputs ~4.7V.

If you put 3.3V into the VCC pin, the regulator can barely provide enough voltage for the ublox chip. It looks like the ublox can only send part of a TeXT notice message before it gives up.

Cheers, /dev

Ok. So I made the exactly pin configuration from the site that you ave me and I uploaded my long code from my first post. Now I have this result in my serial monitor:

FullExample.ino
An extensive example of many interesting TinyGPS++ features
Testing TinyGPS++ library v. 0.92
by Mikal Hart

Sats HDOP Latitude   Longitude   Fix  Date       Time     Date Alt    Course Speed Card  Distance Course Card  Chars Sentences Checksum
          (deg)      (deg)       Age                      Age  (m)    --- from GPS ----  ---- to London  ----  RX    RX        Fail
---------------------------------------------------------------------------------------------------------------------------------------
**** **** ********** *********** **** 00/00/2000 00:00:00 71   ****** ****** ***** ***   ******** ****** ***   159   0         1        
0    9999 ********** *********** **** 00/00/2000 00:00:00 182  ****** ****** ***** ***   ******** ****** ***   321   0         1        
0    9999 ********** *********** **** 00/00/2000 00:00:00 259  ****** ****** ***** ***   ******** ****** ***   483   0         1        
0    9999 ********** *********** **** 00/00/2000 00:00:00 336  ****** ****** ***** ***   ******** ****** ***   645   0         1        
0    9999 ********** *********** **** 00/00/2000 00:00:00 412  ****** ****** ***** ***   ******** ****** ***   807   0         1        
0    9999 ********** *********** **** 00/00/2000 00:00:00 489  ****** ****** ***** ***   ******** ****** ***   969   0         1        
0    9999 ********** *********** **** 00/00/2000 00:00:00 565  ****** ****** ***** ***   ******** ****** ***   1131  0         1        
0    9999 ********** *********** **** 00/00/2000 00:00:00 642  ****** ****** ***** ***   ******** ****** ***   1293  0         1        
0    9999 ********** *********** **** 00/00/2000 00:00:00 720  ****** ****** ***** ***   ******** ****** ***   1455  0         1        
0    9999 ********** *********** **** 00/00/2000 00:00:00 796  ****** ****** ***** ***   ******** ****** ***   1617  0         1        
0    9999 ********** *********** **** 00/00/2000 00:00:00 873  ****** ****** ***** ***   ******** ****** ***   1779  0         1

Is it true that this module did not work indoor? What should I do? I just want to see the latitude and longitude from him. I don t understand why it's so complicated to operate with this module.

Is it true that this module did not work indoor? What should I do?

Go outside.