SparkFun Forums 

Where electronics enthusiasts find answers.

Tips and questions relating to the GPS modules from SFE
By slash11
#96454
Hi all! Its my first my post here.
I am embarking on the new (well new for me) project building a GPS based data logger for a kart and possibly for a racing car if all goes well. And I need your advice in choosing the right components from the SFE site and to maybe give me an idea what’s involved in terms of compiling the code etc.
The goals I am trying to achieve with this logger.
First stage:
1. Log data from 5Hz or even 10Hz GPS on to a SD card for later analysis using free software from www.racechrono.com. This should give me an idea of speed at different parts of the track and lap times / sector times. Already a good result. :)
Second stage.
2. Overlay additional data from various sensors, such as RPM (2-stroke pulse), Engine temperature, wheel speed, throttle position, brake position and maybe accelerometers to analyse G-force going through the corners.
3. If that all works fine, then next would be to output some of the above to the dash board, either the existing Mychron 4 dashboard, I believe it is using CAN interface or build my own dash.
Then lastly,
4. Transmit the data to a remote laptop using Serial RF senders / receivers, max range shouldn't be more then 500-1000 meters.

I am new to all this here, but I have been reading a lot on this forum and quite prepared to learn.
So far I have chosen the following components.

LS20031 GPS 5Hz Receiver

Logomatic v2 Serial SD Datalogger

Accelerometer ADXL320
RF Modem WRL-00560 - http://www.sparkfun.com/commerce/produc ... cts_id=560
or
XBee Pro

The main question to start with, could I use the above products and connect them together or do I need something else? Would the logger be able to produce the following output file (below)?

This is an example of file recognised by the Racechrono software, so I would like it to be in this format.
You can see here sentences from the GPS mixed with Sensor data sentences with timestamps.

$GPGGA,124341.400,5049.7753,N,00023.0818,W,1,9,0.92,10.5,M,47.1,M,,*71
$GPGSA,A,3,20,04,17,23,13,11,12,31,32,,,,1.80,0.92,1.54*03
$GPGSV,3,1,10,20,76,068,41,23,58,173,49,17,44,258,45,32,44,072,41*7F
$RC1,124341.818,6384,8,-5,,,,,1960,0,14,96,110,230*22
$RC1,124341.862,6385,2,16,,,,,1960,0,54,130,208,224*0D
$RC1,124341.907,6386,3,3,,,,,1960,0,0,37,74,227*04
$RC1,124341.951,6387,-2,-3,,,,,1995,0,6,60,67,228*04
$RC1,124341.995,6388,3,-1,,,,,2065,0,50,152,169,245*1F
$RC1,124342.040,6389,13,-0,,,,,2100,0,0,17,43,238*18
$GPGSV,3,2,10,11,33,148,42,13,30,195,42,04,30,301,40,37,28,152,*71

where
$RC1,<time>,<count>,<xacc>,<yacc>,<zacc>,<xgyro>,<ygyro>,<zgyro>,<rpm>,<a1>,<a2>,<a3>,<a4>,<a5>*checksum

Awaiting for your comments on that.
Many thanks.
By slash11
#96711
Thanks arnoldarever !
I take it you are the creator of the Racechrono? :wink:
Racechrono IS a great piece of software I just need to figure out a good hardware to hook up to it, which will suit my needs.

V
By WP22
#98891
I've been playing with an LS20031 for this purpose as well. I find that it works quite well when driving around on the street, but has significant issues when I put it in my race car... I don't know if it's all the exposed metal (and roll cage) inside the car, electrical noise, or the particular track I was at (and my proximity to the wall), but the GPS was screwing up pretty bad in high speed banked turns. It seemed to do just fine at slow speeds, and all the slower parts of the track, but was frequently all over the place once I took the high banked turns at full speed (around 100 mph).

In most of those cases, the HDOP went pretty high, but not always. I tried to reproduce the problem in my street car by driving in areas with lots of overhead obstructions, around tall buildings, through downtown Denver, up a local mountain, etc., but all the data looked pretty solid. I got an error of a few meters at worst. I'm suspecting some sort of multipath error during racing conditions and speeds, so I think I'm just going to try a GPS module that I can connect to an external antenna, such as the GPS-00464 (which looks quite a lot like what Traqmate uses).

To illustrate this, here's what a slow pace lap with the LS20031 looked like...

Image

That's pretty good. Here's what a high-priced Traqmate (with roof-mount antenna) produced around the same time... (the differences shown in the maps here are probably mostly just different driving lines, as we had cars going side-by-side through the turns)
Image


But here's what happened to the LS20031 on some full speed laps... (seemed to happen every time, and some were way worse than this)

Image Image


I was hoping to keep things simple and avoid needing an external antenna, but it looks like it may be just not worth the trouble to try to use an integrated antenna. Should work pretty good on a kart though.
By Polux rsv
#98920
I also had similar problems on my bike. I used EB85, placed on the dasboard, under the plexiglas. It was fixed with velcro. I then moved it on the tail, still fixed with velcro. Same problems. I then fixed the receiver with strong adhesive. No more problems. It seems reception is altered with vibrations.

Angelo
By WP22
#98940
Polux rsv wrote:I also had similar problems on my bike. I used EB85, placed on the dasboard, under the plexiglas. It was fixed with velcro. I then moved it on the tail, still fixed with velcro. Same problems. I then fixed the receiver with strong adhesive. No more problems. It seems reception is altered with vibrations.

