Help!!

Skyraider
Posts: 40
Joined: Sat Nov 11, 2017 1:18 pm

Re: Help!!

Post by Skyraider »

Hi Tony,

Related to the GPS that could cause overflow problem:
here are the sequence that generate the problem. When the GPS has no fix, it send the following sentences:
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGSV,1,1,01,24,,,36*7B
$GPGLL,,,,,,V,N*64
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
In that situation, the clock crashed after a few seconds

when the fix is done at least on one sattelite, the sentences are like that:
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGSV,1,1,01,24,,,36*7B
$GPGLL,,,,,210533.00,V,N*4C
$GPRMC,210534.00,V,,,,,,,051217,,,N*7C
$GPVTG,,,,,,,,,N*30
$GPGGA,210534.00,,,,,0,00,99.99,,,,,,*67
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30

and the clock works well !

Do you think it could be linked to a stack overflow?

regards,
Skyraider
Posts: 40
Joined: Sat Nov 11, 2017 1:18 pm

Re: Help!!

Post by Skyraider »

Hello,
Related to the problem I had when connecting a GPS unit that made the clock crashed when sending data without a 3Dfix:
I found a workaround with the GPS unit:
I made a small adapter so that the GPS will send data to the clock only when a 3Dfix is OK. With that, the clock always receive data that contains time information.
I didn't found why the clock crashed when receiving data with no sattelite fix (see post above). With that adaptor, this will not happen again as the GPS will send data only after a 3Dfix.
To achieve that, I used the PPS information from the GPS unit: PPS will generate 1 pulse per second only when 3D fix is confirmed. I connected the PPS signal to a 74HC2538 (monostable) that generate a pulse of about 1.5 second duration each time a PPS pulse is received.
So when PPS is active, the output of the 74HC2538 is always high (because it retriggers the 2538 before the end of the 1.5s pulse) : that allows the TxD signal to be sent to the clock.
When PPS is not active, the 74HC2538 is low that disable the TxD transmission to the clock (using a 2N7000, that also adapts the signal from 3.3V (GPS supply voltage) to 5V)

For those that are interrested in this solution, I provide the schematics in attached jpg.
(Note that I didn't represent the 5V to 3.3V converter. I bought one of them for less than 1 euro...)

Hope that helps !
Attachments
GPS_adaptator.jpg
GPS_adaptator.jpg (234.28 KiB) Viewed 6882 times
Post Reply