Tag Archives: IMU

9-Axis IMU LESSON 21: Visualizing 3D Rotations in Vpython using Quaternions

In this lesson we show how to use quaternions from the BNO055 to create a visualization in Vpython. The visualization is a complete 3D free body rotation of a rigid body. To build this project you will need an Arduino Nano, and an Adafruit BNO055 Inertial Measurement Sensor.

This is the code we developed in the video posted here for your convenience. This code is for demo purposes only and should not be used in real applications. It is for educational purposes only.

This is the code we developed on the python side to do the visualization from the passed quaternions.

 

 

 

9-Axis IMU LESSON 20: Vpython Visualization of Roll, Pitch, and Yaw


This is the arduino code we developed in this lesson to approximate roll, pitch and yaw over small ranges.

This is the python code we developed to visualize the 3 dimensional rotation of a rigid body.

 

9-Axis IMU LESSON 19: Vpython Visualization of Pitch and Yaw

To play along at home, you will need an Arduino Nano, and an Adafruit BNO055 Inertial Measurement Sensor. In this lesson we create a live visual where a 3D model rotates in space mimicking the pitch and yaw of the breadboard in the real world. We have not yet derived and implemented the math to incorporate roll into the simulation but that will ab done in the next lesson.

This is the code on the arduino side we developed in the video:

This is the code on the Python side we developed in the video:

 

9-Axis IMU LESSON 8: Using Gyros for Measuring Rotational Velocity and Angle

In this lesson we explore approximating the roll and pitch of our sensor using only the gyros. The advantage of gyros is that they are not susceptible to vibration as much as the acceleromters. In the video we show you how you can simply approximate roll and pitch from the data coming from the gyroscopes. Note that while the gyros do not have the noise problem seen in the accelerometers, we now have a new problem that the gyros are susceptible to long term drift. As you play with these devices what you end up seeing is you will need to combine the data from the accelerometers and the gyros in a clever way to take advantage of the long term stability of the accelerometers and the noise immunity of they gyros. In effect, you will want to apply a high pass filter to the gyro data, and a low pass filter to the acceleromters.

To follow along at home, you will need an Arduino Nano, and an Adafruit BNO055 Inertial Measurement Sensor. We suggest using identical hardware if you want to follow along as different sensors have very different characteristics, and things will work much better for you if we are using the same sensor

This is the code which we developed in the video to demonstrate these concepts.

The code below is for demo purposes only, and should not be used in any real applications. It just demonstrates how to work with this sensor in benchtop presentations.