Posted by Chris | Posted in Car Development, Equipment Purchasing | Posted on 18-04-2012
Those of you who read this blog carefully might already know that I’ve been working on a data logger for the race car. It was originally conceived during the 24hours of Spokane last summer. We had some overheating problems during the race and the drivers needed to constantly monitor and radio in oil and water temperatures. To add to that the gauges aren’t terribly easy to read so it was somewhat distracting. Since I like building cool stuff I thought, “hey why not make a data logger!”. Its taken some time to get this off the ground, but I finally have something to show off so I thought I’d write about it.
My goals are to log and transmit the following information:
- temperature data (oil, water)
- throttle position and brake
- rpm
- 20Hz GPS
- speed
- G forcess
- lap times and split times
Because I don’t have access to the race car every day, (Seattle to Eugene is a long drive) I’ve decided to start with the last four bullets.
Blow is the custom data acquisition unit I made. Features include:
- 20Hz GPS module with high gain antenna
- Bluetooth interface
- micro SD card slot
- 8 +/- 15v tolerant analog to digital input ports (16 bit!)
- 8 3.3v tolerant digital IO or analog input ports
- 1 i2c port for expansion (eg accelerometer, gyro, compass, etc)
- 1 counter input for RPM

The data acquisition hardware. All custom made but the GPS board (red), which has a BGA package that I didn't want to solder my self.
Since I didn’t want to build a car computer (the logger board does have an 8bit microcontroller but that doesn’t really qualify by today’s standards) with display, I figured the easiest way to collect, process, display, and re-transmit the logged data is an android phone, specifically Leo’s old Droid X. It already has bluetooth, accelerometer, a nice display, battery (for when the kill switch is off), 3g data, a decent processor, and LOTS of storage space; it should provide plenty of power to process the data we collect. Since the ‘phone’ has to be mounted in the race car I also 3D printed a two degree of freedom mount.
There’s a lot of parts talking to other parts in this project, so let me draw a diagram of whats going on so everyone is one the same page.
At this point most of the hardware is complete and its more a matter of software. I’ve spent the last two evenings prototyping the software in Python and MATLAB (the embedded code is of course in C). This is mostly because I’m most comfortable parsing text and drawing the track map in python and I’m most comfortable processing data and plotting in MATLAB. Once everything is done the python code will be ported to java and run on the phone, while the MATLAB code will most likely be replaced by html5/javascript, since its the easiest way to make a GUI and because its (mostly platform independent.
Starting with the Python code, I’ve written a small API deal with noisy GPS data a compute the most likely on track location. This is actually the most important piece of code because visualization won’t work without it. You can plot data vs time instead of position but, for example, turn 1 at PIR may be 10 seconds away from the start finish line one lap and 12 seconds away another lap but it’s always going to 300m away (the Python code also helped me compute that distance). The Python code also helps me validate track maps stored as GPX files, which any trip planner software/webservice will generate.
In MATLAB I’ve built a data visualization graphical user interface (GUI). You can click the lap number and it plots, in this case speed vs track position or you can select multiple laps for comparison. My hope is to be able to compare fastest laps from each driver to see where we can each improve our laptimes. For example, at Laguna Seca I know from Micah’s video that we can do at least a second better if we stitch together each drivers best sectors!
As a side note, I didn’t have any real data to work with (the data I took at Laguna Seca in December was missing some critical information, so I couldn’t use it here), so I had to create my own track by driving around the block a few times, which is why you see my stopping so much and driving so slow.
I think that’s all I have for now. If you have any questions or comments please leave them below! Also, I reserve the right to edit this post for clarity or to add more information. You’ve been warned.
















































































































































































































