TTGO V1 no GPS signal

Thread Starter

iaf

Joined Apr 11, 2019
40
Hey Folks, I am encountering the following problem. I have a TTGo board V1 and i tried compiling this code on it
Code:
#include <TinyGPS++.h>

#include <axp20x.h>





TinyGPSPlus gps;

HardwareSerial GPS(1);

AXP20X_Class axp;





void setup()

{

  Serial.begin(115200);



  Wire.begin(21, 22);

  if (!axp.begin(Wire, AXP192_SLAVE_ADDRESS)) {

    Serial.println("AXP192 Begin PASS");

  } else {

    Serial.println("AXP192 Begin FAIL");

  }

  axp.setPowerOutPut(AXP192_LDO2, AXP202_ON);

  axp.setPowerOutPut(AXP192_LDO3, AXP202_ON);

  axp.setPowerOutPut(AXP192_DCDC2, AXP202_ON);

  axp.setPowerOutPut(AXP192_EXTEN, AXP202_ON);

  axp.setPowerOutPut(AXP192_DCDC1, AXP202_ON);

  GPS.begin(9600, SERIAL_8N1, 34, 12);   //17-TX 18-RX

}



void loop()

{

  Serial.print("Latitude  : ");

  Serial.println(gps.location.lat(), 5);

  Serial.print("Longitude : ");

  Serial.println(gps.location.lng(), 4);

  Serial.print("Satellites: ");

  Serial.println(gps.satellites.value());

  Serial.print("Altitude  : ");

  Serial.print(gps.altitude.feet() / 3.2808);

  Serial.println("M");

  Serial.print("Time      : ");

  Serial.print(gps.time.hour());

  Serial.print(":");

  Serial.print(gps.time.minute());

  Serial.print(":");

  Serial.println(gps.time.second());

  Serial.print("Speed     : ");

  Serial.println(gps.speed.kmph());

  Serial.println("**********************");



  smartDelay(1000);



  if (millis() > 5000 && gps.charsProcessed() < 10)

    Serial.println(F("No GPS data received: check wiring"));

}



static void smartDelay(unsigned long ms)

{

  unsigned long start = millis();

  do

  {

    while (GPS.available())

      gps.encode(GPS.read());

  } while (millis() - start < ms);

}
I can see that the GPS LED is blinking so it means that i’m getting fixes but i still see “No Gps” on the serial interface, did anyone have the same problem and could be able to solve it?
 

Thread Starter

iaf

Joined Apr 11, 2019
40
Have you seen the example sketch

https://learn.sparkfun.com/tutorial...guide/example-sketch-tinygps-serial-streaming

The GPS data can be viewed on a standard serial terminal,
Suggest you print the strings received to the terminal
yo should be getting lots of strings,

My guess is you either have corrupted data , or wrong pin out.
The problem is that i have checked the pinout and it's also written on the board. The data that is shown is 0.0.0 and then no GPS signal
 

Deleted member 115935

Joined Dec 31, 1969
0
if your looking directly at the GPS output , then it should have the NEMA strings,
even with zero values in the strings, you should still be receiving the sentences,

Have you connected the terminal direct to the GPS module ?
 

Thread Starter

iaf

Joined Apr 11, 2019
40
if your looking directly at the GPS output , then it should have the NEMA strings,
even with zero values in the strings, you should still be receiving the sentences,

Have you connected the terminal direct to the GPS module ?
Is that possible with the TTGO?
 

Deleted member 115935

Joined Dec 31, 1969
0
I don't know the TTGO board,
can you post a link and we might be able to advise.

Don't suppose you have access to an oscilloscope ?
 

Deleted member 115935

Joined Dec 31, 1969
0
So,
in Arduino world yo have the test sketches in the IDE,
are you using the Arduino IDE ?

In the tools, under examples, you have a sketch MultiSerial

What that sketch does is reads one serial port and send the data to the other,
The serial ports can have different baud rates.

Set the sketch up for the two ports your using,
and then whatever the GPS is sending will be sent to your Arduino terminal on the computer.
( Control shift M on the PC )

Now that your connected direct to the GPS,
then you can see what its sending out.

At start up, the GPS module should be sending out a constant string of characters, in a message structure,
if the thing is not locked, you should still be getting the strings out, just with zero data in them,

e.g.

To understand the NMEA message structure, let’s examine the popular $GPGGA message. This particular message was output from an RTK GPS receiver:

$GPGGA,181908.00,3404.7041778,N,07044.3966270,W,4,13,1.00,495.144,M,29.200,M,0.10,0000*40


If you get no strings out,
the problem is the GPS to board interface.
If you get strings , but never any data , your GPS is not locking

Give it a go,
 

djsfantasi

Joined Apr 11, 2010
9,156
I can’t see the MultiSerial example sketch right now, but if it uses software serial ports, there are restrictions on the software ports. Particularly with regard to simultaneous communications. You might need an Arduino model with multiple hardware serial ports. The Uno is not one. The Mega is.
 

Deleted member 115935

Joined Dec 31, 1969
0
The sketch is just a few lines, it does not use software serial , but can if needed , just include the library. new software serial is better,

The program just goes around and around in a tight loop, so software serial would not have a problem,

File -> examples -> 04:communication -. Multiserial.


void setup() {
// initialize both serial ports:
Serial.begin(9600);
Serial1.begin(9600);
}

void loop() {
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.write(inByte);
}

// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
Serial1.write(inByte);
}
}
 

djsfantasi

Joined Apr 11, 2010
9,156
How are you connecting the board to the GPS module? Is it a direct wire? Or an USB connection.

I am unfamiliar with your board, but have since learned that it has three hardware serial ports. If it’s an USB connection, then you can write a short sketch to test the second serial port using the serial monitor on the USB.

A second question is unlikely to be relevant, but is your GPS module connected to serial1? The articles I found have GOS connected to serisl2
 
Top