Skateboard movement detection with IMU

Hello lovely people!

I am starting my master thesis and for the project, I want to measure the acceleration and rotation fo the skateboard while doing tricks (Kickflip as an example).

For that I want an onboard device consisting of:

  • IMU
  • Arduino
  • power supply
  • Sd Card modul

The whole device should be as small and compact as possible.

IMU and Arduino:
I found the Arduino Nano BLE which has an integrated IMU and Bluetooth, which I don't want to use for this project.
I want to ask you: Do you know another Microcontroller which would be better suited for this project?

SD Card
In addition, I also need a Sd-Card modul. I found that there are Moduls and shields. I am not sure what's the difference between them. The shield costs about 15€ the Modul just 2€.

Power supply:
For the Power Supply I am not sure which one should I get. Happy for any recommendations! It just need to power the device for about 2 hours.

I would love to have easy components which don't need a lot of soldering or special programming :slight_smile:

Thanks in advance!

If You plan to mount electronics to a skate board You really need to use soldering connecting the parts. Else the beats and bangs will quickly ruin the project.

If this is for a master thesis project, might go for something more reasonable than a microSD card, considering there's plenty of vibrations involve. How about something like SOIC SPI FRAM to impress your advisor?

Most of the cheap modules do work. However, they are often the lowest possible quality. If you want you microSD card to connect properly to the pins of the socket, then buy good quality.

Without microSD card is even better. hzrnbgy writes about FRAM, but there are other options. The ESP32 can write to its Flash as if it is a file system. The ESP32 is not an Arduino board, it is "Arduino-compatible".

A MKR board with battery might be a good solution for you.

Many start with an Arduino Uno and a MPU-6050 with I2C bus. That can get 100 samples per second. For your project you have to look at drones. They use a faster processor, a better IMU with a faster SPI bus. A MKR board with SAMD21 processor is the minimum for your project.

Perhaps a MKR Zero with MKR IMU shield.
The IMU shield uses the BNO055 with the slow I2C interface. The BNO055 has a processor inside, so the Arduino does not have to do all the calculation. I don't know of the BNO055 is fast enough for your project.

Thanks for your replies!

I wrote somethings not very well.
You are right, I am not against soldering. What I meant is, that I want to use as few hardware parts as possible and keep the connections as clean as possible.

I am totally down to get some quality parts which cost a bit more. I don't wanna struggle with bad hardware :smiley:

I also wanna add, that I am going to 3D print a case for it and fix it with some glue or something( not sure yet) in that.

I am also right now really no expert in this topic. I wanna get the parts as soon as possible to start gathering data for the machine learning part.

@Koepel Sounds like you know a lot more about sensors and MC. I am thankful for sharing your thoughts!
The MKR Zero would have the benefit of an integrated SD-Card reader I am right? On the website, it is displayed as a Arduino for music makers and so on.
In the MKR category is also the "BLE 33 Sense" which also has IMU integrated. Is this one maybe even better suited?

Funny, my coach for the master thesis also recommended the BNO055.
So sounds like a solid option. But the datasheet says the BNO as a rate of 100Hz.
Assuming that a skateboard trick lasts for 0,5 sek, that would be 50 samples.
I don't know if that's enough or not. But it does not sound very much.

But as I mentioned I am no pro in this field and also very happy to use libraries and easily find help on the internet. Which I think gets rare when you are using some rare hardware ^^.

I really appreciate any help! :slight_smile:

I only know about millis() and I2C, for the rest I use Google :wink:

The MKR Zero has a SD socket, you may ignore the "music" part.

For a racing drone, the 100Hz is way way way too low.
The BNO055 does calculations, and the resulting fusion data is 100Hz. The fusion data is more information then just the samples. It is a good start, but I don't know if that is enough.
If that does not work, then I think that you have to aim for 1kHz sample rate and SPI bus. Most MEMS-sensors are slow.

Manufacturer's page of the BNO055: with datasheet. The 100Hz output fusion data is mentioned at page 33.

The BLE 33 Sense: Arduino Nano 33 BLE Sense | Arduino Official Store.
It has a LSM9DS1 IMU with the (slow) I2C interface. The calculations have to be done in the Arduino. It does not seem a big improvement over the BNO055, if it is a improvement at all.

