Accelerometer/GPS/Data Recorder for Race Car

Ok I know this is WAY off topic for this forum. But you guys are damn smart and much easier to talk to than any other forum out there so I wanted to ask here lol.

My father in law has whats know as a “Crown Stock” race car. They race at a few local 1/2 mile asphalt tracks around our area (panhandle FL)



What I would like to build is some kind of accelerometer/gps/data recorder set up that can be easily mounted in the car, Ran for the whole practice/qualifying/race and then brought home and “downloaded” to view the data and see just how fast he was going and where, and try to learn from it to see what he can change with the car or his driving habits to make him faster.

I have no idea where to start with something like this. Prefer to use off the shelf parts if possible. ESP32/RPi 4/5 or something else I know nothing about lol. Needs to be able to store the data to an SD card preferably. Would like it to be ran from battery if possible but can also be wired into car battery if need be.

Also would like to not break the bank with this. Not wanting the cheapest of the cheap china parts that will break on the first bump but not wanting to spend $500-1000 on it either.

Any ideas or at least directions to head would be much appreciated!

4 Likes

You could not get this smile off my face if you wanted too. I got some stickers on a race car!!! #sneakpeekRMRRFsticker

Sorry can’t help with that sort of data collection. I wonder how good a cell phone could do?

3 Likes

Awesome project. If using Pi, consider capturing video footage, with decent lense…

LOL - couldn’t help but notice the “Family Funeral & Cremation” sign. Wonderful thing to see when you are hurtling around the track in a souped up car…

1 Like

so an adxl345 with a pico W and an sd card could store and then transmit your data. You’d be in $10. If you instead opt for the phone, you could probably use the onboard sensors with MIT appinventor and have a middle-schooler write your code with pictures and have gps pins throughout the run.

Openauto is cheap.

I had it in my truck for a while when it was truly open source. It is like 25 bucks from

I had the true open source in my truck for a while. I think they may have a trial period. Uses a pi and touchscreen.

I got it from here but it is not maintained anymore.

https://getcrankshaft.com/

It was fun but stopped working with my phone. There is all kinds of stuff you can do with odb2, of the car still has it.

1 Like

I believe he runs a go pro most of the time. I would think trying to record video from a PI for a whole race would eat up a ton of processing power and fill up an SD card pretty quick. But maybe not. Im honestly hoping this ends up as something that can just be mounted to the roll bar behind the driver out of the way.

lol I didn’t even notice that one.

This is kinda along the lines of what I was thinking. And they have GPS chips for those as well so that should cover both. Then just have to figure out a way to decipher the data after the fact. Really hoping I can get my son involved in this project. He is a highschooler so hopefully he can handle the code LOL

OBD2 port is there but not functional during the race. For that to work the dash has to be plugged in and he just keeps that in the tool box incase he has any issues and needs to check codes or anything. So this really needs to be a seperate system that has nothing to do with the actual car other than the fact its mounted to it.

how soon do you need it to work? I really think you would be ahead to take an older working android phone without a sim card as was suggested. You can pull the gps and position from the phone and store the data on the phone. Battery is included along with charging circuitry. GPS can also provide speed and direction data as well as geolocation.

Print a mount for some accessible but inconspicuous location and bolt it together

Not in a super hurry but it is race season right now LOL. Im stuck on the boat till the end of april regardless. I would love to stay under $100 if possible lol. I do have a lot of random stuff at the house that might be useful but we will see what gets suggested and go from there.

That’s exactly what I’d like to build for my motorcycle. Plus also some cameras.
I’ll follow this thread, hopefully there will be some interesting solutions

1 Like

I would seriously use appinventor and an old phone for quick and dirty code to collect the data.

Im not sure I have any old phones around but I will double check when I get home. If I do they will be 7-8+ years old

you need one with space and the gps/accelerometer and android. You could likely get one on ebay for $50 that is a couple years old.

Just getting all the sensors together is a small part of the puzzle. The math and software isn’t hard, but it is hard enough that we have 1-2 experts to tune these things in our robots and most of us don’t touch it.

We do buy parts like a vectornav vn-300 or a piksi. But on robots we actually want to work well, we buy a novatel GPS and pay several thousand in just subscriptions for high resolution services.

In my home projects, an android phone is a very attractive option. The downside is that you have very little control. If the phone offers 10Hz updates, you get 10Hz updates and bo idea how filtered the sensors are. But you can read that data with a $6 (or free) app and you don’t need a graduate level course in engineering.

An IMU usually measures angular rate (3 axis) acceleration (3 axis) and a magnetometer (3 axis compass). Getting speed or distance from that requires integration and any error will add up and cause a lot of error. You can make it better with a good filter. But eventually it will drift. Adding in a GPS sensor can help. Because you will have some measurement of distance that isn’t a double integral from acceleration. GPS is at 1Hz. So what you end up with is the IMU measuring the difference from the last GPS update, and then the GPS comes in and you get a little correction. Most vehicles have a better sensor for speed. It would be available on the OBDII CANbus. You can use that to get faster drift correction. All of this requires a ton of work though.

Ideally, you could find a decent solution that could read speed from OBDII (and maybe also record transmission, enginee RPMs, collant temps…) and combine it with GPS and IMU. An android phone could do all of that (including a cheap bluetooth OBDII reader). Someone must have already done that.

3 Likes

So what you’re saying is its HARD lol

AFAIK the OBDII port is basically disabled because the instrument cluster is pulled from the dash. He keeps that in the tool box with him incase he needs to go to tech and they want to read the computer. Car is a 2009 Police Interceptor if that makes a difference.

So it looks like I need to get my hands on an old android. My entire house has been iphone for at least 5-6 years. But I may know of one old android phone if it hasn’t been tossed in the trash already. Now if I find it I will just have to hope that the battery is still any good in it LOL. But I guess I could just tape it to a external battery plugged in usb.

If you’re ever looking for a used phone/tablet, try swappa.com. I’ve gotten many of my phones from that online market. Also sold a lot.

Mike

1 Like

Funnily enough, there is a thread on a modelling forum running at the moment on a data logger to capture GPS location, speed, course, height and speed, all this recorded on a microSD card using a ESP32 (or Arduino if you really want to). Powered from a 2S lipo or other 5v source.



The thread is here

5 Likes

Awesome! I have not read the thread in detail yet but this seems a lot closer to what I was hoping to end up with. Hoping this will be a project I can get my son involved in and his hands on some small electronics projects while still keeping his interest in the racing part. I will definitely be looking through that thread more later today. Thank you for posting!!!

Support for Google Earth import. Nice!!

That does look fun.

In terms of Phone apps there do seem to be a lot of them, TrackAddict for iOS & Android by HP Tuners Android or IOS These are no tnearly as fun as building it yourself.

3 Likes