8/3/2019 56584048 Main DTMF Robot Doc
1/37
DTMF Controlled Robot
8/3/2019 56584048 Main DTMF Robot Doc
2/37
Abstract
The aim of this project is to design automatic robot which is capable of
receiving a set of command instructions in the form of DTMF tones and performs
the necessary actions. Here DTMF stands for Dual tone multiple frequency.
Automated sensors and remote communication aims at building a highly
automated wireless system which can be monitored with the help of a remote
mobile. The employment of the GSM mobile into the project makes the device to
overcome distance limitation. This makes the user of the robot to be operated
from anywhere in the universe.
The objective of this project is fulfilled by employing a GSM mobile, a
microcontroller, few DC motors for direction control, and an electrical interfacing
between the different modules of the project and
8/3/2019 56584048 Main DTMF Robot Doc
3/37
the controller. The electrical interfacing between different peripheral is
necessary to satisfy different electrical parameters.
The project makes use of a microcontroller which acts as a central
controlling unit. This module is capable of communicating with the input and the
output modules. The output module is formed by the motors used for controlling
the direction of the motor i.e. the forward and backward movement of the robot
and also the GSM mobile which is used for performing communication with the
remotely located authorities. The micro controller reads the mobile sensor
continuously to take any action.
8/3/2019 56584048 Main DTMF Robot Doc
4/37
Introduction
Automation is the need of today. The ultimate aim of technology is to reduce the
load of mankind. To reduce the amount of human effort required to perform a task
is the objective behind technical development.
Robotics is the engineering science and technology of robots, and their design,
manufacture, and application.
Robot is a virtual or mechanical artificial agent. In practice, it is usually an
electro-mechanical machine which is guided by computer or electronic
programming, and is thus able to do tasks on its own. Robotics is related to
electronics, mechanics, and software.
Dual-tone multi-frequency (DTMF) signaling is used for telecommunication
signaling over analog telephone lines in the voice-frequency band between
telephone handsets and other communications devices and the switching center.
The version of DTMF used for telephone tone dialing is known by the
trademarked term Touch-Tone (canceled March 13, 1984), and is standardized by
ITU-T Recommendation Q.23. It is also known in the UK as MF4. Othermulti-
frequency systems are used for signaling internal to the telephone network.
DTMF, better known as touch-tone, is a system of signal tones used in
telecommunications. Applications include voice mail, help desks, telephone
banking, etc.
http://en.wikipedia.org/wiki/Robothttp://en.wikipedia.org/wiki/Virtualhttp://en.wikipedia.org/wiki/Mechanicalhttp://en.wikipedia.org/wiki/Artificial_agenthttp://en.wikipedia.org/wiki/Electromechanicshttp://en.wikipedia.org/wiki/Electronicshttp://en.wikipedia.org/wiki/Mechanicshttp://en.wikipedia.org/wiki/Computer_softwarehttp://en.wikipedia.org/wiki/Signalling_(telecommunications)http://en.wikipedia.org/wiki/Signalling_(telecommunications)http://en.wikipedia.org/wiki/Telephonehttp://en.wikipedia.org/wiki/Automatic_telephone_exchangehttp://en.wikipedia.org/wiki/ITU-Thttp://en.wikipedia.org/w/index.php?title=Q.23&action=edit&redlink=1http://en.wikipedia.org/wiki/Multi-frequencyhttp://en.wikipedia.org/wiki/Multi-frequencyhttp://en.wikipedia.org/wiki/Robothttp://en.wikipedia.org/wiki/Virtualhttp://en.wikipedia.org/wiki/Mechanicalhttp://en.wikipedia.org/wiki/Artificial_agenthttp://en.wikipedia.org/wiki/Electromechanicshttp://en.wikipedia.org/wiki/Electronicshttp://en.wikipedia.org/wiki/Mechanicshttp://en.wikipedia.org/wiki/Computer_softwarehttp://en.wikipedia.org/wiki/Signalling_(telecommunications)http://en.wikipedia.org/wiki/Signalling_(telecommunications)http://en.wikipedia.org/wiki/Telephonehttp://en.wikipedia.org/wiki/Automatic_telephone_exchangehttp://en.wikipedia.org/wiki/ITU-Thttp://en.wikipedia.org/w/index.php?title=Q.23&action=edit&redlink=1http://en.wikipedia.org/wiki/Multi-frequencyhttp://en.wikipedia.org/wiki/Multi-frequency8/3/2019 56584048 Main DTMF Robot Doc
5/37
There are twelve DTMF signals, each of which is made up of two tones from the
following selection: 697 Hz, 770 Hz, 852 Hz, 941 Hz, 1209 Hz, 1336 Hz,
1477Hz.
The tones are divided into two groups (low and high), and each DTMF signal uses
one from each group. This prevents any harmonics from being misinterpreted as
part of the signal.
Digit Low frequency High frequency
1 697 1209
2 697 1336
3 697 14774 770 1209
5 770 1336
6 770 1477
7 852 1209
8 852 1336
9 852 1477
0 941 1336
* 941 1209
# 941 1477
Below is the description of a project, that is an application to control the ROBOT
using the DTMF technology.
OVERVIEW
8/3/2019 56584048 Main DTMF Robot Doc
6/37
In this project the robot, is controlled by a mobile phone that makes call to the
phone attached to the robot. In the course of the call, if any button is pressed
control corresponding to the button pressed is heard at the end of the call. This is
called Dual Tone Multi Frequency (DTMF). The robot receives this DTMF tone
with the help of the phone stacked in the robot. The received tone is processed by
the microcontroller (PIC16F73) with the help of DTMF decoder (HT9170), which
decodes the DTMF tone in to its equivalent binary digit and this binary numbers
are then send to the microcontroller. The microcontroller is programmed to take a
decision for any given input and outputs it decisions to the 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 attached to the robot acts as a remote, so this does not
require any transmitter or receiver 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 called touch tone DTMF
assigns a specific frequency (consisting of two separate tones) to each keys that it
can easily be identified by the electronic
circuit. The signal generated by the DTMF encoder is the direct algebraic
submission, in real time of the amplitudes of two sine or cosine waves of different
frequencies, that is pressing 5 will send a tone made by adding 1336 Hz and 770
Hz to the other end of the mobile phone. The table below shows the
corresponding frequencies of the numbered buttons.
Frequencies corresponding to touch tone
8/3/2019 56584048 Main DTMF Robot Doc
7/37
8/3/2019 56584048 Main DTMF Robot Doc
8/37
Block Diagram
8/3/2019 56584048 Main DTMF Robot Doc
9/37
The major building blocks of this project are:
1. Regulated power supply.
2. Mobile phone.
3. Voice Generating circuit (IC based).
4. Microcontroller.
5. DTMF decoders
6. Motor drivers.
7. Movement controlling motors.
CIRCUIT DESCRIPTION:
8/3/2019 56584048 Main DTMF Robot Doc
10/37
3.1. Power supply
Power supply is the major concern for every electronic device .Since the
controller and other devices used are low power devices there is a need to step
down the voltage and as well as rectify the output to convert the output to a
constant dc.
3.1.1 Battery
In electronics, a battery orvoltaic cell is a combination of manyelectrochemical
Galvanic cells of identical type to store chemical energy and to deliver higher
voltage or higher current than with single cells.
In our project we make use of a battery or a voltaic cell instead of house
hold power supply in order to assure portability to the device so that it can be
carried as per the requirement. Here we employ a 9 volts transistor radio battery.
3.1.2 Rectifier
http://en.wikipedia.org/wiki/Electrochemical_cellhttp://en.wikipedia.org/wiki/Electrochemical_cellhttp://en.wikipedia.org/wiki/Galvanic_cellhttp://en.wikipedia.org/wiki/Chemical_energyhttp://en.wikipedia.org/wiki/Electrochemical_cellhttp://en.wikipedia.org/wiki/Galvanic_cellhttp://en.wikipedia.org/wiki/Chemical_energy8/3/2019 56584048 Main DTMF Robot Doc
11/37
Usually rectifiers are employed to convert an ac input to a constant dc. But the
case here is the input itself is a DC then is there any necessity to employ a
rectifier in the circuit, the answer is quite simple even if the battery is connected
in reverse polarity the rectifier takes care about so we there will not be any
damage for the device even if the polarity of the battery is connected in reverse
direction
There are many rectifiers available in the market some of them are:-
Half wave rectifier
Full wave rectifier
Bridge rectifier
The rectification is done by using one or more diodes connected in series or
parallel.
If only one diode is used then only first half cycle is rectified and it is
termed as half wave rectification and the rectifier used is termed as Half wave
rectifier.
If two diodes are employed in parallel then both positive and negative half
cycles are rectified and this is full wave rectification and the rectifier is termed as
Full wave rectifier.
8/3/2019 56584048 Main DTMF Robot Doc
12/37
If the diodes are arranged in the form of bridge then it is termed as Bridge
rectifier, it acts as a full wave rectifier.
These rectifiers are available in the market in the form of integrated chips (I.Cs)
3.1.3 Voltage regulator
The voltage regulator is used for the voltage regulation purpose. We use IC 7805
voltage regulator.
The IC number has a specific significance. The number 78 represents the series
while 05 represent the output voltage generated by the IC
3.1.4 Light emitting diode
We employ a light emitting diode for testing the functionality of the power supply
circuit. Here we use a 5 volts LED which is connected in series with the power
supply circuit it verifies the functioning of the power supply
LEDs are also employed in other areas for many purposes. The fallowing
are the advantages of using LEDs.
8/3/2019 56584048 Main DTMF Robot Doc
13/37
It helps us while troubleshooting the device i.e. when the device is
malfunctioning it would be easy to detect where the actual problem
araised
LED employed with microcontroller verifies whether data entered is
correct bus number or not
It verifies the functionality of the power supply.
8051 MICROCONTROLLER
In 1981, Intel Corporation introduced an 8-bit microcontroller called the 8051.
This microcontroller had 128 bytes of RAM, 4K bytes of on-chip ROM, two
timers, one serial port, and four ports (each 8-bits wide) all on a single chip. The
8051 is an 8-bit processor, meaning that the CPU can work on only 8 bits of data
at a time. Data larger than 8 bits has to broken into 8-bit pieces to be processed by
the CPU. The 8051 has a total of four I/O ports, each 8 bits wide. Although the
8051 can have a maximum of 64K bytes of on-chip ROM, many manufacturers
have put only 4K bytes on the chip. There are different flavors of the 8051 interms of speed and amount of on-chip ROM, but they are all compatible with the
original 8051 as far as the instructions are concerned. The various members of the
8051 family are 8051 microcontroller, 8052 microcontroller and 8031
microcontroller.
8/3/2019 56584048 Main DTMF Robot Doc
14/37
Block Diagram
Block diagram of inside the microcontroller 8051
8051 Microcontroller
8/3/2019 56584048 Main DTMF Robot Doc
15/37
The 8051 is the original member of the 8051 family. Figure 2.1 shows the block
diagram of the 8051 microcontroller. The AT89C51 is a low-power, high-
performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable
and erasable read only memory (PEROM). The device is manufactured using
Atmels high-density nonvolatile memory technology and is compatible with the
industry-standard MCS-51 instruction set and pin out. The on-chip Flash allows
the program memory to be reprogrammed in-system or by a conventional
nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash
on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which
provides a highly-flexible and cost-effective solution to many embedded control
applications. The AT89C51 provides the following standard features: 4Kbytes of
Flash, 128 bytes of RAM, 32 I/O lines, two 16-bittimer/counters, five vector two-
level interrupt architecture, a full duplex serial port, and on-chip oscillator and
clock circuitry. In addition, the AT89C51 is designed with static logic for
operation down to zero frequency and supports two software selectable power
saving modes. The Idle Mode stops the CPU while allowing the RAM,
timer/counters, serial port and interrupt system to continue functioning. The
Power-down Mode saves the RAM contents but freezes the oscillator disabling all
other chip functions until the next hardware reset.
Pin Description
VCC
Supply voltage.
GND
8/3/2019 56584048 Main DTMF Robot Doc
16/37
Ground.
Pin diagram for microcontroller 8051
Port 0
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin
can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be
8/3/2019 56584048 Main DTMF Robot Doc
17/37
used as high-impedance inputs. Port 0 may also be configured to be the
multiplexed low- order address/data bus during accesses to external program and
data memory. In this mode P0 has internal pull-ups. Port 0 also receives the code
bytes during Flash programming, and outputs the code bytes during program
verification. External pull-ups are required during program verification.
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output
buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they
are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port
1 pins that are externally being pulled low will source current (IIL) because of the
internal pull-ups. Port 1 also receives the low-order address bytes during Flash
programming and verification.
Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output
buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they
are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port
2 pins that are externally being pulled low will source current (IIL) because of the
internal pull-ups. Port 2 emits the high-order address byte during fetches from
external program memory and during accesses to external data memory that uses
16-bit addresses (MOVX @DPTR). In this application, it uses strong internal
pull-ups when emitting 1s. During accesses to external data memory that uses 8-
bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function
Register. Port 2 also receives the high-order address bits and some control signals
during Flash programming and verification.
Port 3
8/3/2019 56584048 Main DTMF Robot Doc
18/37
Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output
buffer scan sink/source four TTL inputs. When 1s are written to Port 3 pins they
are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port
3 pins that are externally being pulled low will source current (IIL) because of the
pull-ups. Port 3 also serves the functions of various special features of the
AT89C51 as listed below:
Table 2.1function of port 3
Port 3 also receives some control signals for Flash programming and verification.
RST
Reset input. A high on this pin for two machine cycles while the oscillator is
running resets the device.
ALE/PROG
8/3/2019 56584048 Main DTMF Robot Doc
19/37
Address Latch Enable output pulse for latching the low byte of the address during
accesses to external memory. This pin is also the program pulse input (PROG)
during Flash programming. In normal operation ALE is emitted at a constant rate
of 1/6 the oscillator frequency, and may be used for external timing or clocking
purposes. Note, however, that one ALE pulse is skipped during each access to
external Data Memory. If desired, ALE operation can be disabled by setting bit 0
of SFR location 8EH. With the bit set, ALE is active only during a MOVX or
MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-
disable bit has no effect if the microcontroller is in external execution mode.
PSEN
Program Store Enable is the read strobe to external program memory.When the
AT89C51 is executing code from external program memory, PSEN is activated
twice each machine cycle, except that two PSEN activations are skipped during
each access to external data memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the
device to fetch code from external program memory locations starting at 0000H
up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be
internally latched on reset. EA should be strapped to VCC for internal program
executions. This pin also receives the 12-volt programming enable voltage (VPP)
during Flash programming, for parts that require 12-volt VPP.
XTAL1
8/3/2019 56584048 Main DTMF Robot Doc
20/37
Input to the inverting oscillator amplifier and input to the internal clock operating
circuit.
XTAL2
Output from the inverting oscillator amplifier. Oscillator Characteristics XTAL1
and XTAL2 are the input and output, respectively, of an inverting amplifier which
can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a
quartz crystal or ceramic resonator may be used. To drive the device from an
external clock source, XTAL2 should be left unconnected while XTAL1 is driven
as shown.
Crystal Oscillator Connections
There are no requirements on the duty cycle of the external clock signal, since the
input to the internal clocking circuitry is through a
8/3/2019 56584048 Main DTMF Robot Doc
21/37
divide-by-two flip-flop, but minimum and maximum voltage high and low time
specifications must be observed.
Programming of Microcontroller 8051
We are using embedded C programming language to program the central unit i.e.
microcontroller 8051, so that it performs the specific task according to the
requirement.
Need of C
Compiler produces hex file that we download into ROM of microcontroller. The
size of hex file produced by compiler is one of the main concerns of
microcontroller programmers for two reasons:
Microcontroller has limited on -chip ROM
The code space for 8051 is limited to 64 KB
Programming in assembly language is tedious and time consuming. C is a high
level programming language that is portable across many hardware architectures.
So for following reasons we use C
It is easier and less time consuming to write in C than assembly.
C is easier to modify and update.
You can use code available in function libraries.
C code is portable to other microcontrollers with little or no modification.
8/3/2019 56584048 Main DTMF Robot Doc
22/37
We use reg51.h as a header file as #include . These files contain all
the definitions of the 80C51 registers. This file is included in your project and will
be assembled together with the compiled output of your C program.
3.5 Oscillators
8051 can work with four different configurations of an oscillator. Since
configurations with crystal oscillator and resistor-capacitor (RC) are the ones that
are used most frequently, these are the only ones we will mention here.
Microcontroller type with a crystal oscillator has in its designation XT, and a
microcontroller with resistor-capacitor pair has a designation RC. This is
important because you need to mention the type of oscillator when buying a
microcontroller.
XT Oscillator
8/3/2019 56584048 Main DTMF Robot Doc
23/37
Crystal oscillator is kept in metal housing with two pins where you have written
down the frequency at which crystal oscillates. One ceramic capacitor of 30pF
whose other end is connected to the ground needs to be connected with each pin.
Oscillator and capacitors can be packed in joint case with three pins. Such
element is called ceramic resonator and is represented in charts like the one
below. A center pin of the element is the ground, while end pins are connected
with OSC1 and OSC2 pins on the microcontroller. When designing a device, the
rule is to place an oscillator nearer a microcontroller, so as to avoid any
interference on lines on which microcontroller is receiving a clock.RC Oscillator.
In applications where great time precision is not necessary, RC oscillator offers
additional savings during purchase. Resonant frequency of RC oscillator depends
on supply voltage rate, resistance R, capacity C and working temperature. It
should be mentioned here that resonant frequency is also influenced by normal
variations in process parameters, by tolerance of external R and C components,
etc.
Above diagram shows how RC oscillator is connected with PIC16F877A. With
value of resistor R being below 2.2k, oscillator can become unstable, or it can
even stop the oscillation. With very high value of R (ex.1M) oscillator becomes
very sensitive to noise and humidity. It is recommended that value of resistor R
should be between 3 and 100k. Even though oscillator will work without an
external capacitor (C=0pF), capacitor above 20pF should still be used for noise
and stability. No matter which oscillator is being used, in order to get a clock that
microcontroller works upon; a clock of the oscillator must be divided by 4.
8/3/2019 56584048 Main DTMF Robot Doc
24/37
Oscillator clock divided by 4 can also be obtained on OSC2/CLKOUT pin, and
can be used for testing or synchronizing other logical circuits.
Following a supply, oscillator starts oscillating. Oscillation at first has an unstable
period and amplitude, but after some period of time it becomes stabilized.
To prevent such inaccurate clock from influencing microcontroller's performance,
we need to keep the microcontroller in reset state during stabilization of
oscillator's clock. Diagram above shows a typical shape of a signal which
microcontroller gets from the quartz oscillator.
8/3/2019 56584048 Main DTMF Robot Doc
25/37
.
Phone on the transmitting side:
The person who wants to switch on/off any device kept at the controller side calls
from a phone and, once the call gets picked up, enters the password and tones fora corresponding device. Every key has to be pressed for a minimum amount of
time to get it latched at the decoder IC.
Mobile phone on the receiving side:
The mobile phone on the receiver side picks up the phone automatically after
5seconds, and then makes the tones available to the DTMF tone decoder IC
through the headphone jack of the phone.
DTMF Tone Decoder IC HT9170:
Features
_ Operating voltage: 2.5V~5.5V
_ Minimal external components
_ No external filter is required
_ Low standby current (on power down mode)
_ Excellent performance
_ Tristate data output for _C interface
_ 3.58MHz crystal or ceramic resonator_ 1633Hz can be inhibited by the INH pin
_ HT9170B: 18-pin DIP package
The HT9170 series are Dual Tone Multi Frequency (DTMF) receivers integrated
with digital
decoder and bandsplit filter functions. The HT9170B and HT9170D types supply
power-down mode and inhibit mode operations. All types of the HT9170 series
use digital counting techniques to detect and decode all the 16 DTMF tone pairs
into a 4-bit code output. Highly accurate switched capacitor filters are employed
to divide tone (DTMF) signals into low and high group signals. A built-in dial
tone rejection circuit is provided to eliminate the need for pre-filtering.
8/3/2019 56584048 Main DTMF Robot Doc
26/37
The DTMF tone decoder IC converts the received tones to their respective binary
values and then gives them as an input to the microcontroller through D3-D0.
The DTMF tone decoder ICs internal architecture consists of a band split filter
section which separates the low and the high tone of the received tone pair,
followed by a digital decode(counting) section which verifies both the frequencyand duration of the received tones before passing resultant 4-bit code to the output
bus.
THE WORKING:
In order to control the robot, we make a call to the phone attached to the robot
from any phone. Now the phone is picked up by the phone on the robot through
auto answer mode (which is in the phone already just we have to enable it). Now
after the circuit is ready and all hex codes are fetched we are ready to control the
robot.
8/3/2019 56584048 Main DTMF Robot Doc
27/37
As shown in the above table, on pressing the key from mobile phone, DTMF
decoder decodes the code and conveys to microcontroller which in turn controls
the motor in code allotted direction.
Introduction
Whenever a robotics hobbyist talk about making a robot, the first thing comes to
his mind is making the robot move on the ground. And there are always two
options in front of the designer whether to use a DC motor or a stepper motor.When it comes to speed, weight, size, cost... DC motors are always preffered over
stepper motors. There are many things which you can do with your DC motor
when interfaced with a microcontroller. For example you can control the speed of
motor, you can control the direction of rotation, you can also do encoding of the
rotation made by DC motor i.e. keeping track of how many turns are made by
your motors etc. So you can see DC motors are no less than a stepper motor.
In this part of tutorial we will learn to interfacing a DC motor with a
microcontroller. Usually H-bridge is preffered way of interfacing a DC motor.
These days many IC manufacturers have H-bridge motor drivers available in the
market like L293D is most used H-Bridge driver IC. H-bridge can also be made
with the help of trasistors and MOSFETs etc. rather of being cheap, they only
increase the size of the design board, which is somtimes not required so using a
small 16 pin IC is preffered for this purpose.
8/3/2019 56584048 Main DTMF Robot Doc
28/37
Working Theory of H-Bridge
The name "H-Bridge" is derived from the actual shape of the switching circuit
which control the motoion of the motor. It is also known as "Full Bridge".
Basically there are four switching elements in the H-Bridge as shown in the figure
below.
As you can see in the figure above there are four switching elements named as
"High side left", "High side right", "Low side right", "Low side left". When theseswitches are turned on in pairs motor changes its direction accordingly. Like, if
we switch on High side left and Low side right then motor rotate in forward
direction, as current flows from Power supply through the motor coil goes to
ground via switch low side right. This is shown in the figure below.
8/3/2019 56584048 Main DTMF Robot Doc
29/37
Similarly, when you switch on low side left and high side right, the current flows
in opposite direction and motor rotates in backward direction. This is the basic
working of H-Bridge. We can also make a small truth table according to the
switching of H-Bridge explained above.
Truth Table
High Left High Right Low Left Low Right Description
On Off Off On Motor runs clockwiseOff On On Off Motor runs anti-clockwise
On On Off Off Motor stops or decelerates
Off Off On On Motor stops or decelerates
As already said, H-bridge can be made with the help of trasistors as well as
MOSFETs, the only thing is the power handling capacity of the circuit. If motors
are needed to run with high current then lot of dissipation is there. So head sinks
are needed to cool the circuit.
Now you might be thinkin why i did not discuss the cases like High side left on
and Low side left on or high side right on and low side right on. Clearly seen in
8/3/2019 56584048 Main DTMF Robot Doc
30/37
the diagra, you don't want to burn your power supply by shorting them. So that is
why those combinations are not discussed in the truth table.
So we have seen that using simple switching elements we can make our own H-
Bridge, or other option we have is using an IC based H-bridge driver. Both of
them are discussed in the next section of the tutorial.
BJT H-Bridge
A simple H-bridge can be made with the help of Power BJTs like TIP31 and
TIP32. An example and a working demo of this circuit is shown in the figure
below.
8/3/2019 56584048 Main DTMF Robot Doc
31/37
BJT H-Bridge Demo
L293D Dual H-Bridge Motor Driver
L293D is a dual H-Bridge motor driver, So with one IC we can interface two DC
motors which can be controlled in both clockwise and counter clockwise direction
and if you have motor with fix direction of motion the you can make use of all the
four I/Os to connect up to four DC motors. L293D has output current of 600mAand peak output current of 1.2A per channel. Moreover for protection of circuit
from back EMF ouput diodes are included within the IC. The output supply
(VCC2) has a wide range from 4.5V to 36V, which has made L293D a best
choice for DC motor driver.
A simple schematic for interfacing a DC motor using L293D is shown below.
8/3/2019 56584048 Main DTMF Robot Doc
32/37
As you can see in the circuit, three pins are needed for interfacing a DC motor (A,
B, Enable). If you want the o/p to be enabled completely then you can connect
Enable to VCC and only 2 pins needed from controller to make the motor work.
As per the truth mentioned in the image above its fairly simple to program the
microcontroller. Its also clear from the truth table of BJT circuit and L293D the
programming will be same for both of them, just keeping in mind the allowed
combinations of A and B. We will discuss about programming in C as well as
assembly for running motor with the help of a microcontroller.
http://www.8051projects.net/dc-motor-interfacing/l293d-interfacing-with-microcontroller.phphttp://www.8051projects.net/dc-motor-interfacing/l293d-interfacing-with-microcontroller.phphttp://www.8051projects.net/dc-motor-interfacing/l293d-interfacing-with-microcontroller.phphttp://www.8051projects.net/dc-motor-interfacing/l293d-interfacing-with-microcontroller.php8/3/2019 56584048 Main DTMF Robot Doc
33/37
SOFTWARE DETAILS
Software used in our project is keilc. Its details are as follows:
Keil (IDE) MicroVision3Keil Software development tools are used to create products for practically every
industry: consumer electronics, industrial control, networking, office automation,
automotive, space exploration. Micro Vision Two is a second generation IDE that
simplifies project development and application testing. With Micro Vision Two,
we can easily create embedded applications in a mixture of C and assembly.
Real-time applications benefit from our highly optimized C libraries and real-time
kernels.
MicroVision3 provides a centralized front-end interface for the compiler,
assembler, linker, debugger, and other development tools. The Project Window in
MicroVision3 displays the current target, groups, and source files that comprise
our project. Rather than creating a single target for each project,
MicroVision2allows multiple targets for each project file. So, with a single
project file, we can create a target for simulating, a target for our emulator, and a
production target for programming into EPROM {E-PROM}.
Each target is composed of one or more groups which are in turn composed
of one or more source files. Groups let us divide the source files into functional
blocks or assign source files to different team members. Options may be
configured at each level of the project. This gives us a great deal of freedom and
flexibility when organizing our application. In addition to the on-line help,MicroVision3 provides on-line versions of the development tool manuals as well
as the device manuals.
Keil C Compilers are based on the ANSI standard and include extensions
necessary to support the 8051, 251, and 166 microcontroller families. The
optimizer in our compiler is tuned for each specific architecture and provides the
highest level of code density and execution speed.
The Keil C compilers give full us control over our embedded platform. We
decide which register banks are used, when to access certain memory areas,
which variables are stored in bits, when and how to use special function registers,and so on. Without ever writing any assembly code we may even write interrupt
service routines in C. Code generated by the Keil C Compiler compares with that
of a professional assembly programmer. This is due to the level of optimizations
that are performed. One such optimization is global register optimization.
8/3/2019 56584048 Main DTMF Robot Doc
34/37
By analyzing which registers are used in each function, the compiler can better
optimize register usage program-wide and generate smaller, faster programs.
This is accomplished by iterative compilation steps during the make process.
The MicroVision3 debugger is designed to make testing your programs as
efficient as possible. While editing and debugging your programs, text and code
attributes are displayed in the source window. As you step through your program,
the current line is marked with a yellow arrow. Code coverage shows you which
lines of your program have been executed. Green means the line has been run.
Grey means is has not.
Breakpoints are clearly marked in the source window. Red for enabled,
white for disabled. These attributes make following program flow easier than
ever. The features of the Micro Vision Two debugger dont stop there. When
simulating your programs, you not only get source-level, symbolic simulation.
You also get on-chip peripheral simulation. Dialog boxes display the condition of
all peripherals and on-chip components
8/3/2019 56584048 Main DTMF Robot Doc
35/37
Cost of the components
Component Quantity Total price(Rs)
330K 2 2
10K 1 2
22uF 2 4
.47uF 1 3
.01uF 1 4
IC 7805 1 7
11.059MHz 1 5
3.57MHz 1 5
16 Pin base 1 5
3.5mm jack 1 10
18 Pin base 1 5
DC Motors 2 300
IC HT9170 1 50
Battery 2 30
Battery cap 1 5
L293D 1 120
wheels 2 50
Caster Wheel 1 15
Chesis 1 60
PCB 1 30
TOTAL COST 702/-
8/3/2019 56584048 Main DTMF Robot Doc
36/37
FURTHER IMROVEMENTS & FUTURE SCOPE
1. IR Sensors:
IR sensors can be used to automatically detect & avoid obstacles if the robot goes
beyond line of sight. This avoids damage to the vehicle if we are maneuvering it
from a distant place.
2. Password Protection:
Project can be modified in order to password protect the robot so that it can beoperated only if correct password is entered. Either cell phone should be password
protected or necessary modification should be made in the assembly language
code. This introduces conditioned access & increases security to a great extent.
8/3/2019 56584048 Main DTMF Robot Doc
37/37
3. Alarm Phone Dialer:
By replacing DTMF Decoder IC CM8870 by a 'DTMF Transceiver IC CM8880,
DTMF tones can be generated from the robot. So, a project called 'Alarm Phone
Dialer' can be built which will generate necessary alarms for something that is
desired to be monitored (usually by triggering a relay). For example, a high water
alarm, low temperature alarm, opening of back window, garage door, etc. When
the system is activated it will call a number of programmed numbers to let the
user know the alarm has been activated. This would be great to get alerts of alarm
conditions from home when user is at work.
References:
www.8051projects.net
www.edaboard.com
Mazidi-8051 microcontroller
Dip trace Help
Datasheets of the IC's