Professional Documents
Culture Documents
Acwir
Acwir
INSTITUTE OF ENGINEERING
THAPATHALI CAMPUS
Kathmandu, Nepal
PREPARED BY:
Sagar Maharjan (069/BEX/325)
Subash Thakuri (069/BEX/340)
Sushil Thapa (069/BEX/344)
SUBMITTED TO:
Department of Electronics and Computer Engineering
DATE: November, 2015
COPYRIGHT
The author has agreed that the library, Department of Electronics Engineering,
Thapathali Engineering Campus, may take this report freely available for inspection.
Moreover, the author has agreed that permission for extensive copying of this project
report for scholar purpose may be granted by the supervisors who supervised the work
recorded herein or, in their absence, by the head of the department wherein this project
report was done. It is understood that the recognition will be given to the author of this
report and to the Department of Electronics, Thapathali Engineering Campus in any
use of material of this project report. Copying or publication or other use of this report
for financial gain without approval of Department of Electronics Engineering,
Thapathali Engineering Campus and authors written approval is prohibited.
Request for permission to copy or to make any other use of this material in this report
is whole or in part should be addressed to:
Department of electronics and computer
Thapathali Engineering Campus
Thapathali, Kathmandu
Head
Department of Electronics Engineering
Thapathali Engineering Campus
Thapathali, Kathmandu
ACKNOWLEDGEMENT
The project entitled "Accelerometer Controlled Wireless Robot (ACWIR) is our
attempt towards implementing the engineering concepts gained during our
institutional life. This report has been prepared as the exposition of the fundamental
works performed during the project period.
We would like to express our sincere thanks to the Department of Electronics and
Computer Engineering for providing us the opportunity to explore our interest and
ideas in the field of engineering through this project.
We cannot stay away from acknowledging the helps, suggestions, and inspiration of
our respected teachers and friends and extend our heartfelt gratitude to everyone for
his/her support and encouragement which has inspired us for this project.
We are also obliged to our project Coordinator Mr. Umesh Timalsina, for incenting
us to strive towards our aim and by providing us with the necessary materials and
helping.
ii
ABSTRACT
Today, Electronic devices are becoming more pervasive and much more compatible
with physical world . The interaction with electronic devices and controlling them is
more than just with mouse and keyboard. Each day, with introduction of new
technologies the ease of access of human life has increased a lot.
In this minor project report, we present smart phones augmented innovative robotic
system. We propose a smart phone accelerometer controlled differential steering
algorithm and implement it on a two motor driven robotic vehicle with real time
rendering. In the system design, we create self-validating protocols that build upon
our Bluetooth communication network. The proposed system can be used in robotic
remote control, autonomy, robotic localization and human- robot. Here, android smart
phone is used as a remote control for operating the robot. The controlling device of
the whole system is AVR microcontroller. Bluetooth module, DC motors are
interfaced to the microcontroller. The data received by the Bluetooth module from
android smart phone is fed as an input to the controller. The controller acts accordingly
on the DC motors of the robot. In achieving the task, the controller is loaded with a
,
program written using embedded c language.
In summary, Our Android phone controlled robot using Bluetooth analyses the motion
technology to capture gestures through android smart phone with an inbuilt
accelerometer and Bluetooth module to regulate the kinetics of a robotic machine.
iii
Table of Contents
C O P Y R I G H T ........................................................................................................ i
A C K N O W L E D G E M E N T ................................................................................ ii
I N T R O D U C T I O N .......................................................................................... 1
1.1 BACKGROUND ............................................................................................... 1
1.2 OBJECTIVES .................................................................................................... 2
1 . 3 L I T E R A T U R E R E V I E W ........................................................................ 3
2. IMPLEMENTATION .............................................................................................. 4
2.1 BLOCK DIAGRAM .......................................................................................... 4
2.2 FLOWCHART................................................................................................... 5
3. METHODOLOGY .................................................................................................. 6
4. HARDWARE DECSRIPTION ............................................................................... 8
4.1 Electronic components:...................................................................................... 8
4.2 Integreted circuits: .......................................................................................... 13
4.3 Module components:....................................................................................... 16
4.4 Electromechanical component: ...................................................................... 17
5. SOFTWARE DESCRIPTION ............................................................................... 18
5.1 AVR Studio 6.1............................................................................................... 18
5.2 Proteus 8 Professional ..................................................................................... 19
5.3 PROGISP ........................................................................................................ 19
5.4 Android studio ................................................................................................. 20
6. EVALUATION .................................................................................................... 26
7. PROBLEMS FACED ........................................................................................... 27
8. FUTURE ENHANCEMENT ............................................................................... 28
9 . P R O J E C T S C H E D U L E ............................................................................. 29
10. PROJECT SCOPE .............................................................................................. 30
11. Result Analysis .................................................................................................... 30
12. CONCLUSION ................................................................................................... 32
13. REFERENCES ................................................................................................... 33
iv
INTRODUCTION
1.1 BACKGROUND
Research on robots has gone on for several decades. Despite dissimilar appearances, robots
all share a common mechanical and movable structure under their distinct phases of control:
perception, processing and action. A robot uses sensors to perceive the environment. Some
robots tend to have controllers with limited computational power and small amount of
memory. With the growing invention of transistors, ICs, computer industry added brains to
the brawn of already existing machines.
Bluetooth technology was created by Telkom vendor device is able to communicate with
up to seven Bluetooth modules at same time through one link whose normal working area
is within few meters. The basic function of Bluetooth serial module is replacing the serial
port line by connecting one to Bluetooth master device and another to slave device. Today,
robots are enjoying resurgence. As computer processors are getting faster and inexpensive,
robots can afford to get smarter. Most of the robots are designed for specific task but our
motive is to build a flexible robot.
Before the dawn of smartphones, one of the few hardware components applications could
interact with was the keyboard. But times have changed and interacting with hardware
components is becoming more and more common. Using gestures and accelerometers often
feels more natural than interacting with a user interface through mouse and keyboard. This
is especially true for easily available touch devices, such as smartphones and tablets. I find
that proper utilization of the sensors and gyroscopes can bring an Android application to
life, making it more interesting, efficient and exciting for the user. Android is a software
stack for mobile devices that includes an operating system and key applications. Android
applications provide access to a wide range of useful libraries and tools that can be used to
build rich applications. Android also includes a full set of tools that provide developers with
high productivity and deep insight into their applications. Bluetooth is a technology with an
open standard specification for a radio frequency (RF) based short range connectivity
technology that changes the face of computing and wireless communication. The data
received by the Bluetooth module from android smart phone is fed as input to the controller.
Thereby, the controller acts accordingly on the DC motors to move in the entire robot in all
the four directions using the android phone.
.
1.2 OBJECTIVES
2. IMPLEMENTATION
2.1 BLOCK DIAGRAM
Bluetooth Module
Microcontroller
DC power Supply
Motor Driver
DC Motor
2.2 FLOWCHART
Start
Turn on Robot
Open App
Robot found?
Yes
Connect to Robot
Enable tilt
Manipulate motors
Finished?
Yes
Stop
No
3. METHODOLOGY
Like other project, this project also includes several units that works in coordination with
one another to give the functionality of the total program engine. So these several units are
divided among individuals of the group. The coding will be done in ATMEL studio for
ATmega16 microcontroller and in Android Studio for android application which will
provide GUI interfacing to our project. The hardware design and simulation will be done in
Proteus. After one completes a unit, it is given to other members to check if that unit works
correctly and according to the requirement.
Actually we have designed our project in three different phases. Mainly we have Pre-Project
Phase, Project development phase, Post project phase. Lets elaborate the phases in some
depth.
3.1 Pre-Project Phase
Basically the phase before we actually code the project and design hardware is the pre
phase. It basically includes System information modeling and requirement analysis
(feasibility analysis). We have selected "ACWIR" as our project. We became familiar with
all the required software libraries as well as hardware designing and interfacing. First we
became familiar with Android Studio, Proteus and ATMEL studio. Then studied embedded
C programming, wireless communication and android application development. We gained
further other Software and hardware knowledge if necessary.
3.2 Project Development Phase
After the analysis of the requirement we needed to design over all architecture of the project,
System Analysis and Design. Although we present a simple flow chart of the project in this
proposal, we should design the complete flow chart. Along with that we will make our
algorithm for the implementation. First we designed and built the hardware then GUI and
hardware interfacing programs. Then we integrated the GUI and interfacing programs with
hardware to complete the project.
In summarized form, our project development phase includes:
5.2.1 Software Procedure
1. Design and simulation of circuit in Proteus
Proteus is software built for making and testing electronic circuits. The circuit
needed for our project is to be build and simulated in Proteus.
2. Developing android app as remote control
The main aim of developing android app is to make a remote for the robot. The
android app has developed with Android Studio (software). The app connects
Bluetooth module used in the circuit.
3. Programming microcontroller in embedded C language
The system needs a controller to control all the activities and this project will be
using ATmega16 microcontroller as a controller. The controller is programmed with
embedded c to interface and control all the various units connected to it
5.2.2Hardware Procedure
1. Soldering of components in PCB
The components needed to build this project should be functional. So the
components are soldered in a PCB board. The components are connected according
to the design of the circuit built in Proteus.
3.3 Post Development Phase
When the Project is completed then it will be tested among different people to collect
feedback to make this project more efficient and useful.
4. HARDWARE DECSRIPTION
4.1 Electronic components:
Voltage regulator:
7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed
linear voltage regulator ICs. The voltage regulator IC maintains the output voltage
at a constant value. 7805 provides +5V regulated power supply. Capacitors of
suitable values can be connected at input and output pins depending upon the
respective voltage levels.
Pin
no.
1
2
3
function
Name
Input
voltage
(5V-18V)
Ground (0V)
Regulated
output;
5V
(4.8V-5.2V)
Input
GND
output
DPDT
DPDT stands for double pole double throw. It is equivalent to two SPDT switches
controlled by a single mechanism. It has sis terminals.
Crystal oscillator
A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of
a vibrating crystal of piezoelectric material to create an electrical signal with a very precise
frequency. This frequency is commonly used to keep track of time (as in quartz
wristwatches), to provide a stable clock signal for digitalintegrated circuits, and to stabilize
frequencies for radio transmitters and receivers. The most common type of piezoelectric
resonator used is the quartz crystal, so oscillator circuits designed around them became
known as "crystal oscillators."
Quartz crystals are manufactured for frequencies from a few tens of kilohertz to tens of
megahertz. More than two billion (2109) crystals are manufactured annually. Most are
small devices for consumer devices such as wristwatches, clocks, radios, computers, and
cell phones. Quartz crystals are also found inside test and measurement equipment, such as
counters, signal generators, and oscilloscopes.
10
Resistor
Resistor is a passive component used to control current in a circuit. Its resistance is given
by the ratio of voltage applied across its terminals to the current passing through it. Thus a
particular value of resistor, for fixed voltage, limits the current through it. They are so
present in electronic circuits.
The different value of resistances are used to limit the currents or get the desired voltage
drop according to the current-voltage rating of the device to be connected in the circuit. For
example, if an LED of rating 2.3V and 6mA is to be connected with a supply of 5V, a
voltage drop of 2.7V (5V-2.3V) and limiting current of 6mA is required. This can be
achieved by providing a resistor of 450 connected in series with the LED.
11
Capacitor
Just like the Resistor, the Capacitor, sometimes referred to as a Condenser, is a passive
device, and one which stores its energy in the form of an electrostatic field producing a
potential difference (Static Voltage) across its plates. In its basic form a capacitor consists
of two or more parallel conductive (metal) plates that do not touch or are connected but are
electrically separated either by air or by some form of insulating material such as paper,
mica or ceramic called the dielectric. The conductive plates of a capacitor can be either
square or circular or rectangular or be of a cylindrical or spherical shape with the shape and
construction of a parallel plate capacitor depending on its application and voltage rating.
When used in a direct-current or DC circuit, a capacitor blocks the flow of current through
it, but when it is connected to an alternating-current or AC circuit, the current appears to
pass straight through it with little or no resistance. If a DC voltage is applied to the
capacitors conductive plates, current flows charging up the plates with electrons giving one
plate a positive charge and the other plate an equal and opposite negative charge. This flow
of electrons to the plates is known as the Charging Current and continues to flow until the
voltage across both plates (and hence the capacitor) is equal to the applied voltage VCC. At
this point the capacitor is said to be fully charged with electrons with the strength of this
charging current at its maximum when the plates are fully discharged and slowly reduces
in value to zero as the plates charge up to potential difference equal to the applied supply
voltage.
12
13
14
15
The module works at the baud rate of 9600bauds.It has four pins:
1. VCC: The module works on 3.7 to 6 volt supply. Internal voltage regulator is
implied on the module. For this project a 5 volt regulated supply is given.
2. Ground : Ground from power is connected here
3. TxD: This is a CMOS logic Transmit Data pin. The logic level is 3.3 volt so this
logic level is converted to TTL (5V) using logic level converter described later. The
data received from another device is transferred through this pin at baud of 9600.
4. RxD: This is a CMOS logic Receive Data pin. The logic level in this pin is also 3.3
volt so this logic level is converted to TTL (5V) using logic level converter. The
data to be sent over Bluetooth is received through this pin. The data should be sent
from microcontroller at the baud rate of 9600 bauds.
16
Controlling DC motor: First basic step to control dc motor is to control its direction using
DPDT Switch in such a way that polarity of motor gets changed when we change the
position of switch
17
5. SOFTWARE DESCRIPTION
5.1 AVR Studio 6.1
AVR studio 6.1 is a software development environment developed by Atmel. It provides a
single development platform for Atmels 8-bits, 32-bits, and ARM cortex-M families of
AVR microcontrollers.
Features of AVR studio 6.1
It is a full software development environment with an editor, simulator,
programmer, etc.
It comes with its own integrated C compiler the AVR GNU C Compiler (GCC) such
that we dont need a third party C compiler.
It provides a single environment to develop programs for both the 8-bits, 32-bits and
ARM Cortex-M AVR series of microcontrollers.
It also integrates fully Qtouch studio.
It provides support for several programmers including STK500, AVR Dragon, etc.
18
5.3 PROGISP
Progisp is a software to burn and load Hex file into the microcontroller . we can edit the file
and interchange the fuse bits. Also we can change the internal and external crystal
(frequency source) of the target chip.
19
20
22
23
24
25
6. EVALUATION
This project can be evaluated on the basis of its performance in real world activities .After
the completion of this project, we can make the system be used by certain groups of people
like navigators, handicapped people, wildlife, researchers, etc. Their valuable suggestions
can be taken as effective way of improvement for the project. The purpose of evaluation is
to find the effectiveness of using these types of system.
Existing problems can be sorted after improvement in the system so that the system
functions properly. Different sorts of data like degree of correctness in navigation, level of
control of the system, difficulties and usefulness in handling the system by handicapped
people etc will be collected through survey among system users. The problems occurring
will be solved as soon as possible with the help of expert analysis.
The system will be made available through advertisement in online sites. If the demand
grows, the system could be produced and supplied at large quantities with help of sponsors.
26
7. PROBLEMS FACED
During our project completion. Various problems were faced in the real time. Some were
easily solved whereas some required extensive study and research.
Designing circuit and programming was tedious and time consuming.
The vibration of the robot frame sometimes caused system to work inefficiently.
Difficulty in getting required parts and components
Short Bluetooth range
Need smartphones for using the system
Works on dc power supply only
27
8. FUTURE ENHANCEMENT
28
9.PROJECT SCHEDULE
Weeks
29 11
30
31
12. CONCLUSION
This research is still in early age of development. Still, it has already proven to succeed in several
of its goals. The android smart phone can develop effectively remote control program. The use of
efficient Accelerometer also enhances its application widely. At the same time, this program uses
Bluetooth connection to communicate with the robot. It has proven to allow for meaningful two
way communication between the android phone and the robot which would allow non-expert to
interact with and adjust the functionality of a system which uses ATmega16 controller, a single
board microcontroller to make the application of interactive objects or environments more
accessible.
The existing robots are whole operated with the help of remote control. This operation is
sometimes tedious, less efficient and has no guarantee for its security. The existing system consists
of trade-off between processing speed, insecure communication and cost. With growing trends,
controllers are developing tremendously. Hence we can make use of advanced controller in
controlling the operation of robot. The proposed project can be built further to work as a
HUMANOID. It can have many uses in practical fields, from teenager's robots to robots working
in industries. This project can be helpful in wars as a part of spying. It can be further improved to
have more decision taking capabilities by employing varied types of sensors and thus could be
used in big industries for different applications.
32
13. REFERENCES
33