GPS Speedometer-display problem

Hi, please everyone for advice. I built a simple GPS speedometer. And the display doesn't show me any data. I use the seven -segment display TM1637 and Neo M6 GPS and Arduino NANO. Can you please see the code if I am not there for a mistake? I am a beginner in programming.
Thank you



/* arduino nano
  displej jsem pouzil 4mistny TM1637. rychlost vic nez 100km/h , na dvoumistny jsem nenasel knihovnu
  GPS modul aktualizuje 1Hz. podle datasetu umi az 5Hz, ale jeste jsem nenasel zpusob jak to zmenit
  casem na to prijdu a pujde to aktualizovat. 1Hz mi prijde dostatecny, ani tachometr v aute se tak rychle neaktualizuje.
*/
#include <TM1637Display.h>
#include <TinyGPSPlus.h>                  // ve spravci knihoven Arduino IDE
#include <SoftwareSerial.h>               // ve spravci knihoven Arduino IDE
static const int CLK = 3, DIO = 4;        // gpio pripojeni na displej mozno zmenit
TM1637Display displej(CLK, DIO);
static const int RXPin = 6, TXPin = 7;    // gpio pripojeni na gps mozno zmenit
TinyGPSPlus gps;
SoftwareSerial ss(RXPin, TXPin);

void setup() {
  displej.setBrightness(10);              // nastaveni jasu (8-15) podle potreby se musi zmenit
  ss.begin(9600);                         // rychlost soft serial nelze zmenit
}

void loop() {
  if (ss.available()) {                   // prisli data z GPS na ss port?
    gps.encode(ss.read());                // dekodovat gps vetu
    if (gps.speed.isUpdated()) {          // jsou aktualizovana data rychlosti?
      displej.showNumberDec(gps.speed.kmph(), false); // zobrazi rychlost na displeji. pocatecni nuly vynechany
    }
  }
}
2 Likes

When you ran the example code for the GPS, did the example code produce data?

No. I uploaded the program to the board and waited for something to appear.
So what do I put into the code?

Why not try the example code of the GPS to see if the GPS works?

I think GPS works. The red diode flashes on the GPS board. As I wrote, I'm a beginner. I don't know what I did wrong.

Did you try the example code that comes with the GPS library to see if the GPS works?

Thus you may move from "I think" to "I know".

I didn't try it. So I'm going to do it, but how do I find that GPS works, when nothing shows me a display?

During uploading this error

avrdude: stk500_paged_load(): (a) protocol error, expect=0x10, resp=0x65

avrdude: stk500_cmd(): programmer is out of sync

avr_read(): error reading address 0x0000

    read operation not supported for memory "flash"

avrdude: failed to read all of flash memory, rc=-2

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x69



I recorded a library test and no change. Display still shows nothing

Silly question I know, but does the Neo 6 have an antenna attached and does it have a view of the sky?

Hi Marty and welcome to the forum.

I've been using a Nano, Neo6M and TM1637 as a working speedometer in my car for a couple of years. I've had plenty of difficulties with it -- both hardware and software. But they can all be resolved.

Like others on this forum, I'm happy to help you but only if you help us to help you.

First thing to do is post a photo of your setup. You might not think this is important but it really is.

Yes :slight_smile:

Maybe I found the cause of the problem. I put the boards under a large magnifying glass and found one chip on the GPS board. I do not have a hot air soldaker for repair, so I have ordered a new module so far.

So, what is wrong with the chip?

It is soldered crookedly on the board and one leg was in the air.

1 Like

Photo of the assembly

1 Like

Excellent photos. Tells us so much. Thank you.

I'm currently using the same GPS module. Yours does look a bit skewed. It is surprising that one leg is not soldered down. But you say that the LED is blinking -- that's a good sign. You need to look at the raw GPS output to see if it is working. Too early to worry about getting the speed.

Looks like you do 3D printing. That's a serious looking power supply. Sooner or later the antenna's tiny cable will break if you leave it loose like that. Never connect or disconnect the antenna cable with power on. Never.

Yes. I 3D print a lot of tools, including the power supply. This build is for revival. As soon as the whole set is functional, it will go into the printed box.

First of all, to eliminate hardware possibilities try using the example code that comes with the GPS library. There should be a 'DeviceExample' sketch under tinyGPSplus in the examples.
Customise line 8 in that sketch to use your Tx and Rx pins, then load it into your Arduino and open the serial monitor at 115200 baud.
You should see text messages on startup, and regular updates as new data comes in from the GPS. If you're getting that, then you know the hardware works.

I have broken several antenna cables. The connections are weak. I made a frame to hold the antenna to the GPS board and protect the cable:

image

The Tinkercad file is in this discussion:

1 Like