0% found this document useful (0 votes)
3 views

Report Main File _Self balancing robot project report

The document discusses the design and implementation of a self-balancing robot based on the inverted pendulum principle, utilizing a combination of sensors and a PID controller for stability. It outlines the methodology, control system, and components involved, including Arduino and MPU6050 for data acquisition and motor control. The project aims to create an eco-friendly transportation prototype that can be remotely accessed via Bluetooth.

Uploaded by

DhavaL solanki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Report Main File _Self balancing robot project report

The document discusses the design and implementation of a self-balancing robot based on the inverted pendulum principle, utilizing a combination of sensors and a PID controller for stability. It outlines the methodology, control system, and components involved, including Arduino and MPU6050 for data acquisition and motor control. The project aims to create an eco-friendly transportation prototype that can be remotely accessed via Bluetooth.

Uploaded by

DhavaL solanki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 38

.

CHAPTER: 1
INTRODUCTION

The self balancing robot, concept of two-wheel inverted pendulum has gained
momentum in research over the last few years. Inherently self balancing robot is unstable and it
would roll around the wheels’ rotation axis without external control and eventually fall.
The robot returns to right position if motor driving occurs in right direction. The robot is
naturally unstable although, it has many favors over the statically stable multi wheeled robots. A
special electromechanical system in which the robot has to be based on balances itself onto a pair
of wheels while standing tall. If the base on which the robot stand is not stable or the
platform is not balanced, the robot tend to falling off from the vertical axis. This time a gyro
chip is needed to provide the PID controller about the angular position of the base of the self
balancing robot. A self balancing algorithm is programmed into the controller and the controller
drives the motors either clockwise or anticlockwise to balance the basement by a pulse width
modulation (PWM) control signal. The robot has to be work upon any type of surface based on
two motors constructed with wheel one for each.
For the rider's convenience, we have also introduced remote sensing, implementing it
using the HC-05 Bluetooth module. Thus a rider can access his/her vehicle from a certain
distance. This device self- balances based on the inverted pendulum principle.

Page 1
CHAPTER: 2
INVERTED PENDULUM SYSTEM

2.1. Inverted Pendulum Principle:-


An inverted pendulum is usually the base of all self -balancing mechanisms. It requires
assistance to stay perpendicular to the base it is attached to. An original pendulum is stable
because it hangs downwards but an inverted one, being forced against gravity, is quite naturally
unstable and needs to be kept upright by some mechanism. The mass, to which it is attached,
when moves forward or backward horizontally, the pendulum fails to stay upright in the same
perpendicular position to the mass. To keep it in that state we need to apply a certain amount of
torque at the centre of it and make sure it stays upright by moving the whole thing forward or
backward. This is the principle used for a self-balancing mechanism.

Fig 1: Inverted Pendulum


2.2. Objective:-
This project is concentrated upon building a prototype of a segway that can self-balance
itself and its rider while in motion. It causes zero pollution by using battery as power source and
consumes space almost that of its rider. The device can be accessed from a distance using remote
sensing mechanism. Thus it serves as a smart way of transport within a short distance. The
inverted pendulum is a classical problem in control systems, and to explore the unstable
dynamics, different platforms have been developed. These platforms are similar in many ways,
leading to many of the behaviours being comparable. The most common types are the self-
balancing robot, Inverted Pendulum on a cart and an inverted pendulum on a linear track

Page 2
CHAPTER: 3
METHODOLOGY

The block diagram shown below consists of all the important blocks that are needed for
the working of this prototype. The source of power is a rechargeable battery. The sensor unit is
the MPU6050 block which has both gyroscope and accelerometer to sense the axis of tilt. As a
rider moves front or back the angle of inclination is sensed by the MPU6050 and the data is
given to the arduino.

Fig 2: Block Diagram

