GPS LACT.DE UG-200

Do you have a link to the GPS?

Do you have a link to the GPS?

I found this links on the net:
http://www.icpdas.com/products/GSM_GPRS/wireless/UG-200-RS232.htm
and
http://www.freewtc.com/products/gps-mouse-receiver-rs232-or-usb-1570-61296.htm
and
http://www.freewtc.com/products/gps-mouse-receiver-rs232-or-usb-1570-61296.htm

mine is RS232 version, it use LS4000 gps detector. It work on my pda, maybe there is some problem with the protocol.. :frowning:

mine is RS232 version, it use LS4000 gps detector. It work on my pda, maybe there is some problem with the protocol..

More likely, it is a problem with voltage levels. RS232 is +/- 12V. The Arduino is TTL (0/5V) which is also inverted. You possibly need a MAX232 chip in between.

problem with voltage levels. RS232

Thank you very much, you could be right, I was not thinking about this problem.
I opend the gps box and i found this chip: Sipex Corporation SP385EET datasheet pdf
my tx and rx cables are connected to his pins 9 and 8 so I thought to solder 2 cables to pins 12 and 13 of that chip to catch the ttl levels as you can see in the datasheet. We will see if I will be lucky.

Thank you again PaulS.

well, I soldered to pin 12 and 13 of that chip so I suppose now I have ttl signals but I have again numbers.. integers numbers that TinyGps doesn't like. :~ :~ :~ :~

so I suppose now I have ttl signals

Without actually measuring anything, you're just guessing. Sooner or later, you are going to burn up the Arduino. Then, it won't matter what your GPS is outputting.

but I have again numbers.. integers numbers that TinyGps doesn't like.

