0% found this document useful (0 votes)
36 views13 pages

Self-Balancing Robot with MPU6050

Dhhrjridjfjueieieijfjejendnjxdjdjdjjeieidnmdkso

Uploaded by

Lalith Anand S.J
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views13 pages

Self-Balancing Robot with MPU6050

Dhhrjridjfjueieieijfjejendnjxdjdjdjjeieidnmdkso

Uploaded by

Lalith Anand S.J
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PROJECT REPORT IN PHYSICS FOR ELECTRONICS

ENGINEERING

ELECTRONICS AND COMMUNICATION


ENGINEERING - A

PROJECT TITLE

Self-Balancing Robot
SUBMITTED BY

KAMALESH.B 310623243023

LALITH [Link]
310623243033

PURUSOTHAMAN 310623243043

Easwari Engineering College


(Autonomous)
Ramapuram Campus
Chennai – 600 089
ABSTRACT
INTRODUCTON:

The self-balancing robot is similar to an upside down pendulum. Unlike a


normal pendulum which keeps on swinging once given a nudge, this
inverted pendulum cannot stay balanced on its own. It will simply fall over.
Then how do we balance it? Consider balancing a broomstick on our index
finger which is a classic example of balancing an inverted pendulum. We
move our finger in the direction in which the stick is falling. Similar is the
case with a self-balancing robot, only that the robot will fall either forward
or backward. Just like how we balance a stick on our finger, we balance
the robot by driving its wheels in the direction in which it is falling. What
we are trying to do here is to keep the center of gravity of the robot exactly
above the pivot point.

To drive the motors we need some information on the state of the robot.
We need to know the direction in which the robot is falling, how much the
robot has tilted and the speed with which it is falling. All these information
can be deduced from the readings obtained from MPU6050. We combine
all these inputs and generate a signal which drives the motors and keeps
the robot balanced.
• COMPONENTS USED :
• Arduino uno microcontroller
• Geared DC motors ( 2Nos)
• motor driver module
• accelerometer and gyroscope
• A pair of wheels
• 7.4V Li-ion Battery
• Connecting wires
• 3D printed Body
• Ultrasonic sensor

Controller :

• The controller that we have used here is Arduino UNO(micro controller)


