top of page
Search

Blog #2 - Recording IMU Data

  • hudsonaibel
  • Jul 11, 2023
  • 2 min read

The first step in processing IMU data and using machine learning to predict results is to create a training set. The training set is what the neural network learns from, and in this case, it will be pre-existing IMU data.


There are two ways to create the training set. The first is to find a pre-existing database of IMU data online and parse it. The second (which I chose to use) is to use a physical board and record the IMU data yourself. So what were the steps I went through to accomplish this?


The boards I ordered have yet to arrive, so I used an Arduino feather with a built-in IMU. I wired it to my laptop, and using the Arduino IDE, I created a simple program that writes out the x, y, and z acceleration data across the serial port.


The next part is to actually save the data. I accomplished this by making a Python program that parses the data, then used Pandas to save the 10,000 points of data to a .csv file. From here, I can send the data to the machine learning program. However, I decided to go a step further and I created a second program to graph the data, allowing me to visualize the data. This also means after the algorithm is trained to predict data, I can compare the real and predicted data, and visually see how the two line up.


Now the project can actually begin! In the coming days, I hope to create a semi-working algorithm that can accurately predict the next acceleration value by looking at the previous few values. After that, testing will begin to see which form of sending data (as previously mentioned in blog #1) is the fastest and most efficient.








 
 
 

Comments


bottom of page