wireless robot using cellphone
DESCRIPTION
This project is one type of robot which is controlled by a mobile phone. These reports cover all the information of this project. This report covers related information of project and their component with necessary block diagram and illustration. This report has been organized in eleven different chapters.TRANSCRIPT
1
WIRELESS ROBOT USING CELLPHONEPROJECT REPORT
BY RAVIRAJSINH S.SOLANKI
ACKNOWLEDGEMENT
I feel greatly indebted to Mr. Kanaiya G. Bhatt who is lecturer in EC department and
Mr. Parth R. Mistry who is HOD of EC department. His ability and knowledge has
been great help to us. I would also thank to all my teachers for their valuable support and
providing some help full information about project.
I would like to express my special thanks to Mr. Bharatbhai Suthar who is father of
Mr. Jay Suthar. Without their help my project would not have been completed. He
taught PCB design & provided important information about project.
1
PREFACE
This project is one type of robot which is controlled by a mobile phone. These reports
cover all the information of this project. This report covers related information of project
and their component with necessary block diagram and illustration. This report has been
organized in eleven different chapters.
Ch-1 introduction of project:
It gives overview of project means that it provides some information of project.
Ch-2 basic block diagram:
In this section we shows basic block diagram of wireless robot using cellphone. Using of
block diagram we understood project in simply form i.e. Block diagram; And also
described this block in brief.
Ch-3 analysis and design:
Here we understood working of project and how to design it. It also gives PCB layout
and component layout of project.
Ch-4 circuit description:
In this section we shows circuit diagram of wireless robot using cellphone. Using of
circuit diagram we understood where is component connected to the circuit and it also
consist deeply description of circuit.
Ch-5 software description:
Here we discus about software. The software is written in ‘C’ language and compiled
using Code Vision AVR ‘C’ compiler. The source program is converted into hex code
by the compiler.
Ch-6 coding & simulated result:
Here show coding for this project and also see its hex form.
2
Ch-7 implementation of hardware:
In this section we discus important component of this project and its working.
Important component means ATmega16, decoder & motor driver IC.
Ch-8 testing & trouble shooting:
Here we discus of problems for making project
Ch-9 advantages, disadvantages & application:
Here we give some advantages, disadvantages & application of project.
3
ABSTRACT
Conventionally, wireless-controlled robots use RF circuits, which have the drawbacks of
limited working range, limited frequency range and limited control. Use of a mobile phone
for robotic control can overcome these limitations. It provides the advantages of robust
control, working range as large as the coverage area of the service provider, no interference
with other controllers and up to twelve controls. Although the appearance and capabilities of
robots vary vastly, all robots share the features of a mechanical, movable structure under
some form of control.
The control of robot involves three distinct phases: reception, processing and action.
Generally, the preceptors are sensors mounted on the robot, processing is done by the on-
board microcontroller or processor, and the task (action) is performed using motors or with
some other actuators.
This project has three subsystems: Hardware, Software & Mechanical.
4
INDEX
CHAPTER CONTENT P.NO.
1. Introduction of the project 06
2. Basic block diagram with description 07
3. Analysis & design of hardware 09
4. Circuit diagram & circuit description 17
5. Software description 21
6. Coding & simulated result 22
7. Implementation of hardware 50
8. Testing & trouble shooting 51
9. Advantage and disadvantage 52
10. Application 54
5
INTRODUCTION OF PROJECT
The primary objective of this project was to build a cell phone link between a transmitter and a
dumb robot and provide the capability to operate the robot from a remote location. Here two
mobile is used one mobile is work as a remote control & another mobile is work as a receiver
which is attached to the robot through the hands free.
When we makes call to a mobile at receiver end from the mobile which is used as the remote
control, then the circuit will connected. When mobile connected to the circuit at that time we
pressed any button, a corresponding to the button pressed is heard at the other end of the call.
This tone is called “Dual Tone Multiple Frequency (DTMF)” tone. Dual tone multiple
frequency means when we pressed any button at that time two frequency is generated one is low
frequency and other is high frequency. In this project, we used DTMF decoder, microcontroller
and motor driver IC (integrating circuit).
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 tone dialing is known as
‘Touch-Tone.
6
BASIC BLOCK DIAGRAM
Fig.1 BASIC BLOCK DAIGRAM
7
BLOCK DIAGRAM DESCRIPTION
Fig. shows the block diagram of the microcontroller-based mobile phone operated land
rover. The important components of this rover are a DTMF decoder, microcontroller and
motor driver.
Block diagram of wireless robot using cellphone is shown in previous page.
In this block diagram three main blocks is DTMF decoder, microcontroller and motor
driver IC.
One mobile is attached to the circuit which is used to receive DTMF tone generated by
remote mobile.
DTMF tone decodes by DTMF decoder and converted into binary form than its output is
send to the microcontroller to perform next action.
The microcontroller is preprogrammed 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.
8
ANALYSIS AND DESIGN HARDWARE
WORKING:-
In order to control the robot, you need to make a call to the cell phone attached to the
robot (through head phone) from any phone, which sends DTMF tunes on pressing the
numeric buttons.
The cell phone in the robot is kept in ‘auto answer’ mode. (If the mobile does not have
the auto answering facility, receive the call by ‘OK’ key on the rover connected mobile
and then made it in hands-free mode.) So after a ring, the cellphone accepts the call.
Now you may press any button on your mobile to perform actions as listed in Table
1.
TABEL-1
ACTION PERFORMED CRRESPONDING TO THE KEYS PRESSED
Number
pressed by user
Output of HT9170
DTMF decoder
Input of the
micro-
controller
Output from
micro-
controller
Action
performed
2 0×02
00000010
0×FD
11111101
0×89
10001001
Forward
motion
4 0×04
00000100
0×FB
11111011
0×85
10001010
Left turn
6 0×06
00000110
0×F9
11111001
0×8A
10001010
Right turn
8 0×08
00001000
0×F7
11110111
0×86
10000110
Backward
motion
5 0×05
00000101
0×FA
11111010
0×00
00000000
Stop
The DTMF tones thus produced are received by the cellphone in the robot.
9
These tones are fed to the circuit by the headset of the cellphone.
The MT8870 decodes the received tone and sends the equivalent binary number to
Microcontroller (ATmega16).
The tones and assignments in a DTMF system are shown in Table 2.
According to the program in the microcontroller, the robot starts moving.
When you press key ‘2’ (binary equivalent 00000010) on your mobile phone, the
microcontroller outputs ‘10001001’ binary equivalent.
Port pins PD0, PD3 and PD7 are high.
The high output at PD7 of the microcontroller drives the motor driver (L293D). Port
pins PD0 and PD3 drive motors M1 and M2 in forward direction (as per Table 1).
Similarly, motors M1 and M2 move for left turn, right turn, backward motion and stop
condition as per Table 1.
10
DTMF SIGNAL:-
DTMF refers to the system of representation, coding and decoding of audio signals
generated by the superposition of two pure sinusoidal tones.
This system is very commonly used for telephone signaling over the line in voice
frequency band to the call switching center.
Mark and Space are the significant parameters, affiliated with DTMF tones.
A time span, for which DTMF digit tone is actually producing sound, is called “Mark"
time and the silence duration between each one of the digits is termed as "Space".
TABLE 2
Frequency assignments in a DTMF system
Frequencies 1209Hz 1336Hz 1477Hz 1633Hz
697Hz 1 2 3 A
770Hz 4 5 6 B
852Hz 7 8 9 C
941Hz * 0 # D
DTMF assigns a specific frequency (consisting of two separate tones) to each key so that
it can easily be identified by an electronic circuit.
Any signal generated by the DTMF encoder is a direct algebraic summation, in real
time, of the amplitudes of two sine or cosine waves of different frequencies, i.e.,
pressing ‘5’ will send a tone made by augmentation of sinusoidal waves of frequencies
1336Hz and 770Hz to the other end of the line.
Various possible tones and frequency assignments in a DTMF system are shown in
Table 1.
11
ALGORITHM:-
An algorithm is designed to rotate motors in different directions viz. forward, backward,
left turn, right turn and stop corresponding to the thrust applied on the mobile keys
assigned to them.
The algorithm for the same is mentioned below and the flowchart is shown in Fig. 7
1. Make port 1 as input port
2. Make port 3 as output port
3. Check if input at port 1 is EA Hex then move robot in forward direction else goes to step
4.
4. Check if input at port 1 is E5 Hex then move robot in backward direction else goes to
step 5.
5. Check if input at port 1 is E8 Hex then robot takes right turn else go to step 6.
6. Check if input at port 1 is E7 Hex then robot takes left turn else go to step 7.
7. Go to step 3 and continuously check the input.
12
FLOWCHART OF CONTROL OF MOTOR:-
NO
NO
NO
13
START
P1=0×FFP3=0×00
+
IS P1=0×EA?
IS P1=0×E6?
IS P1=0×E5?
IS P1=0×E8?
P3=0×1A
P3=0×12
P3=0×18
P3=0×15
PCB LAYOUT:-
14
COMPONENT LAYOUT:-
MECANICAL CONSTRUCTON:-
15
For construction of any robot, the important mechanical constraint is the number motor
we are going to using. One can have either two wheel drive or four wheel drive.
Four wheel drives even through is complex than two wheel drives will provide more
torque and good control. Two wheel drives is very easy to construct.
Top and bottom view of wireless robot is shown in fig. the chassis used in the model is a
sheet made up of parax and is of size is 9×10cm.
Motor are fixed to the bottom of this sheet and circuit is placed above this sheet and it is
affixed firmly.
A cellphone is also placed over the sheet as shown in fig.
CIRCUIT DAIGRAM
16
CIRCUIT DISCRIPTION
17
An MT8870 series DTMF decoder is used here.
All types of the MT8870 series use digital counting techniques to detect and decode all
the 16 DTMF tone pairs into a 4-bit code output.
The built-in dial tone rejection circuit eliminates the need for pre-filtering.
When the input signal given at pin 2 (IN-) in single-ended input configuration is
recognized to be effective, the correct 4-bit decode signal of the DTMF tone is
transferred to Q1 (pin 11) through Q4 (pin 14) outputs.
Table II shows the DTMF data output table of MT8870. Q1 through Q4 outputs of the
DTMF decoder (IC1) are connected to port pins PA0 through PA3 of ATmega16
microcontroller (IC2) after inversion by N1 through N4, respectively.
The ATmega16 is a low-power, 8-bit, CMOS microcontroller based on the AVR
enhanced RISC architecture.
It provides the following features: 16 Kb of in-system programmable Flash program
memory with read-while-write capabilities, 512 bytes of EEPROM, 1kB SRAM, 32
general-purpose input/output (I/O) lines and 32 general-purpose working registers.
All the 32 registers are directly connected to the arithmetic logic unit, allowing two
independent registers to be accessed in one single instruction executed in one clock
cycle.
The resulting architecture is more code-efficient.
Outputs from port pins PD0 through PD3 and PD7 of the microcontroller are fed to
inputs IN1 through IN4 and enable pins (EN1 and EN2) of motor driver L293D,
respectively, to drive two geared DC motors.
Switch S1 is used for manual reset.
The microcontroller output is not sufficient to drive the DC motors, so current drivers
are required for motor rotation.
The L293D is a quad, high-current, half-H driver designed to provide bidirectional drive
currents of up to 600 mA at voltages from 4.5V to 36V.
18
It makes it easier to drive the DC motors. The L293D consists of four drivers. Pins IN1
through IN4 and OUT1 through OUT4 are input and output pins, respectively, of driver
1 through driver 4.
Drivers 1 and 2, and drivers 3 and 4 are enabled by enable pin 1 (EN1) and pin 9 (EN2),
respectively.
When enable input EN1 (pin 1) is high, drivers 1 and 2 are enabled and the outputs
corresponding to their inputs are active. Similarly, enable input EN2 (pin 9) enables
drivers 3 and 4.
An actual-size, single-side PCB for cellphone-operated land rover is shown in Fig. 4 and
its component layout in Fig. 5.
19
To connect the hands free with the circuit:-
There are always two connections which come out of the phone,
these connections are
1. Tip
2. Ring
I’ll prefer to use hands free which have a straight jack (similar to the ones which we
use in our iPods, but a thinner one)
The tip of that jack is called the "tip" and the rest part behind the tip after a black
strip is the ring So connect these two connections with the circuit and you will be
done.
20
SOFTWARE DICRIPTION
The software is written in ‘C’ language and compiled using Code Vision AVR ‘C’
compiler.
The source program is converted into hex code by the compiler.
Burn this hex code into ATmega16 AVR microcontroller.
The source program is well commented and easy to understand.
First include the register name defined specifically for ATmega16 and also declare the
variable.
Set port A as the input and port D as the output.
The program will run forever by using ‘while’ loop.
Under ‘while’ loop, read port A and test the received input using ‘switch’ statement.
The corresponding data will output at port D after testing of the received data.
21
CODING AND SIMULATED RESULT
CODING IN “C” LANGUAGE:-
Source program:
Robit.c
#include <mega16.h>
void main (void)
{
unsigned int k, h;
DDRA=0x00;
DDRD=0XFF;
while (1)
{
k =~PINA;
h=k & 0x0F;
switch (h)
{case 0x02: //if I/P is 0x02
{
PORTD=0x89;//O/P 0x89 ie Forward
break;
}
case 0x08: //if I/P is 0x08
{
PORTD=0x86; //O/P 0x86 ie Backward
break;
}
case 0x04:
{
PORTD=0x85; // Left turn
break; }
22
case 0x06:
{
PORTD=0x8A; // Right turn
break;
}
case 0x05:
{
PORTD=0x00; // Stop
break;
}
}
}
}
HEX CODE:-
23
:100000000C942B000C9400000C9400000C94000045
:100010000C9400000C9400000C9400000C94000060
:100020000C9400000C9400000C9400000C94000050
:100030000C9400000C9400000C9400000C94000040
:100040000C9400000C9400000C9400000C94000030
:100050000C9400000000F894EE27ECBBF1E0FBBF2D
:10006000EBBFE5BFF8E1F1BDE1BD8DE0A2E0BB274C
:10007000ED938A95E9F780E094E0A0E6ED9301978F
:10008000E9F7E4E5F0E085919591009761F0A5919D
:10009000B59105901590BF01F00105900D92019763
:1000A000E1F7FB01F0CFEFE5EDBFE4E0EEBFC0E626
:1000B000D1E00C945B00E0E0EABBEFEFE1BBE9B319
:1000C000E0950E2F1127F801EF70F0709F01F901F4
:1000D000E230A0E0FA0711F4E9E817C0E830A0E048
:1000E000FA0711F4E6E811C0E430A0E0FA0711F4D1
:1000F000E5E80BC0E630A0E0FA0711F4EAE805C035
:10010000E530A0E0FA0711F4E0E0E2BBD8CFFFCF82
:00000001FF
IMPLEMENTATION OF HARDWARE
24
MT8870 DTMF decoder:-
FEATURES:-
Complete DTMF Receiver
Low power consumption
Internal gain setting amplifier
Adjustable guard time
Central office quality
Power-down mode
Inhibit mode
Backward compatible with MT8870C/MT8870C-1
Applications:-
Receiver system for British Telecom (BT) or CEPT Spec (MT8870D-1)
Paging systems
Repeater systems/mobile radio
Credit card systems
Remote control
Personal computers
Telephone answering machine
DEACRIPTON:-
25
The M-8870 is a full DTMF Receiver that integrates both band split filter
and decoder functions into a single18-pin DIP or SOIC package.
Manufactured using CMOS process technology, the M-8870 offers low
power consumption (35 mW max) and precise data handling.
Its filter section uses switched capacitor technology for both the high and
low group filters and for dial tone rejection. Its decoder uses digital counting
techniques to detect and decode all 16 DTMF tone pairs into a 4-bit code.
External component count is minimized by provision of an on-chip
differential input amplifier, clock generator, and latched tri-state interface
bus.
Minimal external components required include a low-cost 3.579545 MHz
color burst crystal, a timing resistor, and a timing capacitor.
The M-8870-02 provides a “power-down” option which, when enabled,
drops consumption to less than 0.5 mW.
The M-8870-02 can also inhibit the decoding of fourth column digitsM-8870
operating functions include a band split filter that separates the high and low
tones of the received pair, and a digital decoder that verifies both the
frequency and duration of the received tones before passing the resulting 4-
bit code to the output bus.
FILTER:-
The low and high group tones are separated by applying the dual-tone signal
to the inputs of two 6th order switched capacitor band pass filters with
bandwidths that corresponds to the bands enclosing the low and high group
tones.
The filter also incorporates notches at 350 and 440 Hz, providing excellent
dial tone rejection.
Each filter output is followed by a single-order switched capacitor section
that smooth’s the signals prior to limiting.
Signal limiting is performed by high gain comparators provided with
Hysteresis to prevent detection of unwanted low-level signals and noise.
26
The comparator outputs provide full-rail logic swings at the frequencies of
the incoming tones.
FUNCTIONAL BLOCK DAIGRAM
DECODER:-
The M-8870 decoder uses a digital counting technique to determine the
frequencies of the limited tones and to verify that they correspond to
standard DTMF frequencies.
A complex averaging algorithm is used to protect against tone simulation by
extraneous signals (such as voice) while tolerating small frequency
variations.
The algorithm ensures an optimum combination of immunity to talk off and
tolerance to interfering signals (Third tones) and noise. When the detector
recognizes the simultaneous presence of two valid tones (known as signal
condition), it raises the Early Steering flag (Est.). Any subsequent loss of
signal condition will cause Est. to fall.
27
WOKING OF IC:-
The MT-8870 is a full DTMF Receiver that integrates both band split filter
and decoder functions into a single 18-pin DIP.
Its filter section uses switched capacitor technology for both the high and
low group filters and for dial tone rejection.
Its decoder uses digital counting techniques to detect and decode all 16
DTMF tone pairs into a 4-bit code.
To reject common-mode noise signals, a balanced differential amplifier
input is used.
The internal clock circuit is completed with the addition of a standard
3.5795MHZ crystal oscillator
The input arrangement of the MT-8870 provides a differential input
operational amplifier as well as a bias source (VREF) to bias the inputs at
mid-rail.
Provision is made for connection of a feedback resistor to the op-amp output
(GS) for gain adjustment.
DTMF KEYPAD FREQUENCY
Frequencies 1209Hz 1336Hz 1477Hz 1633Hz
697Hz 1 2 3 A
770Hz 4 5 6 B
852Hz 7 8 9 C
941Hz * 0 # D
28
DECODER OUTPUT:-
MT8870 is a DTMF receiver incorporating switched capacitor filter
technology and an advanced digital counting/ averaging algorithm for period
measurement.
MT8870 provides full DTMF receiver capability by integrating both the
band split filter and digital decoder functions into a single 18-pin DIP,
SOIC, or 20-pin PLCC package.
Filter section uses a switched capacitor technique for both high & low
group filters and dial tone rejection.
MT8870 decoder uses digital counting techniques for the detection and
decoding of all 16 DTMF tone pairs into a 4 - bit code.
TABLE-2 DTMF DATA OUTPUT:-
Low
group(Hz)
High
group(Hz)
Digit 0E D3 D2 D1 D0
997 1209 1 H L L L H
997 1336 2 H L L H L
997 1477 3 H L L H H
770 1209 4 H L H L L
770 1336 5 H L H L H
770 1477 6 H L H H L
852 1209 7 H L H H H
852 1336 8 H H L L L
852 1477 9 H H L L H
941 1336 0 H H L H L
941 1209 * H H L H H
941 1477 # H H H L L
697 1633 A H H H L H
29
770 1633 B H H H H L
852 1633 C H H H H H
941 1633 D H L L L L
- - ANY L Z Z Z Z
This DTMF receiver minimizes external component count by providing an
on-chip differential input amplifier, clock generator, and a latched three-
state interface bus.
Input to the circuit from the receiver phone’s headset is given to pin 2 of
MT8870.
The digital outputs are obtained at pins 11, 12, 13 and 14. Table 2 shows the
DTMF data output combinations of MT8870.
It is very essential to choose the values of capacitor & resistor as the audio
signal to be fed to CM8870 is very weak.
For DTMF decoding, in the project, the circuit used is Single Ended Input
configuration as shown in Figure 2.
Single Ended Input Configuration of CM8870
30
ATmega16 AVR MICROCONTROLLER(HEART OH PROJECT)
:-
FEATURES:-
High-performance, Low-power AVR® 8-bit Microcontroller
Advanced RISC Architecture
– 131 Powerful Instructions – Most Single-clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 16 MIPS Throughput at 16 MHz
– On-chip 2-cycle Multiplier
Nonvolatile Program and Data Memories
– 16K Bytes of In-System Self-Programmable Flash
– 512 Bytes EEPROM
Endurance: 100,000 Write/Erase Cycles
– 1K Byte Internal SRAM
– Programming Lock for Software Security
Special Microcontroller Features
– Power-on Reset and Programmable Brown-out Detection
– Internal Calibrated RC Oscillator
– External and Internal Interrupt Sources
– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down,
Standby and Extended Standby
I/O and Packages
31
– 32 Programmable I/O Lines
– 40-pin PDIP, 44-lead TQFP, and 44-pad MLF
Operating Voltages
– 2.7 - 5.5V for ATmega16L
– 4.5 - 5.5V for ATmega16
Speed Grades
– 0 - 8 MHz for ATmega16L
– 0 - 16 MHz for ATmega16
Power Consumption @ 1 MHz, 3V, and 25C for ATmega16L
– Active: 1.1 mA
– Idle Mode: 0.35 Ma, Power-down Mode: < 1 μA
32
PIN CONFIGURATION:-
33
34
BLOCK DAIGRAM
OF
ATmega16
PIN DISCRIPTION:-
VCC:
35
Digital supply voltage.
GND:
Ground.
Port A (PA7...PA0):
Port A serves as the analog inputs to the A/D Converter.
Port A also serves as an 8-bit bi-directional I/O port, if the A/D Converter is
not used. Port pins can provide internal pull-up resistors (selected for each
bit). The Port A output buffers have symmetrical drive characteristics with
both high sink and source capability. When pins PA0 to PA7 are used as
inputs and are externally pulled low, they will source current if the internal
pull-up resistors are activated. The Port A pins are tri-stated when a reset
condition becomes active, even if the clock is not running.
Port B (PB7...PB0) :
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The Port B output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port B
pins that are externally pulled low will source current if the pull-up resistors
are activated. The Port B pins are tri-stated when a reset condition becomes
active, even if the clock is not running.
Port C (PC7...PC0):
Port C is an 8-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The Port C output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port C
pins that are externally pulled low will source current if the pull-up resistors
are activated. The Port C pins are tri-stated when a reset condition becomes
active, even if the clock is not running. If the JTAG interface is enabled, the
pull-up resistors on pins PC5 (TDI), PC3 (TMS) and PC2 (TCK) will be
activated even if a reset occurs.
Port D (PD7...PD0):
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The Port D output buffers have symmetrical drive
characteristics with both high
36
sink and source capability. As inputs, Port D Pins that are externally pulled
low will source current if the pull-up resistors are activated. The Port D pins
are tri-stated when a reset condition becomes active, even if the clock is not
running.
RESET:
Reset Input. A low level on this pin for longer than the minimum pulse
length will generate a reset, even if the clock is not running. The minimum
pulse length is given in Table 15 on page 36. Shorter pulses are not
guaranteed to generate a reset.
XTAL1:
Input to the inverting Oscillator amplifier and input to the internal clock
operating circuit.
XTAL2:
Output from the inverting Oscillator amplifier.
AVCC:
AVCC is the supply voltage pin for Port A and the A/D Converter. It should
be externally connected to VCC, even if the ADC is not used. If the ADC is
used, it should be connected to VCC through a low-pass filter.
AREF:
AREF is the analog reference pin for the A/D Converter.
37
ATmega16 AND IC 7404:-
Circuit Schematic of ATmega16 and IC 7404
With reference to the Figure 4, CM8870 generates binary outputs Q1, Q2,
Q3, and Q4 at respective pins 11, 12, 13 and 14.
These digits are negated using 4 NOT gates of a 7404 HEX INVERTER.
IC7404 is a 14 pin DIP IC which has 6 inverters, of which, only 4 are used.
Inputs are given to the pins 1, 3, 5 and 13 while; corresponding outputs are
taken from the pins 2, 4, 6 and 12. Pin 7 is a ground and Pin 14 is Vcc.
This inverted input is given to port 1 of microcontroller at pins 1, 2, 3, 4 and
5 which are P1.0, P1.1, P1.2, P1.3 and P1.4 respectively.
38
Microcontroller is programmed to give outputs at port pins P3.3 to P3.7
from pins 13 to 17 which are fed to the DC motor driver L293D.
The driver output is fed to the DC motors, responsible for driving the robot.
Crystal frequency used in the circuit is 11.0592 MHz.
HEX INVERTER
These codes to drive DC motors are written on 80C51 using ‘C’ and
consequently simulated on "Keil μVision".
The program is uploaded on 80C51 controller using "Flash Magic”.
39
L293D MOTOR DRIVER IC:-
FEATURE:-
Wide Supply-Voltage Range: 4.5 V to 36 V
Separate Input-Logic Supply
Internal ESD Protection
Thermal Shutdown
High-Noise-Immunity Inputs
Functional Replacements for SGS L293 and SGS L293D
Output Current 1 A Per Channel (600 mA for L293D)
Peak Output Current 2 A Per Channel (1.2 A for L293D)
Output Clamp Diodes for Inductive Transient Suppression (L293D)
Peak output current 2A per channel
Inhibit facility
Over –Temperature Protection
40
DESCRIPTION:-
The L293 and L293D are quadruple high-current half-H drivers. The L293 is
designed to provide bidirectional drive currents of up to 1 A at voltages from
4.5 V to 36 V.
The L293D is designed to provide bidirectional drive currents of up to 600-
mA at voltages from 4.5 V to 36 V.
41
Both devices are designed to drive inductive loads such as relays, solenoids,
dc and bipolar stepping motors, as well as other high-current/high-voltage
loads in positive-supply applications.
All inputs are TTL compatible.
Each output is a complete totem-pole drive circuit, with a Darlington
transistor sink and a pseudo-Darlington source.
Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN and
drivers 3
and 4 enabled by 3,4EN.
When an enable input is high, the associated drivers are enabled and their
outputs are
active and in phase with their inputs.
When the enable input is low, those drivers are disabled and their outputs are
off and in the high-impedance state. With the proper data inputs, each pair of
drivers forms a full-H (or bridge) reversible drive suitable for solenoid or
motor applications.
On the L293, external high-speed output clamp diodes should be used for
inductive transient suppression. A VCC1 terminal, separate from VCC2, is
provided for the logic inputs to minimize device power dissipation.
L293D is characterized for operation from 0C to 70C.
PRODUCTION DATA information is current as of publication date.
42
TECHNICAL DETAILS:-
Maximum Voltage Supply (VSS): 36V
Maximum Input Voltage (VC): 7V
Maximum Peak output current: 2A
Total Power Dissipation: 5W at 800C
Input Low Voltage: -0.3 to 1.5V
Input high voltage: 2.3 to 7V
Low Voltage Input Current:-10 μA
High Voltage Input current: 100 μA
43
WORKING OF L293D FOR THIS PROJECT:-
Microcontroller output is not sufficient to drive DC motors. So, high-voltage
and high-current drivers are required. L293D is a quadruple high-current,
half-H driver which is designed to provide bidirectional drive currents of up
to 600-mA at voltages ranging from 4.5 V to 36 V.
44
Driving DC motors with L293D
All inputs are TTL compatible and each output is a complete totem-pole
drive circuit, with a Darlington transistor sink and a pseudo-Darlington
source.
Drivers are enabled in pairs, with drivers 1 and 2 enabled by ENABLE 1
and drivers 3 and 4 enabled ENABLE 2. When an enable input is high, the
associated drivers are enabled.
Consequently, their outputs are active and in phase with their inputs. When
the enable input is low, those drivers are disabled and their outputs are off
and in the high impedance state.
With the proper data inputs, each pair of drivers forms a full-H (or bridge)
reversible drive suitable for solenoid or motor applications.
45
An integrated diagram of L293D with DC motors is shown in Figure 5.
Two DC motors used in the project are of 30 rpm which can be enabled by
making the pins 1 and 9 high.
Motor inputs for first section are at pins 2 and 7 and that for the second is at
pins 10 and 15.
Outputs are taken from pins 3 and 6 for first section and pins 11 and 14 for
second.
The direction of rotation of motor (clockwise or anti-clockwise) is
dependent upon inputs at the respective pins.
Thus, two motors together give forward, left, right and backward motions.
FUNCTION TABLE
(Each driver)
INPUT OUTPUT
A EN Y
H H H
L H L
X L Z
H = high level, L = low level, X = irrelevant,
Z = high impedance (off)
DC MOTOR:-
DC motors are widely used in industrial and consumer applications.
46
In many cases, absolute precision in movement is not an issue but precise
speed control is. However there are also applications that do require precise
positioning.
DC motors combined with feedback for either position or speed are called
Servo motors. As this feedback mechanism has an edge over other closed
loop systems when it comes to position control, we use DC motors in
commissioning the lift.
Some more important features of DC motor that accentuates its
implementation are:
High output power relative to motor size and weight
High efficiency. Can approach 90% at light load conditions
High torque to inertia ratio. Can rapidly accelerate loads
Has reserve power and torque
Excellent speed control, Effective braking.
The last advantage is certainly subtle because, the motor though for short
periods is used frequently.
47
WORKING OF DC MOTOR:-
The DC motor has two basic parts: the rotating part that is called the
armature and the stationary part that includes coils of wire called the field
coils.
The stationary part is also called the stator.
The armature is made of coils of wire wrapped around the core, and the core
has an extended shaft that rotates on bearings.
The termination points are called the commutation, and this is where the
brushes make electrical contact to bring electrical current from the stationary
part to the part rotating of the machine.
As the armature begins to move, the north pole of the armature comes closer
to the south pole of the field, and the south pole of the armature is coming
closer to the north pole of the field.
As the two unlike poles near each other, they begin to attract.
This attraction becomes stronger until the North Pole moves directly in line
with the field’s South Pole, and its South Pole moves directly in line with
field’s poles.
When the opposite poles area at their strongest attraction, the armature will
be “locked up” and will resist further attempts to continue spinning.
For the armature to continue its rotation, the armature’s polarity must be
switched.
For this reason the armature must be a coil and a set of commutation
segments must be added to provide a means of making contact between the
rotating member and the stationary member.
One commutation segment is provided for each terminal of the magnetic
coil.
Since this armature has only one coil, it will have only two terminals, so the
commutation has two segments.
Since the armature is now a coil of wire, it will need DC current flowing
through it to become magnetized. This presents another problem; since the
armature will be rotating, the DC voltage wires cannot be connected directly
to the armature coil.
48
A stationary set of carbon brushes is used to make contact to the rotating
armature.
The brushes ride on the commutation segments to make a contact so that
current will flow through the armature coil.
This is a simple two pole motor that is used primarily for instructional
purposes. Since the motor has only two poles, the motor will operate rather
roughly and not provide too
much torque.
Additional field poles and armature poles must be added to the motor for it
to become useful for industry.
Now as described earlier, the DC motor suits the lift applications, the
electrical working of the motor is given below
49
DC SERIES MOTOR:-
Where there is a wide variation in load or where the motor must start under a
heavy load, series motors have desirable features not found in shunt motors.
The series wound motor is used where high starting torque and varying
speed is desired.
The armature and the series field are connected in series.
With high armature and field currents, it has a very high starting torque and
is well suited for starting heavy loads.
DC MOTOR
Notice that the series field is in series with the armature windings.
50
When the motor is first started, with the negligible effects of the counter
EMF, current flow through the armature is high.
Since the armature and the series field are in series, the current in the
armature is the same current through the series winding.
Large current develops a very strong magnetic field and results in an
extremely high torque, Conversely, if the motor is operating at rated speed,
the counter EMF will be
Very high, and the current in the series field winding and armature is
reduced proportionally.
This means that the series motor can develop a very high torque and
Respond to increase in loading (reductions in armature RPM) rapidly.
The series motor will continue to increase in speed as long as there is more
torque
developed that is necessary to turn the load.
This additional torque is called acceleration torque.
51
When a series motor is heavily loaded, it slows and produces more torque.
As the load is removed, the motor increases in speed.
If the load is suddenly removed from the series motor, the accelerating
torque is just enough to continue to increase the motor’s speed.
The continuously increasing speed can destroy motor.
TESTING AND TROUBLE SHOOTING
After component soldering insert IC into socket then cheeked continuity for
its connectivity (Layer of PCB) then applied DC +9v to circuit and checked
voltage at m1 & m2 terminal for DC motor When there is no call from
another cell phone voltage at m1&m2 are 0.0v when make the call to unit
cellphone & when received signal & pressed @ no on robot mobile output
52
voltage at m1&m2 is 6.00v then pressed 4 and output voltage is –ve DC
(reverse) & pressed 1 and output voltage is 0.0v (stop)
This way we tested circuit operation now circuit was ready for robot drive.
TROUBLE SHOOTING:-
1. NO movement
Possible case is given below
– no signal from to cell-phone connectivity
– Power supply missing
– AVR programming.
2. If AVRmega16 programming in Controller get error then ic will not
responding in our project we programmed as per description and we take
care for loading to compiler , yet after implementation one function (stop) is
done by pressing no:1 instead 5
ADVANTAGES
This is wireless controller robot hence the limitation of wired robots is
completely overcome by using latest technology of mobile phones.
53
In this project we have used RF circtury hence the limitation of a controlled
range is no more a constrain of this model.
Limitless area coverage is the main advantage of this land rover
DISADVANTAGES
This land rover has only one disadvantage that is it can be operated in area
where mobile network is available and if mobile network is not available it
54
cannot be operated.
APPLICATION
55
Using the cell-phone operated Land rover we can access the robot from long
range and using this advantage we can use this in industrial purpose, home
application and its help full to human being….
This can be fitted in an attractive form of a toy robot.
If we use the switching IC instead of the driver IC we can turn on and off
any appliances connected to this robot
CONCLUSION
56
Hence, it can be concluded that mobile controlled robots can be constructed
using the components: IC MT8870 (DTMF decoder), IC 7404 (inverter),
(ATmega16) microcontroller and L293D (motor drivers). Locomotion of the
robot in different directions can be controlled and maneuvered by pressing
the assigned keys on the mobile phone (in this experiment; key ‘5’ for
forward motion, key ‘7’ for left turn, key ‘8’ for stop, key ‘9’ for right turn
and key ‘0’ for backward motion).
FUTURE EXTENSION
57
This project demonstrates the tale/remote control of the electronic
appliances and the DC motors using mobile phone. However, a closed loop
system that gives feedback to the transmitter can be implemented so that
output work done can be acknowledged by the transmitter side. DTMF
receiver and transmitter IC can be used to give feedback to the controlling
mobile. Similarly, modern 3G communication system may be one of the
intriguing features that can be incorporated in our system to discover the
status and location of the robot.
58
COMPONENET LIST
Semiconductors:-
IC1 MT8870DTMF Decoder
IC2 ATmega16AVR Microcontroller
IC3 L293D Motor Driver IC
IC4 74LS04 NOT gate
D1 1N4007 Rectifier diode
Resistor:-
R1,R2 100KΩ
R3 330KΩ
R4-R8 10KΩ
Capacitor:-
C1 0.47µF Ceramic disk
C2,C3,C5,C6 22pF Ceramic disk
C40.1µF Ceramic disk
Miscellaneous:-
XTAL13.57MHz Crystal
XTAL212MHz Crystal
S1Push-to-on-switch
M1, M26V, 50-rpm geared, DC Motor
BATTERY6V, 4.5Ah battery
TOTAL PRICE OF PROJECT IS 1000Rs.
59
BIBILOGRAPHY
We collect our require information from following websites...
www.google.com
www.robokits.com
www.instructable.com
www.atmel.com
60
APENDIX
Features of ATmega16:-
High-performance, Low-power AVR® 8-bit Microcontroller
Advanced RISC Architecture
131 Powerful Instructions – Most Single-clock Cycle Execution
32 x 8 General Purpose Working Registers
Fully Static Operation
Up to 16 MIPS Throughput at 16 MHz
On-chip 2-cycle Multiplier
Nonvolatile Program and Data Memories
16K Bytes of In-System Self-Programmable Flash
512 Bytes EEPROM
Endurance: 100,000 Write/Erase Cycles
1K Byte Internal SRAM
Programming Lock for Software Security
Programming of Flash, EEPROM, Fuses, and Lock Bits through the
JTAG Interface
61