By reading the data if the control unit feels that the device is falling out of balance then it
instructs the L298N motor driver so that it can direct the motors. The motors in turn control the
wheels. Therefore, the balance is maintained as the device balances itself. All the components
i.e. the MPU6050, motor driver, HC-05 module are all interfaced with the Arduino in order to

Page 3
run the device. To make sure of the convenience of the rider, we have introduced the concept of
remote accessing using the Bluetooth module. Therefore, one can access his/her vehicle from a
distance using this method of communication which does not need wires. Since it is a prototype
of a Segway that is used for transportation of humans, thus we have also introduced an indicator
to notify the battery left.

Fig 3: Circuit Diagram Without Bluetooth Module

Interface the MPU6050 with Arduino and connect the motors though the Motor driver module.
The whole set-up is powered by the battery. The circuit diagram for the same is shown above.
The Arduino and the L298N Motor driver module is directly powered through the Vin pin and
the 12V terminal respectively. The on-board regulator on the Arduino board will convert the
input 7.4V to 5V and MPU6050 will be powered by it.

Page 4
Fig 4: Circuit Diagram with Bluetooth Module

Page 5
CHAPTER: 4
DESIGN PROCESS

The self balancing robot gets balanced on a pair of wheels having the required grip
providing sufficient friction. For maintaining vertical axis two things must be done, one is
measuring the inclination angle and other is controlling of motors to move forward or backwards
to maintain 0˚angle with vertical axis. For measuring the angle, two sensors, accelerometer and
gyroscope are used. Accelerometer can sense either static or dynamic forces of acceleration and
Gyroscope measures the angular velocity. The outputs of the sensors are fused using a
Complementary filter. Sensors measure the process output say α which gets subtracted
from the reference set-point value to produce an error. Error is then fed into the PID where the
error gets managed in three ways. After the PID algorithm processes the error, the controller
produces a control signal μ. PID control signal then gets fed into the process under control.
Process under PID control is two wheeled robot. PID control signal will try to drive the process
to the desired set-point value that is 0˚ in vertical position by driving the motors in such a way
that the robot is balanced.

Page 6
CHAPTER: 5
TECHNIQUE CONTROL

It is a challenging work to balance an inverted pendulum, because naturally it is unstable.


The small error or disturbance from equilibrium position takes away from equilibrium forcefully
that further destabilizes the system. So, keeping balance at a slightly non-equilibrium requires
precise control to immediately correct any errors in tilt the instant they happen. To deal with this
problem, a PID controller is employed that uses tilt feedback to control the torque of the motors
and keep the robot balanced. A PID controller continuously measures a process variable and
calculates an error value (angle from the vertical), which is the deviation of the process variable
from some desired value (0 degrees from the vertical) [4]. The PID controller try to minimize
this type of error over time by continuously adjusting a control variable (motor torque) according
to the following equation, where u(t) is the control variable, e(t) is the current error in the process
variable, and Kp, Ki, and Kd are coefficients that must be tuned to achieve the desired behaviour
of the controller:

Page 7
CHAPTER: 6
DATA ACQUISITION AND FILTERING

 Both the accelerometer and gyroscope data are used to obtain the angular position of the
object. Gyroscope does this by integrating the angular velocity over time. From the
position of the gravity vector (g-force) angular position is obtained using the
accelerometer. In both these cases, it is very hard to use without a filter.
 Accelerometer measures all forces that are working on an object, as well as it will also
see a lot more than just the gravity vector. Every small force working on the object
disturbs measurements in a great amount. While working on an actuated system the
forces that drive the system will also be visible on the sensor as well. The accelerometer
data is reliable in case of a long term, for that reason a "low pass" filter is required.
 In the case of Gyro, it is very easy to obtain an accurate data which is not susceptible to
external forces. But because of the integration over time, the measurement has a tendency
to drift, not returning to level zero when the system went back to its original position.
This data is reliable only for a short term; it shows drift on the long term.
 The complementary filter provides data both for short and long term from gyroscope and
