Paper 2144
Paper 2144
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
Abstract: In the last decade, the open source community has expanded to make it possible for people to
build complex products at home. In this thesis a two-wheeled self-balancing robot has been designed.
The system in itself requires active control in order to be stable. Using open source micro-controller
Arduino NANO and MPU6050 the balancing of robot, motor drive with quite high rpm and sensors. And
we can able to control it through a controller and it can be switched to avoid the object. Its help for
many industrial uses and in further update can also be use as vehicle with automation. As per this era
SBR is quite priced more than Normal, in this project the product price of SBR can be minimized as
possible and even lower than market price. So with this small change this project, can be used in
household and can be affordable for everyone in this modern world.
I. INTRODUCTION
This project is about Self Balancing Robot, it is an effective approach to development and advancement in the field of
robotics.These machines are particularly characterized by there ability to balance on two wheels by the implementation
of a closed loop algorithm. Its design is more complex, as it needs to maintain its upright position. It is essential for the
robot to not only balance but also maintain its position, withstanding external forces or unexpected disturbances if any.
And here it not only self balance itself but also avoid the object under the real time environment . Can used to detect
the object more quick and respond fast unlike general self balancing robot this is next step of modification and can able
to move and avoid the obstacle and move forward as well as backward, and follow the object by clicking the button and
also be controlled by remote or mobile. It use numbers sensors , and have an inbuilt Bluetooth module and IR sensor in
expansions board. Where self balancing robot used in industry but not fully functioned one, but this robot will help with
further more development it can used both industry and domestic purpose.
The self-balancing robot gets adjusted on a couple of wheels having the necessary hold giving adequate contact. For
keeping up the vertical axis two things must be done, one is estimating the tendency point and the other is controlling
of engines to push forward or in reverse to maintain 0˚angle with the vertical axis. For measuring the angle, two
sensors, an accelerometer, and a gyroscope are used. The accelerometer can sense either static or dynamic forces of
acceleration and the Gyroscope measures the angular velocity. In this project, we are going to balance self-balancing
robot and able to avoid object.
automatically be sensing its surroundings and whenever it would be like going unstable it will automatically make itself
stable with the help of sensors and controllers and if it meant to interact with an object it will avoid and move to
another direction.
II. METHODOLOGY
2.1 Hardware Detail
A. ArduinoNano
The Arduino Nano is a small, complete, and breadboard-friendly board based on the ATmega328 (Arduino Nano 3.x).
It has more or less the same functionality of the Arduino Duemilanove, but in a different package. It lacks only a DC
power jack, and works with a Mini-B USB cable instead of a standard one.
Figure 1
Microcontroller ATmega328
Architecture AVR
Operating Voltage 5V
Flash Memory 32 KB of which 2 KB used by bootloader
SRAM 2 KB
Clock Speed 16 MHz
Analog I/O Pins 8
EEPROM 1 KB
DC Current per I/O Pins 40 mA (I/O Pins)
Input Voltage 7-12 V
Digital I/O Pins 22
PWM Output 6
Power Consumption 19 mA
PCB Size 18 x 45 mm
Weight 7g
Figure 2
MPU6050 is a Micro Electro-mechanical system (MEMS), it comprises of three-axis accelerometer and three-
axis gyro sensor. It causes us to gauge speed, direction, quickening, displacement, and other movements like
features.
MPU6050 comprises of Digital Motion Processor (DMP), which has the property to explain complex
problems.
MPU6050 comprises a 16-bit analog to digital converter equipment. Because of this element, it catches the
three-axis movement simultaneously.
This module has some well-known highlights which are effectively open, because of its simple accessibility it
tends to be utilized with a popular microcontroller like Arduino.
This module utilizes the I2C module for interfacing with Arduino.
MPU6050 is more affordable, Its principle highlight is that it can easily merge with accelerometer and gyro.
This MPU6050 prevent the robot from falling and stable itself as show in the figure2.1
Figure 2.1
MPU6050 Pinout
Pin Pin Name Description
01 Vcc This pin is used for Supply Voltage. Its input voltage is +3 to + 5V.
02 GND This pin use for ground
03 SCL This pin is used for clock pulse for I2C compunction
04 SDA This pin is used for transferring data through I2C communication.
05 Auxiliary Serial Data (XDA) It can be used for other interfaced other I2C modules with MPU6050.
06 Auxiliary Serial Clock It can also be used for other interfaced other I2C modules with MPU6050.
(XCL)
07 AD0 If more than one MPU6050 is used in a single MCU, then this pin can be
used to vary the address.
08 interrupt (int) This pin is used to indicate that data is available for MCU to read.
C. Motor Driver
A motor driver is a gadget or group of gadgets, which is utilized to control in a foreordained manner the operational
presentation of an electric motor. The motor driver makes the controller compatible with the control of motors by
boosting its power. The motor driver we are using in this project is TB6612FNG.
Figure 3
Double H-bridge motor driver is the driver which can drive two DC motor or one bipolar stepper motor
Suggested motor voltage (VMOT): 4.5 V to 13.5 V (can work down to 2.5 V with derated execution)
Output consistent current: 1 A for every channel (can be resembled to convey 2 A continuous)
Maximum PWM frequency: 100 kHz
A built-in feature of a thermal shutdown circuit
Filtering capacitors on both supply lines
Reverse-power protection on the motor supply
Figure 4
high frequency ultrasonic sound, which bounce off any nearby solid objects, and the reciever listens for any return
echo. That echo is then processed by the control circuit to calculate the time difference between the signal being
transmitted and received. This time can subsequently be used, along with some clever math, to calculate the distance
between the sensor and the reflecting object.
Figure 5
E. Expansion Board
Expansion cards allow the capacities and interfaces of a computer system to be adjusted to the tasks it will perform.
In which here this expansion board has bluetooth module and IR sensor (left side IR and right side IR sensor). The
arduino Nano , GY 521/MPU 5060 module and TB6612FNG motor drive are mounted on this board.
Figure 6
And for Bluetooth module, we use BT16 4.2 Bluetooth transparent transmission module adopts the latest Bluetooth
4.2 BLE single chip AB1602 from Airoha, and realizes GATT-based Bluetooth data transmission through the embedded
data transparent transmission service. BT16 4.2 Bluetooth transparent transmission module supports serial command
mode, which is used to realize the interaction between external MCU and module. We can perform parameter
configuration and some control on the module through serial port commands, such as modifying the UUID, modifying
the Bluetooth name, and controlling the Bluetooth disconnection.
Figure 7
Copyright to IJARSCT DOI: 10.48175/568 37
www.ijarsct.co.in
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
F. IRM-56384
The IRM-56384 device are miniature type infrared remote control system receiver which has been developed and
designed by utilizing the most updated IC technology. The PIN diode and preamplifier are assembled on lead frame,
the epoxy package is designed as an IR filter. The demodulated output signal can directly be decoded by a
microprocessor.
Figure 8
Shaft end play End play for thrust direction of protruded shaft 0.05~0.35mm
Weight 150G
Mechanical Rated voltage no load and motor horizontally held Measured by JIS-A(RMS), ≦60dB(max)
noise at 10cm away form metal housing on protruded side and back ground noise to
be 26dB(max).
Encoder Double hall switch 26 Pulse output
Measuring Conditions
Motor position Motor to be held, with shaft horizontally
Power supply Regulated power supply which assures unquestionable
Environmental temperature and +10℃~+35℃ and 30%~90%RH.
humidity If judgment is questionable, measurement is be made
Based on JIS Standard Testing Condition(20℃±2℃, 65%±5% )
Direction of rotation CW viewed from protruded shaft side
Electrical Characteristic
No load current Rated voltage, No load ≦200mA
No load speed Rated voltage, No load 360rpm ±10%
Starting current Rated Voltage, rotor position to be 2/3R ≦4A
Stall torque Rated Voltage ≧5.kg.cm
Insulation resistance Between motor terminal and motor metal housing (100v DC) 10MΩ(min)
Dielectric strength AC 100v (50~60Hz),2.0mA for one minute between motor No pull over
terminal and motor metal housing
Electrical noise Motor to be equipped with varistor
H. Battery
Lithium-ion polymer batteries are appropriate for this sort of use. To supply the fundamental power the motor
demands and the vital power for the right flexibly of all the components of the PCB, a LiPo battery of 3.7V and 2200
mah will be utilized
Figure 11
B. Android Studio
Android Studio is the official integrated development environment (IDE) for Android application development. Every
project in Android Studio has one or more modalities with source code and resource files. These modalities include
Android app modules, Library modules, and Google App Engine modules. With help of it we create an app that can
control the robot which is act as an remote and modify the speed and movement can change into different mode.
Copyright to IJARSCT DOI: 10.48175/568 40
www.ijarsct.co.in
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
III. IMPLEMENTATION
3.1. Details of Hardware Implementation
Figure 13
Copyright to IJARSCT DOI: 10.48175/568 41
www.ijarsct.co.in
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
Form the above figure it show the exact flow chart of the program which is going to be work on this condition where
if the angle oscillated by the sensor is noted 0 then there will no movement but here it won’t get 0, it always x<0>x in
this condition. So the movement will not stop until it system turned off.
A. Structural Implementation
At first we implement the structure of (SBR) robot, first we create the base (which is made of aluminium or
plastics),and then we mounted the Expansion board in which in that expansion board we place the Arduino NANO,
TB6612FNG module , UltraSonic sensor, GY512/MPU6050 module. After that on top we create another base where
the battery is fixed. And below the base1 we insert the motor and wheels.
B. Sensor Module
GY512/MPU6050 is the sensor we are using in our project to measure the tilted position and to measure the speed
that how rapidly both robots are shifting their positions. The purpose behind choosing that sensor is because this
mpu6050 is the package of gyroscope and accelerometer. If we talk about the implementation of a gyro from this
package so gyro is giving us the data of tilt positioning data and orientation data of the bot to the controller. Similarly,
the accelerometer is working in a way that it is giving us the data of the bot that at what speed and what time it is taking
to change and to shift its position and angle.
And the UltraSonic sensor and IR sensor(left side and right side) will detect the object form left , right and in front
with in the range of 15cm communicate to the controller so that it can give the command to the motor and able to move
in the different direction.And can communicate or get the order from the user (using mobile app)by bluetooth module
and give the command to the controller.
C. Control Unit
Arduino Nano is the main central processing unit in our project SB robot. It is the controller at which all the
decisions are being taken by receiving input from the sensor mpu 6050, ultrasonic, IR sensor and from bluetooth
module(which user give the info about the movement) and based on that input (receiving from sensor mpu6050) it
gives command through the program running on the controller to the motor driver whether to move forward or
backward depends on the tilted position of the bot and the data receiving through sensor so the driver will now operate
the motors after receiving Nano is the main central processing unit of this project.
D. Driver Module
We are using motor driver TB6612FNG in our project. The mechanism of the motor driver in our project is that it
makes the encoder of the motorcompatible with the controller that how it will communicate with the controller and
what type of data and how the data will be provided to the driver through the controller. That is why the motor driver is
the most essential component in our project to drive the motors in a way that what speed does the motors need to move
forward or backward like what kind of input the driver is receiving through a controller and based on that input motor
driver will now give the command and operates the motor with a particular speed based on what bit of data, a driver is
receiving from the controller. So, therefore, for transmitting the output of the controller towards the motor we have to
use the driver for it which helps us to first receive that data from the controller and transmit it towards the motors.
E. Encoder Motors
Encoder motors(at the encoder hall sensor is fixed ) are very sensitive which defines a prescribed position. Now if
we just talk about encoder, so it operates in such a way that it gives us the data that at what direction (clockwise or
anticlockwise) and speed these motors are functioning. This is how the encoder of the motors gives us the prescribed
position of the motors. That was our purpose behind using that motor because it shows us the position and speed(rpm)
of the motor that at what degree our motor is now been located so when the new input will be received from the driver
it will get back to the targeted position. The encoder is working as a feedback system in our project receiving data from
Copyright to IJARSCT DOI: 10.48175/568 42
www.ijarsct.co.in
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
motors and transmitting it towards the driver then the driver gives the command to bring that motors to the targeted
position.
ordinary module charger on a self- balancing robot has a self-balancing activity which can keep the operator from any
kinds of fall harm.
4.2. Analysis
The analysis of our project tells the advantages and motivations behind all the components and functions on which the
self-balancing robot is worked. We used encoder motors in our project because it gives us much better efficiency instead
of stepper motors because the encoder motors are light weighted motors as compared to stepper motors. For driving out
the motors the system we uses the motor driver named TB6612FNG to gain much more stability than L293D which is
not compatible with our project as its resolution was not like what we desired for the robot because we want to gain
much more stability which we can’t get from L293D.
And we use infrared sensor and ultrasonic sensor to identify the object near the robot show that it can avoid, we use
expansion board where the IR sensor is mounted default because it give more accurate value compare to other object
avoiding techniques which use either one of Ultrasonic or IR sensor.
V. CONCLUSION
This paper has presented a design and implements self-balance (SB) robot which can avoid the object. It was
illustrated that the SB robot that is capable of balancing one robot and also avoid the object and can follow the desired
trajectory is realized. This was done using Arduino, and other off-the- shelves parts to make it affordable, easier for
maintenance and improvement. This robots can make a balanced and controlled body in the first part and after making
can avoid the object in three direction. The controller was planned and created progressively. The significance of
controlling the balance and avoid the obstacles and gains to the exhibition of the controller has been demonstrated
tentatively.
REFERENCES
[1]. Iulian Matesica, Mihai Nicolae, Liliana Barbulescu, Ana-Maria Margeruseanu, “Self-balancing robot
implementing the inverted pendulum concept,” in 15th RoEduNet Conference: Networking in Education and
Research, Bucharest, Romania, 2016.
[2]. Arduino. (2015). Arduino Software (IDE). (Arduino) Retrieved December 27, 2015, from
https://www.arduino.cc/en/Guide/Environmen
[3]. Ahasan, M. A., Hossain, S. A., Siddiquee, A. U., & Rahman M.M(2012). Obstacle invariant Navigation of An
Autonomous Robot based on GPS. Khulna University
[4]. Shahdib, F., Ullah, M. W., Hasan, M. K., & Mahmud, H. (2013). Obstacle Detection and Object Size
Measurement for Autonomous Mobile Robot using Sensor. International Journal of Computer Applications.
[5]. Github.com
[6]. Android Studio.IDE/application for creating mobile app
[7]. CAD /for models
[8]. MAT LAB