I worked on the programming of the MARG. We use Ultimate Sensor Fusion Solution designed by Pesky Product. It is made up of an EM7180 Sensor Hub coupled with an MPU9250 IMU. The EM7180 outputs quaternions. We tested with the Lucas’ simulation.
We judged this model will be enough for us and bouLED. So we will definitely use it for the design of our PCB.
After several tries we finally printed a triangle with the right size for the led strip.
I also used a laser cutter but the led strip could not fit within holes again. To use the laser cutter we need someone trained to insure the safety so it was simpler for us to use the 3D printing. The main issue was the fact that we didn’t have accurate enough data. I measured with caliper and re-written the placement of holes algorithme on openscad. After several tries I printed a triangle with the right size and the data were to be very accurate (~20 micron). I took some times because each printing took 2 hours.
Lucas soldered the led strip, tied the triangle and the led strip together and we have our prototype.
Now I am working on the programming of the AHRS. We use Ultimate Sensor Fusion Solution designed by Pesky Product. It is made up of EM7180 Sensor Hub coupled with the MPU9250 IMU. The EM7180 uses a Kalman filter and provides in output quaternions.
For image stabilisation, there must be some way of computing bouLED’s 3D orientation. We chose the Madgwick sensor fusion algorithm using an AHRS (Attitude and Heading Reference System), which comprises a magnetometer, an accelerometer and a gyroscope.
Alexis gave us STM32 «IoT node» Discovery kits, which feature this AHRS array among the extensive list of on-board sensors. I wanted to use ChibiOS, but this devboard uses a STM32L475VG microcontroller, whereas the closest supported microcontroller is in the STM32L476 series. Therefore, I had to port ChibiOS, which gave me some interesting insight about the inner working of its MCU abstractions.
I had to manually query the LSM6DSL accelerometer/gyroscope combo over I2C, but fortunately, a driver for the LIS3MDL magnetometer is already provided in ChibiOS/Ex. For the moment, the unfiltered values are sent to the computer over J-Link RTT; we will eventually use UART-over-USB instead.
The final board will use a AHRS combo in one chip, because in the current setup, the gyro and accelerometer are synchronized with each other, but not with the magnetometer.