accelerometer respectively.

Page 8
Fig 5: Complementary Filter Block

 Arduino Mega and MPU 6050 are used to acquire data and filter. Basic
connection diagram is shown in Figure.

Fig :6 Arduino and Mpu-6050 Connection

 In this fig 4pins will be used for this project.


 VCC pin of MPU6050 is connecting to +5v.
 GND pin of mpu6050 is connecting to GND.
 SCL, SDA INT Pin of MPU 6050 is connecting to analog pin of Arduino A5,A4 D2

Page 9
CHAPTER: 7
CONTROL SYSTEM AND ALGORITHM

The control system of the two wheels balancing robot in this project is illustrated by the
block diagram in Figure.

Fig 7 : Control system of the robot

The robot control software is inside the microcontroller module and the program
flowchart is shown in Figure.

Page 10
Fig 8: Program flowchart

Page 11
CHAPTER: 8
MOTOR CONTROL

The speed of the motor can be able to adjust by the PWM by adjusting the duty cycle and
hence the voltage supplied to the motor. Using the PWM method saves the cost of acquiring a
Digital to Analogue Converter. Another benefit of using the PWM is that the signal remains
digital and no digital-to-analogue conversion is necessary, by doing so the noise effects are
minimized.
Changing the set point for the PID controller individually for two motors can control the
translational motion of the robot. The motor power increases by the proportional term as the
system leans further over and decreases the motor power as the system approaches the upright
position. A gain factor, Kp, determines how much power to apply to the motor for any given
lean, as follows:

The differential term of the PID algorithm acts as a damper reducing oscillation. Another
gain factor, Kd, determines how much power is applied to the motor according to the following
equation:

Finally, neither the proportional nor differential terms of the algorithm will remove all of
the lean because both terms go to zero as the orientation of the system settles near vertical. The
integral term sums the accumulated error tries to drive the lean to zero as follows:

Page 12
The output of the PID Controller is

PWM = Proportional term + Integral Term + Differential term

The output of the motor PWM as Above will be used as the set-point for the motor.

Error of Motor Speed = Motor Set point – current speed reading of motor output Proportional term of
motor

=Kp * Error of motor Speed

Output Differential term of motor = kd * (Error of motor speed – last error of motor speed)

Output integral of motor

= Ki * Sum of error of motor speed

And Finally

Motor Speed = Proportional term of motor + Integral Term of motor + Differential term of motor.

For tuning the PID control of motor speed, the value of Kp, Ki and Kd is get by trial and
error method.
The H-Bridge amplifier amplifies the signal from the pulse-width modulator channel to
produce voltage that is sufficient enough to drive the motor. Under the command of the software
the H-Bridge swaps the motor terminals to drive the motor in a different direction. Using the H-
Bridge saves the cost of using two voltage sources for bidirectional control of the motor. The H-
Bridge has got two logic inputs for the direction control of the motor.

Page 13
CHAPTER: 9
COMPONENTS

9.1 Arduino Uno


An Arduino Uno is a platform which can be interfaced with other components to control
the working of a device. It is compatible with several operating systems like Windows, Mac, and
Linux etc. It consists of digital I/O pins which are 14 in number and can be used as per the
requirement of the project. This is a simple board for beginners and can be further extended by
experts according to their need. Arduino Uno requires a 5v voltage for operation and also a USB
connection to interface other components. In our prototype we use Arduino to interface
Bluetooth module, motor driver, MPU6050. We have constructed a battery level indicator which
calculates the level of the battery using Arduino and then Arduino decides based on the
algorithm whether the battery is full charged, or medium, or drained and then directs the
respective LED to glow in this case Green, Yellow or Red.

Page 14
Fig :9 Arduino Uno
9.1.2 Features

• High Performance, Low Power AVR 8-Bit Microcontroller

– 131 Powerful Instructions – Most Single Clock Cycle Execution


– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 20 MIPS Throughput at 20 MHz
– On-chip 2-cycle Multiplier

• High Endurance Non-volatile Memory Segments

– 4/8/16/32K Bytes of In-System Self-Programmable Flash program memory


– 256/512/512/1K Bytes EEPROM
– 512/1K/1K/2K Bytes Internal SRAM
– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
– Data retention: 20 years at 85°C/100 years at 25°C
– Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
True Read-While-Write Operation
– Programming Lock for Software Security

• Peripheral Features

– Two 8-bit Timer/Counters with Separate Pre scalar and Compare Mode
– One 16-bit Timer/Counter with Separate Pre scalar, Compare Mode, and Capture
Mode
– Real Time Counter with Separate Oscillator
– Six PWM Channels
– 8-channel 10-bit ADC in TQFP and QFN/MLF package
Temperature Measurement
– 6-channel 10-bit ADC in PDIP Package
Temperature Measurement
– Programmable Serial USART
– Master/Slave SPI Serial Interface
– Byte-oriented 2-wire Serial Interface (Philips I2C compatible)
– Programmable Watchdog Timer with Separate On-chip Oscillator
– On-chip Analog Comparator
– Interrupt and Wake-up on Pin Change

• Special Microcontroller Features

– Power-on Reset and Programmable Brown-out Detection


– Internal Calibrated Oscillator

Page 15
– External and Internal Interrupt Sources
– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby, and
Extended Standby

• I/O and Packages

– 23 Programmable I/O Lines


– 28-pin PDIP, 32-lead TQFP, 28-pad QFN/MLF and 32-pad QFN/MLF

• Operating Voltage:

– 1.8 - 5.5V

• Temperature Range:
– -40°C to 85°C

• Speed Grade:
– 0 - 4 [email protected] - 5.5V, 0 - 10 [email protected] - 5.5.V, 0 - 20 MHz @ 4.5 - 5.5V

• Power Consumption at 1 MHz, 1.8V, 25°C


– Active Mode: 0.2 mA
– Power-down Mode: 0.1 μA
– Power-save Mode: 0.75 μA (Including 32 kHz RTC)

9.1.3 Pin Configuration

Page 16
Fig 10 :TQFP Top View
PDIP

Fig 11: Plastic Dual Inline Package

Page 17
Fig 12: MLF Top
View

Page 18
Fig 13: 32 MLF Top View
9.1.4 Pin Descriptions

 VCC -Digital supply voltage.

 GND- Ground

 Port B (PB7:0) XTAL1/XTAL2/TOSC1/TOSC2

Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port B output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port B pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset
condition becomes active, even if the clock is not running. Depending on the clock
selection fuse settings, PB6 can be used as input to the inverting Oscillator amplifier and
input to the internal clock operating circuit. Depending on the clock selection fuse
settings, PB7 can be used as output from the inverting Oscillator amplifier.
.
 Port C (PC5:0)

Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The PC5...0 output buffers have symmetrical drive characteristics with both high
sink and source capability. As inputs, Port C pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port C pins are tri-stated when a
reset condition becomes active, even if the clock is not running.

 PC6/RESE

If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that n the
electrical characteristics of PC6 differ from those of the other pins of Port C. If the
RSTDISBL Fuse is un programmed, PC6 is used as a Reset input. A low level on this pin
for longer than the minimum pulse length will generate a Reset, even if the clock is not
running.

 Port D (PD7:0)

Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port D output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port D pins that are externally pulled low will source

Page 19
current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset
condition becomes active, even if the clock is not running.

9.1.5 Block Diagram of Aurdino

Fig 14: Block diagram

9.2 MPU6050
MPU6050 is a module which consists of a gyroscope and an accelerometer together in it.
Both are 3-axis micro electro-mechanical systems.

Page 20
Fig 15: MPU6050

