Carloop Pro GPS time to signal lock

I tried to run GPS only code to see what’s wrong.
Response is = “Sattelites in view: 0” (couple of hours of checking)
Code here:

@alanm @jvanier - any chance to get new GPS module by post?
or maybe you can suggest some good substitute (as I cannot find GP-735T in any online store in Poland)

I think this GPS unit outputs serial data in the NMEA format. In theory, you can use any device with a serial port to receive it and then display the raw data in a terminal.

NMEA, with way more detail than you need, is described at this link:
http://www.gpsinformation.org/dale/nmea.htm

You could even use a Particle device to take the serial data from the serial port, and then echo it to the serial over USB port (a very simple firmware; just a few lines). Connect the USB to a computer and then use a terminal software (such as PuTTy) to view the data stream.

That would at least let you know what the GPS is doing.

I have connected GPS GP-735T module directly via TTL-to-USB converter to my laptop.
And then with with u-blox software I tried to check it u-center

It’s working fine and getting very quickly GPS fix (screen from data capture):

I think issue is somewhere at Carloop Pro module with wiring or code…

Can you confirm that this wiring is ok? Shouldn’t it be that TX/RX pins (3,4) should be crossed to RX/TX on the other side?

Second check is to run simple code passing data from GPS module serial connection (over pins 4 & 5)
to Particle Serial output.

// This #include statement was automatically added by the Particle IDE.
#include <ParticleSoftSerial.h>

#define RX_PIN  4 // GPS TX
#define TX_PIN  5 // GPS RX
#define GPS_BAUD  9600  // GP-735 default baud rate

ParticleSoftSerial ss(RX_PIN,TX_PIN);

void setup() {
  Serial.begin(115200); // Begin serial communication with computer
  
  Serial.println("Start, communication open."); 
  
  ss.begin(GPS_BAUD); // Begin serial communication with GPS

  Serial.println("Start, GPS serial opened"); 
}

void loop() {
	
	if(ss.available()) {
	
		Serial.println("Serial to GPS avaliable.");
		Serial.println(ss.read());
	
	} else {
	
		Serial.println("Serial to GPS not avaliable");
		
	}

}

And this code is returning “Serial to GPS not avaliable”…
So my Carloop Pro have trouble to talk over serial to GPS module.
Any ideas?

@pawelmanu,

The first thing I would suggest is to follow the Particle naming convention for pins (instead of the Arduino-style pin numbering).
I am guessing you are using pins D4 & D5?
In that case, you should have the following:

#define RX_PIN  D4 // GPS TX
#define TX_PIN  D5 // GPS RX

Try that out first.

Having the serial wired correctly is very important when using hardware serial. However, software serial (which you are doing with the ParticleSoftSerial library) can be done with whatever pins you specify. The second thing to try is to switch D4 & D5 in the defines above and see if that works.

If those two things don’t solve it, then let us know and we can help dig deeper. You proved the GPS works, so now it must be Carloop, the Electron 2G (since it is Carloop Pro, if I remember correctly) or the code.

@cyclin_al1 I have tried all of the hints from you. And still no connection via serial to GPS module.

What’s next?

@pawelmanu,

My apologies, but I went to sleep for the night and then realized that we are off-track. I assumed Carloop was using a serial interface on the pins you indicated.

However, I went back and verified the Carloop library and the hardware.
Carloop actually connects the GPS serial interface to the Particle device pins RX & TX. Therefore, you can use the hardware serial capabilities of Serial1.

ParticleSoftSerial ss(RX_PIN,TX_PIN);
ss.begin(GPS_BAUD); 

should be changed to

Serial1.begin(GPS_BAUD); 

Another way to go about it is to use the gps capability built into the Carloop library.
My apologies, I should have caught that error right away.

@pawelmanu,

I just want to confirm if that solved it?

@cyclin_al1 Now via Serial1 I am receiving some data. But get confused with it’s structure.

That’s my code:

And that’s the Serial monitor output:

Numbers returned seams to give some pattern - but what is that?

Should it be that Carloop Serial1 returns NMEA structured sentences (GPGGA, GPGLL, GPGSA, GPGSV, GPRMC, GPVTG, and GPTXT) ?

@pawelmanu,

I could not see your code, just a blank page. Does a share on particle have a time limit?

I did look at your Serial monitor output. Without the code, I could not understand it.
However, if I had to take a wild guess, it would be that the output is showing the ASCII code for each character. If my guess is right, then 10=line feed, 13=carriage return, and numbers just above 32 are numerical digits. If that is the case, just printing the character instead of its ASCII code would result in something easily interpreted.

@cyclin_al1 ok… I have changed my code to interpret the output as characters.

Current code version here:

I am getting NMEA sentences clearly now:

$GPRMC,055131.00,V,,,,,,,310717,,,N*7D
$GPVTG,,,,,,,,,N*30
$GPGGA,055131.00,,,,,0,00,99.99,,,,,,*65
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGLL,,,,,055131.00,V,N*49 

In GPGLL I should have GPS coordinates (see: https://cdn.sparkfun.com/datasheets/GPS/GP-735T-150203.pdf)

How it’s possible that this GP-735T module connected directly works fine (see couple of posts above)
and once it’s going over Carloop board - it’s having issues to get GPS fix?
Wrong power level delivered to GPS?

Cross checked once more:

  • Once it’s connected via Carloop board - it’s getting 3.3V and cannot get GPS fix at all.
  • Once connected directly via TTL-to-USB - it’s getting 5V and gets first GPS fix in 1-2 minutes.

Any ideas how to solve it with some rewiring on existing board?

@alanm & @jvanier, You should be aware of this finding (voltage level powering the GPS)!

@pawelmanu,
All the carloop stuff is on Github:

In the hardware repository, I looked at the schematic and indeed the GPS is connected to 3.3V on GPS connector pins 2 & 5. The good news is there is a 5V supply on the Carloop board.

If you are able, can you breakout both sides of the GPS connector or a breadboard or something similar? Be sure not to connect 5V with the 3.3V! You could then test if the GPS_RX and GPS_TX would still work fine at 3.3V levels while power to the GPS is at 5V. If it does not work, then logic conversion between 5V and 3.3V might be needed.

If you are adventurous and the test above passed, you could cut the 3.3V trace on the circuit board to disconnect the GPS power from 3.3V. You would then also have to cut the power trace from the GPS connector going to the CAN transceiver IC. Next, use a jumper wire to re-connect the CAN transceiver IC to 3.3V. Then you could use another jumper wire to connect GPS power to 5V.