Categories

LEDzep – getting angles and tap detection

Hello!

These days I worked a lot on our mpu9150, a 9axes motion sensor embeded on our cards. We had to adapt the SDK provided by the constructor Invensence and adapt it to our STM (it was originally intended for TI processors). Then we used it to configure the mpu and the dmp processor. The mpu transmit to the dmp raw datas throught a fifo. The dmp will then put in the same fifo the filtered datas.

Here is what we get in this fifo when the system is balanced, when a tap is simulated with the ball or when we rotate along z.
test valeurs au reposLEDzep - tap capture

LEDzep - test valeurs angle

We note first of all that there is no drift.
Then I used the values ​​of the accelerometer to determine the duration and the threshold adapted for the tap detection. It now appears to be effective as shown in these videos. There is still a small porblem: each shocks, the dmp detects up to 3 taps. So that’s why the zeplin flashes when touching the ceiling.

After that, I projected the quaternions datas in order to recover euler angles and especialy the Heading angle that we’re going to use for the servo control.

We now get a precise angle measurement as shown in this graph.

LEDzep - récupération angles en degré

So now we are able to recover datas from all our sensors (altitude, angle, tap) and we can use all of our actuators. Thomas began a first height servo control code. I will now start the angular one. Both servo control threads will then be alternated with regular time intervals.

good evening!

Commentaires fermés.