This is the sensor module which senses the angle of inclination of the rider and hence the
device while in motion. It then sends this data to the Arduino to process it and balance the device
as required. This module takes in a supply voltage of 3.3-5V.

9.2.1 Application

 Blur Free technology (for Video/Still Image Stabilization)


 Air Sign technology (for Security/Authentication)
 Touch Anywhere technology (for “no touch” UI Application Control/Navigation)
 Motion Command technology (for Gesture Short-cuts)
 Motion-enabled game and application framework
 Instant Gesture recognition
 Location based services, points of interest, and dead reckoning
 Handset and portable gaming
 Motion-based game controllers
 3D remote controls for Internet connected DTVs and set top boxes, 3D mice
 Wearable sensors for health, fitness and sports
 Toys

Page 21
9.2.2 Features

 Gyroscope Features

 The triple-axis MEMS gyroscope in the MPU-60X0 includes a wide range of features:
 Digital-output X-, Y-, and Z-Axis angular rate sensors (gyroscopes) with a user-
programmable full-scale range of ±250, ±500, ±1000, and ±2000°/sec
 External sync signal connected to the FSYNC pin supports image, video and GPS
synchronization
 Integrated 16-bit ADCs enable simultaneous sampling of gyros
 Enhanced bias and sensitivity temperature stability reduces the need for user calibration
 Improved low-frequency noise performance
 Digitally-programmable low-pass filter
 Gyroscope operating current: 3.6mA
 Standby current: 5μA
 Factory calibrated sensitivity scale factor
 User self-test

 Accelerometer Features

 The triple-axis MEMS accelerometer in MPU-60X0 includes a wide range of features:


 Digital-output triple-axis accelerometer with a programmable full scale range of ±2g,
±4g, ±8g and ±16g
 Integrated 16-bit ADCs enable simultaneous sampling of accelerometers while requiring
no external multiplexer
 Accelerometer normal operating current: 500μA
 Low power accelerometer mode current: 10μA at 1.25Hz, 20μA at 5Hz, 60μA at 20Hz,
110μA at 40Hz
 Orientation detection and signaling
 Tap detection
 User-programmable interrupts
 High-G interrupt
 User self-test

 Additional Features

 The MPU-60X0 includes the following additional features:


 9-Axis MotionFusion by the on-chip Digital Motion Processor (DMP)
 Auxiliary master I2C bus for reading data from external sensors (e.g., magnetometer)
 3.9mA operating current when all 6 motion sensing axes and the DMP are enabled
 VDD supply voltage range of 2.375V-3.46V

Page 22
 Flexible VLOGIC reference voltage supports multiple I2C interface voltages (MPU-
6050 only)
 Smallest and thinnest QFN package for portable devices: 4x4x0.9mm
 Minimal cross-axis sensitivity between the accelerometer and gyroscope axes
 1024 byte FIFO buffer reduces power consumption by allowing host processor to read
the data in bursts and then go into a low-power mode as the MPU collects more data
 Digital-output temperature sensor
 User-programmable digital filters for gyroscope, accelerometer, and temp sensor
 10,000 g shock tolerant
 400kHz Fast Mode I2C for communicating with all registers
 1MHz SPI serial interface for communicating with all registers (MPU-6000 only)
 20MHz SPI serial interface for reading sensor and interrupt registers (MPU-6000 only)

9.2.3 Motion Process

 Internal Digital Motion Processing (DMP) engine supports 3D Motion Processing and
gesture recognition algorithms

 The MPU-60X0 collects gyroscope and accelerometer data while synchronizing data
sampling at a user defined rate. The total dataset obtained by the MPU-60X0 includes 3-
Axis gyroscope data, 3-Axis accelerometer data, and temperature data. The MPU’s
calculated output to the system processor can also include heading data from a digital 3-
axis third party magnetometer.

 The FIFO buffers the complete data set, reducing timing requirements on the system