(no, I don't get paid per link that put in the text)

Thanks for your quick reply!

Ah okay, I was wrong about the BNO055. It overall seems to me like the quite advanced product (adafruit library & sensor fusion on its own) and I think I am gonna buy one since you and also my coach recommended it. If it is not sufficient I could order another one.

About the MKR Zero:
Sounds like a good solution! Maybe the music part can be used in another project ^^
A manual like this Click can still be used even though I am using the MKR Zero instead of an Uno i guess?

Thanks for using sharing the Links, helps a lot to directly find what you mean.

There is one last thing I would be very pleased if you could help me :smiley:
The power supply..
I read a lot of people having problems powering their MC.
I don't need a crazy long stand-alone time on this. Is there a quite small battery or power bank you can recommend, where you maybe already know that it is working?

Datasheet of the MKR Zero

Board Power Supply (USB/VIN) 5V
Supported Battery(*) Li-Po single cell, 3.7V, 700mAh minimum

Thank you a lot, I owe you a coffee!

The Adafruit libraries are compatible with most Arduino boards. They also have the best Arduino tutorials.

When you look at your post, then in the lower-right corner is More../Modify. You can use Modify to fix text errors, such as the links :confused:

When using a 12V battery, then a DC/DC-converter can make 5V and the MKR board can be powered via the 5V.
The MKR boards are made for battery operation with a battery connector. There is also a charging circuit on the board.
Battery: Lithium Ion Polymer Battery - 3.7v 1200mAh : ID 258 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits.

Here is something about battery life:
When you don't have Wifi, but also not in sleep mode, then the power usage should be below 100mA. That means that 2 hours recording should be no problem.

The MKR IMU shield with the BNO055 connects firm into a MKR board. You can even tie it together.

Others mentioned that the SD card in the SD socket might be a problem with vibrations. I share that concern. If the connection is bad during a few milliseconds, perhaps 2 hours recording is gone.

Oh my bad.. fixed the links.

Yeah the concern about the vibrations and impacts is not far fetched.
At first I thought about using a SD-card because it is more direct compared to Bluetooth and not limited in distance.
But yeah regarding this problem I am thinking that Bluetooth maybe has an advantage. I could transfer the data to my phone which I can carry in my pocket, so distance should be no worry.
Another solution maybe could be to dampen impacts and vibrations with wool or felt, which is stuffed in the cover.

Do you think Bluetooth is the more "problem-free" solution?
I am totally not stubborn about using a SD card.

About the Battery..
If I understood that correctly:
I can feed the mentioned Lithium Ion Polymer Battery - 3.7v 1200mAh : ID 258 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits directly into the Arduino?

I can feed the mentioned Lithium Ion Polymer Battery - 3.7v 1200mAh : ID 258 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits directly into the Arduino?

Yes, it is made for that :stuck_out_tongue:
You can also use the Arduino MKR with a USB cable to the computer to charge the battery.

I don't know if Bluetooth is more problem-free for you project.

The ESP32 has Bluetooth and Wifi, that is a good alternative. It is not an official Arduino board. It is made "Arduino-compatible", but it is a slightly different world, so you need good tutorials. The LOLIN D32 has a battery connector.

Now here it comes: Suppose you use the MKR IMU shield and decide to use a Arduino MKR WiFi 1010 for Bluetooth and Wifi. There is a u-blox NINA-W10 on that board for the Bluetooth and Wifi. Guess what is inside the NINA-W10 ? A ESP32 !

Okay i think i am going to try it with the:

  • MKR Zero
  • IMU shield
  • BNO005
  • LiPo Battery set up

Now I just need a vendor who has all parts :stuck_out_tongue:

Just found this 1: Adafruit 9-DOF Absolute Orientation IMU Fusion Breakout - BNO055 [STEMMA QT / Qwiic] : ID 4646 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits
and dat 2 : Adafruit 9-DOF Absolute Orientation IMU Fusion Breakout - BNO055 : ID 2472 : $34.95 : Adafruit Industries, Unique & fun DIY electronics and kits

Is the only difference that that the 2 is plug and play with the cables and the 1 is not? don't get it why 15 price difference ^^

The MKR Wifi 1010 sounds interesting and maybe will be used if the SD-card has problems getting written on.

Thanks your very much, also specially for the always quick replies. Thats super handy.
For the time, best wishes and stay safe :slight_smile:

The “IMU shield” and the “BNO005” are the same thing.

The Adafruit module with BNO005 can be used as well. They make good quality products.

Adafruit has the Feather series. For example: Adafruit Feather M0 Adalogger : ID 2796 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits.

There are many boards, but I advise to stay with the most common Arduino boards. The basic Arduino boards use a microcontroller of the AVR family and the SAMD21G processor is also often used.
In the code of lesser used processors might be more bugs, this happens with Arduino boards as well :frowning:
Adafruit and Sparkfun have their own boards with sometimes their own bootloader and sometimes there own build environment. Then you depend on Adafruit and Sparkfun to fix a problem when there is a bug.

Sometimes I buy a board that is not standard, but has compatible hardware. Then I put a matching official Arduino bootloader in it, and I use the board as if it is an Arduino board. In my Arduino IDE I have only extra build environments for the ESP32 and ESP8266, but nothing else.

(no, I don’t get payed for every time that I mention the ESP32)

Oh okay, so there is not a real difference between getting a BNO055 as an adafruit or as an arduino shield ?
In that case I think the shield would be the better option.
The thing with the other bootloader for adafruit or other companies does not sound like a huge difference but if it has no Pro´s to it I think the arduino shield is fine.

so the set up is:
MKR Zero
MKR IMU Shield
3,7 1200mAh

sounds quite compact to me :slight_smile:

Yes, okay. You have to start somewhere. We don't know yet if it is fast enough.

You also need a SD card. Not every SD card is compatible. There is a preferred tool to format it: I use the newest version 5.0.1.

In the Arduino IDE go to the Board Manager and install the "Arduino SAMD Boards (32-bits ARM Cortex-M0+)".
Then you can select the "Arduino MKRZERO" board.

While the order is being shipped, you can watch a few videos about calibrating the BNO055.

Gonna do dat. Thanks alot for your advices!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.