Measuring bank angles with the MPU6050 and Raspberry Pi - The first tests

What happened so far
Throughout the last blog entries I briefly explained the motivation and idea behind measuring the bank angles on a motorcycle with the help of a raspberry pi and the MPU6050. We then focused on the hardware- and software requirements as well as the basic coding structure.

First data and validation:
With the hard- and software ready it is time to test. At first I wanted to make sure that the sensor produces accurate results. For this purpose we took the motorcycle, lined it up without starting the engine, and tilted it left and right. The next diagram shows the bank angle vs. time. One can see the angle that has been calculated from the accelerometer input.







 The chart shows a constant angle output for the motorcycle in straight upright position of 5 degrees with the engine switched off (blue line). The 5 degrees offset for the straight position come from the mounting of the MPU6050 on the circuit board. This is perfectly fine and and offset that has to be considered in the lateron measurements. With the engine switched on the signal starts to fluctuate. This is a first conclusion that the vibrations of the engine, even in idle, have a strong influence on the measurement output. We have now established the offset in the straight, upright position. Now we can tilt the motorcycle left and right to validate the output further. The driver starts in upright position and then tilts the motorcycle several degrees into one direction, where he stays for some seconds. He then goes back to the upright position and repeats the tiliting in the other direction. The next diagram shows a tilt of the motorcycle left and right. With the offset of 5 degrees in mind the output for the tilt is pretty good. The maximum tilt position has been validated with the two images shown below the diagram.     

Comments

Popular posts from this blog

Measuring bank angles with the MPU6050 and Raspberry Pi - The introduction and hardware requirements

Measuring bank angles with the MPU6050 and Raspberry Pi - Wiring the components and installing the required software packages

Measuring bank angles with the MPU6050 and Raspberry Pi - The software