processor by allowing the processor burst read the FIFO data. After burst reading the
FIFO data, the system processor can save power by entering a low-power sleep mode
while the MPU collects more data.

 Programmable interrupt supports features such as gesture recognition, panning, zooming,


scrolling, tap detection, and shake detection

 Digitally-programmable low-pass filters

 Low-power pedometer functionality allows the host processor to sleep while the DMP
maintains the step count.

9.2.4 Clocking

 On-chip timing generator ±1% frequency variation over full temperature range
 Optional external clock inputs of 32.768kHz or 19.2MHz

Page 23
9.3 L298N Motor Driver
L298N motor driver is a high voltage and high current dual H-bridge, called so for the
structure of its circuit. It consists of an onboard 5v voltage regulator and is quite pockets friendly
module. This driver module is used to control two motors bi-directionally.

Page 24
Fig16 : L298N Motor Driver

9.3.1 Schematic Diagram

The L298N is an integrated monolithic circuit in a 15- lead Multi watt and
PowerSO20 packages. It is a high voltage , high current dual full-bridge driver de-signed to

Page 25
accept standard TTL logic level sand drive inductive loads such as relays, solenoids, DC and
stepping motors. Two enable inputs are provided to enable or disable the device independently of
the in-put signals .The emitters of the lower transistors of each bridge are connected together
rand the corresponding external terminal can be used for the connection of an external sensing
resistor. An additional Supply input is provided so that the logic works at a lower voltage.

Fig 17: Schematic Diagram

9.3.2 Pin Function

Page 26
Fig 18: Pin Diagram

Pin Name Description


1 Sense A The sense resistor is connected between this pin and the ground to control
15 Sense B the current of the load
2 Out 1 Output of the bridge A the current that flow through the load connected
3 Out 2 between these two pins is monitored at pin 1.
4 Vs+ Supply voltage of the power output stages
A non inductive 100nF capacitor must be connected between this pin and
ground.
5 Input 1 TTL compatible inputs of the bridge A
7 Input 2
6 Enable A TTL Compatible Enable input : The L state disables the bridge A
11 Enable b (Enable A) and the bridge b (enable B)
8 GND GND
9 Vss Supply voltage for the logic blocks. A 100nF capacitor must be connected
between this pin and ground.
10 Input 3 TTL Compatible inputs of the bridge B.
12 Input 4
13 Out 3 Output of the bridge B. the current flow through the load connected
14 Out 4 between these two pins monitored at pin 15

9.3.3 Features

Page 27
1) High operating voltage, which can be up to 40 volts;
2) Large output current, the instantaneous peak current can be up to 3A;
3) With 25W rated power;
4) Two built in H-bridge, high voltage, large current, full bridge driver, which can be used to
drive DC motors, stepper motors, relay coils and other inductive loads.
5) Using standard logic level signal to control.
6) Able to drive a two-phase stepper motor or four-phase stepper motor, and two-phase DC
motors.
7) Adopt a high-capacity filter capacitor and a freewheeling diode that protects devices in the
circuit from being damaged by the reverse current of an inductive load, enhancing reliability
8) The module can utilize the built-in stabilivolt tube 78M05 to obtain 5v from the power supply.
But to protect the chip of the 78M05 from damage, when the drive voltage is greater than 12v, an
external 5v logic supply should be used.
9) Drive voltage: 5-35V; logic voltage: 5V
10) PCB size: 4.2 x 4.2 cm

Motor driver IC (L298D) has input pins, output pins, enable pin, logic supply voltage
pin, and Main supply voltage pin. L298N is a 15 pin motor driver IC that can drive two motors at
a time. It allows high current (2A per motor) to flow through it. So it is useful for driving motors
which need high current to run. Pin connections for the IC L298N are given in the above
diagram. Input pins are connected to the micro controller (in this case it is Arduino). Arduino
applies PWM across these pins. Output pins are connected to the motors. Enable pin and logic
supply pin are given the voltage that is defined as logic high (here it 5 V). Main supply voltage
pin is joined to the main power supply (max 46V for L298N, here it is 12 V).

