Pdf24 Merged
Pdf24 Merged
Pdf24 Merged
FLYWHEEL
A Mini Project Report
Submitted by
May 2024
DECLARATION
We the undersigned hereby declare that the Mini Project report “Self Balancing Bike
Using Flywheel”, submitted for partial fulfillment of the requirements for the award of degree
of Bachelor of Technology of the APJ Abdul Kalam Technological University, Kerala is a
bonafide work done by us under supervision of Mr. Ashik M S. This submission represents
our ideas in our own words and where ideas or words of others have been included, we have
adequately and accurately cited and referenced the original sources. We also declare that
we have adhered to ethics of academic honesty and integrity and have not misrepresented
or fabricated any data or idea or fact or source in this submission. We understand that
any violation of the above will be a cause for disciplinary action by the institute and or
the University and can also evoke penal action from the sources which have thus not been
properly cited or from whom proper permission has not been obtained. This report has not
been previously used by anybody as a basis for the award of any degree, diploma or similar
title of any other University.
Place:
Date:
D EPARTMENT OF M ECHATRONICS E NGINEERING
CERTIFICATE
This is to certify that the report entitled “SELF BALANCING BIKE USING
FLYWHEEL ” submitted by GRACE MARIA GEORGE (JEC21MC011), JESWIN
DEVASIA (JEC21MC012), MUHAMMED RABEEH V P (JEC21MC018), RINCE
MATHEW (JEC21MC022) to the APJ Abdul Kalam Technological University in partial
fulfillment of the requirements for the award of the Degree in Bachelor of Technology in
Mechatronics Engineering is a bonafide record of the mini project work carried out by
him under my guidance and supervision. This report in any form has not been submitted
to any other University or Institute for any purpose.
We take this opportunity to thank everyone who helped us profusely, for the successful
completion of our mini-project work. With prayers, we thank God Almighty for his grace
and blessings, for without his unseen guidance, this project would have remained only in our
dreams.
We thank the Management of Jyothi Engineering College and our Principal, Dr Jose P
Therattil for providing all the facilities to carry out this project work. We are greatful to
the Head of the Department Dr. Anoopa Jose Chittilapilly for her valuable suggestions and
encouragement to carry out this project work.
I would like to express our whole hearted gratitude to the project guide Mr. Ashik M S for
his encouragement, support and guidance in the right direction during the entire mini-project
work.
We thank our Mini Project Coordinators Dr. Vivek Lukose & Mr. Johny George for
their constant encouragement during the entire project work. We extend our gratefulness to all
teaching and non teaching staff members who directly or indirectly involved in the successful
completion of this mini-project work.
Finally, I take this opportunity to express our gratitude to the parents for their love, care
and support and also to our friends who have been constant sources of support and inspiration
for completing this mini-project work.
ii
VISION OF THE INSTITUTE
Creating eminent and ethical leaders through quality professional education with
emphasis on holistic excellence.
• To equip the students with appropriate skills for a meaningful career in the global
scenario.
• To inculcate ethical values among students and ignite their passion for holistic
excellence through social initiatives.
iii
PROGRAMME EDUCATIONAL OBJECTIVES
PEO 2: Graduates shall have ability to design and create novel solutions with modern
tool usage which lead to a lifelong learning or higher qualification, making
them experts in their profession.
iv
PROGRAMME SPECIFIC OUTCOMES
Graduate possess -
PSO 1: Professional skills: Associate the concepts related to electrical, electronics,
Mechanical, Robotics, Control and Instrumentation to solve the challenges of
modern industries.
PSO 2: Problem solving ability: Analyze and design systems with modern tools for
the benefit of the society.
v
PROGRAMME OUTCOMES
vi
COURSE OUTCOMES
COs Description
The students will be able to think innovatively on the development of
C3O7.1
components, products, processes or technologies in the engineering field.
The students will be able to analyse the problem requirements and arrive
C3O7.2
workable design solutions.
C3O7.3 The students will be able to understand the concept of reverse engineering.
The students will be able to familiarise with the modern tools used in the
C3O7.4
process of design and development.
CO MAPPING TO POs
POs
COs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
C3O7.1
C3O7.2
C3O7.3
C3O7.4
Average
CO MAPPING TO PSOs
PSOs
COs PSO1 PSO2 PSO3
C3O7.1
C3O7.2
C3O7.3
C3O7.4
Average
vii
ABSTRACT
The bicycle, a seemingly simple invention, has woven itself into the fabric of societies
worldwide. Beyond its function as a mode of transportation, the bicycle has influenced social
movements, health practices, entertainment , sports and even urban planning.A well-balanced
bicycle is crucial for a safe and enjoyable ride. However, a lack of balance can lead to several
problems for cyclists, impacting their confidence, safety, and overall experience.The most
immediate consequence of poor balance is a higher chance of tipping over. Falls can result in
injuries ranging from scrapes and bruises to more serious broken bones , the fear of falling can
lead to a lack of confidence and make them hesitant to navigate tight spaces, handle sudden
changes in direction, or merge with traffic. Struggling to maintain balance requires extra effort
from core muscles and legs. This can lead to muscle fatigue and discomfort, especially on
longer rides. Lack of balance might restrict cyclists from venturing off smooth, flat surfaces.
The concept of a self-balancing bicycle presents an intriguing solution to many of the
problems faced by cyclists today, particularly those related to balance. Self-balancing bikes
could usher in a new era of safer, more accessible, and enjoyable cycling for everyone. It
would automatically adjust to maintain an upright position, significantly reducing the risk
of tipping over and the associated injuries,encourage more people to take up cycling,allow
for smoother and more precise maneuvering,could lessen the physical strain on core muscles
and legs and lead to less fatigue on longer rides Self-balancing bicycles have the potential to
revolutionize cycling by addressing many of the challenges currently faced by riders.
viii
CONTENTS
List of Figures xi
1 Introduction 1
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Literature Survey 3
2.1 Reaction Wheel Control System for a Self Balancng Bike . . . . . . . . . 3
2.2 Design and Analysis of a Self- Balancing Bicycle Model . . . . . . . . . . 4
2.3 Design and Development of Self Balancing Vehicle . . . . . . . . . . . . . 5
2.4 Self Stabilizing Bike using Gyroscope . . . . . . . . . . . . . . . . . . . . 6
2.5 Balancing Control and Model Validation of Self-Stabilizing Motorcycle . . 7
3 Methodology 8
3.1 Working Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 Mechanics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2.1 Bike Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2.2 Reaction Wheels . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2.3 System Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.3 Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.4 Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.4.1 PID Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.4.2 Ziegler-Nichols . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4.3 Kalman Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5 Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5.1 NodeMCU 8266 . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5.2 MPU-6050 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5.3 BLDC Motor-1000KV . . . . . . . . . . . . . . . . . . . . . . . 14
3.5.4 SimonK 30A ESC . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.5.5 3S LIPO 11.1V . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
ix
3.5.6 Flywheel and Assembly . . . . . . . . . . . . . . . . . . . . . . 17
3.5.7 Jumper Wires . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.5.8 Bread Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.6 Circuit Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4 Results & Discussion 20
4.1 Design 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2 Design 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2.1 Controller performance when balancing . . . . . . . . . . . . . . 22
5 Conclusion 23
6 Future Scope 24
References 25
Appendices 26
A Arduino Code 26
x
LIST OF FIGURES
xi
Chapter 1. Introduction 1
CHAPTER 1
INTRODUCTION
The traditional bicycle presents a unique control challenge- maintaining upright stability
while in motion. This seemingly simple feat relies on a complex interplay between rider input,
steering geometry and gyroscopic forces. So, we are introducing our project called gyroscope
stabilised bicycle. This project delves into the engineering principles behind self-balancing
bicycles, focusing on modern technology introduces methods like gyroscopes and motors to
actively sense and correct imbalances, promoting self-balancing functionality. Through the
development of a miniaturized model, we aim to demonstrate the potential of these systems
and their impact on bicycle control and accessibility.
1.1 Overview
A self-balancing bike, also known as a self-balancing scooter or hoverboard, is a two-wheeled
personal transporter typically powered by electric motors. It uses gyroscopic sensors and
accelerometers to detect the rider’s movements and adjust accordingly to maintain balance.
These devices have become popular for short-distance commuting and recreational use due to
their compact size and ease of use.
1.2 Application
Self balancing bikes can be used for personal commuting, especially in urban areas where
congestion is high. They offer a convenient and eco-friendly mode of transportation.Companies
can use self-balancing bikes for last-mile delivery of goods and packages. They are particularly
useful in crowded urban environments where larger vehicles may struggle to navigate. Security
personnel can use self-balancing bikes for patrolling large areas such as campuses, parks,
and shopping malls, enhancing their mobility and visibility. These bikes can be adapted
for individuals with mobility impairments, providing them with greater independence and
mobility. Self-balancing bicycles offer numerous practical applications that extend beyond
traditional cycling. One of the primary benefits is enhanced safety for riders. The inherent
stability of self-balancing bikes reduces the risk of falls and injuries, making cycling safer
for a broader range of people, including children, elderly individuals, and those with balance
impairments. This technology can encourage more people to adopt cycling as a mode of
transportation or recreation, knowing that the risk of accidents is significantly minimized.
Another important application is in providing transportation solutions for disabled individuals.
People with physical disabilities or balance issues often face significant challenges when it
comes to independent mobility. Self-balancing bikes can be a game-changer in this regard,
offering a reliable and easy-to-use mode of transport. This can greatly enhance their quality
of life by providing greater independence and the ability to travel short distances without
relying on others.
Self-balancing bikes also hold considerable potential for recreational use. The added
stability can make the experience of riding more enjoyable and less stressful, particularly
for beginners or those who are nervous about riding traditional bicycles. This can open
up cycling to a wider audience, promoting physical activity and outdoor enjoyment among
diverse age groups and fitness levels.In urban transportation, self-balancing bikes could be
integrated into bike-sharing programs, providing a more user-friendly option that can attract
new users. They can also serve as a practical alternative for short commutes in congested city
areas, helping to reduce traffic and pollution. The ease of use and increased safety can make
them particularly appealing for last-mile transportation solutions.Furthermore, self-balancing
bikes have potential applications in logistics and delivery services. In environments where
traditional vehicles are too large or cumbersome, these bikes can provide an efficient and
agile means of transporting goods. Their ability to maintain balance even at low speeds or
when stationary makes them ideal for navigating crowded urban areas or delivering items
directly to customers’ doors.
1.3 Benefits
Self balancing bikes are often easier for beginners to learn compared to traditional bicycles
since they automatically balance, reducing the fear of falling. Riders gain confidence quickly,
allowing them to focus more on enjoying the ride rather than worrying about balancing.People
of various ages and abilities, including those with physical limitations, can enjoy riding a
self-balancing bike.The automatic balancing mechanism helps prevent accidents caused by
loss of balance, especially at low speeds or during sudden maneuvers.They can be ideal
for short commutes or leisurely rides, requiring minimal effort to maintain balance and
control.Riding a self-balancing bike can be an enjoyable and stress-relieving activity for
people of all ages, providing a unique experience compared to traditional bicycles.
CHAPTER 2
LITERATURE SURVEY
2.5 Hansol Moon, Thomas Sugar , “ Balancing Control and Model Validation
of Self-Stabilizing Motorcycle ”, Journal , 2020 [5]
Bicycles and motorcycles offer maneuverability, energy efficiency and acceleration
that four wheeled vehicles cannot offer given similar budget for. Two wheeled vehicles
have drastically different dynamics from four wheeled vehicles due to their instability
and gyroscopic effect from their wheels. This thesis focuses on self-stabilization of a
motorcycle using an active control momentum gyroscope (CMG) and validation of this
multi-degree-of-freedom system’s mathematical model. Physical platform was created to
mimic the simulation as accurately as possible and all components used were justified. This
process involves derivation of a 3 Degree-of-Freedom (DOF) system’s forward kinematics
and its Jacobian matrix, simulation analysis of different controller algorithms, setting the
system and subsystem specifications, and real system experimentation and data analysis. A
Jacobian matrix was used to calculate accurately decomposed resultant angular velocities
which are used to create the dynamics model of the system torque using the Euler-Lagrange
method. This produces a nonlinear second order differential equation that is modeled using
MATLAB/Simulink. PID, and cascaded feedback loop are tested in this Simulink model.
Cascaded feedback loop shows most promises in the simulation analysis. Therefore, system
specifications are calculated according to the data produced by this controller method. The
model validation is executed using the Vicon motion capture system which captured the roll
angle of the motorcycle. This work contributes to creating a set of procedures for creating
a validated dynamic model for a CMG stabilized motorcycle which can be used to create
variants of other self-stabilizing motorcycle system.
CHAPTER 3
METHODOLOGY
Figure 3.1: Orientation of torques and angular momenta for a rapidly spinning top
3.2 Mechanics
3.2.1 Bike Dynamics
The dynamics of bicycles encompass the physical forces that act upon them during motion,
presenting inherent challenges due to their unstable nature. This instability complicates
steering and riding, as bikes naturally lean with the rider’s movements, facilitating turns in
the direction of the lean while hindering steering in the opposite direction. At lower speeds,
maintaining balance demands continuous, subtle adjustments to the handlebars. Conversely,
at higher speeds, bicycles benefit from increased stability, partly due to gyroscopic effects
and the geometry of their construction, which aids in maintaining upright posture. However,
heightened stability at speed also amplifies responsiveness to rider inputs, including steering,
acceleration, and braking. Consequently, even minor adjustments or changes in velocity can
markedly influence stability and handling.
When stationary, bicycles are most unstable, lacking the gyroscopic forces that aid
balance during motion. Comprehending bike dynamics involves understanding of factors
such as geometry, weight distribution, tire characteristics, and the influence of rider actions.
These elements collectively dictate how bicycles behave in motion, impacting their stability,
maneuverability, and overall performance.
3.3 Calculations
According to Figure 3.2, the mass of the system is m1 + m2 kg. The distances from the
ground to the centers of mass of the bike and the flywheel are h1 and h2 meters, respectively.
When the angle of tilt is θ, the torque induced τ is given by:
Also,
τ ′ = I2 ωωp (3)
where I2 is the moment of inertia of the flywheel, ω the angular speed of the flywheel, and
ωp the precession speed of the flywheel.
On comparing equation (2) and equation (3),
Therefore,
(m1 h1 + m2 h2 )g sin θ
ωp = (5)
I2 ω
To infer the torque required for the reaction wheel according to the tilt angle θ from the
given equations, we proceed as follows:
The torque τ induced by the tilt of the bike is:
τ = (m1 h1 + m2 h2 )g sin θ
where: m1 : Mass of the bike (including BLDC Motor). h1 : Height of the bike’s center of
gravity (excluding the flywheel). m2 : Mass of the flywheel. h2 : Height of the flywheel’s
center of gravity. g: Acceleration due to gravity. θ: Tilt angle of the bike relative to the
vertical axis.
The gyroscopic torque τ ′ produced by the reaction wheel is:
τ ′ = I2 ωωp
3.4 Controller
The process flow diagram shown in Figre 3.3 shows that the control of the bike is simple
and straightforward. This includes reading data from sensor, filtering the data, applying
control algorithms on the data, and sending control signal to the actuators. All the filtering
of data and generation of control signal is done by a microcontroller.The measured angle is
treated with a PID algorithm, and output generated is scaled to a corresponding voltage and
fed to the motor controller. The motor controller then outputs a voltage to the BLDC Motor.
This motor geared down, and ultimately actuates the flywheel. The torque exerted on the
flywheel, generates a reaction torque which is exerted on the bike.
PID control is the single undisputed most common control method in the industry. PID
control, according to Figure 3.4, stems from building on a simple control method, called
proportional control which on its own can increase the speed of the feedback system. The
integrating effect (I), allows the system to keep the output signal steady and constant when
approaching the sought after value. The derivative effect (D), notices the change over time in
system performance and adjusts accordingly. This derivative effect keeps systems from going
unstable when increasing the proportional and integral gain.
The full PID controller can be described mathematically as follows:
Zt
d
u(t) = KP e(t) + KI e(τ) dτ + KD e(t)
0 dt
Where u(t) is the input signal to the system, which depends on the error term e(t) = r(t) y(t) ,
where r(t) is the reference value and y(t) is the measured value. The constant values KP , KI ,
KD are the values meant to be tuned to the system in order to find satisfying performance.
3.4.2 Ziegler-Nichols
The Ziegler–Nichols tuning method is a heuristic method of tuning a PID controller. It
was developed by John G. Ziegler and Nathaniel B. Nichols. It is performed by setting the I
(integral) and D (derivative) gains to zero. The ”P” (proportional) gain, Kp , is then increased
(from zero) until it reaches the ultimate gain Ku , at which the output of the control loop has
stable and consistent oscillations. Ku and the oscillation period Tu are then used to set the P, I,
and D gains depending on the type of controller used and behavior desired. This tuning rule
is meant to give PID loops best disturbance rejection.
3.5 Components
The each module in and the purpose of components are explained in the below sub
sections.
during operation. Its compatibility with various sensors and peripherals allows for seamless
integration into the bike’s architecture, facilitating real-time monitoring and adjustment
of parameters. Moreover, its Wi-Fi connectivity enables remote control and data logging,
empowering riders and developers to fine-tune performance and analyze ride metrics. The
NodeMCU ESP8266 plays a pivotal role in enhancing the functionality and intelligence of
self-balancing bikes, contributing to their safety, efficiency, and user experience.
3.5.2 MPU-6050
The MPU-6050 accelerometer (Figure 3.6) is a widely used sensor module that combines a
three-axis accelerometer and a three-axis gyroscope. It is capable of measuring acceleration,
tilt, and rotation in three-dimensional space. The module integrates motion detection
algorithms, making it suitable for various applications such as motion tracking, gesture
recognition, and robotics. The MPU-6050 accelerometer communicates with a microcontroller
or Arduino board through I2C communication protocol and provides accurate and reliable
motion data. Its compact size, low power consumption, and versatile features make it a
popular choice for projects requiring motion sensing capabilities.
send signals to the motor controller. Controller Response The controller adjusts the motor’s
direction and speed to counteract the tilt. By spinning the flywheel in the opposite direction
of the lean, the gyroscopic effect creates a righting force that stabilizes the bicycle. BLDC
Motor Advantages BLDC motors are ideal for self-balancing bicycles due to several reasons
such as,BLDC motors convert electrical energy into mechanical energy with minimal losses,
resulting in longer battery life for the self-balancing bicycle results in high efficiency,BLDC
motors offer excellent speed and torque control, allowing the controller to make minute
adjustments to maintain balance effectively and BLDC motors react quickly to changes in
input from the sensors, ensuring the bicycle responds swiftly to maintain stability.
The SimonK 30A ESE (Electronic Speed Controller) shown in Figure 3.8 is a highly
regarded component used for managing the speed of brushless motors in various RC (radio-controlled)
models, including drones, airplanes, and helicopters. This ESC is capable of handling a
continuous current of 30A and is preloaded with SimonK firmware, known for its fast and
responsive motor control. It supports a wide range of battery types, typically from 2S to 4S
LiPo batteries, ensuring flexibility for different power requirements. Additionally, it often
includes a built-in Battery Eliminator Circuit (BEC) to supply power to the receiver and servos,
enhancing its utility in complex setups. The SimonK 30A ESC features standard PWM input
for broad compatibility with most RC receivers and incorporates protection mechanisms such
as low voltage cut-off, overheat protection, and throttle signal loss protection. Its compact
and lightweight design makes it an ideal choice for applications where space and weight are
at a premium.
Controlling reaction wheels in a self-balancing bike with a SimonK 30A ESC involves a
specialized application of the ESC’s capabilities. The ESC interfaces with the motors driving
the reaction wheels. The ESC receives input signals from sensors that detect the bike’s tilt or
orientation, typically gyroscopes and accelerometers. Based on these inputs, the ESC adjusts
the power supplied to the reaction wheels to counteract the bike’s lean and maintain balance.
SimonK firmware’s rapid response and precise motor control are crucial here, ensuring the
reaction wheels can quickly and accurately stabilize the bike by generating appropriate torque
in response to changes in the bike’s orientation. This setup allows for dynamic and real-time
adjustments, essential for effective self-balancing mechanisms in vehicles like self-balancing
bikes.
A 3S LiPo (Lithium Polymer) battery shown in Figure 3.9 with an 11.1V voltage is
a rechargeable power source, favored in remote-controlled vehicles, drones, and other
high-performance electronics due to its high energy density and lightweight nature. The ”3S”
in its designation indicates that it consists of three lithium polymer cells connected in series.
This series connection adds the voltage of each individual cell. It comprises of three cells
in series, each providing 3.7V, totaling 11.1V. Capacities typically range from 1000mAh
to 5000mAh or more, with varying discharge rates (C-Ratings) such as 20C, 30C, or 40C,
which indicate the maximum current output relative to the battery capacity. It usually features
connectors like XT60, Deans, or EC3, along with a JST-XH balance connector for even cell
charging.
Flywheels (Figure 3.10) play a crucial role in the operation of self-balancing bikes, serving
as key components in maintaining stability and enhancing maneuverability. These rotating
discs store kinetic energy, which can be rapidly transferred to counteract shifts in the bike’s
balance, ensuring a smooth and controlled ride. By leveraging the principles of angular
momentum, flywheels help stabilize the bike by stabilizing its orientation and minimizing
deviations from the desired trajectory. Their compact design and efficient energy storage
make them well-suited for integration into self-balancing bike systems, contributing to their
reliability and performance in diverse urban environments.
Jumper wires (Figure 3.11) are essential electrical connectors used in electronics projects.
They consist of insulated wires with pins or sockets on each end, allowing for easy connection
and prototyping. They enable the transfer of signals, power, and data between components on
a breadboard or circuit board.
Figure 3.13 shows the circuit diagram of electronic controlling part of self balancing
bicycle.The key concept is the gyroscopic effect. Imagine a spinning flywheel like a top; it
resists changes in its orientation. In the bicycle, the flywheel’s rotational axis is carefully
controlled to counteract the bike’s leaning motion. As the bicycle tilts, the system adjusts the
flywheel’s rotation to create a counteracting torque, essentially righting the bicycle.
Connections
• Power Connections: The 3S LiPo battery connects to the circuit, providing power to
the NodeMCU, ESC, and potentially the MPU6050.
• NodeMCU (Brain): This microcontroller acts like the bicycle’s brain. It receives data
from the MPU6050 sensor, which detects the tilt angle. The NodeMCU analyzes this
data and calculates the necessary adjustments to maintain balance.
• MPU6050 Sensor (Tilt Detection): This sensor plays a critical role by constantly
monitoring the bicycle’s tilt. By measuring the tilt angle and its direction, the NodeMCU
can determine the severity of the lean and calculate the appropriate corrective action.
• BLDC Motor and ESC (Flywheel Control): The BLDC motor acts as the flywheel in
this system. The ESC receives control signals from the NodeMCU, which dictate the
speed and direction of the flywheel’s rotation. By strategically adjusting this rotation,
the system introduces a corrective torque to counteract the tilt and restore balance.
Power Supply
• 3S LiPo Battery: This battery provides the main power source for the entire circuit.
A 3S battery indicates three cells connected in series, typically providing a nominal
voltage around 11.1V to 12.6V.
CHAPTER 4
4.1 Design 1
The initial design of the self-stabilizing bike shown in Figure 4.1 encountered several
significant challenges. One of the primary issues was the difficulty in accurately locating the
center of mass, which is essential for maintaining balance. This miscalculation led to frequent
instability. The design also included wheels with sharp edges, which adversely affected the
bike’s stability, causing it to tip over easily. Moreover, the bike experienced high levels of
vibration, which further compromised its stability and control. The motor used in this design
was a 5V DC motor, which did not perform adequately. It exhibited a noticeable delay in
response time, leading to sluggish adjustments and overall poor performance in maintaining
balance.
4.2 Design 2
In the second design, significant improvements were made to overcome the challenges
faced in the initial iteration as shown in Figure 4.2. The difficulty in finding the center of
mass was effectively addressed, resulting in enhanced stability and balance. The wheels were
redesigned with rounded edges, which significantly improved the bike’s stability and reduced
the likelihood of tipping over. To further enhance performance, the motor was upgraded from
a 5V DC motor to a BLDC motor. This new motor provided better performance, with quicker
response times and more efficient control.
These changes led to a marked increase in the overall efficiency and stability of the
self-stabilizing bike, making it more reliable and effective in maintaining balance. The
self-balancing bike’s successful outcome stems from its integration of an MPU6050 sensor
with a BLDC Motor. This integration allowed for the precise measurement of tilt angles,
crucial for determining the necessary adjustments to maintain balance. By continuously
monitoring the tilt angle, the system calculated the corresponding torque and speed required
to counteract any deviations from the upright position. This real-time adjustment mechanism
ensures that the bike remains stable even when subjected to external forces or rider inputs.
The MPU6050 sensor plays a pivotal role in this process by accurately detecting the bike’s
orientation in space. Its data output serves as the foundation for the system’s decision-making
process, enabling it to respond swiftly and effectively to changes in tilt. Through sophisticated
algorithms, the system translates this sensor data into actionable commands for the BLDC
Motor, orchestrating precise adjustments to keep the bike upright.
As a result of this integrated approach, the self-balancing bike exhibits remarkable stability,
capable of maintaining balance within a 5-degree tilt range. This level of performance not
only enhances the safety and usability of the bike but also showcases the effectiveness of
sensor-driven control systems in dynamic environments
CHAPTER 5
CONCLUSION
Testing indicates the need for further evaluation to determine the stability achievable
with a PID controller. The results suggest that PID control could be a suitable method for a
self-balancing bike. One issue impacting performance is the bike’s construction, specifically
the high center of mass, which complicates PID tuning. This results in a limited range
of angles from which the bike can recover to its already unstable equilibrium point. Both
previous research and this project’s findings indicate that designing a self-balancing bike is
feasible, but the choice of control method and balance mechanism implementation is crucial
for optimal performance. Many successful implementations have used state-space models,
suggesting that these modern control methods may offer advantages over traditional PID
control, given the less impressive results observed.
Further research is needed to evaluate the control system’s performance under vehicular
motion, as this aspect has not been tested yet due to time constraints. In conclusion, the
development and adoption of self-balancing bikes represent a transformative shift in urban
mobility, accessibility, and sustainability. With their unparalleled stability, compact design,
and diverse applications, these innovative vehicles offer a multitude of benefits, from reducing
accidents and injuries to promoting health and wellness. As we look to the future, the
continued evolution of self-balancing bike technology promises even greater advancements,
including integration with autonomous systems and the implementation of cutting-edge
features. By embracing this vision of urban transportation, we can create more inclusive,
efficient, and environmentally friendly cities, where everyone can enjoy the freedom of safe
and convenient mobility.
CHAPTER 6
FUTURE SCOPE
A comparison between a modern state-space control method like LQR and the traditional
PID controller is necessary to determine the best control method for a reaction wheel balanced
bike. Additionally, further research is needed to understand the behavior of the reaction wheel
bike under motion and to identify the most effective control method for this application. The
MPU6050 IMU lacked a built-in magnetometer, resulting in disturbed gyroscopic data due
to susceptibility to gyroscopic drift. Future work should consider using a higher precision
9-DoF IMU for more accurate data collection. Combined with a well-implemented Kalman
filter, this could improve the precision and consistency of angle readouts for the bike’s lean
angle, positively impacting system performance. Using a stable power source is advisable for
similar projects to maintain constant voltage. Rechargeable Li-Po batteries would be ideal due
to their low weight and ability to provide consistent voltage, enhancing system consistency
and aiding in tuning. A more rigid chassis with a lower center of mass would help the system
balance more easily, as the current high center of mass makes the bike prone to tipping and
losing ground contact due to resonance frequencies causing vibrations.
More research is needed on full-scale bikes to explore the potential of control mechanisms
for real-life applications. The future of self-balancing bikes holds immense potential for
technological advancements and expanded utility. Integration with self-driving technology
opens doors to autonomous urban transportation systems, reducing traffic congestion and
emissions. Moreover, continued innovation may lead to features such as obstacle detection
and route optimization, further enhancing safety and efficiency. Additionally, advancements
in customization and accessibility will ensure that self-balancing bikes remain inclusive,
catering to diverse user needs and preferences.
REFERENCES
[1] R. Soryani, “Reaction wheel control system for a self-balancing bike,” in Journal, IEEE,
2023.
[4] P. D. Tak, “Self stabilizing bike using gyroscope,” in Journal, IEEE, 2017.
APPENDIX A
ARDUINO CODE
1 #include <Wire.h>
2 #include <MPU6050.h>
3 #include <PID_v1.h>
4 // Define motor control pins
5 const int motorPin1 = D3;
6 const int motorPin2 = D4;
7 const int motorEnablePin = D5;
8
12 // PID parameters
13 double Setpoint, Input, Output;
14 double Kp = 18, Ki = 2, Kd = 8;
15 // Adjust PID gains for faster response
16 unsigned long lastTime = 0;
17 const unsigned long updateInterval = 100;
18 // Update interval in milliseconds
19
28 void setup() {
29 // Initialize serial communication
30 Serial.begin(115200);
31
37 while (1);
38 }
39
60 void loop() {
61 // Check if it’s time to update sensor readings and PID
62 unsigned long currentTime = millis();
63 if (currentTime - lastTime >= updateInterval) {
64 // Read the sensor values
65 int16_t ax, ay, az, gx, gy, gz;
66 mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
67
72 // Calculate the rate of turn from the gyroscope along the y-axis
73 gyroRateY = gy / 131.0;
74 // Assuming a full-scale range of 250 degrees/sec
75
83 // Update the PID input with the filtered angle along the y-axis
84 Input = angleFilteredY;
85
COs Description
Make use of acquired knowledge within the selected area of technology for
C317.1
project development.
Identify, discuss and justify the technical aspects and design aspects of the
C317.2
project with a systematic approach.
C317.3 Interpret, improve and refine technical aspects for engineering projects.
To exercise their creative and innovative qualities in a group project
C317.4
environment.
C317.5 Report effectively the project related activities and findings.
CO MAPPING TO POs
POs
COs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
C317.1 3 3 3 3 3 3 3 3 - - - 3
C317.2 3 3 3 3 3 - 2 3 - 3 2 3
C317.3 3 3 3 3 3 2 3 3 - 2 3 3
C317.4 3 3 2 2 - - - 3 3 3 3 3
C317.5 3 - - - 2 - - 3 2 3 2 3
Average 3 2.4 2.2 2.2 2.2 1 1.6 3 1 2.2 2 3
CO MAPPING TO PSOs
PSOs
COs PSO1 PSO2
C317.1 1 3
C317.2 1 2
C317.3 2 1
C317.4 1 2
C317.5 1 1
Average 1.2 1.8
vii