Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Arduino Data Acquisition Module

Hi all,
I am looking at building myself a data acquisition module for use with race chrono using the following hardware:
Arduino (I have an Uno and a Mega, If I need the extra functionality I will go mega)
Adafruit ultimate GPS module
MPU6050
HC-05 Bluetooth module

I am looking sending across to race chrono :
GPS data
Engine RPM
Brake switch
Throttle Position
G force
and possible lean angle at a later date

Before I plough on, someone must have already done this before me, rather than reinvent the wheel can anyone point me in the direction of the code for a previously built logger?

Any help much appreciated, and when I am done I will happy to share my code and findings etc.

thanks

Ian

Comments

  • edited November 2
    I would also be interested in a data logger like this. I have seen projects for G-force or RPM displays, so maybe you cold put them together.

    Many race cars, like vintage cars or cars without digital EFI, don't have OBD, so there is no RPM input for RaceChrono. Please keep us informed and build a lot of them if it works!
  • Depending on how much you spend on the Arduino project, you might first want to see what the RaceDAC can do. It can act as a direct interface from the engine or other sensor to RaceChrono. http://www.racedac.com/
  • @coxylaad - Could you just have a couple channels, like RPM and coolant temperature or just RPM? Would that simplify the module? I'm interested, but I have never used Arduino stuff.
  • As I have mentioned on other threads I am on V4 (?) of my 'track logger'. If you are going to do the blue tooth and the logging of data like RPM you will need more powerful than just a Arduino Uno, mini etc.

    V1 I started with a Arduino Mega doing just BT and GPS. Adding RPM I started to loose data. I am trying for a minimum of 25Hz GPS and 50Hz data

    V2 I moved to a Teensy 3.6 as it has on board SD card and still uses Arduino for programming so could use what I already knew. With this I added Accelerometer/Gyro, Brake on/off and throttle position sensor reading

    V3 I moved to a ESP 32 using FreeRTOS and moved from Arduino. This let me use the on-board BT module so less components. Thought I could move the GPS to WiFi so that I had more bandwidth for BT data since I was getting a bandwidth bottle neck pushing higher rates to the phone. This version I had code for 9 DOF sensor with lean angle calcs etc, TPS, RPM, Wheel speeds, brake on/off. Bunch of stuff. Though I only connected sensors for about 1/3 of it all. It worked pretty well.

    V4 I have moved to a Raspberry Pi as an experiment. Its this winter's project. I am going to expose the data to Race Chrono but also going to store it on the device in a Influx DB. Then run Grafana on it directly so that I can view graphs of the session from my tablet straight from the DB at the track. I have gyro/lean/accelerometer data at 100hz with 25hz GPS logged at the moment to the DB. Need to start to add additional sensors and see where things fall down. But I also upgraded my track bike so looking if I can get data straight from the ECU at a reasonable rate

    I may move back to a version of my ESP32 if my rPi testing doesn't go well. I have ot published any of my code or designs publicly, but might be willing to work collectively on something if we find the right common platform.

    TTYL, Jeff
  • @J_D_W would you recommend going to Raspberry Pi directly? I'm planning to build one too...
  • @aol I am in early days so I am still not sure if it's the right decision or not.

    If you want to use Arduino teensy 3.6 did me very well. I just didn't like having separate BT module but the built-in SD Card was good. Up to 25hz it did everything I wanted. If I wasn't also doing this to tinker in winter I would probably have stayed at this solution and designed a custom board to mount it all on vs the home made board I used.

    I like the RTOS aspect of ESP32 for controling whats going on in the solution the best so far. Though the ESP32 itself has limitations. For example it's ADC are pretty bad so I used an I2C based ADC for TPS and was going to add analog suspension sensors. I did all the code in 'C' using queues, tasks etc which I find much better vs Arduino.

    I feel my biggest limitation to logging lots of data is the BT. I started just wanting lap timing but then I started to lear from the extra data and want more sensors. For example I know why 2017 season ended in a crash, data shows I hit brakes though don't remember doing so in the corner.

    I am not getting rid of RaceChrono, I like it for the timing etc. But what I am currently playing with is sending GPS data over wifi as it's simple with GPSd on the Raspberry Pi. That gets me lap timing and quick look at speeds etc. Then I am currently thinking of putting data as fast as possible to Influx DB (currently around 100hz). Then once I get that data sorted I may add BT capabilities as well and see if I can still log some data in RC3 format to RaceChrono just for video overlay options. The data would only be at the same rate as the GPS which is enough for video. Also logging to a DB on Raspberry Pi lets me log more data than RC3 can handle, though I am technically not there yet. I think I had one field available with my ESP32 solution (though not all my sensors were in place on the last bike)

    logging at 100Hz the raw data seems to let me smooth out the noise and get closer to a real 50hz data set. Though I have only done 2 car trips of 20min each so far logging GPS & IMU data. I am currently working on an RPM/TPS/Gear emulator so that I can fake the inputs into the system while driving it around town in the car when I go somewhere.

    I guess I should find some time some night to try to setup a wiki or something somewhere to explain things a bit if there is interest in the community here.

    Jeff
  • aolaol
    edited November 15
    @J_D_W if you're interested, next versions could provide better way to input DIY data than $RC3. Sounds like this is the bottleneck why you're browsing your data from your own databases. I'm not ready to discuss it publicly yet, but contact me through support form or email if you are interested.
Sign In or Register to comment.