• Arduino is an open-source platform used for building electronics projects.
Arduino consists of both a physical programmable circuit board (often
referred to as a microcontroller and a piece of software, or IDE
(Integrated Development Environment) that runs on your computer, used
to write and upload computer code to the physical board.

Motor Driver:

• The L298N Motor Driver Module is a high voltage Dual H-Bridge


manufactured by ST company. It is designed to accept standard TTL
voltage levels. H-bridge drivers are used to drive inductive loads that
requires forward and reverse function with speed control such as
DC Motors, and Stepper Motors.

Wheels:

Do not under estimate these wheels. So make sure your wheels have good grip
over the floor you are using. Watch closely, your grip should never allow your
wheels to skit on the floor.

Accelerometer and Gyroscope:

• The best choice of Accelerometer and Gyroscope for your bot will be the
MPU6050.
• The accelerometer measures the acceleration along one direction, while the
gyroscope measures the angular acceleration on one axis.

Chassis:

The chassis lays an important role which carries all the electronic components. You can use

cardboard, wood, plastic anything that you are good with. But, just make sure the chassis is
sturdy and should not wiggle when the bot is trying to balance

Motors: The best choice of motor that you can use for a self balancing robot, without a doubt

will be Stepper motor. Yes it is not mandatory to have a stepper; the bot works fine with these
cheap commonly available yellow coloured DC gear motors as well.

Ultrasonic sensor :
The ultrasonic sensor works on the principle of SONAR and RADAR system which is
used to determine the distance to an object.

An ultrasonic sensor generates the high-frequency sound (ultrasound) waves. When


this ultrasound hits the object, it reflects as echo which is sensed by the receiver as
shown in Fig---

By measuring the time required for the echo to reach to the receiver, we can calculate the

distance. This is the basic working principle of Ultrasonic module to measure distance.
HC-SR-04 has an ultrasonic transmitter, receiver and control circuit.

In ultrasonic module HCSR04, we have to give trigger pulse, so that it will generate
ultrasound of frequency 40 kHz. After generating ultrasound i.e. 8 pulses of 40 kHz, it
makes echo pin high. Echo pin remains high until it does not get the echo sound back.
So the width of echo pin will be the time for sound to travel to the object and return
back. Once we get the time we can calculate distance, as we know the speed of sound.

HC-SR04 can measure up to range from 2 cm - 400 cm.

CIRCUIT DIAGRAM:
• The circuit diagram clearly explains about the circuit
connections between the various electronic components.

• The arduino board is powered by a battery and all other


electronic components are connected to the arduino board.

How Does Balancing Work?


To keep the robot balanced, the motors must counteract the robot falling. This action
requires feedback and correcting elements. The feedback element is the MPU6050
gyroscope + accelerometer, which gives both acceleration and rotation in all three axes.
The Arduino uses this to know the current orientation of the robot. The correcting
element is the motor and wheel combination.

Many different sensory devices are used to determine the position and orientation of
an object. The most common of these sensors are the gyroscope and the
accelerometer. Though similar in purpose, they measure different things. When
combined into a single device, they can create a very powerful array of information.

The most important component in the balancing of the bot is the accelerometer and
gyroscope module MPU6050…lets see more about gyroscope and accelerometer..

What is a gyroscope?
A gyroscope is a device that uses Earth's gravity to help determine orientation. Its
design consists of a freely-rotating disk called a rotor, mounted onto a spinning axis in
the center of a larger and more stable wheel. As the axis turns, the rotor remains
stationary to indicate the central gravitational pull, and thus which way is "down

"One typical type of gyroscope is made by suspending a relatively massive rotor inside
three rings called gimbals," according to a study guide by Georgia State University.
"Mounting each of these rotors on high quality bearing surfaces insures that very little
torque can be exerted on the inside rotor."
Gyroscopes were first invented and named in the 19th century by French physicist
Jean-Bernard-Léon Foucault. It wasn't until 1908 that German inventor H. Anschütz-
Kaempfe developed the first workable gyrocompass, according to Encyclopedia
Britannica. It was created to be used in a submersible. Then, in 1909, it was used to
create the first auto-pilot.
What is an accelerometer?
An accelerometer is a compact device designed to measure non-gravitational
acceleration. When the object it's integrated into goes from a standstill to any velocity,
the accelerometer is designed to respond to the vibrations associated with such
movement. It uses microscopic crystals that go under stress when vibrations occur,
and from that stress a voltage is generated to create a reading on any acceleration.
Accelerometers are important components to devices that track fitness and other
measurements in the quantified self-movement.
The first accelerometer was called the Atwood machine and was invented by the
English physicist George Atwood in 1783, according to the book "Practical MEMS," by
Ville Kaajakari.

Uses of a gyroscope or accelerometer


The main difference between the two devices is simple: one can sense rotation,
whereas the other cannot. In a way, the accelerometer can gauge the orientation of a
stationary item with relation to Earth's surface. When accelerating in a particular
direction, the accelerometer is unable to distinguish between that and the acceleration
provided through Earth's gravitational pull. If you were to consider this handicap when
used in an aircraft, the accelerometer quickly loses much of its appeal.

The gyroscope maintains its level of effectiveness by being able to measure the rate
of rotation around a particular axis. When gauging the rate of rotation around the roll
axis of an aircraft, it identifies an actual value until the object stabilizes out. Using the
key principles of angular momentum, the gyroscope helps indicate orientation. In
comparison, the accelerometer measures linear acceleration based on vibration.

The typical two-axis accelerometer gives users a direction of gravity in an aircraft,


smartphone, car or other device. In comparison, a gyroscope is intended to determine
an angular position based on the principle of rigidity of space. The applications of each
device vary quite drastically despite their similar purpose. A gyroscope, for example,
is used in navigation on unmanned aerial vehicles, compasses and large boats,
ultimately assisting with stability in navigation. Accelerometers are equally widespread
in use and can be found in engineering, machinery, hardware monitoring, building and
structural monitoring, navigation, transport and even consumer electronics.

The appearance of the accelerometer in the consumer electronics market, with the
introduction of such widespread devices like the iPhone using it for the built-in
compass app, has facilitated its overall popularity in all avenues of software.
Determining screen orientation, acting as a compass and undoing actions by simply
shaking the smartphone are a few basic functions that rely on the presence of an
accelerometer. In recent years, its application among consumer electronics extends
now to personal laptops.

Sensors in use
Real-world usage best illustrates the differences between these sensors.
Accelerometers are used to determine acceleration, though a three-axis
accelerometer could identify the orientation of a platform relative to the Earth's surface.
However, once that platform begins moving, its readings become more complicated
to interpret. For example, in a free fall, the accelerometer would show zero
acceleration. In an aircraft performing a 60-degree angle of bank for a turn, a three-
axis accelerometer would register a 2-G vertical acceleration, ignoring the tilt entirely.
Ultimately, an accelerometer cannot be used alone to assist in keeping aircrafts
properly oriented.

Accelerometers instead find use in a variety of consumer electronic items. For


example, among the first smartphones to make use of it was Apple's iPhone 3GS with
the introduction of such features as the compass app and shake to undo, according
to Wired.
A gyroscope would be used in an aircraft to help in indicating the rate of rotation around
the aircraft roll axis. As an aircraft rolls, the gyroscope will measure non-zero values
until the platform levels out, whereupon it would read a zero value to indicate the
direction of "down." The best example of reading a gyroscope is that of the altitude
indicator on typical aircrafts. It is represented by a circular display with the screen
divided in half, the top half being blue in color to indicate sky, and the bottom being
red to indicate ground. As an aircraft banks for a turn, the orientation of the display will
shift with the bank to account for the actual direction of the ground.

The intended use of each device ultimately influences their practicality in each platform
used. Many devices benefit from the presence of both sensors, though many rely on
the use of but one. Depending on the type of information you need to collect —
acceleration or orientation — each device will provide different results.

Innovations and applications:

Fig caption

• In this car to make it self balancing gyroscope is used.


A gyroscope is a device used for measuring or maintaining orientation and angular velocity. It is a
spinning wheel or disc in which the axis of rotation (spin axis) is free to assume any orientation by
itself

Fig caption
Therefore this self-balancing technology is used in the development of self -balancing cars
and bikes as seen in the picture above.
Reference :

[Link]

[Link]

[Link]

[Link]

Common questions

Powered by AI

Both accelerometers and gyroscopes are used because they provide complementary data: accelerometers measure linear acceleration and can infer object orientation relative to Earth, but struggle with accuracy during motion; gyroscopes measure rotational motion and maintain orientation with high accuracy, but cannot sense linear motion. Independently, accelerometers cannot distinguish between gravitational and non-gravitational forces during motion, leading to inaccuracies. In contrast, gyroscopes do not account for translational motion. Combined, they offer a comprehensive understanding of both orientation and dynamic motion to maintain balance in a self-balancing robot .

The MPU6050 is integral to balancing a self-balancing robot as it combines an accelerometer and a gyroscope to provide critical data regarding the robot's state. The accelerometer measures the acceleration along a direction while the gyroscope measures angular rotation on an axis. These combined readings allow the robot to determine its tilt and the speed of its fall. Using this data, the robot can adjust its motor speeds to counteract imbalance, maintaining its center of gravity above the pivot point .

In consumer electronics, accelerometers and gyroscopes are used for functions like screen orientation detection, movement tracking, and gaming controls. Accelerometers provide orientation data that allows devices to adapt to user movements, like switching screen orientations, while gyroscopes add precision in motion detection, enabling features like image stabilization and rotational tracking. In robotics, particularly in self-balancing robots, their role is more complex; they provide essential data to maintain balance by continuously adjusting the robot’s motors based on orientation and movement, which requires real-time data synthesis and processing to ensure stability and perform control functions .

The choice between stepper motors and DC gear motors affects both design complexity and performance characteristics. Stepper motors offer precise control over position and speed, which can lead to more accurate balance and fine-tuned motion. However, they are more complex and potentially more expensive. Conversely, DC gear motors are simpler and more cost-effective but may not offer the same level of precision. The performance in terms of responsiveness and stability must be weighed against these factors, with DC gear motors being adequate for hobby projects and stepper motors being preferred for scenarios requiring higher precision .

The potential drawbacks of using an ultrasonic sensor include limited range (2 cm to 400 cm), susceptibility to environmental noise, and inaccuracies in detecting small or acoustically absorbent objects. These issues could be mitigated by integrating multiple sensor systems to improve robustness and accuracy, implementing advanced signal processing techniques to filter out noise, and calibrating the ultrasonic sensor to ensure reliability in various conditions. Additionally, using complementary sensors like IR sensors can provide redundant data to counterbalance the limitations of ultrasonic measurements .

A PID controller is significant in the self-balancing robot as it provides feedback mechanisms that drive the robot's motors to maintain balance. PID stands for Proportional, Integral, and Derivative control, which are used to calculate the error value as the difference between desired position and current state. The controller adjusts motor speeds accordingly: the proportion term deals with present errors, the integral term with accumulated past errors, and the derivative term predicts future errors by considering the error's rate of change. This balanced approach allows for precise and stable control over the robot's balance, improving response time, accuracy, and reducing oscillations .

A self-balancing robot is akin to an inverted pendulum because both systems are inherently unstable and require active feedback control to maintain balance. The main challenge lies in keeping the pivot (or the robot's wheels) directly under the center of gravity. Unlike a standard pendulum which naturally gravitates back to rest, an inverted pendulum will topple unless corrective action is taken. In both cases, real-time data about position and motion must be monitored and used to drive corrective actions, such as moving the base in the direction of tilt to maintain vertical alignment .

The principles of angular momentum and rigidity in space are central to the functionality of gyroscopes in robotics. Angular momentum ensures that the spinning rotor within the gyroscope maintains its axis orientation over time, despite external forces. Rigidity in space means that as the rotor spins, it resists changes to its orientation due to external torques. In robotics, these principles allow a gyroscope to provide stable and reliable measurements of rotational motion and orientation, critical for balance and navigation tasks, such as those required by self-balancing robots to maintain equilibrium amidst disturbances .

The Arduino UNO acts as the controller for the self-balancing robot. It is used to process readings from sensors like the MPU6050 and execute the necessary control algorithms to maintain balance. The Arduino board runs the program that interprets data from the accelerometer and gyroscope, determining the direction and magnitude of adjustments needed, and it interfaces with the motor driver to enact these adjustments via the DC motors .

The benefits of using 3D printed components in self-balancing robots include customizability, cost-effectiveness, and rapid prototyping capabilities. Designers can tailor parts to fit specific design needs, reduce material waste, and iterate designs quickly and cheaply. However, challenges include potential issues with the strength and durability of 3D-printed materials, which might not withstand high stress or impact conditions as well as traditionally manufactured components, and limitations in precision and finish quality. These challenges can be mitigated by selecting suitable materials, optimizing design for strength, and using post-processing techniques to enhance component properties .

You might also like