Sie sind auf Seite 1von 12

PROJECT REPORT

ON

TWO WHEELED AUTONOMOUS BALANCING ROBOT

SUBMITTED BY

NAME IDENTITY NO. SEAT NO.

1. Aditya Mehta EM2006036

2. Quresh Sutarwala EM2006064

DEPARTMENT OF

ELECTRONICS ENGINEERING

Year 2009-2010

Shri Vile Parle Kelvani Mandal’s

Dwarkadas J. Sanghvi College of Engineering


Plot no. U-15, Bhaktivedanta Swami Marg,

Vile Parle, Mumbai - 400056


Shri Vile Parle Kalvani Mandal’s

Dwarkadas J. Sanghvi College of Engineering


Plot no. U-15, JVPD Scheme, Bhaktivedanta Swami Marg,

Vile Parle (W), Mumbai – 400 056

Department of Electronics Engineering


This is to certify that the Project report entitled

“TWO WHEELED AUTONOMOUS BALANCING ROBOT”


Submitted by:

1. Aditya Mehta

2. Quresh Sutarwala
Students of Electronics Engineering have successfully completed their Project – A required for the
fulfillment of SEM VII as per the norms prescribed by the University of Mumbai during the second half
of the year 2009. The project report has been assessed and found to be satisfactory.

_______________ _______________

Internal Guide External Guide

_______________ _______________

Head of Department Principal

_______________

Internal Examiner
TABLE OF CONTENTS

1. INTRODUCTION
1.1 MOTIVATION
1.2 PROBLEM STATEMENT
2. THEORY
2.1 BLOCK DIAGRAM
2.2 WORKING PRINCIPLE
2.3 OVERVIEW OF BLOCK DIAGRAM
2.3.1 MICROCONTROLLER

2.3.2 INERTIAL MEASURMENT UNIT

2.3.3 MOTOR DRIVER IC

2.3.4 MOTORS

3. SOFTWARE IMPLEMENTATION
4. WORK TO BE COMPLETED IN VIII SEMESTER
5. LITRETURE SURVEY
6. REFERENCES
1. INTRODUCTION

The aim of the project is to build a two wheeled autonomous balancing robot. This
robot will serve as a test bench to test various control algorithms for their
efficiency. The research on two wheeled robots has gained momentum over the
past decade. It is based on the inverted pendulum model. It needs a good control
algorithm to hold itself in an upright position. A number of different algorithms
can be used, which include Linear Quadratic Regulator, Proportional Integral
Derivative and Fuzzy Logic.

The robot being an under-actuated system is inherently unstable and thus


considerable effort will be required in order to design a successful control
algorithm. Several different aspects must be considered while building the robot.
The centre of gravity must be sufficiently high so as to provide the necessary
sensitivity. The choice of tilt sensors is also critical to the design of the robot.
Another important aspect is the choice of microcontroller. It must have the
required peripherals and must be able to respond as quickly as required.

Through my project I intend to explore and exhibit the numerous features of the
AVR microcontroller. These features include interfacing the microcontroller to
sensors and actuators. Additionally I am interested in studying the PID controller,
in particular its application in balancing the robot. I would also like to develop a
control algorithm which would enable the robot to balance on a flat or sloping
terrain.
2. THEORY

2.1 Working Principle

The two wheeled autonomous balancing robot is based on the inverted pendulum
model. An inverted pendulum is an under actuated system. An under actuated
system is one in which. In order to balance the robot the motors must rotate in the
direction of the tilt. The balancing of the robot is achieved using feedback control.
The speed and direction of the motors is varied in accordance with the angle and
direction of tilt so as to ensure that the robot stays upright. Additionally feedback
from the shaft encoders will ensure that both the motors rotate at the same speed.
2.2 Block Diagram
2.3 Overview of Block Diagram

2.3.1 Microcontroller

The microcontroller used is the Atmel Atmega32. It is an 8-bit microcontroller. It


is based on the RISC architecture. It has a reduced instruction set thus allowing all
instructions to be executed in one clock cycle. It also has a large number of
peripherals and is thus able to provide the required functionality. It has a fast PWM
mode which can be used to control motor speed. The analog to digital converter is
used to convert the analog input from the accelerometer into its corresponding
digital value. It has 4 I/O ports which can be used to interface a number of
hardware devices with the controller. It serves as the brain of the robot and is use
to implement the PID control algorithm. The code for the microcontroller is written
in C language.
2.3.2 Inertial Measurement Unit

The inertial measurement unit (IMU) consists of accelerometer and a gyroscope.


The gyroscope is used to measure instantaneous value of tilt. It provides the rate of
tilt which is integrated to obtain the angle of tilt. It is mounted on the top of the
robot to provide maximum sensitivity. The IMU provide voltages which
correspond to the angle of tilt. These analog values are then converted into their
equivalent digital values by the ADC of the microcontroller.
2.3.3 Motor Driver IC

The motor driver IC used is the L293D. It is based on the H-bridge architecture. It
can be used to control up to 2 DC motors at a time. The robot uses 2 L293D IC’s.

2.3.4 Motors

The robot has 2 110RPM DC motor which has been geared down to ___RPM. The
motors are mounted on the base of the robot. The shaft encoders mounted on the
motors are used to control motor speed and ensure that both the motors operate at
exactly the same speed.
3. SOFTWARE IMPLEMENTATION

The programming of the robot requires writing a code to control the speed of the
servo motors. The analog values obtained from the IMU must be filtered and
converted into digital form using the ADC converter of the microcontroller. The
PID control algorithm must be implemented. The PID constants must be
calculated. The system must be simulated, after which the algorithm can be tested
on the actual rob

4. WORK TO BE CARRIED OUT IN VIII SEMESTER

4.1 Implementation of PID control

A model of the robot will be made, which will be used to simulate the system.
Using the simulation the tuning of the PID controller will be carried out so as to
calculate the required constants. The program code to implement the PID
algorithm will be written. The code will be written in C language and loaded onto
the microcontroller. The code will process the values obtained from the IMU and
give the corresponding output to the motors.

4.2 Hardware

The circuit will be designed and built. It will include the microcontroller and
related circuitry. It will also include the motor drivers. The IMU unit will be
calibrated so as to obtain accurate readings. It will be interfaced with the ADC
ports of the microcontroller.

4.3 Actuators

The shaft encoders will be mounted on the motors. The shaft encoders will be
interfaced to the microcontroller and calibrated to provide accurate readings.

Das könnte Ihnen auch gefallen