Hi everyone,
we (my friend and I) have been working on a project in the last couple of weeks and are somewhat newcomers to Arduino. We are basically trying to build a little self-driving boat. We managed to connect a BLE (Bluetooth Low Energy) module, three ultrasonic sensors (HC-SR04) and a couple of motors (with the L293D motor driver). Now we wanted to take the project to the next level by connecting a GPS module, so we ordered a GPS module on Amazon. By mistake we ordered the Neo-7M-0-001. After hours of trying to get it to work we gave up and thought the issue to be that it was the 7M and not a 6M, as all the tutorials on YouTube and most blogs/post use the 6M. So then we ordered a 6M and now were stuck with that one.
All the wiring and the modules are attached below with pictures.
For the 7M we only tried 3.3 V from the Arduino. (Accidentally,) we once tried 5V on the 6M.
According to the data sheets the baud rate of both GPSs is 9600 (and of course we used that in the code). The Serial connection (Serial.begin) is at 115200.
For the Neo-7M-0-001:
DeviceExample code:
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
/*
This sample sketch 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 = 4, TXPin = 3;
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("DeviceExample.ino"));
Serial.println(F("A simple demonstration of TinyGPS++ with an attached GPS module"));
Serial.print(F("Testing TinyGPS++ library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("by Mikal Hart"));
Serial.println();
}
void loop()
{
// This sketch displays information every time a new sentence is correctly encoded.
while (ss.available() > 0)
if (gps.encode(ss.read()))
displayInfo();
if (millis() > 5000 && gps.charsProcessed() < 10)
{
Serial.println(F("No GPS detected: check wiring."));
while(true);
}
}
void displayInfo()
{
Serial.print(F("Location: "));
if (gps.location.isValid())
{
Serial.print(gps.location.lat(), 6);
Serial.print(F(","));
Serial.print(gps.location.lng(), 6);
}
else
{
Serial.print(F("INVALID"));
}
Serial.print(F(" Date/Time: "));
if (gps.date.isValid())
{
Serial.print(gps.date.month());
Serial.print(F("/"));
Serial.print(gps.date.day());
Serial.print(F("/"));
Serial.print(gps.date.year());
}
else
{
Serial.print(F("INVALID"));
}
Serial.print(F(" "));
if (gps.time.isValid())
{
if (gps.time.hour() < 10) Serial.print(F("0"));
Serial.print(gps.time.hour());
Serial.print(F(":"));
if (gps.time.minute() < 10) Serial.print(F("0"));
Serial.print(gps.time.minute());
Serial.print(F(":"));
if (gps.time.second() < 10) Serial.print(F("0"));
Serial.print(gps.time.second());
Serial.print(F("."));
if (gps.time.centisecond() < 10) Serial.print(F("0"));
Serial.print(gps.time.centisecond());
}
else
{
Serial.print(F("INVALID"));
}
Serial.println();
}
with tinyGPS+-0.95 DeviceExample we get the following data in the Serial Monitor:
"No GPS detected: check wiring" (once)
Also, the GPS modules LED blinks Blue, the RX on the Arduino does not light up at all, the TX blinks about one time a second.
I will have to attach the FullExample code in a separate post, as I would exceed the limit of 9000 characters.
with tinyGPS+-0.95 FullExample we get this data in the Serial Monitor:
In the table we get "*" from "Sats" to (including) "card" and under "chars RX", "Sentences RX" and "Checksum Fail" we get "0". After a couple of those lines, it changes to "No GPS data received: Check wiring". From then one those lines switch back and forth.
The GPS modules LED blinks again, the RX on the Arduino does not light up at all, the TX blinks again one time in one second.
For these two sketches we waited up to 10 minutes, each time getting the same answer.
We also tried another sketch from the internet, but due to the limit of characters I will have to attached that sketch in another post...
All we get is "GPS Start". Thats it (We waited for about 5 minutes). (We of course changed the pins in the code and baud rate in the serial monitor)
With that one, the LED on the 7M does not blink, but stays light up. The TX on the Arduino blinks again with the same rate, the RX does not light up at all once again.
Now we tried the exact same code from above with another two setups: the 7M with the Antenna module from the 6M and the 6M (with Antenna).
For the 7M + Antenna with the DeviceExample code we get the following:
In the Serial Monitor we get "No GPS detected: check wiring" (once) and then nothing.
The RX and the TX on the Arduino do not light up, the 7M does blink though.
For the 7M +Antenna with the FullExample code we get this:
In the table we get "*" from "Sats" to (including) "card" and under "chars RX", "Sentences RX" and "Checksum Fail" we get "0". After a couple of those lines, it changes to "No GPS data received: Check wiring". From then one those lines switch back and forth.
The GPS modules LED blinks again, the RX on the Arduino does not light up at all, the TX blinks again one time in one second (after about five seconds of constant on).
For the 7M + Antenna with the code from the Internet we get this:
"GPS Start". The LEDs (RX and TX) on the Arduino do not light up. The GPS modules LED blinks after about 5 seconds.
For the 6M + Antenna with the DeviceExample code we get the following:
In the Serial Monitor we get "No GPS detected: check wiring" (once) and then nothing.
The RX and the TX on the Arduino do not light up, the (green) LED on the 6M does blink every time I move the module.
For the 6M +Antenna with the FullExample code we get this:
In the table we get "" from "Sats" to (including) "card" and under "chars RX", "Sentences RX" and "Checksum Fail" we get "0". After a couple of those lines, it changes to "No GPS data received: Check wiring". From then one those lines switch back and forth.
After 30 seconds or something though, it changes: Everything is again "", but the "Chars RX" changes to some value (from 4, to 6, to 9, to 10, to 11). We suspect that this occurred because we may have been moving the connectors a little.
The GPS modules LED blinks every now and then after I move the module, the RX on the Arduino does not light up at all, the TX blinks again one time in one second.
For the 6M + Antenna with the code from the Internet we get this:
"GPS Start". The RX and TX LEDs on the Arduino stay off. The modules LED blinks every now and then after moving the module.
All this sounds very confusing to us. The 6M seems to be weird with its led turning on and off, but we even tried all of this after we soldered the connectors on the modules, so it can't be a bad connection.
On the pics, it looks like we are inside; we just took the pictures inside, we tested outside.
(I can post the exact lines that appear on the Serial Monitor, if needed. Feel like its just too much though.)
Help is very appreciated!
Thank you.