Angelo
Thanks for the info... That's very good to know, and is compatible with my experience with the LS20031. I just have the GPS module velcro'ed inside a plastic project box for now, and that box is subjected to far more vibrations in the race car than it is in either of my street vehicles. On the race car, the box is mounted to the bare metal of the center tunnel (only 2 strips of velcro in between), and there is substantial engine vibration and a harsh ride from the stiff suspension and high speeds. In the other vehicles, it is gently attached to the padded center armrest, so it gets a comfortable ride, and I haven't been able to replicate the problem like that. I will go try to give it a rough ride and see if that creates the problem I was having...
By slash11
#98959
That is very intersting information guys, thanks. I guess in the kart the gps would be subject to vibration even more due to lack of suspension. I will bear that in mind when building my project.
WP22, do you mind me asking, what software do you use to view the data from LS20031 and what hardware to log the data in the first place?

Many thanks
V
By WP22
#99073
slash11 wrote:That is very intersting information guys, thanks. I guess in the kart the gps would be subject to vibration even more due to lack of suspension. I will bear that in mind when building my project.
WP22, do you mind me asking, what software do you use to view the data from LS20031 and what hardware to log the data in the first place?

Many thanks
V
I'm using an Arduino to parse the NMEA strings and convert them to decimal coordinates, which it then sends in CSV format to a microSD card via a SparkFun OpenLog module. For a simple and low-cost solution, you could just plug the GPS right into OpenLog, and then parse the NMEA later; I just have some other things going on that need a controller. For the time being (ie until I do something better for analysis), I'm just using a shareware video overlay program that I developed, RaceRender, to draw me the map. The current release (1.4.1) plots latitude/longitude inputs a little out of proportion (it doesn't yet account for their shape based on latitude), but that should be addressed soon, now that I'm focusing more on dataloggers. In any case, the free version should be suitable for your testing needs, once you get the coordinates into decimal form; a compatible generic CSV format is described near the bottom of this page: http://www.racerender.com/docs/HowTo-Datalogger.html

OpenLog is easy and works pretty good, although I've found that I pretty consistently get some data loss and corruption, due to my microSD cards being too slow in SPI mode... I'm sending it about 100 byte strings @ 20Hz, and that's apparently overflowing the buffer every once in a while (I'm guessing when it has to do some extra I/O, like writing FAT data). I consistently get about 99.74% of my strings fully intact with an older Kingston 1GB card, and around 99.85% with a new PNY 2GB (but the PNY is flaky and doesn't always work right away). I have to kick the bad rows out or it will screw up my map, but they're easy to detect if you add a checksum and do some simple data field validation. I'll probably try to find some better and faster microSD cards, as well as reduce the amount of data I'm throwing at it...
By slash11
#99830
Thanks WP22! Racerender looks good, I have downloaded it and will have a play. I see it has a CSV import, so I could potentially import file from my Mychron4 logger, I can see its not on the listed of supported data loggers, but I will have a go.
As for the hardware, do you think this kit "Adafruit GPS logger shield kit - v1.1" - http://www.adafruit.com/index.php?main_ ... ucts_id=98
will be a good starting point, as it has some analogue inputs say for throttle and break pedal sensors and engine thermocouple and digital input to read RPM?
But you are right, I guess I will need Adruino to parse the input in to a format understood by the software.
I can see your software has option to display RPM, are there plans to include more inputs?
Also, would you be able to PM me a sample csv file fields so I could probable convert my Mychron4 exported csv into a right format?
Thanks
By slash11
#100553
WP22 wrote:
slash11 wrote:That is very intersting information guys, thanks. I guess in the kart the gps would be subject to vibration even more due to lack of suspension. I will bear that in mind when building my project.
WP22, do you mind me asking, what software do you use to view the data from LS20031 and what hardware to log the data in the first place?

Many thanks
V
I'm using an Arduino to parse the NMEA strings and convert them to decimal coordinates, which it then sends in CSV format to a microSD card via a SparkFun OpenLog module. For a simple and low-cost solution, you could just plug the GPS right into OpenLog, and then parse the NMEA later; I just have some other things going on that need a controller. For the time being (ie until I do something better for analysis), I'm just using a shareware video overlay program that I developed, RaceRender, to draw me the map. The current release (1.4.1) plots latitude/longitude inputs a little out of proportion (it doesn't yet account for their shape based on latitude), but that should be addressed soon, now that I'm focusing more on dataloggers. In any case, the free version should be suitable for your testing needs, once you get the coordinates into decimal form; a compatible generic CSV format is described near the bottom of this page: http://www.racerender.com/docs/HowTo-Datalogger.html

OpenLog is easy and works pretty good, although I've found that I pretty consistently get some data loss and corruption, due to my microSD cards being too slow in SPI mode... I'm sending it about 100 byte strings @ 20Hz, and that's apparently overflowing the buffer every once in a while (I'm guessing when it has to do some extra I/O, like writing FAT data). I consistently get about 99.74% of my strings fully intact with an older Kingston 1GB card, and around 99.85% with a new PNY 2GB (but the PNY is flaky and doesn't always work right away). I have to kick the bad rows out or it will screw up my map, but they're easy to detect if you add a checksum and do some simple data field validation. I'll probably try to find some better and faster microSD cards, as well as reduce the amount of data I'm throwing at it...

Hi WP22,
I have been playing with the Racerender and was able to successfully overlay Data from AIM Mychron4 to the video , works great . The only thing is RPM seems doesn't accept values above 9999 and on my kart 2-stroke it goes beyond that. Is it possible to tweek the software to allow showing RPM values above 9999?

Also, on the SD card issue that you have. I noticed that the performance of Micro SD cards varies greatly especially when recording high quality video directly to SD. So it is a matter of trial and error to find one that is capable to handle the data stream.
Thanks.

Thanks.