Arduino nano iot 33 and SparkFun GPS Module - Copernicus II DIP (12 Channel)

Hello, I am working on a tracking system and one of the modules is the Trimble Copernicus II GPS. The other sensors, MPU92/65 and BMP280 work fine when connected to the Arduino nano iot 33 but the Trimble Copernicus II GPS sensor isnt working.

The pin connection is as follows:
GPS VCC ---> Nano 3.3 V,
GPS GND ---> Nano GND,
GPS TX-B ---> Nano RX and
GPS RX-B ---> Nano Tx pin

I have tried this code

byte aa;
void setup()
{
  Serial.begin(4800);
  Serial.println("It works, so far"); 
}

void loop() 
{
  if (Serial.available()>0) // if there is data coming into the serial line
  {
    aa = Serial.read(); // get the byte of data
    Serial.print(byte(aa)); // send it to the serial monitor
  }
}

No readings whatsoever

and also

#include <TinyGPSPlus.h>
#include <SoftwareSerial.h>
/*
   This sample sketch demonstrates the normal use of a TinyGPSPlus (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 = 1, TXPin = 0;
static const uint32_t GPSBaud = 4800;

// The TinyGPSPlus 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 TinyGPSPlus with an attached GPS module"));
  Serial.print(F("Testing TinyGPSPlus 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();
}

I get Error compiling for board Arduino NANO 33 IoT. Is my pin connection the issue or what exactly am I missing?
Any help will be much appreciated.

Hi.
In the second case where you use software serial, are you compiling with the GPS TX connected to the Nano pin 0? You can't upload a sketch with that arrangement -- you have to disconnect the GP->pin 0.

It is normal to use some other pins for ss, not pins 0 & 1.

Check the voltage supplied to the GPS -- I found I couldn't rely on the 3.3V from a Nano to the GPS (probably a cheaper Nano than you are using).

Get to know your Arduino before you use it (I don't).
All I know is that this board is not a classic Nano where you must (can) use SoftwareSerial.
Don't use it here.
The IOT33 has AFAIK hardware serial (TX/RX pins) that you address with Serial1
Leo..

That is is true for the classic Nano due to those pins also being the serial port used for uploading, but not for the Nano 33 IoT @chads_k is using. The Nano 33 IoT has a native USB capability, so it does uploads over the USB CDC serial port, leaving pins 0 and 1 free for the user to do as they like.

1 Like

Good to know. Thanks.

I did try using 5V with Uno but it still didnt work. I'm thinking of maybe getting an antenna or using it outside

That's a pricey model you've got. Migt be wise to make sure it's 5V tolerant.

Have you been able to see any raw data coming from the GPS at all? I think that's the first step in troubleshooting GPS problems.

no raw data yet. Still looking at different codes that others have used. The pin connection is correct. Most people have used 3.3 V successfully. also the rating of the boards is 2.7 V to 3.3 V so I'll just stick to 3.3V

Do you have a TTL/USB converter? I find that's the simplest way to view the raw data. It doesn't involve a microprocessor such as a Nano or custom coding.

The Nano 33 IOT is a 3.3volt processor, so you should assume it's pins are not 5volt tolerant.

The GPS is likely a 3.3volt device.
The first fix could take longer, and should of course be done outside.

Always include everything in your first post. Code, links to all part, diagram, picture of setup etc.
But you must have read that in the "how to post" sticky.

Always start with one device/sensor. Make it work before trying to add another one.
If a device doesn't work, then use it on it's own with the shortest code possible.
A simple test sketch might come with it's library.
Leo..

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.