Project Motivation, Needs and Goals:

My name is Shivam and in this project, I will walk you through how a self-balancing robot can be made. I developed a keen interest in the field of robotics during the course of my bachelors program in Mechanical Engineering. I equate robotics to understanding of the human from the perspective of an engineer; essentially aiming to impart our bodily mechanics to a sophisticated machine, which is a system of mere links and joints functioning harmoniously together.

Focusing on Autonomous Systems and Artificial Intelligence, through my masters at Duke University, I aim to dive deeper into the prospect of robotics. Specifically, I intend to understand balancing in robots. Balancing is one of the major challenges faced by the robotics industry. Given that robots will be subjected to performing multiple tasks, with varying loads and environment conditions, going off-balance is a highly likely event. Addressing this issue is important so as to:

  • Ensure the task is carried out as planned
  • Prevent damage to the robot and its components
  • Avoid human intervention to put the robot back in its position

Here is a short video clip showing how even the most complex robots tend to fall. It reinforces the importance of instilling the property of “self-balancing” in them.

As is evident from the video,  keeping the robot balanced is absolutely necessary to maintain both its safety, as well as complete a desired task.

In this project, I explore this concept by adapting a two-wheeled mobile robot that I design and make use of relevant electronics to implement self balancing.

Learning Objectives:

The following topics will be discussed during the course of this project:

  • CAD model of the two-wheeled robot’s chassis
  • 3D Printing the model
  •  Learning to use the Arduino
  • Understanding the working of MPU6050 6-Axis Accelerometer-Gyroscope sensor
  • Concept of Noise Filtering

 

Image_1 The basic design

Fig 1: Basic chassis design of the balancing robot

Viewing the robot from the side (Fig 1(c)), it can be inferred that if a gentle push/pull inclines the robot’s body, then it would fall down under the influence of gravity. Hence, we will be working out a way to make the robot realize that it has deviated from its stable position and provide an input to bring it back to that position and stay in control. 

The project can be categorized into the following sub-tasks:

  • Bill of Materials
  • Understanding the Parts
  • Chassis Designing
  • Schematic of Circuit
  • Application of Control

Let us proceed into each sub-task and analyze the topics to a greater depth.

Bill of Materials:

Here is a list of all parts that are required to build and assemble the robot:

Part Name

Supplier

Quantity

TT DC Motors

ApplianPar

2

Plastic Wheels

ApplianPar

2

Arduino Uno

Arduino Store

1

MPU6050 Sensor

HiLetgo

1

L298N Motor Driver

Qunqi

1

Breadboard

Qunqi

1

Jumper Wires

Elegoo

1 set

Estimated budget of the project: $54.88

Fig 2: Gallery of parts required for the completion of this project

LINKS TO PURCHASE THE MATERIAL

Understanding the Parts:

The motors used for this project are the TT motors – 200 RPM rated 3V-6V DC and will be the sources for the motion of our robot’s wheels. These motors will receive current from the power supply, that is capable of supplying about 9V – 12V of voltage. Now if the requirement of the motors is much lesser than what the power supply provides, a direct connection between the two could lead to overloading and eventually ruin the component. Comes into picture the L298N motor driver, which serves as a voltage regulator between the motors and the remaining circuitry. 

But what tells the motor driver as to how much voltage can be allowed to pass through to the motors? The Arduino Uno, which is essentially a mini-computer, is the brain of our robot. Depending on certain circumstances perceived by the robot, the Arduino sends an appropriate signal to the motors and the entire system responds accordingly. For the robot to perceive its environment, it needs to be able to sense changes in its surroundings. In our case, the act of balancing revolves around the idea of manipulation of angles and therefore, we need to use a sensor that reads changes in these angles with changes in the motion of the robot. The MPU6050 is a device capable of making such measurements and provides its input to the Arduino, which then responds appropriately. 

Stages of Progression:

With the list of parts ready, we now commence into the methodology of building the robot’s body through a stepwise procedure. 

The table below includes the segregation of the steps into 4 modules, each capable of being understood independently without having to proceed in the given order. The final output of the project does utilize all the modules, so do go through all sections. 

Instructional Video - Denoising of Data:

In this section, we will discuss about filtering and smoothening of data generated from sensors. As it turns out, sensors are prone to providing highly fluctuating data and this fluctuation can affect the functioning of the overall system. Hence, it is desirable to negate the effects of this “noise” by smoothening the data using filters. 

Filtering plays an extremely important role in our project, since the angles generated by the MPU6050 should not vary too drastically. In such an event, the Arduino would also supply rapidly varying signals to the robot and it would make it highly unstable.

Proceed to the video below to find out what kind of filters can be used to smoothen the data.

About the Author:

Shivam Kaul

I am currently a masters student at Duke University, pursuing M.S in Mechanical Engineering and Material Science. My interests are in the field of robotics and automation, with the aim of contributing to commercial robotic commodities that may be used for day-to-day purposes. I also like puzzle solving, art and dramatics.

Last updated: May, 2021