Need to see the code (use the # icon!) and some sample output.

Without actually measuring anything, you're just guessing. Sooner or later, you are going to burn up the Arduino.

I checked with oscilloscope and now the output signal from the pin13 of that chip is 3.3 V but still reading numbers without no sense maybe.

Need to see the code (use the # icon!) and some sample output.

#include <NewSoftSerial.h>
#include <TinyGPS.h>

// Si definiscono i pin usati per la comunicazione con Arduino ed il baud rate del modulo GPS
#define RXPIN 3
#define TXPIN 2
#define GPSBAUD 4800

// Viene creata un'istanza all'oggetto TinyGPS
TinyGPS gps;
// Si inizializza la libreria NewSoftSerial utilizzata per la comunicazione con il modulo GPS
NewSoftSerial uart_gps(RXPIN, TXPIN);

// Si dichiara un prototipo per la funzione della libreria TinyGPS.
void getgps(TinyGPS &gps);

void setup()
{
 // Si inizializza il modulo UART per la comunicazione con il PC.
 Serial.begin(115200);
 // Si imposta il baud rate per il modulo GPS
 uart_gps.begin(GPSBAUD);

 // Testo iniziale inviato dallo sketch verso il PC
 Serial.println("");
 Serial.println("GPS Shield QuickStart Example Sketch v12");
 Serial.println("       ...waiting for lock...           ");
 Serial.println("");
}


// Il loop principale semplicemente aspetta l'arrivo di una sentenza valida dal modulo GPS
// quindi ne estrae le sotto stringhe richieste e le invia al PC

void loop()
{
 while(uart_gps.available())     // Aspetta l'arrivo di dati validi
 {
 int c = uart_gps.read();    // Carica i dati ricevuti nella variabile c
 if(gps.encode(c))      // Verifica congruenza dati
 {
 getgps(gps);         // Estrapola le sottostringhe di dati e le invia al PC
 }
 }
}


void getgps(TinyGPS &gps)
{

 // Richiama la funzione che estrapola dalla sentenza i dati relativi alla posizione
 float latitude, longitude;
 gps.f_get_position(&latitude, &longitude);

 // Invia al PC i dati estrapolati
 Serial.print("Lat/Long: ");
 Serial.print(latitude,5);
 Serial.print(", ");
 Serial.println(longitude,5);

 // Richiama la funzione che estrapola dalla sentenza i dati relativi alla data
 int year;
 byte month, day, hour, minute, second, hundredths;
 gps.crack_datetime(&year,&month,&day,&hour,&minute,&second,&hundredths);

 // Invia al PC i dati estrapolati
 Serial.print("Date: "); Serial.print(month, DEC); Serial.print("/");
 Serial.print(day, DEC); Serial.print("/"); Serial.print(year);
 Serial.print("  Time: "); Serial.print(hour, DEC); Serial.print(":");
 Serial.print(minute, DEC); Serial.print(":"); Serial.print(second, DEC);
 Serial.print("."); Serial.println(hundredths, DEC);


 Serial.print("Altitude (meters): "); Serial.println(gps.f_altitude()); 
 Serial.print("Course (degrees): "); Serial.println(gps.f_course());
 Serial.print("Speed(kmph): "); Serial.println(gps.f_speed_kmph());
 Serial.println();

 // Here you can print statistics on the sentences.
 unsigned long chars;
 unsigned short sentences, failed_checksum;
 gps.stats(&chars, &sentences, &failed_checksum);
 //Serial.print("Failed Checksums: ");Serial.print(failed_checksum);
 //Serial.println(); Serial.println();
}

Need to see the code (use the # icon!) and some sample output.

and some sample output.

Yes, sorry, I forgot to paste it..
from gps module using: Serial.println(uart_gps.read()); i get this numbers:

230
24
158
152
120
230
120
6
207
12
240
24
248
24
231
24
158
24
158
152
224
24
231
24
158
152
120
6
240
12
207
24
224
152
230
152
230
24
158
24
and so on... :frowning:

The only other thing that might be happening is that the data is inverted. Fortunately, the NewSoftSerial class can un-invert the data for you, if you set the (optional) 3rd argument to true.

It could also be the GPS is in binary output mode instead of NMEA ouput.

PaulS:
The only other thing that might be happening is that the data is inverted. Fortunately, the NewSoftSerial class can un-invert the data for you, if you set the (optional) 3rd argument to true.

Tryed.... nothing... still numbers.. differents but still only numbers without a way to parse them.

wayneft:
It could also be the GPS is in binary output mode instead of NMEA ouput.

If you are right is there ia easy way to read the data?

Thank you..

maybe it is the time to think to buy a new gps module..

I had some result using BYTE in the Serial.print, now it look like NMEA output, I will try to post the output
this is the code:

#include <NewSoftSerial.h>
NewSoftSerial uart_gps(2, 3);
void setup()
{
 Serial.begin(115200);
 uart_gps.begin(GPSBAUD);
} 
void loop()
{
 while(uart_gps.available())
 {
 int c = uart_gps.read();
 Serial.print(c, BYTE);
 }
}

but anyway gps.encode(c) is false :cold_sweat:

this is what I am reading:
$GPGSA, A,1,,,,,,,,,,,,,*1E
$GPGSV,3,1,12,26,84,034,,2B,62,092,35,15,42,302,,27,36,265,*76
$GPGSV,3,2,12,08,35,059,42,05,34,197,32,09,15,258,,18,10,322,*7A
$GPGSV,3,3,12,17,09,127,35,19,03,024,,21,03,299,,07,00,070,7B
$GPRMC,124130.00,V,4548.4705,N,00838.2024,E,,,080512,,,N
41
$GPGGA,124130.00,4548.4705,N,00838.2024,E,0,00,0.0,,M,,M,,*54
$GPGSA, A,1,,,,,,,,,,,,,*1E
.....and so on...

the gps antenna is outside of the window and from $GPGGA it look like the gps cant fix and the number of satellites is 00 .. :cold_sweat:

IT IS WORKING NOW!!!!! thank you guys!!!

How long did you wait? The GPS might take several minutes to get a lock.

How long did you wait? The GPS might take several minutes to get a lock.

Yes, I see... about 5/10 minutes and now it is working.. :slight_smile:

Now I want to write a code who can give me an alarm when fixed a point (lat/Long) I move out from that point a fixed distance.. but this is another story :slight_smile:

Thank you again PaulS :slight_smile:

Now I want to write a code who can give me an alarm when fixed a point (lat/Long) I move out from that point a fixed distance.

The TinyGPS library would be a good place to start. It manages the parsing of the data from the GPS. So, you can simply as for the current latitude and longitude value at any time. There are functions to get the distance between two points (defined by lat/lon).