Page 28
9.4 Bluetooth Module (HC-05)
HC-05 which is the Bluetooth module is used for accessing the device by means of
wireless technology. This module functions on the basis of master and slave principal. The
configuration of master is implemented using attention commands. This can be extended using
Global positioning system.

Fig 19: Bluetooth Module (HC-05)

HC‐05 module is an easy to use Bluetooth SPP (Serial Port Protocol) module, designed for
transparent wireless serial connection setup. Serial port Bluetooth module is fully qualified
Bluetooth V2.0+EDR (Enhanced Data Rate) 3Mbps Modulation with complete 2.4GHz radio
transceiver and baseband. It uses CSR Bluecore 04‐External single chip Bluetooth system with
CMOS technology and with AFH (Adaptive Frequency Hopping Feature). It has the footprint as
small as 12.7mmx27mm. Hope it will simplify your overall design/development cycle.

Page 29
9.4.1 Hardware features

 Typical ‐80dBm sensitivity.


 Up to +4dBm RF transmit power.
 Low Power 1.8V Operation, 3.3 to 5 V I/O.
 PIO control.
 UART interface with programmable baud rate.
 With integrated antenna.
 With edge connector.

9.4.2 Bluetooth Software.


Scan for new devices from the Mobile application (Bluetooth RC Control ) and you will find the
module with the device name “HC‐05”, after that, click to connect, if some message appears
asking about “Pairing code” just put “1234” as default code.

Fig 20: Mobile app Screenshot.

Page 30
9.4.3 Pin Configuration

Pin Pin Name Pin Description


No

1 Enable/key This pin is used to toggle between Data Mode (set low) and AT
command mode (set high). By default it is in Data mode

2 VCC Powers the module. Connect to +5V Supply voltage

3 GND Ground pin of module, connect to system ground.

4 TX Transmits Serial Data. Everything received via Bluetooth will be given


Transmitter out by this pin as serial data.

5 RX Receive Serial Data. Every serial data given to this pin will be
Receiver broadcasted via Bluetooth

6 STATE The state pin is connected to on board LED; it can be used as a


feedback to check if Bluetooth is working properly.

7 LED Indicates the status of Module

 Blink once in 2 sec: Module has entered Command Mode


 Repeated Blinking: Waiting for connection in Data Mode
 Blink twice in 1 sec: Connection successful in Data Mode

8 BUTTON
Used to control the Key/Enable pin to toggle between Data and
command Mode

Page 31
9.5 Geared Direct current Electrical Motor
A geared direct current electrical motor is driven by the motor driver to rotate both
clockwise and anti-clockwise and in turn rotate the wheels. They require a certain power to be
driven. Here we have used brush-less motor because they have a comparatively lower
maintenance and mechanically less complex.

Fig 21: Geared Direct Current motor

9.5.1
A DC motor is any of a class of electrical machines that converts direct current electrical
power into mechanical power. The most common types rely on the forces produced by magnetic
fields. Nearly all types of DC motors have some internal mechanism, either electromechanical or
electronic; to periodically change the direction of current flow in part of the motor. Most types
produce rotary motion; a linear motor directly produces force and motion in a straight line.

Page 32
CHAPTER: 10
RESULT

The final implementation of the self balancing robot is figured bellow. As mentioned
earlier it is a static linear model. It can handle tilt angle maximum 12 degree. The robot moves
forward and backward continuously within a range of about -3 cm and +3cm around the
balancing spot in order to balance itself on the flat surfaces. Compared with the smooth flat
surfaces, the stability of the robot is better when balancing on the rough flat surfaces like carpet.
This can be explained by the relatively small moment of inertia of the wheels compared to the
moment of inertia of the robot’s body and the extra damping effect produced by the carpet. The
final implementation is shown in Figure.

