Tag Archives: IMU

Schematic for Tilt Meter Using the MPU6050

Below we show the detailed schematic we use for the Tilt Meter we are developing based on the MPU6050 IMU sensor.

MPU 6050
Schematic for Creating a Tilt Meter

This is the simple code for measuring acceleration in the x and y axis. We will develop this much further in future lessons, but this is just to verify things are hooked up correctly, and that we can measure accelleration.


9-Axis IMU LESSON 26: Understanding PID Control systems with Arduino


In this lesson we use our BNO055 9-axis sensor, and our pan-tilt servo mount to create a self-leveling platform based on a classic PID control system. The video takes you step by step through the theory behind a PID controller, and then demonstrates a practical example in hardware. In the video we develop the code below.


9-Axis IMU LESSON 25: Proportional Control System for Self Leveling Platform

In this lesson we improve our earlier control system for our self leveling platform. In our earlier work, our control system would elliminate system error by constant corrections of 1 degree each time through the loop. In this lesson, we show how to feedback a control signal that is proportional to the error. Hence larger errors will get a larger correction signal, and the error is driven to zero much quicker.

This is the code we developed during this lesson:


9-Axis IMU LESSON 24: How To Build a Self Leveling Platform with Arduino

In this lesson we develop the initial simple code for leveling the platform. We implement the simplest control system, which is to just increment or decrement the servos based on whether the actual position is greater or less than the target position. We increment/decrement by one degree, since this is the smallest allowed change in servo position. Next week we will implement a more sophisticated control system. Below is the arduino code developed in this lesson.