Sainsmart GPS Arduino UNO Problems

I am having problems getting the sainsmart gps to show anything when i try to run the “simple_test” sketch from the TinyGPS library. Even when I uncomment the Serial.write(c); portion, I still don’t see anything other than CHARS=0 SENTENCES=0 CSUM ERR=0. If I connect it to pin 0, 1 and run a blank sketch i can get data from the gps but the moment i try to run a sketch it doesn’t work.

#include <SoftwareSerial.h>

#include <TinyGPS.h>

/* This sample code demonstrates the normal use of a TinyGPS object.
   It requires the use of SoftwareSerial, and assumes that you have a
   4800-baud serial GPS device hooked up on pins 3(rx) and 4(tx).
*/

TinyGPS gps;
SoftwareSerial ss(3, 4);

void setup()
{
  Serial.begin(115200);
  ss.begin(9600);
  
  Serial.print("Simple TinyGPS library v. "); Serial.println(TinyGPS::library_version());
  Serial.println("by Mikal Hart");
  Serial.println();
}

void loop()
{
  bool newData = false;
  unsigned long chars;
  unsigned short sentences, failed;

  // For one second we parse GPS data and report some key values
  for (unsigned long start = millis(); millis() - start < 1000;)
  {
    while (ss.available())
    {
      char c = ss.read();
      // Serial.write(c); // uncomment this line if you want to see the GPS data flowing
      if (gps.encode(c)) // Did a new valid sentence come in?
        newData = true;
    }
  }

  if (newData)
  {
    float flat, flon;
    unsigned long age;
    gps.f_get_position(&flat, &flon, &age);
    Serial.print("LAT=");
    Serial.print(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6);
    Serial.print(" LON=");
    Serial.print(flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon, 6);
    Serial.print(" SAT=");
    Serial.print(gps.satellites() == TinyGPS::GPS_INVALID_SATELLITES ? 0 : gps.satellites());
    Serial.print(" PREC=");
    Serial.print(gps.hdop() == TinyGPS::GPS_INVALID_HDOP ? 0 : gps.hdop());
  }
  
  gps.stats(&chars, &sentences, &failed);
  Serial.print(" CHARS=");
  Serial.print(chars);
  Serial.print(" SENTENCES=");
  Serial.print(sentences);
  Serial.print(" CSUM ERR=");
  Serial.println(failed);
}

I have been messing with it on and off for a few weeks and I am out of ideas. Any help is very appreciated!

I am having problems getting the sainsmart gps to show anything when i try to run the "simple_test" sketch from the TinyGPS library.

Where is the link to your products datasheet?

What if you uncomment this line?

      // Serial.write(c); // uncomment this line if you want to see the GPS data flowing

http://www.u-blox.com/images/downloads/Product_Docs/NEO-6_DataSheet_(GPS.G6-HW-09005).pdf

this is for the gps, u-blox neo-6m

this i the link for the actual product with no much useful info

I did try to see what was coming thru by uncommenting the Serial.write line and it shows nothing besides the CHARS=0 SENTENCES=0 CSUM ERR=0 line.

The most probable source of your problem is that you've wired it incorrectly. GND has to be connected to Arduino GND, 3V3 goes the the equally named pin on the Arduino, TX goes to pin 3 while RX goes to pin 4 on the Arduino. Can you make a picture of your wiring and post it?

I finally got it working. You got me thinking after checking all my connections, and I decided to change my jumper wires, and problem solved.

Thanks for the help!!

Hi All. I’m having some trouble with the same setup. Uno R3, Sainsmart GPS & using TinyGPS (v12). Using the example library code Simple_test or Test_with_gps_device I only get back Chars RX & Checksum Fail values. No actual GPS data come through. Of course I’ve tested it outside in different locations. To ensure a reliable GPS signal was a present I tested the areas with my phone to find the best locations but still no GPS data came through.

Pins are: 3.3v to 3.3v, grnd to grnd, RX to Pin 4, TX to Pin 3.

Any thoughts on what I may be missing?

Forgot to include the code for reference. Any thoughts or suggestions appreciated :slight_smile:

test_with_gps_device.txt (4.77 KB)

One thing to try is to switch the TX and RX lines. There are two schools of thought as to what transmit and receive mean, depending on whether you are sending data or receiving it. It’s possible that the GPS has a different interpretation as to what send and receive mean than what the Arduino has.

I’d suggest that, in the future, when you are looking to buy something, and the documentation tab is blank, keep looking.

Thanks Paul. I've tried switching the RX & TX but it didn't help. When switch the RX output I was getting stopped and restarted once the wires were put back so I think it's hooked up right.

hello guys im having problem with my gps skylab skm53 because everything is working perfect but when i open the serial mornitor it juist show me ********* instead of values of the lat and long pls can anyone help me

im having problem with my gps skylab skm53 because everything is working perfect

You are having problems because everything is working perfectly? I'd hate to see what you have to say when things go to hell in a hand basket.

when i open the serial mornitor it juist show me ********* instead of values of the lat and long

What does?

pls can anyone help me

OK. Please is not spelled that way.