Motorcycle data logger for research program

Hello,

I think it's time to post a more general topic about my project and don’t focus my posts in subsections. I am programming a motorcycle datalogger.
I am currently a PhD student at University and I work on motorcycle modeling. I am trying to validate a mathematical of the powered two wheeled vehicles that is why I need to perform tests with a datalogger.
I did the choice to buy low cost solution and not plug and play because I really think that it is a promising solution!

The hardware solution includes:

  • Arduino Mega 2560
  • Micro SD card board Adafruit
  • GPS venus sparkfun (20Hz)
  • 2 hall effect sensors (1 kHz) (counters)
  • rotary encoder (100 Hz)
  • IMU BNO055 Bosch (100 Hz)
  • 2.8 TFT Screen Adafruit

I am a beginner in Arduino programming and regarding the complexity of the project I am looking for people to follow me.

I have begun the project with the GPS programming. A forum user (/dev) helps me and the GPS sketch seems work perfectly in 20 Hz. The code allows to do location, speed measurement and save data on Micro SD card.

Now I am trying to add the IMU but I am totally lost when I try to mix GPS and IMU sketcsh because of the different sample rates.

About general programming syntax, I am thinking to create a large buffer temporarily saving the 2 hall effect sensor data (1kHz), the encoder and the IMU data (100Hz) until the end of the slowest loop which is the 20 Hz GPS loop.
I am sceptic about the fact to guaranty continuity between data acquisition and SD card writing process without any interruption…
Is it a proper way to proceed?

You can find my first sketch attached.

I hope find people who want share their knowledge and maybe people passionate about motorcycle.

Thank you,
Pm

NMEASDlog_PM_v4.ino (14.3 KB)

Nobody ?

Thank you,
Pm

It sounds like you are creating something similar to an Ardupilot with a sensor board, for example http://newlab.westernwillow.com/component/ardupilot-mega-2560-oilpan-h

This could probably drive the motorcycle for you while also collecting data.

Made me think of this guy. http://www.monocilindro.com/2016/11/16/data-logging-and-lcd-display-visualization-with-fuelino/

powergravity:
About general programming syntax, I am thinking to create a large buffer temporarily saving the 2 hall effect sensor data (1kHz), the encoder and the IMU data (100Hz) until the end of the slowest loop which is the 20 Hz GPS loop.

Are you able to write to an SD card at 20Hz?
Historically they are known to be slow at writing small amounts of data at frequent intervals. Most SD cards are optimised for bulk data transfer such as for use in a digital camera.
Perhaps the newer cards are better than they used to be?

powergravity:
Hello,

I think it's time to post a more general topic about my project and don’t focus my posts in subsections. I am programming a motorcycle datalogger.
I am currently a PhD student at University and I work on motorcycle modeling. I am trying to validate a mathematical of the powered two wheeled vehicles that is why I need to perform tests with a datalogger.
I did the choice to buy low cost solution and not plug and play because I really think that it is a promising solution!

The hardware solution includes:

  • Arduino Mega 2560
  • Micro SD card board Adafruit
  • GPS venus sparkfun (20Hz)
  • 2 hall effect sensors (1 kHz) (counters)
  • rotary encoder (100 Hz)
  • IMU BNO055 Bosch (100 Hz)
  • 2.8 TFT Screen Adafruit

I am a beginner in Arduino programming and regarding the complexity of the project I am looking for people to follow me.

I have begun the project with the GPS programming. A forum user (/dev) helps me and the GPS sketch seems work perfectly in 20 Hz. The code allows to do location, speed measurement and save data on Micro SD card.

Now I am trying to add the IMU but I am totally lost when I try to mix GPS and IMU sketcsh because of the different sample rates.

About general programming syntax, I am thinking to create a large buffer temporarily saving the 2 hall effect sensor data (1kHz), the encoder and the IMU data (100Hz) until the end of the slowest loop which is the 20 Hz GPS loop.
I am sceptic about the fact to guaranty continuity between data acquisition and SD card writing process without any interruption…
Is it a proper way to proceed?

You can find my first sketch attached.

I hope find people who want share their knowledge and maybe people passionate about motorcycle.

Thank you,
Pm

I like your mission,I would be happy to work with you on this. I am neck deep in a project Ive started for logging engine parameters as we speak. I could ude some advice as well. Mine is based off of the 2560