Self Balancing Robot Using Pid
Self Balancing Robot Using Pid
using Arduino
A report by Yogesh Prajapat &
Divyansh Trivadi
Abstract
The purpose of our project is to balance a robot automatically using motors,
sensors and a microprocessor.
The use of a pair of motors is to keep the robot in the upright position by using an
accelerometer and gyroscope sensors. This provides a classic inverted pendulum.
Generally the accelerometer sensor is noisy, but they are accurate over a short
period of time.
By using the sets of results obtained from the sensors and the calculated results,
it can solve the problem of the classic inverted pendulum, and therefore the robot
can be kept in the upright position without falling down.
Components -
1. Stepper Motor
2. Arduino Nano
3. A4988 Motor Driver
4. MPU 6050
5. HC-05 Bluetooth Module
6. 12 Volt Lipo Battery
7. Wheels
8. Nuts & Bolts
Circuit
Where to Use MPU6050
The MPU6050 is a Micro Electro-Mechanical Systems (MEMS)
which consists of a 3-axis Accelerometer and 3-axis Gyroscope
inside itThis helps us to measure acceleration velocity,
orientation, displacement and many other motion related
parameter of a system or object. This module also has a (DMP)
Digital Motion Processor inside it which is powerful enough to
perform complex calculation and thus free up the work for
Microcontroller.
Applications of MPU-6050
• Used for IMU measurement
• Humanoid robots
• Tilt sensor
The A4988 is a complete microstepping motor driver with built-in translator for
easy operation. It is designed to operate bipolar stepper motors in full-, half-,
quarter-, eighth-, and sixteenth-step modeswith an output drive capacity of up to 35
V and +2 A.
About stepper Motor
A stepper motor is an electric motor whose main feature is that its shaft rotates
by performing steps, that is, by moving by a fixed amount of degreesThis feature
is obtained thanks to the internal structure of the motor, and allows to know the
exact angular position of the shaft by simply counting how may steps have been
performed, with no need for a sensor. This feature also makes it fit for a wide
range of applications.
Definition
PID stands for Proportional, Integral and Derivative. In this algorithm, the error
signal received is the input. And the following equation is applied onto the error
signal U(t) = Kp*e(t) + Kd+d/dt(e(t)) + Kixintegrale(t)) (1.1)
There are four methods of self balancing of robots. These are as follow :
In the upper layer of the robot, we have placed the STM Board on
Perf Board. Another perf board of 4 opto couplers is placed on the
top layer. Gyroscope and Accelerometer (MPU6050) also placed
on the top layer of the robot from the lower side. Both of the
components are placed in the middle part so that the centre of
gravity is kept as low as possible.
Uses
Uses
Disadvantages :
>Slow speed
>Takes long time to charge .
>Circuit board must kept moister free or else it
misbehave result in accidents.
>Expensive, which costs over $30 to $50. Also induces
Advantages
● https://people.ece.cornell.edu/land/courses/ece4760
/FinalProjects/f2015/dc686_nn233_hz263/final_proje
ct_webpage_v2/dc686_nn233_hz263/index.html#:~:t
ext=The%20two%2Dwheeled%20design%20of,or%20f
our%2Dwheeled%20robot%20cannot.
● https://slideplayer.com/slide/9473099/
● https://create.arduino.cc/projecthub/zjor/self-balanci
ng-robot-with-arduino-nano-and-steppers-9bf019?ref=
part&ref_id=11332&offset=4