So I have some funny things going on with this chip over I2C
When hooked up to my MCU when I first received it, the BasicNMEARead sketch worked great.
Since I’ve had it for a while I can not get anything consistent. The only way I can manage to get any NMEA strings over I2C now is going through u-centre, doing the most recent firmware update, and reflashing my MCU with the example code. And even after it is working then, it fails after a power cycle.
Everything works great through u-centre and shows a ton of SIV, not sure where I should be looking.
Hi, thanks for writing in.
I wonder if the backup battery which saves all of your setting via volatile memory is failing. Have you measured the battery? What is the voltage output?
Which part specifically are you using? A SKU would be helpful.
Also, a photo of your setup is also helpful.
Across the battery I’m reading ~1.5V
Picture of my breadboard setup is attached. Excuse the rat’s nest.
https://i.imgur.com/L7n8Yn7.jpg
I bought the unit off Digikey:
https://www.digikey.ca/en/products/deta … 2/11481331
Written on the chip below the model num is:
G62000001672
1944
0100 32
Interesting development - I can disconnect the GPS receiver board completely from power, and reconnect and continue to get NMEA strings as the example sketch intends.
It seems to be the power cycle of my MCU (Teensy 4.0) that is causing the problem.
Problem solved:
The issue seems to be the delay between the MCU startup and the GPS startup.
This (below) setup routine to catch if the GPS is working or not happens to quickly, at least in my case.
void setup()
{
Serial.begin(115200);
Serial.println("SparkFun Ublox Example");
Wire.begin();
if (myGPS.begin() == false)
{
Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing."));
while (1);
}
//This will pipe all NMEA sentences to the serial port so we can see them
myGPS.setNMEAOutputPort(Serial);
}
This can be cured with the use of two simple delay()'s like below, the first one to give the GPS half a second to come alive before the MCU deems it as faulty, and the next, so that if it is actually faulty you’ll be able to receive the message before it moves on, which was happening in my case - I couldn’t even see the “Ublox GPS not detected at default I2C address. Please check wiring. Freezing.” message.
Wire.begin();
delay (500);
if (myGPS.begin() == false)
{
delay (200);
Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing."));
}
Ah, excellent. I am glad to see you have the module working. Thank you for sharing your solution showing that longer delays are needed.
Cheers, happy holidays!