Overview
The Self-Balancing Robot is a complex closed-loop control system
that autonomously balances itself in place. It collects feedback
from multiple sensors, including the onboard accelerometer of the
myRIO, a gyroscope, and encoders built into both motors. It uses a
complementary filter and a PD (proportionaldifferential) controller
in LabVIEW to stand upright.
Base Functionality
• The wheels are rotated by DC motors, which operate
independently and receive PWM data to control their speeds
• The encoders built into each motor measure relative
position, and communicate with myRIO using specialized
encoder digital lines
• The onboard three-axis accelerometer of myRIO measures
static and dynamic acceleration
• The gyroscope measures rotational velocity, and
communicates with myRIO using the I2C communication
protocol
• A complementary filter is used on the accelerometer and gyroscope data to eliminate the high frequency noise of
the accelerometer and the low frequency noise of the gyroscope
• A PD controller is used to control the motor positions relative to one-another
• myRIO connects to the host PC via WiFi
• The LabVIEW code can either be run from the host PC or deployed as a start-up executable
• The robot is enabled by pushing the built-in button on myRIO
Expansion and Teaching Options
• Learn how the Self-Balancing Robot relates to controls concepts like relative stability, robust stability, and
fundamental design tension (See the Connections to Controls Concepts at the end of this section)
• Advanced Challenge: Edit the LabVIEW code of the Self-Balancing Robot to enable it to travel on command
Self Balancing Robot
Self Balancing Robot Assembly 123
Back to Contents page