Laporan Projek Akhir POLITEKNIK (ELEKTRIK)
Laporan Projek Akhir POLITEKNIK (ELEKTRIK)
Laporan Projek Akhir POLITEKNIK (ELEKTRIK)
DEPARTMENTDIPLOMA OF ELECTRICAL
ENGINEERING
07DET12S1002
07DET12S1006
07DET12S1003
Supervised by :
Mr Chin Ken Leong
NAME
REGISTER NUMBER
1.
2.
3.
NAME
REGISTER
NUMBER
1.
07DET12S1002
2.
07DET12S1006
3.
07DET12S100
Revised
Supervisor Name
Supervisor Signature :
Date
Certified by
Coordinator name
Coordinator signature
Date
"We attribute this work is the result of our own work except excerpts which we have
explained each source."
1.
2.
3.
Signature
Name
Register Number
Date
:
:
:
:
Signature
Name
Register Number
Date
:
:
:
:
Signature
Name
Register Number
Date
:
:
:
:
ACKNOWLEDGEMENTS
Alhamdulillah pray to Allah because favor and grace from Allah, finally got our
complete the full report as well as on electrical engineering projects. In preparing this
report, too many trials and challenges our task ahead, but had all of that we made as a
lesson and experience is quite valuable because tired tired we finally pays off when
the report was finally successfully completed perfectly and successfully. Gratitude
of thanks to our supervisor Mr Chin Ken Leong because helped us in all respect
especially when we almost lost enthusiasm because of the stalemate to figure out a
proper way to solve the problem in the face. In addition, the acknowledgement to all
the lecturers Kota Kinabalu Polytechnic as contribute guidance to us about this study.
This speech is intended to. This speech was addressed to both our parents because a
lot of support and help us financially, spirit and moral. Do not forget also to the Pitas
District Education Office, Sandakan Fire Department, prison Department Kepayan
and classmates and those involved directly and indirectly in helping us complete this
report successfully. Wassalam.
ABSTRACT
A robot is an electro-mechanical device that can perform autonomous or
preprogrammed tasks. A robot may act under the direct control of a human (eg. the
robotic arm of the space shuttle) or autonomously under the control of a programmed
computer. Robots may be used to perform tasks that are too dangerous or difficult for
humans to implement directly (e.g. nuclear waste clean up) or may be used to
automate repetitive tasks that can be performed with more precision by a robot than
by the employment of a human (e.g. automobile production.)
This project aims at designing a robot, which has freedom of movement along
all the 3 axes and its motion is controlled by means of wheels. The user can control
the movements using a Cellphone from a remote place. The system is made more
useful by introducing artificial intelligence to it. By artificial intelligence, we mean
designing the robot is such a manner that in situation which require decision making,
the robot identifies the presence of the obstacle, alerts the user and moreover awaits
instruction from the user for the further action. Other condition, which the robot can
determine, is presence of fire. I.e., high temperature and presence of metals in
vicinity.
Contents
Chapter
Case
Page
Page Title
iii
Students Certificate
iv
Acknowledge
Abstract
vi
Contents
vii
List of Tables
viii
List of Figures
xii
List of Photos
xiii
INTRODUCTION
1.1
Introduction
1.1.1
Introduction of Robot
1.2
Problem Found
1.3
Objective
1.4
Scope Research
LITERATURE REVIEW
2.1
Introduction
2.2
MPLSB IDE
10
2.3
10
2.4
10
2.5
Bluetooth module
11
2.6
Integrated L293B
12
2.7
Microcontroller
13
METHODOLOGY
3.1
Introduction
19
3.1.1
3.2
20
3.3
Phase 1
21
3.4
Phase 2
23
3.5
Phase 3
24
3.6
Phase 4
25
FINDING
4.1
42
4.2
47
4.3
51
DISCUSSION
5.1
54
5.2
57
5.3
58
CONCLUSION
6.1
60
6.2
61
REFERENCE
ATTACHMENT A
ATTACHMENT B
ATTACHMENT C
65
LIST OF TABLES
NO TABLES
TABLES
PAGES
3.1
29
4.1
43
4.2
45
4.3
47
4.4
49
5.1
57
LIST OF FIGURES
NO OF FIGURE
TITLE
PAGE
3.1
22
4.1
44
5.1
56
6.1
56
LIST OF PHOTOS
No.Photo
Title
Pages
2.1
13
2.2
13
2.3
14
2.4
14
2.5
15
3.1
27
3.2
28
3.3
36
3.9
33
3.10
32
3.11
35
3.12
36
3.13
39
3.14
39
4.1
52
4.2
52
TITLE
A
B
C
Provided by :
Saniy Bin Haji
Ahmad
CHAPTER 1
INTRODUCTION
1.1
Introduction
Robotics is the branch of technology that deals with the design, construction,
operation, and application of robots, as well as computer systems for their control,
sensory feedback, and information processing. These technologies deal with
automated machines that can take the place of humans in dangerous environments or
manufacturing processes, or resemble humans in appearance, behavior, and/or
cognition. Many of today's robots are inspired by nature contributing to the field of
bio-inspired robotics.
Photo 1.1
The concept of creating machines that can operate autonomously dates back to
classical times, but research into the functionality and potential uses of robots did not
grow substantially until the 20th century. Throughout history, robotics has been often
seen to mimic human behavior, and often manage tasks in a similar fashion. Today,
robotics is a rapidly growing field, as technological advances continue, research,
design, and building new robots serve various practical purposes, whether
domestically, commercially, or militarily. Many robots do jobs that are hazardous to
people such as defusing bombs, mines and exploring shipwrecks
1.2
1.2.1
Introduction Of Robot
As strange as it might seem, there really is no standard definition for a robot.
However, there are some essential characteristics that a robot must have and this
might help you to decide what is and what is not a robot. It will also help you to
decide what features you will need to build into a machine before it can count as a
robot.
1.2.2
1.2.2.1 Sensing First of all your robot would have to be able to sense its surroundings. It
would do this in ways that are not unsimilar to the way that you sense your
surroundings. Giving your robot sensors: light sensors (eyes), touch and pressure
sensors (hands), chemical sensors (nose), hearing and sonar sensors (ears), and taste
sensors (tongue) will give your robot awareness of its environment.
1.2.2.2 Movement A robot needs to be able to move around its environment. Whether
rolling on wheels, walking on legs or propelling by thrusters a robot needs to be able
to move. To count as a robot either the whole robot moves, like the Sojourner or just
parts of the robot moves, like the Canada Arm.
1.2.2.3 Energy A robot needs to be able to power itself. A robot might be solar powered,
electrically powered, battery powered. The way your robot gets its energy will
depend on what your robot needs to do.
1.2.2.4 Intelligence A robot needs some kind of "smarts." This is where programming
enters the pictures. A programmer is the person who gives the robot its 'smarts.' The
robot will have to have some way to receive the program so that it knows what it is
to do.
I.3.2
First application is using Dual Tone Multiple Frequency (DTMF) Using two
mobile phones for effective transmission and reception by DTMF. The problem using
this application is cannot using PIC18F4550 . It can only used PIC16F and PIC24F.
I.3.3
I.3.4
Third application is using Bluetooth robot there was install at smart phone and
controlled PIC 18F4550 by bluetooth through integrated L923B . This application
give us full of data except full circuit diagram from proteus. Given just a picture of
components that installed at PCB layout and has a label at all of the component. This
application is very suitable but the problem is full data from Bluetooth Robot website
that has been downloaded dont give the circuit diagram from proteus. But the
picture PCB layout and all of the component included and we can redraw based on
picture PCB layout given with support and guide from supervisor.
1.4 Objective
The objective of our project is to control the robot by mobile phone. In this project,
the robot is controlled by a mobile phone that makes a call to the mobile phone
attached to the robot. In the course of a call, if any button is pressed, a tone
corresponding to the button pressed is heard at the other end of the call. This tone is
called dual-tone multiple frequency (DTMF) tone. The robot perceives this DTMF
tone with the help of the phone stacked in the robot. The received tone is processed
by the ATmega16 microcontroller with the help of DTMF decoder MT8870. The
decoder decodes the DTMF tone into its equivalent binary digit and this binary
number is sent to the microcontroller. The microcontroller is pre programmed to take
a decision for any given input and outputs its decision to motor drivers in order to
drive the motors for forward or backward motion or a turn. The mobile that makes a
call to the mobile phone stacked in the robot acts as a remote. So this simple robotic
project does not require the construction of receiver and transmitter units. DTMF
signaling is used for telephone signaling over the line in the voice-frequency band to
the call switching centre. The version of DTMF used for telephone tone dialing is
known as Touch-Tone. DTMF assigns a specific frequency (consisting of two
separate tones) to each key so that it can easily be identified by the electronic circuit.
The signal generated by the DTMF encoder is a direct algebraic summation, in real
time, of the amplitudes of two sine (cosine) waves of different frequencies, i.e.,
pressing 5 will send a tone made by adding 1336 Hz and 770 Hz to the other end of
the mobile phone.
1.5 Scope Research
Scope research in this project is including all of literature review is as follows :
Input Device
Input Interface
Output Interface
Output Device
CHAPTER 2
LITERATURE REVIEW
2.1.1
of
ships
starting
in
1910.
Soviet Red
Army used
remotely
controlled teletanks during 1930s in the Winter War and early stage of World War II.
There were also remotely controlled cutters and experimental remotely controlled
planes in the Red Army.
Remote control vehicles are used in law enforcement and military engagements for
some of the same reasons. The exposure to hazards are mitigated to the person who
operates the vehicle from a location of relative safety. Remote controlled vehicles are
used by many police department bomb-squads to defuse or detonate explosives.
See Dragon Runner,Military robot.
Unmanned Aerial Vehicles (UAVs) have undergone a dramatic evolution in
capability in the past decade. Early UAV's were capable of reconnaissance missions
alone and then only with a limited range. Current UAV's can hover around possible
targets until they are positively identified before releasing their payload of weaponry.
Backpack
sized
UAV's
will
provide
ground
troops
with
over
the
2.1.2
2.2
FIRMWARE TOOLS
The following device programming software are sufficient and effective tools for
PIC firmware implementation. These will be briefly explained in the subsections.
2.2.1
MPLAB IDE
2.2.1.1
compiling options and debugging interfaces hence provides a flexible and structural
development environment for the programmer. It can on run on Windows platform
as a 32-bit application. The environment is simply a notepad application which is
assisted by supplementary features. The tool is freely provided by Microchip and its
final release can be downloaded from: www.microchip.com (can be found at the
design section of the page). Previous versions can be found at the archive page:
http://www.microchip.com/stellent/idcplg?
IdcService=SS_GET_PAGE&nodeId=1406&dDoc Name=en023073 .
2.2.1.2
Here, the installation of the version 8.43 of MPLAB will be explained. The
installation procedure can differ according to the final release of the tool. Therefore,
consult the relevant documents before installing the final versions.
I)
Download
the
MPLAB
8.43
from
the
webpage1:
http://www.microchip.com/stellent/idcplg?
IdcService=SS_GET_PAGE&nodeId=1406&dDoc
Name=en019469&part=SW007002
II)
III)
If there is a previous installation of the software (older than 8.43), remove it prior to
installation.
IV)
If the pages are updated, you can find the final versions (as well as the previous
releases) of the software tools presented in this document from the relevant sections
of the microchip webpage or archives
V)
In the extracted folder, run setup.exe with an administrative profile and follow the
recommended remarks, accept the license terms, select complete installation etc.
VI)
At this stage, MPLAB will validate your installation which will take about 10-30
minutes depending on how you follow the instructions. If you forgot to remove the
previous installations, the program will first try to uninstall those configurations.
VII)
After a while, the installation program will ask you to install the HI-TECH C
compiler which is the default compiler for PIC10/12/16 microcontrollers to be used
within MPLAB. Select Yes to install the final version of the compiler (9.70 is the
final release of this compiler for now).
Click Next, accept the license agreement, note on the installation directory,
After the installation of MPLAB IDE is complete, you can see the documentation
2.2.1.3 If you have any problems with the installation steps, refer to the
documentations of MPLAB from its webpage. From the webpage, you can
also find useful links on writing codes in C with example applications
documented by MPLAB communities and forums, describing the application
procedures
(hardware
configurations,
compiling
options)
as
well
(http://www.microchip.com/stellent/idcplg?
IdcService=SS_GET_PAGE&nodeId=1408). In this document, only the
procedure
regarding
the
implementation
of
simple
PIC-to-PC
2.2.2
MPLAB C18 compiler is one of the compiling tools for programming PIC18
MCUs. It is supported by MPLAB IDE as a compiler; hence very little effort is
needed by the programmer to compile the source code. There are also other C
compiler tools of MPLAB for programming 16 and 32 bit PIC microcontrollers
(PIC24 and PIC32). However, only the C18 compiler is considered in this tutorial as
it is the primary tool for programming the most commonly used PIC18 devices in the
market (PIC18F4550, PIC18F2550, PIC18F4450 etc.).
The tool was known as MPLAB C18 Compiler Student Edition and was able to
support code optimizations for 60 days. Lately, it was upgraded to separate final
(free) releases in which the code optimizations are limited for academic use. Free
versions of the C18 compiler with code optimizations for 60 days are available on
the webpage (Download the standard evaluation version):
DTMF (dual tone multi frequency) is the signal to the phone company that
you generate when you press an ordinary telephone's touch keys. In the
United States and perhaps elsewhere, it's known as "Touchtone" phone
(formerly a registered trademark of AT&T). DTMF has generally replaced
loop disconnect ("pulse") dialling. With DTMF, each key you press on your
phone generates two tones of specific frequencies. So that a voice can't
imitate the tones, one tone is generated from a high-frequency group of tones
and the other from a low frequency group. Here are the signals you send
when you press your Touchtone phone keys:
Digit
1
2
3
4
5
6
7
8
9
0
*
#
Low
High
frequency frequency
697
1209 Hz
697
1336
697
1477
770
1209
770
1336
770
1477
852
1209
852
1336
852
1477
941
1336
941
1209
941
1477
2.4 Infrared (IR) Object Detection Module Circuit Using IR LED and
Photodiode
2.4.1
The IR object detection module is quiet easy to make. This circuit below is a
low cost / low range infrared object detection module that you can easily
make at home using IR sensors. We will use a photodiode and IR LED to
make a simple circuit. IR led looks like a regular LED that you usually see in
Television Remote controls. I found a small kit for infrared IR sensor circuit
and sharing this here. For now I have added a regular LED to glow when
something is detected , you can replace it with a buzzer or something else the
way you wish.
2.4.2
The Main concept is simple , the IR led keeps transmitting IR infrared rays up
to some range (there is a potentiometer also in the design with the help of
which you can alter the range). When some object comes in the IR infrared
range, the IR waves hits the object and comes back at some angle, Photo
diode detects that IR rays and hence works as a sensor.
2.4.3
Requirements
1
1
1
1
11
2.4.4
-IR
PR
1k
220E
6k8
10k
Circuit diagram
LED
(photodiode)
resistance
resistance
resistance
potentiometer
2.4.4
For now in this circuit a LED is glowing as an example , You can use it the
way you wish, You can use it to run some DC motors and make a simple
robot. Or the logic 1 can be used to do complex operation with interface to
some microcontroller for some complex projects.
With the Dwengo Bluetooth module, you can communicate wireless to your
projects. You can build your own cell phone controlled robot or a home
automation system . The Bluetooth module is based on a class 2 HC-06
module and supports Bluetooth v2.0. Thanks to its serial interface (TTL level)
the Bluetooth module is easy to use.
2.4.2
2.4.3
The Dwengo Bluetooth module has four pins: two are used for serial
communication (RXD and TXD), while the other two are used as a power
supply (GND and 5V):
2.4.4
The easiest way to connect the Bluetooth module to your Dwengo board is by
using the breadboard. Connect pins GND and 5V to the - and + lines of the
breadboard. The RXD and TXD pins must be connected to the RC6 and RC7
pins of the Dwengo board:
2.4.5
2.4.6
After connecting the Bluetooth module to your Dwengo board, you can use
the USART module built into the PIC18F4550 to communicate with your
Bluetooth module. The standard configuration is 9600 baud, 8 data bits, 1
stop bit and no parity bit.
2.4.7
Whenever your Bluetooth module (and thus Dwengo board) is active it will
be recognized by your computer. Therefore you need to connect linvor with
your computer. The passphrase is 1234.
2.4.8
To change the properties of the Bluetooth module you can use following AT
codes:
2.5
L293B
DESCRIPTION
The L293B and L293E are quad push-pull drivers capable of delivering output
currents to 1A per channel. Each channel is controlled by a TTL-compatible logic
input and each pair of drivers (a full bridge) is equipped with an inhibit input which
turns off all four transistors. A separate supply in-put is provided for the logic so that
it may be run off a lower voltage to reduce dissipation.
2.5.2
2.5.2.2BLOCK DIAGRAMS
DIP16 - L293B
(*) In the L293 these points are not externally available. They are internally
connected to the ground (substrate). O Pins of L293 () Pins of L293E.
2.5.3
Symbol
Vs
Parameter
Value
Supply Voltage
36
Logic
Supply
Unit
V
Voltage
36
Input Voltage
7
Inhibit Voltage
7
Peak Output Current
V
V
V
ss
Vi
V
inh
(non repetitive t =
Iout
5ms)
Total
Power
Dissipation at TgroundP
tot
pins
= 80C
2.6
Microcontroller
Microcontroller in simple term means a small computer on a single chip. Wiki Its
like an artificial mind for any intelligent devices which is responsible for taking
decisions. [eg your robot needs to take decision, a microcontroller would do that
for us.]
2.6.1
Application of microcontroller
If you have ever wondered what microcontrollers are doing these days then, all kinds
of devices has microcontrollers in it. Microcontroller chip is must for any devices
which measures,stores,controls,calculate or displays information. Automobile
industry is the largest user of microcontrollers. Microcontrollers are used in
consumer products too. LCD/LED display units, Keyboards,Modems, Digital
camcorders,Optical players,Printers and other peripherals are devices where you can
find microcontrollers inside.
2.6.2
Often the term microcontrollers and microprocessor are used interchangeably. But in
many ways microcontrollers differs from microprocessor. The most important would
be its functionality. Other components such as memory or components is needed in
order for a microprocessor to be used.
The very heart of the computer is the microprocessor. But microcontroller is
designed to be all of that in one. All necessary peripherals are already built into it so
no other external components are needed for its application.
Since all the components are already included in the microcontroller hence it makes
it perfect for various applications such as robots , as we are going to use here .
2.6.3
Why microcontroller ?
Photo
2.12 :
Input interface to microcontroller
2.6.4
Cost ?
Microcontroller are relatively cheaper than a microprocessor what you can find
in a typical computer.
2.6.5
Microcontroller can be programmed , and has its own programming language and
compilers. Hence in our robotic applications it is going to serve as a mind which will
be responsible for taking all decisions. All the informations from various sensors will
be served to microcontroller and those informations will be processed according to
the logic we programmed into the microcontroller. Depending upon the capability
there are numerous kinds of microcontroller.
2.6.6
Importance of microcontroller
2.7
UART
bootloading, bluetooth
wireless, make
datalogger,
debug
code,
2.7.1
RS232
RS232 is the old standard and is starting to become obsolete. Few if any laptops even
have RS232 ports (serial ports) today, with USB becoming the new universal
standard for attaching hardware. But since the world has not yet fully swapped over,
you may encounter a need to understand this standard.
Back in the day circuits were noisy, lacking filters and robust algorithms, etc. Wiring
was also poor, meaning signals became weaker as wiring became longer (relates to
resistance of the wire). So to compensate for the signal loss, they used very high
voltages. Since a serial signal is basically a square wave, where the wavelengths
relate to the bit data transmitted, RS232 was standardized as +/-12V. To get both
+12V and -12V, the most common method is to use the MAX232 IC(or ICL232 or
ST232 - different IC's that all do the same thing), accompanied with a few capacitors
and a DB9 connector. But personally, I feel wiring these up is just a pain here is a
schematic if you want to do it yourself (instead of a kit):
EIA232F
Today signal transmission systems are much more robust, meaning a +/-12V signal is
unnecessary. The EIA232F standard (introduced in 1997) is basically the same as the
RS232 standard, but now it can accept a much more reasonable 0V to 5V signal.
Almost all current computers (after 2002) utilize a serial port based on this EIA-232
standard. This is great, because no longer need the annoying MAX232 circuit.
And this is the assembled image. Notice that I added some useful wire
connectorsthat did not come with the kit so that I may easily connect it to the
headers on my microcontroller board. Also notice how two wires are connected to
power/ground, and the other two are for Tx and Rx.
2.7.3
Without going into the details, and without you needing to understand them, all you
really need to do is just buy an adaptor.
For example:
TTL -> TTL to RS232 adaptor -> PC
TTL -> TTL to EIA-232 adaptor -> PC
TTL -> TTL to EIA-232 adaptor -> EIA-232 to USB adaptor -> PC
TTL -> TTL to USB adaptor -> PC
TTL -> TTL to wireless adaptor -> wireless to USB adaptor -> PC
And a close-up of the outputs. connected the ground, Tx, and Rx to wireless
transmitter. I will talk about Tx and Rx soon:
2.7.5
Bit Banging
What if by rare chance your microcontroller does not have a UART (check the
datasheet), or need a second UART but your microcontroller only has one? There is
still another method, called bit banging. To sum it up, send signal directly to a
digital input/output port and manually toggle the port to create the TTL signal. This
method is fairly slow and painful, but it works . .
One solution would be to have both devices share the same clock source, but that just
adds extra wires.All of this is handled automatically by the UART, but if would like
to understand more, continue reading . . .
Asynchronous transmission allows data to be transmitted without the sender having
to send a clock signal to the receiver. Instead, the sender and receiver must agree on
timing parameters in advance and special bits are added to each word which are used
to synchronize the sending and receiving units.
When a word is given to the UART for Asynchronous transmissions, a bit called the
"Start Bit" is added to the beginning of each word that is to be transmitted. The Start
Bit is used to alert the receiver that a word of data is about to be sent, and to force the
clock in the receiver into synchronization with the clock in the transmitter. These two
clocks must be accurate enough to not have the frequency drift by more than 10%
during the transmission of the remaining bits in the word. (This requirement was set
in the days of mechanical teleprinters and is easily met by modern electronic
equipment.)
When data is being transmitted, the sender does not know when the receiver has
'looked' at the value of the bit - the sender only knows when the clock says to begin
transmitting the next bit of the word.
When the entire data word has been sent, the transmitter may add a Parity Bit that the
transmitter generates. The Parity Bit may be used by the receiver to perform simple
error checking. Then at least one Stop Bit is sent by the transmitter.
When the receiver has received all of the bits in the data word, it may check for the
Parity Bits (both sender and receiver must agree on whether a Parity Bit is to be
used), and then the receiver looks for a Stop Bit. If the Stop Bit does not appear when
it is supposed to, the UART considers the entire word to be garbled and will report a
Framing Error to the host processor when the data word is read. The usual cause of a
Framing Error is that the sender and receiver clocks were not running at the same
speed, or that the signal was interrupted.
Regardless of whether the data was received correctly or not, the UART
automatically discards the Start, Parity and Stop bits. If the sender and receiver are
configured identically, these bits are not passed to the host.
If another word is ready for transmission, the Start Bit for the new word can be sent
as soon as the Stop Bit for the previous word has been sent.
In short, asynchronous data is 'self synchronizing'.
The
Loop-Back
Test
The loop-back test is a simple way to verify that your UART is working, as well as to
locate the failure point of your UART communication setup.
For example, suppose you are transmitting a signal from microcontroller UART
through a TTL to USB converter tor laptop and it isn't working. All it takes is one
failure point for the entire system to not work.
The trick is to connect the Rx to the Tx, hence the loop-back test.
Top
waveform:
UART
transmitted
0x0F
Adding
UART
Functions
to
AVR
To add UART functionality (or any AVR based microcontroller) need to make a few
minor modifications to your code and add a small amount of extra hardware.
Full
and
Half
Duplex
Full Duplex is defined by the ability of a UART to simultaneously send and receive
data. Half Duplex is when a device must pause either transmitting or receiving to
perform the other. A Half Duplex UART cannot send and receive data
simultaneously. While most microcontroller UARTs are Full Duplex, most wireless
transceivers are Half Duplex. This is due to the fact that it is difficult to send two
different signals at the same time under the same frequency, resulting in data
collision. If robot is wirelessly transmitting data, in effect it will not be able to
receive commands during that transmission, assuming it is using a Half Duplex
transmitter.
CHAPTER 3
METHODOLOGY
INTRODUCTION:
Almost all the major manufacturing,research and aerospace industries use robots for
various purposes.
Here in this website I will try to provide tutorials for some of the basic robotic
projects that I have created till now. Robotics and microcontroller works side by
side. The decision making part of any robotics components are microprocessor or
microcontroller that act as a brain for the robot.
The vision, sensor, actuator, motors, sensor,power and voltage. All these factors and
components are regulated and processed by a Central processing unit or
Determine Title, Objective, Scope and
Microcontroller (Microprocessor).
Identify problem
PHASE 1
Here Central Processing Unit does not refer to CPU of a traditional computer but the
Unit which governs the activity of an artificial device. All the input from various
sensory units are being sent to the CPU and then it been processed to send control
Literature Review
Here in this website I will try to focus on some basic concepts and simple robotic
selection
projects that you can makeResearch
at home.implementation
If you are a and
beginner
then probably you are at PHASE 2
type of handphone controlled robot.
right place for learning basic tutorials on robotics.I will also provide some basics of
programming on microcontrollers.
Finding through internet. Email
to developer and open website
at Bluetooth Robot application
Install MikroC
Pro For Pic,Flow
learn user
Methodology
Chart
manual, draw schematic diagram by
proteus and simulate/ list component
requirement and equiment to developed
robot .
Install the
application
Bluetooth robot to
smartphone.
Data Analysis
FASA 3
FASA 4
PHASE 2
Research Implementation
During this research to find the answer and understand all of literature review we are
realized the if we are using Cell Phone communicate with microcontroller by DTMF
the PIC it just PIC16F and PIC 24F only could be function with DTMF.
Then we are also realized if we are using Arduino we cannot used PIC18F4550 to
communicate with arduino, and then , Arduino need high cost to developed the
hardware even their have many applications to use Handphone Controlled Robot.
After that, we try to find some application can be interaction with PIC18f4550 in
smart phone. Then, we just found one application named Bluetooth Robot and the
description about the application that its can commnunicate to PIC18F4550 with
integrated L293B. The Bluetooth Robot application has been install to smart phone
and we are tried find the full of data to developed the robot. We has tried to email to
developer (Jose Garcia) and the we are found the website and there have the full of
data that we need.
PHASE 3
Data Analysis
After the full of data to develope Bluetooth robot has been download. We are found
the software MicroC Pro for PIC C language by mikroelektronika and we just
install it to open the source code in C language guiding by user manual mikroC .
interface. The picture and label for all of component included in the document.
Through the data given, we can draw the circuit diagram , then simulate with support
and guide from our supervisor.
PHASE 4
Install the equipment and circuit component
Then, simulation of circuit diagram in proteus was success, we used the list of
component and equipment that required and bought at electronic shop or by
online website. After that, we can install the component and create a robot using two
DC motor and programming the PIC18F4550 by MicroC Pro for PIC. Finally we
can test the robot has function or not by using application in smartphone (Bluetooth
Robot).
PIC18F
here
in
this
tutorial
series
we
are
going
to
learn
some
examples with explanation with each chapter of the tutorials that I am going to
show.
This
tutorial
is
compiled
pic18f
microcontrollers, who
wish to learn
microcontroller
coding
in
Hardware C. We are also going to see the software tools, understand Microcontroller
pin diagram, Ports and its relevance, Programming and relevant data sheet of the
microcontroller, and I will also explain where and what to look for in a datasheet, as
it can be confusing for beginner. Please do to complain if you find the tutorial a bit
lengthy, but shortcuts are never good choice. A navigation menu on the Top must be
helpful for you to switch between topic and chapters.
How many ways to program a Microcontroller?
There are many ways or styles to code a simple microcontroller program. What is
really necessary is to develop a perfect and good coding habit or methodology while
you code, to avoid confusion. For doing a same logical operation there can be
multiple ways in Hardware C. It will help you to optimize the coding you do.
Here I am going to explain some base line methods and also some common practices
that you need to follow while coding a pic18f microcontroller with suitable
examples. There can be hundred of ways of writing same code; I will just try to cover
some of the basic styles to get you started, from Simple to complex ways. Once you
understand the basics then it must be quiet easy for you to navigate your own
imagination and make the microcontroller respond according to your wish. I will try
to explain each and every block with simple and easily understandable format. I
would also try to avoid Complex terms whenever it is possible.
There are different types of compiler. Suppose if you working with a PIC30F series
microcontroller then the same MPLAB IDE will require a C30 Compiler engine to
Compiler your code. C30 and C18 are just the versions of compiler which is capable
of Converting your code into machine language (0s and 1s) which a microcontroller
would understand.
However since we are going to use a PIC18F series of microcontroller so we will
use a C18 compiler.
A lite version of C18 compiler and MPLAB ide is completely free to
download from Microchips website. Apart form C18 Compiler, a Hi-Tech C
compiler can be also used for coding a pic18f4550 series of microcontroller. Hi-Tech
C makes it easy to write codes specially when I prefer to write LCD programs, HiTech C compiler is however not free if you wish to optimize the code, So we are
going to Stick to C18 Compiler, lite version.
You need to login into microchip account which is free to create before you can
download the C18 lite version and MPLAB IDE. The mplab refered in this tutorials
is version v8.60. You can download the latest Release from their website directly.
CELLPHONE INTERACT WITH
Radio control (often abbreviated to R/C or simply RC) is the use of radio signals to
remotely control a device. The term
is used frequently to refer to the control of model vehicles from a hand-held radio
transmitter. Industrial, military, and scientific research organizations make [traffic]
use of radio-controlled vehicles as well.
A remote control vehicle is defined as any mobile device that is controlled by a
means that does not restrict its motion with an origin external to the device. This is
often a radio control device, cable between control and vehicle, or an infrared
controller. A remote control vehicle (Also called as RCV) differs from a robot in that
the RCV is always controlled by a human and takes no positive action autonomously.
One of the key technologies which underpin this field is that of remote vehicle
control. It is vital that a vehicle should be capable of proceeding accurately to a target
area; maneuvering within that area to fulfill its mission and returning equally
accurately and safely to base.
Interface
SPYROBO
Cell phone
Cell phone
as a
as a
Methodology to prepare Handphone
Controlled Robot
Transmitter
Receiver
3.1
help
of
phone
stacked
in
the
robot.
The received tone is processed by the 16F72 microcontroller with the help of DTMF
decoder MT8870 the decoder decodes the DTMF tone in to its equivalent binary
digit and this binary number is send to the microcontroller, the microcontroller is
preprogrammed to take a decision for any give input and outputs its decision to
motor drivers in order to drive the motors for forward or backward motion or a
turn. The mobile that makes a call to the mobile
phone stacked in the robot acts as a remote. So this simple robotic project does not
require the construction of receiver and transmitter units. DTMF signaling is used for
telephone signaling over the line in the voice frequency band to the call switching
center. The version of DTMF used for telephone dialing is known as touch
tone. DTMF assigns a specific frequency (consisting of two separate tones) to each
key s that it can easily be identified by the electronic circuit. The signal generated by
the DTMF encoder is the direct al-gebric submission, in real time of the amplitudes
of two sine (cosine) waves of different frequencies, i.e. ,pressing 5 will send a tone
made by adding 1336hz and 770hz to the other end of the mobile.
1.5.1 Phase I:
This is the basic phase but the most time consuming phase as this phase involve the
The primary step toward the search of components& ICs which will be required.
For the designing of our project we require we some specific hardware and software
and then interfacing the components each other to accomplish the task required by
our project.
Hence our mainly consist of two parts1. Hardware
2. Software
3.1.1
Hardware Requirements
All of this components was bought at Cytron Technologies through the online
system. The main components of the hardware section of our project are given as:
Microcontroller (PIC18F8550)
DC Motor
Optocouplers
Head-phone
Wireless Camera
TV Resistors, Capacitors
Tuner Card,Resistors,Capacitors
1.5.2
Phase II:
In this phase we will try to develop the Interfacing design circuit in PCB. In PCB
first we will draw the interface circuit of land rover then after some Steps of pcb
designing we will fabricate the different ICs & microcontroller. A cell phone will be
also connected in the circuit with interfacing with DTMF Decoder IC.A motor driver
IC will interface with microcontroller& DC motors. In the below shows the block
wise interfacing of different ICs & devices.
CELL PHONE
CELL PHONE
DTMF DECODER
MICROCONTROLLER
1.5.3
Phase III:
MOTOR DRIVER
This is the final phase of project aspects, in this phase we will write a program for
LEFT MOTORS
RIGHT MOTORS
1.2
Block
we will use mainly twoFig.
software
given
below.Diagram
Compiler (Proton)
Source Code
This phase also include final testing of all coding, Interface circuit functioning &
performance of whole system. If any error will be generated then we will try to
remove this error by the modification on the circuit.
Provided by :Muhammad
Abu Sofian
CHAPTER 4
07DET12S1006
FINDING
Researching and Designing
gathering information
Differential drive is a method of controlling a robot with only two motorized wheels.
What makes this algorithm important for a robot builder is that it is also the simplest
control method for a robot. The term 'differential' means that robot turning speed is
determined by the speed difference between both wheels, each on either side of your
robot. For example: keep the left wheel still, and rotate the right wheel forward, and
the robot will turn left.( Don't want to turn) As long as both wheels go at the same
speed, the robot does not turn - only going forward or reverse.
As shown in above figure wheels are attached with chassis made up of any metal
(like iron). Shaft of two DC motors (around 150 RPM or more) are directly coupled
with real wheels. So as both motors rotate CW, the land rover moves forward. And as
both motors rotate CCW, it will move backward. to turn it left right DC motor rotates
and to turn it right left DC motor rotates. Also it will take forward-left & forwardright turn as well as backward-left & backward-right turn if required. For that, either
of the motors (left or right) is rotated CW or CCW. For example if left motor rotates
CW,will take forward-right turn and if it rotates CCW then backward-right turn.
Similarly for right DC motor.
The differential drive algorithm is useful for light chasing robots. This locomotion is
the most basic of all types, and is highly recommended for beginners. Mechanical
construction, as well as the control algorithm, cannot get any simpler than this.
pseudocode:
structure
gear combinations
mechanical
placing sensors
The major building blocks are cell phone, DTMF decoder, micro-controller, DC
motor driver circuits.
Cell phone: - This is very first and the most important part of the system because due
to this only the entire system is activated and works. It will receive the signals from
another cell phone and gives them as input to DTMF decoder. First the system is
activated by calling the SIM card number inside the phone. Afterwards it will receive
DTMF code signals dialed from another cell phone and give it to DTMF decoder.
DTMF decoder: - The function of this block is self understood. It will take DTMF
input given by cell phone decode it and gives 4-bit digital output to micro controller.
It also generates an interrupt every time when it gives digital output
Micro-controller: - You can call this block as the heart of entire system because it
actually performs all the controlling actions. Depending upon the code given by
DTMF decoder it will move the rover forward, backward, left or right by rotating
both DC motors
DC Motor driver: - It receives actuating signals from micro controller in terms of
high / low logic, amplifies (current) it and rotates 2 DC motors in both directions
DTMF decoder: -
As shown in figure it is made up form readily available MT8870 chip that is widely
used for DTMF based application. It receives DTMF tones and generates 4-bit digital
output corresponding to received DTMF signal of digits 0 - 9 and other signals (like
*, # etc) also. It receives input form cell phone to its pin no 2. It amplifies it through
internal op-amp amplifier. If it receives valid DTMF tone, it will produce pulse
output on StD (pin no 15). This is indicated by green LED connected as shown. The
4-bit digital output is latched on pins 11 - 14 and that is given to micro controller.
The StD output is also given to interrupt pin of micro controller through transistor
that will generate negative pulse every time when DTMF signal is received. This
negative pulse will generate an interrupt. All the movements of robotic arm are
controlled by cell phone digit switches 1 to 8. The 4 bit digital output corresponding
to these switches form MT8870 are as given here
Sample Robotic
SAMPLE
INPUT
OUTPUT
The code accepts incoming commands via telnet or voice recognition, then it sends
the commands out to a robot device. It is essentially an API for using a cellphone to
control a robot.
Highlighted functionality includes:
Remote control commands for forward, back, left, right, and stop
GPS to acquire the phone's location and speak the city and state
which
in
http://www.technologystudent.com
turn
can
control
robotic
device.
Augmented
Microcontrollers
and
Development
Boards
Cycles
A 'cycle' is the smallest amount of time it takes for your microcontroller
to do 'nothing.'
For example, suppose I ran this while loop on a microcontroller:
cycles=8;
void delay_cycles(unsigned long int cycles)
{
while(cycles > 0)
cycles--;
}
loop:
loop:
calculating:
655000 cycles/second -> 655 cycles/ms
655 cycles/ms * 1.5ms = 982.5 cycles ~= 982 cycles
http://www.robot-electronics.co.uk/
turn servo on
delay_cycles(982);
turn servo off
Using the same equation for 1ms and 2ms, the extremes of servo motion, we
calculate some more:
655
cycles/ms
1ms
= 655
cycles
In this project 8051 and bluetooth module are communicating over uart @9600bps.
Bluetooth module HC-05 is controlled via simple AT commands. This module comes
in SMD package and works on 3.3v power supply. The BT module is a SPP
supported profile so it can be connected easily to any controller or embedded device.
In this profile the data sent and receive to module directly comes on the RX pin of
microcontroller. It becomes really easy to make your device bluetooth compatible.
L293D H-Bridge motor driver are used to control two DC motors. A readymade
compact size chassis is used to avoid the chassis assembly comlexities . The chassis
contains 2 decks the lower is used for BO motors fitting the upper is used as a battery
stack. On top plate the controller board is mounted by screw fitting.
-
See
more
at:
view.247#sthash.TXPtNQLw.dpuf
http://www.8051projects.net/download.php?
Provided by :Muhammad
Abu Sofian
CHAPTER 5
07DET12S1006
Discussion
robots
are
also
found
in
security
Sensing
Sensors allow robots to receive information about a certain measurement of the
environment, or internal components. This is essential for robots to perform their
tasks, and act upon any changes in the environment to calculate the appropriate
response. They are used for various forms of measurements, to give the robots
warnings about safety or malfunctions, and to provide real time information of the
task it is performing.
Speech recognition
Interpreting the continuous flow of sounds coming from a human, in real time, is a
difficult task for a computer, mostly because of the great variability ofspeechThe
same word, spoken by the same person may sound different depending on
local acoustics, volume, the previous word, whether or not the speaker has a cold,
etc.. It becomes even harder when the speaker has a different accent.
calculate the appropriate signals to the actuators (motors) which move the
mechanical.
The processing phase can range in complexity. At a reactive level, it may translate
raw sensor information directly into actuator commands. Sensor fusion may first be
used to estimate parameters of interest (e.g. the position of the robot's gripper) from
noisy sensor data. An immediate task (such as moving the gripper in a certain
direction) is inferred from these estimates. Techniques from control theory convert
the task into commands that drive the actuators.
At longer time scales or with more sophisticated tasks, the robot may need to build
and reason with a "cognitive" model. Cognitive models try to represent the robot, the
world, and how they interact. Pattern recognition and computer vision can be used to
track objects.Mapping techniques can be used to build maps of the world.
Finally, motion planning and other artificial intelligence techniques may be used to
figure out how to act. For example, a planner may figure out how to achieve a task
without hitting obstacles, falling over, etc.
Manual remote
A manually tele operated robot is totally under control of a driver with handphone or
other control device. The device may be plugged directly into the robot, may be a
wireless joystick, or may be an accessory to a wireless computer or other controller.
A tele-op'd robot is typically used to keep the operator out of harm's way.
Segregation of duties
Muhammad Abu Sofian
Provided by :Muhammad
Abu Sofian
CHAPTER 6
07DET12S1006
Conclusion
Human-robot interaction
If robots are to work effectively in homes and other non-industrial environments, the
way they are instructed to perform their jobs, and especially how they will be told to
stop will be of critical importance. The people who interact with them may have little
or no training in robotics, and so any interface will need to be extremely intuitive.
Science fiction authors also typically assume that robots will eventually be capable
of communicating with humans through speech, gestures, and facial expressions,
rather than a command-line interface.
Technological trends
Various techniques have emerged to develop the science of robotics and robots. One
method is evolutionary robotics, in which a number of differing robots are submitted
to tests. Those which perform best are used as a model to create a subsequent
"generation" of robots. Another method is developmental robotics, which tracks
changes and development within a single robot in the areas of problem-solving and
other functions.