Fig :22 Hardware Model

Page 33
CHAPTER: 11
APPLICATION

1. Self-balancing unicycle is a self-powered unicycle that balances itself in a three


Dimensions angle X, Y, & Z.

2. Monocycle Is the World’s First Self Balancing Bike: The Monocycle is a perfect city
Bike that can be used for short distance travels and can be parked in the least available of
spaces. Moreover, the bicycle comes with a strong electric motor to support the riders, so
they need not push too hard to speed up the bike.

3. Electric self-balance bike scooter/with Remote switch/balance bike: it’s a self balancing
Robot, which balance itself on its two wheels.

Page 34
CONCLUSION

To study results in a prototype of a Segway, that includes basic features like self-
balancing, rechargeable, battery level indicator and leisure features like remote sensing. This
prototype gives a vision of future transportation where fuel is going to be problem and so is
population. Our study is based on finding a solution to these problems and thus making our
prototype a futuristic transportation medium. This prototype offers remote sensing which upscale
its value and provide easy remote access from anywhere (within a distance of 10 meters, which
can be extended with use of different wireless technology). The self-balancing mechanism is
achieved using a proportional-integral-derivative controller which is set up manually while
coding. The value of proportional, integral and derivative is attained by trial and error method.
These values determine the stability factor of this segway model.

Page 35
FUTURE SCOPE

Since our study focuses on constructing a prototype therefore it has few limitations that
can be improved in future.
1) Greater RPM and Torque can be used in direct current electric motor for greater load and
speed.
2) The motor driver can be changed to higher powered driver, as we are making a prototype
we don’t need high voltage driver but an actual product would need a greater powered
motor driver.
3) Instead of manually setting up proportional gain , integral gain and derivative gain we
can use PID controller as a component to avail extra flexibility and quick response time.
4) One can make use of two 3-axis gyroscope (instead of one) to attain better angle
precision.
5) The wireless technology can be changed for greater range coverage.

Page 36
Annexure-1
LIST OF COMPONENTS

Sr. No Component Description Price

1. Aurdino Uno 550


2. MPU 6050 215
3. 2- L298N Motor Driver 600
4. Bluetooth Module HC 05 315
5. 2- Geared DC Electrical Motor 170
6. Wires 35
7. Wheels 90
8. Chargeable battery 450

Page 37
REFERENCES

1) Hau- Shiue Juang and Kai-Yew Lum, “Design and control of a two wheel self-balancing
robot using the arduino microcontroller board”, IEEE International Conference on
Controls and Automation, China, June 2013
2) Wei An and Yangmin Li, “Simulation and Control of a Two-Wheeled Self-Balancing
Robot”, IEEE International Conference on ROBIO, December 2013
3) Mayukh Sharma, Rahul Sharma, Vikrant Sinha, Kshitj Singh, Shakil Tadavi, “Segway-
The Human Transporter”, IJIRST, Volume 1, Issue 11, April 2015.
4) Mr. Velaji Hadiya, Mr. Aakash Rai, Mr. Sushant Sharma, Ms. Ashwini More, “Design
and Development of Segway”, IRJET, Volume 3, Issue 5, May 2016.
5) Mrs.Lekshmy.S, Aleesha George, Athira C.V, “Self Balancing Robot” International
Journal of Computer Engineering in Research Trends, Volume 2, Issue 12, December-
2015, pp.1091-1095
6) Sulabh Kumra, Shipa Mehta, “ Singular Axis Self Balancing Robot”, International
Journal of Image Processing and Vision Sciences (IJIPVS) ISSN (Print): 2278 – 1110,
Vol-1 Iss-3,4, 2012
7) R.S.Meena,Vikas Kumawat, “Controller Design For Servo Motor Using MATLAB,” .In
Proceeding of National Conferences on Advances & Research in Electrical System
Technology ( AREST 2011)

Page 38

You might also like