Hey guys, I am new here and to the Microcontroller arena, sort of. i got a Duemilanove and some stuff about 5 years ago but tabled an old project until recently. I have a little experience with this stuff but not much, I am a mechanical designer by trade. Ill give you a bit of info about the project I am working on, where i am at etc, but if you want to skip right to the question go to the bottom. Thanks!
The Project Scope: I am building a GPS Lap Timer for my Supermoto Racebike. The practice track i ride is 5/8 mile long and my current lap times are around 40s when its only asphalt. It has mostly clear skies and slight tree coverage on one side of the track but nothing directly overhead so sat fixes should be good. There are 12 turns and the Start/Finish is the second fastest part on the track topping out 3rd gear on my 450cc race bike. What I would like to do is before hand(have the lat/lon) or on the track collect Geofence points for the Start/Finish line, then tear it up. I would like an LCD screen that displays the last lap and fastest speed and have a Green LED lit when the last lap was faster than the previous, or red when it was slower. After the session i would like it to display the fastest lap time and max speed.
The current parts list: I am using an Uno R3, Fastrax UP501 GPS module and an Old Adafruit GPS Shield v1.1. I have various 16x2 LCD displays an a MicroView OLED display that i would like to use.
The current progress: I am new to all this and really have only done simple(blink LED type simple) stuff many years ago. I have configured the UP501 for RMC(position, Velocity, Time) data sampling at 10Hz/9600bps. I set this up right to the Uno and get a nice stream of data to the Serial Monitor. This used the TinyGPS library.
I then setup the GPS Shield using SPI and SD libraries to initialize the SD and write to it. This all worked just fine.
Next I setup the GPS Shield with the UP501(tricky cause the shield powers 5v to the GPS and i needed less since my module is 3-4.2v. I setup a 1N4004 and measure the Vdrop to be sure it was in the right range. Got a nice stream of data to the Serial monitor this was so i knew things were working so this is a retired shield and there really wasn't much info out there for it.
Lastly I setup the GPS shield with SD and GPS and things went south. I got one line of GPS data on the Serial monitor after a few minutes and that partially wrote to the SD card. I think the issue is between SoftwareSerial and SPI. Something with the Bandwidth used and/or buffer. I am still looking into this and not the real reason i am here but any advice there would be great from someone who has run into this. I have seen this issue pop up for various other GPS shields but nothing directly relating to what i am doing.
THE REASON I AM POSTING: So again I am new to all this and learning on the fly. I don't like just grabbing code and running it so i have been doing a lot of learning making sure i understand what is going on and when. While trying to figure out how exactly to trigger the end of lap I think I may be outside of what the Uno is capable of. I basically have 3 main options(unless some of you guys/gals have more) and wanted to see what more experienced users thought.
-
Determinate of AB(start/finish line) and AC(start line point to current bike position). Find when this goes from (+) to (-) then figure out between those two times what the actual time was when crossing the start/finish line. This means converting to cartesian and doing some math on the fly. I will likely be traveling between 8 and 10fps here so maybe get a gps position every foot if i am lucky. If the start/finish line was "infinite" i would cross it 4 times a lap so likely there would need to be a GeoFence area to trigger this as well.
-
Two geofence areas and figure when i go from one to the other and again calculate the time based on the position of each point.
-
have a lookup table and when the bike is in a certain geofence area start looking up its current position in the table to figure out when the start/finish line is crossed.
So i think these 3 ideas will work BUT will they work on the Arduino? Am I well outside of what these things can do? Is there some other way to do this project that I have thought about? I haven't seen any purely GPS lap timers out there(except some over the counter $500 options). Some of you guys might be saying "why don't you just make a track side trigger timer system?" I do have a lap transponder and the track has a system in place(that works sometimes) but these are kart tracks designed to pickup karts so unless its during a bike race the transponder system is touchy. I would like a system that was self contained and ultimately part of my full scope of making a datalogger that collects lean angle, accel data(brake points, acceleration areas) and add more "traps" around the track to see if i am faster/slower in areas. And after the fact i want to put this info into Google maps or google earth and plot my fastest laps to see what lines i took, where/when i got on the gas etc. That and i have the parts already for this and thought it would be a fun project to learn about this stuff.
So what do you guys think?
Thanks if you made it this far and for any info!