m2
m2
This Project has been submitted for examination with approval of a university advisor.
WCU Page i
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
Acknowledgment
First of all, we would like to thank the almighty God for letting us to finish our final project.
Secondly, we are extremely grateful to the faculty of Electrical and Computer Engineering, for
giving us the opportunity to carry out this B.Sc. thesis project, which is taken and considered as
one course in the curriculum. We would like to express our earnest gratitude and regards to our
project advisor, Mr. Gopal, lecturer in stream of Communication Faculty of Electrical and
Computer Engineering, for being the corner stone of our project to reach this simulation result
and Mr Durai for his continuous help in hardware implementation of our project. It is their
continuous encouragement, invaluable supervision, perpetual motivation, guidance and basic
comments from the beginning of our project to reached this last simulation result, hardware
implementation and successful documentation preparation as well as readiness of us for this
project presentation.
Finally, we extend our gratefulness to one and all who are directly or indirectly involved in the
successful completion of this project work to this simulation.
WCU Page ii
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
Abstract
Many disabled people usually depend on others in their daily life especially in moving from one
place to another. For the wheelchair users, they need continuously someone to help them in
getting the wheelchair moving. By having a wheelchair control system, they become more
independent.
In this project, we are going to build a cell phone controlled robot /wheelchair using DTMF. The
robot is controlled by a mobile phone that makes a call to the mobile phone attached to the robot.
Particularly, we concentrate on design and implementation of DTMF based controlled
wheelchair.
Here, we will use mobile keypad as the input device to drive the robot in different direction. In
this project, we will use two mobiles, one will be connected with the DTMF circuit and another
will be used to call the mobile attached with DTMF circuit. The Mobile attached with DTMF
circuit will be kept in auto-answering mode. The robot can be controlled from mobile attached to
the DTMF circuit by pressing its keys and from any other mobile by calling to the mobile
attached with DTMF circuit and pressing keys from the calling mobile keypad. Now for the
DTMF tones pressed, the tones are fed to the circuit and the corresponding actions such as move
forward or backward, turn left or right, or stop are performed.
List of Acronyms
ADC………………………………………….Analog to digital convertor
WCU Page iv
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
WCU Page v
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
List Table
Table 3. 1 Used materials…………………………………………………………………… 15
WCU Page vi
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
List Figure
Figure 3. 1 DTMF Decoder………………………………………………………………… 16
Table of Contents
Declaration and Approval of the project.........................................................................................................i
Acknowledgment...........................................................................................................................................ii
Abstract.........................................................................................................................................................iii
List of Acronyms..........................................................................................................................................iii
List Table......................................................................................................................................................vi
List Figure....................................................................................................................................................vii
CHAPTER ONE............................................................................................................................................1
1. INTRODUCTION.....................................................................................................................................1
1.1 Background Information......................................................................................................................2
1.1.1 History and Evolution of DTMF.................................................................................................2
1.1.2 DTMF Technology Overview.....................................................................................................5
1.1.3 DTMF Applications....................................................................................................................7
1.2 Statement of the Problem.....................................................................................................................9
1.3. Objectives.........................................................................................................................................10
1.3.1 General Objective.....................................................................................................................10
1.3.2 Specific Objectives...................................................................................................................10
1.4 Methodology of the Project...............................................................................................................10
1.5 Scope of the Project...........................................................................................................................12
CHAPTER TWO.........................................................................................................................................13
2. REVIEW OF RELATED LITERATURES.............................................................................................13
CHAPTER THREE.....................................................................................................................................15
3. SYSTEM DESIGN AND ANALYSIS....................................................................................................15
3.1 System Components and Analysis.....................................................................................................15
3.1.1 DTMF Decoder (CM8870) Module..........................................................................................15
3.1.2 Microcontroller.........................................................................................................................22
3.1.3 Motor Driver IC........................................................................................................................28
3.1.4 DC Motor..................................................................................................................................30
WCU Page ix
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
CHAPTER ONE
1. INTRODUCTION
The human mind always needs information of interest to control systems of his/her choice [2]. In
the age of electronic systems, it is important to be able to control and acquire information from
everywhere. Although many methods to remotely control systems have been devised, the
methods have the problems such as the need for special devices and software to control the
system. Mobile phone in today’s world is become very popular and essential entity for one and
all, so for any mobile based application there is great reception. As long as we are using mobile
phone, we are capable of controlling things remotely from everywhere.
Now, a day as interest in robotics continues to grow, robots are increasingly being integrated into
everyday life [3]. The results of this integration are end-users possessing less and less technical
knowledge of the technology. Robots play a very important role in human life. Robots are a
machine which reduces the human efforts in heavy works in industries, building etc. and makes
life easy.
Controlling a robot wirelessly is possible with several methods such as Remote, Bluetooth, Wi-
Fi, etc. But, the controls of these communication methods are limited to certain areas, and
complicated to design as well. A Mobile Controlled Robot is a solution to overcome these
difficulties. A general concept of mobile controlled robot is that it can be controlled from any
part of the world Robotics has been a dominant contributor to the development of the human
society over the years.
Electric wheelchairs appeared in the 1950s; it extends the capabilities of traditional wheelchair
by introducing control and navigational intelligence [11]. These devices can make easy the lives
of many disabled people, particularly those with severe impairments by increasing their range of
mobility. This project “cellphone controlled wheelchair using DTMF” aims to resolve the above-
mentioned issue i.e. increasing the freedom of mobility by adding new mechanism of controlling
the wheelchair. So, what we are going to do is controlling the wheelchair through cellphone.
This project includes a robotic wheelchair consisting of a cell phone, DTMF decoder and
microcontroller. The transmitter is a handheld mobile phone. Dual Tone Multi-Frequency
WCU Page 1
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
(DTMF), Touch-tone or simply tone dialing. A valid DTMF signal is the sum of two tones, one
from a low group (697-941Hz) and the other from a high group (1209-1633Hz) with each group
containing four individual tones. DTMF signaling therefore play an important role in distributed
communication systems such as multiuser mobile radio [1].
In this project, we present the design and implementation of an unmanned wheelchair (i.e. a
robotic wheelchair) consisting of a GSM network (a mobile phone), DTMF decoder,
microcontroller and a motor driver.
In the recent past, wireless controlled vehicles had been extensively used in a lot of areas like
unmanned rescue missions, military usage for unmanned combat and many others [3]. But the
major disadvantage of these wireless unmanned robots is that they typically make use of RF
circuits for maneuver and control. Essentially RF circuits suffer from a lot of drawbacks such as
limited frequency range i.e. working range, and limited control. To overcome such problems
associated with RF control, few papers have been written, describing methods which make use of
the GSM network and the DTMF function of a cell phone to control the robotic vehicle. This
paper although uses the same principle technology of the GSM network and the DTMF based
mobile phone [2].
In earlier days, our telephone systems were operated by manually in a telephone exchange room.
The callers will pick up the phone and giving instruction to the operator to connect their
destination line. The DTMF technology provides ultimate solutions for the telephone industries
which is used to switch two lines automatically. The DTMF stands for ‘Dual Tone Multi-
frequency’ which is one of the techniques for converting the analogue signal to digital using
DTMF decoder. The DTMF decoder circuit mostly used in mobile communications system
which recognizes the sequence of DTMF tones from the standard keypad of the mobile phone
[1].
WCU Page 2
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
one click, 2 by two clicks and so on. The numbers were dialed with a short gap between each
digit in order to avoid the digit bleeding into the next digit. Pulse dialing had the disadvantage
that it was limited to the local exchange connections and required an operator for connecting
long distance calls. It was also easy to trick the phone system by tapping the hook, which is
pushed down when the telephone is hung up [6].
Research on DTMF was initiated by Bell labs in the late fifties in an attempt to allow tone
signals for long distance dialing. DTMF was being developed as the future of electronic
telecommunications as opposed to the mechanical telecommunication networks that were
prevalent at that time.
DTMF was introduced on November 18, 1963 under the trademark of ‘Touch Tone’ by Bell
Systems [11]. The first Touch Tone telephone was the Western Electric model 1500 with ten
buttons, which was introduced on the same year. Using audio tones for signaling was not new
and the Multi‐Frequency signaling (MF) which was used by telephone exchanges for
communicating with each other using in‐band signaling was already around. Multi‐frequency
signaling uses a combination of two pure sine wave frequencies for signaling. Both CCITT and
Bell System devised various MF signaling protocols. The in‐band signaling between exchanges
was based on a sixteen‐digit keypad, which a telephone operator used to input the next leg of the
destination telephone number for connecting to the downstream telephone operator. This semi‐
automated signaling and switching technology had the twin advantage of cost and time
effectiveness as it was faster and cheaper to use MF.
The MF technology was a great success among specialists for establishing long distance
telephone calls [11]. The Touch Tone was an extension of this technology to the end consumer
and was offered as a ‘modern way’ of placing calls where consumers can dial the destination
telephone number directly without having to talk to a telephone operator. AT&T described the
product as "a method for pushbutton signaling from customer stations using the voice
transmission path”. Engineers who designed the Touch Tone experimented with the keypad
layout which would replace the rotary dial on telephone sets and the current layout with 1 in the
upper‐left and 0 at the bottom was chosen after testing nearly fifteen different layouts. During the
initial days, mechanical switches were used in the keypads to select different taps on tuned coils
WCU Page 3
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
and the microphone was disconnected every time a key was pressed in order to prevent the
background noise from interfering with the DTMF tones that were transmitted. Each button
activated two contacts, and the system was called dual tone multi frequency because of the two
tones and multiple frequencies generated. The tones were then decoded by the switching center
to identify which key was pressed.
When it came to selecting the frequencies for DTMF, the engineers wanted a set of frequencies
that would not interfere with the MF based switching between telephone exchanges.
Accordingly, DTMF’s frequencies were different from all pre‐existing MF signaling protocols at
that time – R2, R1, CCS4, and CCS5.
DTMF as used in consumer telephone push‐button tone dialing was known by the trademark
Touch
Tone. Other vendors who manufactured equipment compatible with DTMF called the feature
Tone
dialing or used their own registered trademarks (as in the case of ‘Digi tone’ of Northern
Electric).
The initial research team had also examined the possibility of accessing computers through
telephone lines and surveyed several companies to identify their needs for this. The # (hash) and
*(star) keys were added based on the inputs received. A set of lettered keys A, B, C, and D were
also added to facilitate menu selection, though it was later dropped from most phones. However,
it was several years before these keys were widely used for suppressing caller IDs or for entering
service codes. It was also used by public payphones that would accept credit cards for sending
information from the magnetic strip [8].
Yet another use for the letter keys was by the military, where it was used to prioritize the calls
[6]. The relabeled letters were used to define the priority of the calls before dialing, in order to
cut currently active calls, if required, allowing the more important traffic to flow through
uninterrupted. The levels of priority available were Flash Override (A), Flash (B), Immediate
(C), and Priority (D), in decreasing order of priority. Pressing any of these keys prioritized the
call, overriding other calls on the network. For example, if B was pressed before dialing a
number, the telephone switch would first look for available lines and if unavailable, try to
WCU Page 4
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
disconnect any no‐priority calls. If also unavailable, then it would disconnect the D and C
priority calls in that order so as to free a line for this call. A Flash Override would stop all other
calls on the trunks between the origin and destination of the current call and hence it was limited
to the White House Communications Agency. However, this method of precedence dialing is
largely obsolete today as military networks use number combinations to prioritize calls.
Once DTMF was launched, pulse dialing lost its significance. As a result, DTMF controlled
switching systems were introduced in telephone exchanges in lieu of the equipment circuits that
were used. Customer telephone sets were also upgraded to use DTMF circuits and tone dialing.
Several tests were performed during the sixties on the DTMF system and it was made official
during that time. Since then, DTMF has been used as the de facto telecommunications dialing
and switching system. [11]
DTMF can be transmitted over telephone lines as well as over the internet. The tones are
decoded on the receiving end and used for practical applications such as interacting with
computer systems
and answering machines. The interaction with a computer system is achieved using an IVR
system.
Over a regular landline, DTMF is sent as audio signals. DTMF tones are transmitted through the
same wires that carry the voice signals. In the case of mobile phones, DTMF tones can be
generated only after the connection is established. This feature is often used by call centers for
gathering inputs from callers for selection of IVR menus, capturing account information for
phone banking facilities and so on. In a VoIP phone, DTMF is transmitted as a data packet over
the internet, however this is prone to errors such as echo or packet loss during transmission,
distorting the data and making it difficult to rebuild the key press combination at the receiving
end.
WCU Page 5
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
DTMF technology supports acoustic transfer. This means that DTMF tones can be transmitted by
a standard speaker and received by a standard microphone.
Speech recognition technologies are another alternative used by call centers to offer the callers
more flexibility for providing inputs during a call [11]. However, speech recognition
technologies have still a long way to go to achieve a high degree of accuracy and therefore most
call centers prefer DTMF for user inputs as it is more reliable. The flip side of using DTMF is
that with just 16 distinct tones, there are a limited number of permutations that can be used to
transmit information.
A, Advantages of Using DTMF
There are several advantages for using DTMF technology for automating some of the key parts
of a call. Some of these are listed below [6], [11]:
Higher Security: -Using DTMF for obtaining user input is more secure and gives callers the
assurance that sensitive data is being protected. DTMF tones cannot be interpreted by the human
ear, but can be easily decoded by a phone system and computer. Thus, sensitive information can
be isolated from the agents as well as from call recording systems. In the absence of DTMF, an
agent with a malicious intent can steal sensitive card information from the archived call records.
From a customer’s perspective as well, DTMF offers higher security, as they do not have to
speak out the card details over the phone, and this protects them from data theft if the call is
being made in a crowded environment.
Improved Metrics: - In an inbound call center, obtaining user inputs via DTMF can improve
key metrics such as Average Handling Time (AHT), since the agents need not repeat the card
details back to the caller to confirm the accuracy of the input.
The increased security offered by DTMF also improves customer satisfaction levels, making
them feel more comfortable with entering sensitive data using DTMF, and thereby maintaining
its anonymity.
Reduced Probability of Errors: - It also reduces the possibility of errors, as there is only one
point of data entry. Without a DTMF, the caller will have to read out the data and the agent types
WCU Page 6
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
it into his desktop application, giving rise to two points of error. On the other hand, using DTMF
means the caller is directly entering the data, subsequently reducing the chances for error.
The primary use of DTMF tones is by a telephone exchange for the identification of the dialed
number. DTMF tones have a wide variety of applications in areas such as voicemail, phone
banking, help desk services, and other types of inbound call centers. DTMF tones are also used
by radio and cable TV networks to signal when local insertions (local news content or ads) can
be made. It can also be used for station identification as well as for switching the remote
transmitters on or off. Radio channels also use DTMF tones to transfer the audio to local
airwaves. DTMF tones were often heard during a station identification process, which typically
preceded a local insert.
The A, B, C, and D keys are rarely used on present day telephone networks, but some networks
still use them for network control purposes. For example, the A key is used to listen in on calls
by cycling through different carriers at will. (This is prohibited by most carriers today). These
keys are also used in radiophone patch and repeater operations to control the repeater while
connected to an active phone line. These keys, along with the # and * keys, are also widely used
by amateur radio operators for repeater control, VoIP based communications, and remote‐base
operations.
Earlier VHS tapes (Video Home System) used DTMF signaling to encode information on the
master video tape thereby providing information on settings such as format, duration, volume
etc. to automatic duplication machines. This allowed better replication of the master video tapes
and these signaling tones can sometimes be heard at the beginning and end of some tapes.
WCU Page 7
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
DTMF signals can also be transmitted over a radio to control turning things on and off. Practical
applications include remote control of home appliances, activation of warning systems, opening
and closing of doors, starting and stopping of motors and in general any binary action.
Using a two‐way radio, a number can be transmitted using DTMF tones [6]. A DTMF decoder
programmed with the same number at the receiving end and connected to a receiver at the remote
location can then be activated and used to control the equipment that has been connected to it. By
adding Wildcard characters to the number, information can be embedded in the number thus
enabling multi‐location control using a single DTMF signal. For example, assume that the lights
in your house are controlled using DTMF codes. If each light is mapped to a single DTMF
signal, and you have fifteen lights in your house, then in an emergency if you want all lights
switched on, you cannot wait for fifteen codes to be transmitted. In such a case, the decoder
would be programmed to allow individual lights to be controlled, while also enabling a Master
Switch to turn on all lights simultaneously using a Wildcard. Another Wildcard may be
programmed to switch on all lights in a single room. Thus, group and sub‐group controls are
possible using DTMF control.
Similarly, to receive information from a remote site, a transmitter can be added to the two‐way
radio. This is known as a talkback system or SCADA system and it can send information back to
you via DTMF, which can then be used for status indication or for feeding into the computer for
further action. Thus, DTMF is a truly interactive signaling format [11].
In the call center industry, DTMF is primarily used to process user requests, to obtain
identification
information and to route phone calls using the keypad entries made by the user. DTMF
technology
is used in conjunction with IVR software and ACD systems to offer self‐service menu options to
call center customers. In a 2005 Data monitor Pool Survey of over 100 contact center decision
makers, to identify the areas and type of calls that they prefer to automate using DTMF, the top
three responses were call routing, information access/FAQ, and financial transactions/billing.
DTMF signaling is used in several computer‐telephony software applications as well [11].
WCU Page 8
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
Even with the advent of speech recognition based applications, most contact centers offer callers
the choice to use either DTMF or speech input to capture user inputs. DTMF inputs are often
used in IVR based applications for menu navigation, obtaining numerical inputs (such as account
number, date of birth PIN number etc.) or even for recognizing a digital pattern [6].
While scripting, one of the following methods is typically used for determining when the user
input is complete [11]:
Most applications will have default settings for each option, which can be overridden using
scripts. Menu navigation using DTMF is achieved by asking the user to press a key to select a
menu option. Depending on the menu choice selected, the application can then route the call to a
specific group of agents, based on the skill set requirements.
DTMF is used to obtain information from customers, and is employed in a wide variety of
industries ranging from financial institutions such as banks and credit card companies to
healthcare and insurance organizations.
A handicapped person with locomotive disabilities needs a wheelchair to perform functions that
require them to move around. They use traditional wheelchair and they do so manually by
pushing the wheelchair with his hands. Now a day, there are many peoples with disability who
cannot walk by themselves but can hold at least small material like cellphone.so this disable
peoples who cannot walk by themselves use a wheelchair that needs a helper, or requires high
energy to drive it. Even if the disable person can drive it by his/her own hand it leads him to be
tired. Because of this they become dependent on others and this limits their mobility. This also
WCU Page 9
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
causes some psychological and financial problems. Hence it is desirable to provide them with a
motorized wheelchair that can be controlled by mobile cellphone using DTMF technology. The
introduction of the motorized wheelchair increases their independency and mobility in
performing their daily social life activities. Disabled people who cannot walk by themselves but
can hold and/or touch at least small material like cellphone are able to move their wheelchair
around independently. Since the motorized cellphone controlled wheelchair can move at a fair
speed, it is important that it be able to obstacles automatically in real time.
1.3. Objectives
1.3.1 General Objective
The main objective of this project is; to control the wheelchair (robotic vehicle) easily by using
cellphone. It has been mainly designed in order to reduce human effort in driving a wheelchair.
Many existing systems has discussed about the wheelchairs and has proposed many methods for
reducing their efforts. But still there is a difficulty in moving a wheelchair manually. So, in
order to avoid that difficulty, instead of controlling the wheelchair manually, our project
objective is in moving the wheelchair using DTMF technology
Some of the specific objectives for this project is that to know more about;
WCU Page 10
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
Step1: - Observing and analyzing the problem: scanning the environment and review related
works since it is a critical look at the related projects or researches that is significant to the
project that we are carrying out, we were seen and analyze necessary literatures, some many
videos, and many other important references.
Step2:-Design the circuit diagram on the paper: - first we tried to design the circuit on the
paper.
Step3: - Analyze the Circuit Diagram: - before design the circuit on a software, we concentrate
on components analysis and their connections as well as their locations on the circuit diagram,
and select appropriate software.
Step 4: - Design the circuit on the Software, and write the algorithm for C-program: - the
schematic capture designed on proteus electronics circuit design software for simulation, and the
algorithm of the C-program was developed.
Step 5: - Write C-program code on software: - After selecting appropriate C program and
Atmel studio 6.1 software; we wrote the C-program code on Atmel studio 6.1 software and run
it, and then by taking many correction mechanisms we run it correctly.
Step 6: -Simulate the circuit and check whether it is properly working or not: - since testing
is necessary to evaluate the accuracy and characteristics of each proposed system, by loading the
hex file program on the design circuit we simulate it, and by taking many correction mechanisms
we tried to check its proper working.
Step 7: - Try to do prototype: - Using bread board we have tried to do the prototype of
this project, using the following steps:
Check the Working of the Breadboard
Analyze the Circuit Diagram
Get the Required Components
Insert the Components on Breadboard
Give the Power Supply
WCU Page 11
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
Since every good engineering design innovations, projects and researches is not done without
limitations so our scope focuses on designing and develop low cost secured DTMF based
cellphone controlled robot. For now we don’t focus on smart phones but in the future we will try
to work on smart phones.
WCU Page 12
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
CHAPTER TWO
2. REVIEW OF RELATED LITERATURES
A number of related works exist in literature, application of DTMF Technology to different areas.
We develop this project, after analysis deeply explained below related literatures, and other
necessary references; and then relating these to our project idea.
In 1898, Nikola Tesla built the first propeller driven radio controlled boat [8], which can be
regarded as the original prototype of all modern day uninhabited aerial vehicles and precision
guided weapons. Records state that it is the first among all remotely controlled vehicles in air,
land or sea [8]. It was powered by lead-acid batteries and an electric drive motor. The vessel was
designed in such a way that it could be maneuvered alongside a target using instructions received
from a wireless remote-control transmitter. Once in its position, a command would be sent to
detonate an explosive charge contained within the boat’s forward compartment. The weapon’s
guidance system introduced a secure communications link between the pilot’s controller and the
surface running torpedo in an effort to assure that control could be maintained even in the
presence of electronic counter measures [8].
The aim of this project [14] is to improve the machine operation in Malaysia Industry and also in
medical facilities. In this project, the technology that we used is Dual-Tone Multi-Frequency
(DTMF) Technology. DTMF signaling is used for telecommunication signaling over analog
telephone lines in the voice frequency band between telephone handsets and other
communications device and the switching center. [14]
The underlying principle mainly relies up on the ability of DTMF (Dual-Tone Multi-Frequency)
technology to acts as a remote for controlling the land-rover to move [14]. It will generate
DTMF corresponding to a number or code in the number pad and then detect the same number or
code from its corresponding DTMF. In detail, a DTMF generator will generates two frequencies
corresponding to a number or code in the number pad which will be transmitted through the
WCU Page 13
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
Wireless controlled unmanned vehicles which are used nowadays typically use RF circuits for
motion and control [4]. But RF circuits suffer from the disadvantage of limited working range
which results in limited control. As RF circuits’ follows LOS (Line of sight) approach, it fails
miserably in NLOS (Non-Line of Sight) conditions involving obstacles and barriers. To
overcome these, one method was proposed by Awab Farikh et al, (2010) [1] which typically
makes use of the DTMF technology along with a microcontroller based circuit for maneuver and
control of these unmanned robotic vehicles.
Similarly, Ashish Yadav et al, (2012) [2] also proposed the construction of an unmanned vehicle
which could be especially used for ground combat using a similar technology. Recently, Sabuj
Das Gupta et al (2013) [3] discussed in detail about how the method described in [1] could be
implemented using a microcontroller by providing the necessary circuit details and the software
code.
WCU Page 14
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
CHAPTER THREE
3. SYSTEM DESIGN AND ANALYSIS
3.1 System Components and Analysis
Hardware materials these are required for this project are listed below in table 3.1 with
these mode and quantity [1] - [5].
Now, we try to explain more in detail about some of most important components with analysis
as follows.
3.1.1 DTMF Decoder (CM8870) Module
It is an IC that takes DTMF signal as input and decodes it and shows the corresponding key as
four-bit output. It is used for decoding the mobile signal. It gets DTMF tone from the mobile
handset’s speaker pins at its pin 2 and 3. The DTMF decoder is operated with a 3.579MHz
crystal (Xtal2) applied between pin 7 and 8. In the DTMF receiver CM8870 (IC), capacitor is
used to filter the noise. Pin 16 connected to resistor R5 provides the early steering output. It goes
high immediately when the digital diagram detects a valid tone pair. Any momentary loss of
signal condition causes Est to return to low state. A voltage greater than threshold of steering
logic VTst detected at St causes the device to register the detected tone pair. The guard time
output resets the external steering time constant, and its state is a function of Est and the voltage
at St. Pin 5, 6, and 9 are grounded pin 1 and 4 are shorted as shown in figure below.
WCU Page 15
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
Now the pin description of DTMF decoder is described in the following table.
WCU Page 16
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
WCU Page 17
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
algorithm detects a
recognizable tone pair (signal
condition). Any momentary
loss of signal condition will
cause ESt to return to a logic
low
B) Input Configuration
WCU Page 18
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
The input arrangement of the CM8870 provides a differential input operational amplifier as well
as a bias source (VREF) which is used to bias the inputs at mid-rail. Provision is made for
connection of a feedback resistor to the op-amp output (GS) for adjustment of gain.
In a single-ended configuration, the input pins are connected as shown in above figure, with the
op-amp connected for unity gain and VREF biasing the input at ½ VDD. The following figure
shows differential configuration, which permits the adjustment of gain with the feedback resistor
R5. All resistors are -1% tolerance and all capacitors are -5% tolerances.
C1=C2= 10nF
R1=R4=R5= 100 KΩ
R2 = 60KΩ, R3 = 37.5KΩ
R3 = (R2R5)/(R2 + R5)
C) Functional Description
The CM8870 DTMF Integrated Receiver provides small size, low power consumption, but high
performance with 5V operation. The CM8870 internal architecture consists of a band-split filter
section which separates the high and low tones of the received pair, followed by a digital decode
WCU Page 19
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
(counting) section which verifies both the frequency and duration of the received tones before
passing the resultant 4-bit code to the output bus.
Filter Section: - Separation of the low-group and high-group tones is achieved by applying the
dual-tone signal to the inputs of two 9th-order switched capacitor bandpass filters. The
bandwidths of these filters correspond to the bands enclosing the low-group and high-group
tones. The filter section also incorporates notches at 350Hz and 440Hz which provides excellent
dial tone rejection. Each filter output is followed by a single order switched capacitor section
which smooths the signals prior to limiting. Signal limiting is performed by high-gain
comparators. These comparators are provided with a hysteresis to prevent detection of unwanted
low-level signals and noise. The outputs of the comparators provide full-rail logic swings at the
frequencies of the incoming tones. [12]
Decoder Section: - The CM8870 decoder uses a digital counting technique to determine the
frequencies of the limited tones and to verify that these tones correspond to standard DTMF
frequencies. A complex averaging algorithm is used to protect against tone simulation by
extraneous signals (such as voice) while providing tolerance to small frequency variations. The
averaging algorithm has been developed to ensure an optimum combination of immunity to
“talk-off” and tolerance to the presence of 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. The overall decoder output of DTMF can be summarized for each key press as the
following table.
WCU Page 20
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
Steering Circuit: - Before the registration of a decoded tone pair, the receiver checks for a valid
signal duration (referred to as “character-recognition-condition”). This check is performed by an
external RC time constant driven by ESt. A logic high on ESt causes VC to rise as the capacitor
discharges. Providing signal condition is maintained (ESt remains high) for the validation period
(tGTP), VC reaches the threshold (VTSt) of the steering logic to register the tone pair, thus
latching its corresponding 4-bit code into the output latch. At this point, the GT output is
activated and drives VC to VDD. GT continues to drive high as long as ESt remains high,
signaling that a received tone pair has been registered. The contents of the output latch are made
available on the 4-bit output bus by raising the three-state control input (TOE) to a logic high.
The steering circuit works in reverse to validate the interdigit pause between signals. Thus, as
well as rejecting signals too short to be considered valid, the receiver will tolerate signal
interruptions (drop outs) too short to be considered a valid pause. This capability together with
the capability of selecting the steering time constants externally, allows the designer to tailor
performance to meet a wide variety of system requirements.
WCU Page 21
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
3.1.2 Microcontroller
1. ATmega16 Microcontroller
The ATmega16 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC
architecture. By executing powerful instructions in a single clock cycle, the ATmega16 achieves
throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power
consumption versus processing speed. [10]
The ATmega16 provides the following features: 16 Kbytes of In-System Programmable Flash
Program memory with Read-While-Write capabilities, 512 bytes EEPROM, 1 Kbyte SRAM, 32
general purpose I/O lines, 32 general purpose working registers, a JTAG interface for Boundary
scan, On-chip Debugging support and programming, three flexible Timer/Counters with compare
modes, Internal and External Interrupts, a serial programmable USART, a byte oriented Two-
wire Serial Interface, an 8-channel, 10-bit ADC with optional differential input stage with
programmable gain (TQFP package only), a programmable Watchdog Timer with Internal
Oscillator, an SPI serial port, and six software selectable power saving modes. The Idle mode
stops the CPU while allowing the USART, Two-wire interface, A/D Converter, SRAM,
Timer/Counters, SPI port, and interrupt system to continue functioning. The Power-down mode
saves the register contents but freezes the Oscillator, disabling all other chip functions until the
next External Interrupt or Hardware Reset. In Power-save mode, the Asynchronous Timer
continues to run, allowing the user to maintain a timer base while the rest of the device is
sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except
Asynchronous Timer and ADC, to minimize switching noise during ADC conversions. In
Standby mode, the crystal/resonator Oscillator is running while the rest of the device is sleeping.
WCU Page 22
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
This allows very fast start-up combined with low-power consumption. In Extended Standby
mode, both the main Oscillator and the Asynchronous Timer continue to run.
The device is manufactured using Atmel’s high density nonvolatile memory technology. The
On-chip ISP Flash allows the program memory to be reprogrammed in-system through an SPI
serial interface, by a conventional nonvolatile memory programmer, or by an On-chip Boot
program running on the AVR core. The boot program can use any interface to download the
application program in the Application Flash memory. Software in the Boot Flash section will
continue to run while the Application Flash section is updated, providing true Read-While-Write
operation. By combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a
monolithic chip, the Atmel ATmega16 is a powerful microcontroller that provides a highly-
flexible and cost-effective solution to many embedded control applications.
The ATmega16 AVR is supported with a full suite of program and system development tools
including: C compilers, macro assemblers, program debugger/simulators, in-circuit emulators,
and evaluation kits. [10]
WCU Page 23
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
A) Pin Descriptions
VCC- 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 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 38. Shorter pulses are not guaranteed to generate a reset.
WCU Page 24
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
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.
2. Arduino Microcontroller
Arduino is a tool for making computers that can sense and control more of physical world than
our desktop computer. It is an open source physical computing platform based on simple
microcontroller board and a development environment for writing software for the board.
Arduino can be used to develop interactive objects taking point from a variety of switches or
sensors an controlling a variety of lights, motor and other physical output. Arduino projects can
be standalone or they can be communicated with software running on our computer (eg flash,
processing, MAX MSp). The boards can be assembled by hand or purchased preassembled; the
open source IDE can be downloaded free. The Arduino programming language is an
implementation of Wiring, a similar physical computing plat form, which is based on the
Processing multimedia programming environment. The Arduino Uno is a micro controller board
based on AT mega 328.it has 14 digital input /output pin (of which 6 can be used as PWM
outputs,6 analog inputs a 16 MHZ ceramic resonator a USB connection, a power jacks an ICSP
header and a reset button. It contains everything needed to support the micro controller; simply
connect it a computer with a USB cable or power it with a AC to DC adapter or battery to get
started. [13]
WCU Page 25
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
WCU Page 26
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
WCU Page 27
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
valid program, so when the user clicks the “Upload to I/O board” button in the IDE, a copy of
the code is written to a temporary file with an extra include header at the top and a very simple
main function at the bottom, to make it a valid C++ program. Since the IDE is pin oriented, we
can quickly achieve our desired logic and build a working model. [13]
3.1.3 Motor Driver IC
A motor driver IC is an integrated circuit chip which is usually used to control motors in
autonomous robots. Motor driver ICs act as an interface between microprocessors in robots and
the motors in the robot. The most commonly used motor driver IC’s are from the L293 series
such as L293D, L293NE, L298, etc. These ICs are designed to control 2 DC motors
simultaneously.
Here we prefer L293D as a rating of 600mA is good for driving small DC motors and protection
diodes are included in the IC itself. L293D has 16 pins, as shown below. [10]
2 INPUT 1, when this pin is HIGH the current will flow though output 1
3 OUTPUT 1, this pin should be connected to one of the terminal of motor
4 GND, ground pin
5 GND, ground pin
6 OUTPUT 2, this pin should be connected to one of the terminal of motor
7 INPUT 2, when this pin is HIGH the current will flow though output 2
8 VC, this is the voltage which will be supplied to the motor. So, if you are driving
12 V DC motors then make sure that this pin is supplied with 12 V
9 Enable 3-4, when this is HIGH the right part of the IC will work and when it is low the
right
10 INPUT 3, when this pin is HIGH the current will flow though output 3
11 OUTPUT 3, this pin should be connected to one of the terminal of motor
12 GND, ground pins
13 GND, ground pins
14 OUTPUT 4, this pin should be connected to one of the terminal of motor
15 INPUT 4, when this pin is HIGH the current will flow though output 4
16 VSS, this is the power source to the IC. So, this pin should be supplied with 5 V
Motor Driver ICs are primarily used in autonomous robotics only. Also, most microprocessors
operate at low voltages and require a small amount of current to operate while the motors require
a relative higher voltages and current. Thus, current cannot be supplied to the motors from the
microprocessor. This is the primary need for the motor driver IC.
Why 4 grounds in the IC? The motor driver IC deals with heavy currents. Due to so much
current flow the IC gets heated. So, we need a heat sink to reduce the heating. Therefore, there
WCU Page 29
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
are 4 ground pins. When we solder the pins on PCB, we get a huge metallic area between the
grounds where the heat can be released.
Why Capacitors? The DC motor is an inductive load. So, it develops a back EMF when
supplied by a voltage. There can be fluctuations of voltage while using the motor say when
suddenly we take a reverse while the motor was moving in some direction. At this point the
fluctuation in voltage is quite high and this can damage the IC. Thus, we use four capacitors that
help to dampen the extreme variation in current. [10]
3.1.4 DC Motor
Robot motors enable a robot to move. Without them a robot could not be called a robot. Electric
motors are only some part of all actuators available. Nevertheless, they are most commonly used
in hobbyist robot applications. Motors and actuators are the devices which make the robot
movable. Motors and actuators convert electrical energy into physical motion/mechanical
energy. The vast majority of actuators produce either rotational or linear motion.
There are literally dozens of types of electric motors (and many more if you count gasoline and
other fueled engines), but for amateur robotics, the choice comes down to these three:
In a continuous DC motor, application of power causes the shaft to rotate continually. The
shaft stops only when the power is removed, of if the motor is stalled because it can no longer
drive the load attached to it.
In a stepping motor, applying power causes the shaft to rotate a few degrees, then stop.
Continuous rotation of the shaft requires that the power be pulsed to the motor. As with
continuous DC motors, there are sub-types of stepping motors. Permanent magnet steppers are
the ones you’ll likely encounter, and they are also the easiest to use.
A special “subset” of continuous motors is the servo motor, which in typical cases combines a
continuous DC motor with a “feedback loop” to ensure accurate positioning. There are many,
many types of servo motors; a common form is the kind used in model and hobby radio-
controlled cars and planes.
Since it can be powered by by batteries, low operating voltages are typically preferred since
fewer cells are required to obtain the specified voltage, we choose a 12v continuous DC motor
can assist with include the operating current, speed, torque, and power. [15]
WCU Page 30
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
As shown below in figure 3.6, the connection between different parts of the project in the
following block diagram, the basic working principle of the overall system can be divided in to
three main different sections.
WCU Page 31
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
which the key appears determines the low frequency, and the column determines the high
frequency [1].
For example, pressing the '1' key will result in a sound composed of both a 697 and a 1209 hertz
(Hz) tone. The original keypads had levers inside, so each button activated two contacts. The
multiple tones are the reason for calling the system multi frequency. These tones are then
decoded by the switching center to determine which key was pressed.
In simple words by adding or mixing two or more frequencies we generate DTMF tone. In given
figure we can see two groups of different frequencies. When one upper and one lower
frequencies mix together then a tone is created which is called Dual Tone Multiple Frequency.
The generated signal can be expressed mathematically as follows: [1]
Each key has a specific Tone frequency. For example, if the "5" key is pressed then generated
frequency tone is 770 + 1336 = 2106 Hz. The key "1" is pressed then frequency of 697 + 1209 =
1906 Hz. Here we get a tone from the cellphone by using aux wire to DTMF Decoder IC namely
HT8870 which decodes the tone into digital signal of 4bit.
B. Control Section: - ATmega16 is used for controlling the complete process of this mobile
phone controlled robot. ATmega16 reads commands sent by DTMF Decoder and compare with
defined code or pattern. If commands match, the microcontroller sends respective command to
driver section.
C. Driver Section: - This section consists motor driver and two DC motors. Motor driver is used
for driving motors because microcontroller does not supply enough voltage and current to motor.
So, we add a motor driver circuit to get enough voltage and current for motor. By collecting
commands from ATmega16, motor driver drive motor according to commands [1]- [3].
The L293D IC receives signals from the microprocessor and transmits the relative signal to the
motors. It has two voltage pins, one of which is used to draw current for the working of the
L293D and the other is used to apply voltage to the motors. The L293D switches it output signal
WCU Page 32
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
according to the input received from the microprocessor. For Example: If the microprocessor
sends a 1(digital high) to the Input Pin of L293D, then the L293D transmits a 1(digital high) to
the motor from its Output Pin. An important thing to note is that the L293D simply transmits the
signal it receives. It does not change the signal in any case.
The L293D is a 16 pin IC, with eight pins, on each side, dedicated to the controlling of a motor.
There are 2 INPUT pins, 2 OUTPUT pins and 1 ENABLE pin for each motor. L293D consist of
two H-bridge. H-bridge is the simplest circuit for controlling a low current rated motor. The
Theory for working of a H-bridge is given below.
H-bridge is given this name because it can be modelled as four switches on the corners of ‘H’.
The basic diagram of H-bridge is given below [10]:
For simplicity, let’s assume that in this condition the motor rotates in a clockwise direction.
WCU Page 33
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
Now, when S3 and S2 are closed then and S1 and S4 are kept open then the current flows from
the other direction and the motor will now definitely rotate in counter-clockwise direction.
When S1 and S3 are closed and S2 and S4 are open then the ‘STALL’ condition will occur (The
motor will break).
Stall Condition: When the motor is applied positive voltage on both sides then the voltage from
both the sides brings the motor shaft to a halt. [10]
Now, depending upon the values of the Input and Enable the motors will rotate in either
clockwise or anticlockwise direction with full speed (when Enable is HIGH) or with less speed
(when Enable is provided with PWM).
Let us assume for Left Motor when Enable is HIGH and Input 1 and Input 2 are HIGH and LOW
respectively then the motor will move in clockwise direction.
So, the behavior of the motor depending on the input conditions of motor driver will be as
follows:
WCU Page 34
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
The tones are received by the receiver phone accordingly. One thing to keep in mind is that the
cell phone at the receiver side should be kept in auto answer mode, so that the call can be taken
after a single ring. The DTMF tones which are received are fed to the robot through the headset
of the cell phone.
The robot can be controlled from mobile attached to the DTMF circuit by pressing its keys and
from any other mobile by calling to the mobile attached with DTMF circuit and pressing keys
from the calling mobile keypad. The microcontroller will read the 4-bit BCD output signal of
DTMF decoder and it will process it to know which key of the mobile keypad is pressed. After
knowing which key of the mobile keypad is pressed, the microcontroller will send the required
control signal to the DC motor driver (L293D) of the robot to drive the robot in the desired
direction [1]- [5].
The general system operation is controlled by the program loaded on the microcontroller, which
is developed based on the following flow chart.
WCU Page 35
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
WCU Page 36
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
CHAPTER FOUR
4. RESULTS AND DISCUSSIONS
4.1. Software simulation results
The following software’s are used for this project to check the simulation and some part
hardware.
proteus
Atmel studio 6.1
Arduino
MATLAB
A) In GUI MATLAB generates DTMF
DTMF (dual tone multi frequency) is the signal to the phone company that you generate when
you press an ordinary telephone's touch keys. The sounds used for touch tone dialing are
referred to as DTMF (Dual Tone Multiple Frequencies) tones. Each number (as well as the "#"
and "*") is represented by a pair of tones. For instance, the number "1" is represented by the
frequencies 1209 Hz and 697 Hz.
The following table shows the DTMF frequencies and the corresponding keys.
WCU Page 37
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
GUIs (also known as graphical user interfaces or UIs) provide point-and-click control of
software applications, eliminating the need to learn a language or type commands in order to run
the application. Create Apps with Graphical User Interfaces in MATLAB. The GUI typically
contains controls such as menus, toolbars, buttons, and sliders. Many MATLAB products, such
as Curve Fitting Toolbox™, Signal Processing Toolbox™, and Control System Toolbox™
include apps with custom user interfaces.
In ours project generates DTMF by MATLAB by using two pure sine waves combine for form
the DTMF Tone, using upper and lower frequency generates and formulating sine wave. And
also display GUI MATLAB, like this
Since there is no DTMF Decoder IC in Proteus simulation software, for simulation and
demonstration purpose only we forced to use push buttons to replace the binary digital value
which is generated by the decoder after receiving tone signal from the receiving side mobile
phone through microphone. This input circuit consists of RC circuits that are connected to the
cell phone headset wire to transmit the received tone on the receiver cell phone to the DTMF
decoder. The circuit which connects the receiving phone to the DTMF decoder. It transmits
DTMF tone frequency to the decoder IC. So, the four buttons are connected to Pins 14-17 of
Atmega16 Microcontroller which are internally pulled-up (using code). The other terminals of the
buttons are connected to ground. Atmega16 Microcontroller is used for controlling the complete
process of this mobile phone controlled robot. The Atmega16 Microcontroller reads commands
sent by DTMF Decoder and compare with defined code or pattern. If commands match, the
microcontroller sends respective command to driver section. Outputs from port pins 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. The microcontroller output is not
sufficient to drive the DC motors, so current drivers are required for motor rotation.
When the system is powered ON, Atmega16 Microcontroller waits for the button to be pressed. If
the forward direction button (button connected to pin 14) is pressed, the Atmega16 Microcontroller
drives input 1 of motor driver IC and a logic high to input 3 and. Hence, the motor starts rotating in
forward direction. Similarly, if the reverse direction button is pressed, Atmega16 Microcontroller
drives input 2 of L293D Motor Driver IC and input 4 of L293D is given a logic high. Hence, the
motor starts rotating in reverse directions.
Table 4. 1 Input value of motor
number Input IN1 Input IN2 Input IN3 Input IN4 Move the motor
Button 1 1 0 1 0 forward
Button 2 0 1 0 1 Backward
Button 3 1 0 1 1 Right
Button 4 1 1 1 0 left
WCU Page 39
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
WCU Page 40
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
value. According to the pressed key value, the ATmega16 microcontroller will send the required
signal to the DC motor driver (L293D) of the wheel chair to drive the wheel chair in the desired
direction.
The control keys for the wheel chair are 2, 8, 4, 6 and others to drive the wheel chair in forward,
backward, left, right direction and to stop it respectively. Now, press different keys of the 4X4
keypad and drive your wheel chair as you want.
Table 4. 2 Direction of motor
Control Keys Wheel Chair Direction
8 Forward
2 Backward
4 Right
6 Left
others Stop
DC Motor Driver is a L293D based motor driver interface board from Atmel studio 6.1. The
main aim of interfacing DC motor with any microcontroller is to control the direction and speed
of a DC motor. But due to high voltage and current requirement of DC motors, it cannot be
interfaced directly with microcontrollers. For to interface DC motor with any microcontroller, we
need a motor driver. Motor driver is basically a current amplifier which takes a low-current
signal from the microcontroller and gives out a proportionally higher current signal which can
control and drive a motor. L293D is a dual H-Bridge motor driver IC. With one L293D IC we
can interface two DC motors which can be controlled in both clockwise and counter clockwise
direction.
WCU Page 41
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
WCU Page 42
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
direction button is pressed, Arduino drives input 2 (Pin 3) of L293D Motor Driver IC with the
PWM signal and input 1 (pin 2) of L293D is given a logic low. Hence, the motor starts rotating
in reverse directions. The speed of the motor in either direction can be controlled using the POT
as it controls the duty cycle of the output PWM signal.
WCU Page 43
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
sense after one or two ring the phone then it pick up automatically and receive the instruction
and forward to the DTMF decoder.
4.3 Discussions
We had observed from the above simulations and hardware are that: -
1. In ours project generates DTMF by MATLAB by using two pure sine waves combine for form
the DTMF Tone, using upper and lower frequency generates and formulating sine wave.
2. When the system is powered ON, Atmega16 Microcontroller waits for the button to be pressed.
If the forward direction button (button 1) is pressed, the Atmega16 Microcontroller drives input 1
of motor driver IC and a logic high to input 3 and. Hence, the motor starts rotating in forward
direction. Similarly, if the reverse direction button is pressed, Atmega16 Microcontroller drives
input 2 of L293D Motor Driver IC and input 4 of L293D is given a logic high. Hence, the motor
starts rotating in reverse directions.
3. The ATmega16 microcontroller will read the 4X4 keypad output. After reading the 4X4
keypad output, the ATmega16 microcontroller will process the keypad output value to find
pressed key value. According to the pressed key value, the ATmega16 microcontroller will send
WCU Page 44
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
the required signal to the DC motor driver (L293D) of the wheel chair to drive the wheel chair in
the desired direction.
4. This project on Arduino and simulation. Two buttons are used in this project, one each for
forward and reverse direction of the motor. The two buttons are connected to Pins 13 and 12 of
Arduino which are internally pulled-up (using code). The other terminals of the buttons are
connected to ground and hence when the button is pressed, the microcontroller detects LOW
(logic 0). The output of the POT is an analog signal and hence it is connected to analog pin of the
Arduino.
5. In this Hardware implementation, a small DC Motor is controlled with an Arduino and a
Motor Driver IC where both the speed of the motor and the direction of rotation are controlled.
The Hardware implementation shown here controls a single DC motor but can be extended to
control two motors with independent speed and direction controls. The speed of the motor in
either direction can be controlled using the POT as it controls the duty cycle of the output PWM
signal.
WCU Page 45
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
CHAPTER 5
5. CONCLUSION AND RECOMMENDATIONS
5.1 Conclusion
By developing this robotic vehicle, we have overcome the drawbacks of RF communication
which have a limited range whereas this car can be controlled from anywhere just using this
DTMF technology. By developing a cell phone operated robotic car, we have overcome the
drawbacks of the conventionally used RF circuits. In these project with the 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.
WCU Page 46
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
References
[1] Awab Fakih, Jovita Serrao, “Cell Phone Operated Robotic Car.”, International Journal of
Scientific & Engineering Research, ISSN 2229-5518.
[2] Gupta, Sabuj Das, Arman Riaz Ochi, Mohammad Sakib Hossain, and Nahid Alam Siddique.
"Designing & Implementation of Mobile Operated Toy Car by DTMF.", International Journal of
Scientific& Research Publications, Vol.-3, Issue1, 2013.ISSN 2250-3153.
[3] Jadhav, Ashish, Mahesh Kumbhar, and Meenakshi Pawar. "Cell Phone Controlled Ground
Combat Vehicle.", International Journal of Computer and Communication Engineering, Vol. 1,
No. 2, July 2012.
[4] Banerji, Sourangsu. "Design and Implementation of an Unmanned Vehicle using a GSM
network with Microcontrollers.", International Journal of Science, Engineering and Technology
Research 2.2 (2013): pp-367374.
[5] Amritanshu S., Hrishikesh N., “GSM Calling based Multi-tasking Robot vehicle with
Password protection”, International Journal of Advanced Research in Computer Science and
Software Engineering, Volume 4, Issue 1, January 2014, pp 812-815.
[6] http://www.etsi.org/technologies‐clusters/technologies/fixed‐line‐access/dtmf
[7] http://www.datasheetdir.com/NATIONAL-DM74LS373+Latches.
WCU Page 47
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
Appendix
A. code for ATmega16
#include <avr/io.h>
int main()
{
unsigned int key;// variable key declaration
DDRD=0x00; // port D declerd as input
DDRB=0X0F; // port B declerd as output
while (1) //start of infinity loop
{
key=PIND;
switch (key)
{
case 0x01: //if I/P is 0x01
{
PORTB=0x01; //move Forward
break;
}
case 0x02: //if I/P is 0x02
{
PORTB=0X05; //move Backward
break;
}
case 0x04: //if I/P is 0x04
{
PORTB=0X02; // turn Right
break;
}
case 0x08: //if I/P is 0x08
{
PORTB=0X08; //turn Left
break;
}
case 0x00: //if I/P is 0x00
{
}
}
return 0;
}
WCU Page 48
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
WCU Page 49
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
#include <avr/io.h>
int main()
{
DDRA=0x00;
DDRC=0xFF;
while(1)
{
If (PINA==0b00010001) //if 8 is pressed then move FORWARD
{
PORTC=0b00001001;
}
If (PINA==0b00011001) // if 2 is pressed then move BACKWARD
{
PORTC=0b00000110;
}
If (PINA==0b00010110) // if 6 is pressed then move the RIGHT
{
PORTC=0b00000101;
}
If (PINA==0b00010100) // if 4 is pressed then move LEFT
{
PORTC=0b00001010;
}
If (PINA==0b00000001) // if move FORWARD
{
PORTC=0b00000101;
}
else
}
A. Code matlab
function varargout = dtmf(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @dtmf_OpeningFcn, ...
'gui_OutputFcn', @dtmf_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
function dtmf_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObject;
guidata(hObject, handles);
WCU Page 50
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
WCU Page 51
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r=1;
set(handles.text1,'String',...
num2str(r));
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r=2;
set(handles.text1,'String',...
num2str(r));
function pushbutton15_Callback(hObject, eventdata, handles)
WCU Page 52
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
t=[0:0.000125:.05];
fs=8000;
f1=697;f2=1477;
y1=.25*sin(2*pi*f1*t);
y2=.25*sin(2*pi*f2*t);
y=y1+y2;sound(y,fs)
axes(handles.axes3);
plot(t,y);
set(handles.axes3,'XMinorTick','on');
title('DTMF Input');xlabel('Time');
ylabel('Amplitude');grid;
rmain=2048*2;rmag=1024*2;
cn=9;cr=0.5;
cl=.25;ch=.28;
[b,a]=cheby1(cn,cr,cl);
yfilt1=filter(b,a,y);
h2=fft(yfilt1,rmain);
hmag2=abs(h2(1:rmag));
[b1,a1]=cheby1(cn,cr,ch,'high');
yfilt2=filter(b1,a1,y);
h3=fft(yfilt2,rmain);
hmag3=abs(h3(1:rmag));
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r=3;
set(handles.text1,'String',...
num2str(r));
function pushbutton16_Callback(hObject, eventdata, handles)
t=[0:0.000125:.05];
fs=8000;
f1=697;f2=1633;
y1=.25*sin(2*pi*f1*t);
y2=.25*sin(2*pi*f2*t);
y=y1+y2;sound(y,fs)
axes(handles.axes3);
plot(t,y);
WCU Page 53
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
set(handles.axes3,'XMinorTick','on');
title('DTMF Input');xlabel('Time');
ylabel('Amplitude');grid;
rmain=2048*2;rmag=1024*2;
cn=9;cr=0.5;
cl=.25;ch=.28;
[b,a]=cheby1(cn,cr,cl);
yfilt1=filter(b,a,y);
h2=fft(yfilt1,rmain);
hmag2=abs(h2(1:rmag));
[b1,a1]=cheby1(cn,cr,ch,'high');
yfilt2=filter(b1,a1,y);
h3=fft(yfilt2,rmain);
hmag3=abs(h3(1:rmag));
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r='A';
set(handles.text1,'String',...
num2str(r));
function pushbutton9_Callback(hObject, eventdata, handles)
t=[0:0.000125:.05];
fs=8000;
f1=770;f2=1209;
y1=.25*sin(2*pi*f1*t);
y2=.25*sin(2*pi*f2*t);
y=y1+y2;sound(y,fs)
axes(handles.axes3);
plot(t,y);
set(handles.axes3,'XMinorTick','on');
title('DTMF Input');xlabel('Time');
ylabel('Amplitude');grid;
rmain=2048*2;rmag=1024*2;
cn=9;cr=0.5;
cl=.25;ch=.28;
[b,a]=cheby1(cn,cr,cl);
yfilt1=filter(b,a,y);
WCU Page 54
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
h2=fft(yfilt1,rmain);
hmag2=abs(h2(1:rmag));
[b1,a1]=cheby1(cn,cr,ch,'high');
yfilt2=filter(b1,a1,y);
h3=fft(yfilt2,rmain);
hmag3=abs(h3(1:rmag));
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r=4;
set(handles.text1,'String',...
num2str(r));
function pushbutton10_Callback(hObject, eventdata, handles)
t=[0:0.000125:.05];
fs=8000;
f1=770;f2=1336;
y1=.25*sin(2*pi*f1*t);
y2=.25*sin(2*pi*f2*t);
y=y1+y2;sound(y,fs)
axes(handles.axes3);
plot(t,y);
set(handles.axes3,'XMinorTick','on');
title('DTMF Input');xlabel('Time');
ylabel('Amplitude');grid;
rmain=2048*2;rmag=1024*2;
cn=9;cr=0.5;
cl=.25;ch=.28;
[b,a]=cheby1(cn,cr,cl);
yfilt1=filter(b,a,y);
h2=fft(yfilt1,rmain);
hmag2=abs(h2(1:rmag));
[b1,a1]=cheby1(cn,cr,ch,'high');
yfilt2=filter(b1,a1,y);
h3=fft(yfilt2,rmain);
hmag3=abs(h3(1:rmag));
axes(handles.axes1);
plot(yfilt1);grid;
WCU Page 55
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
WCU Page 56
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r=6;
set(handles.text1,'String',...
num2str(r));
function pushbutton12_Callback(hObject, eventdata, handles)
t=[0:0.000125:.05];
fs=8000;
f1=770;f2=1633;
y1=.25*sin(2*pi*f1*t);
y2=.25*sin(2*pi*f2*t);
y=y1+y2;sound(y,fs)
axes(handles.axes3);
plot(t,y);
set(handles.axes3,'XMinorTick','on');
title('DTMF Input');xlabel('Time');
ylabel('Amplitude');grid;
rmain=2048*2;rmag=1024*2;
cn=9;cr=0.5;
cl=.25;ch=.28;
[b,a]=cheby1(cn,cr,cl);
yfilt1=filter(b,a,y);
h2=fft(yfilt1,rmain);
hmag2=abs(h2(1:rmag));
[b1,a1]=cheby1(cn,cr,ch,'high');
yfilt2=filter(b1,a1,y);
h3=fft(yfilt2,rmain);
hmag3=abs(h3(1:rmag));
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
WCU Page 57
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r='B';
set(handles.text1,'String',...
num2str(r));
function pushbutton5_Callback(hObject, eventdata, handles)
t=[0:0.000125:.05];
fs=8000;
f1=852;f2=1209;
y1=.25*sin(2*pi*f1*t);
y2=.25*sin(2*pi*f2*t);
y=y1+y2;sound(y,fs)
axes(handles.axes3);
plot(t,y);
set(handles.axes3,'XMinorTick','on');
title('DTMF Input');xlabel('Time');
ylabel('Amplitude');grid;
rmain=2048*2;rmag=1024*2;
cn=9;cr=0.5;
cl=.25;ch=.28;
[b,a]=cheby1(cn,cr,cl);
yfilt1=filter(b,a,y);
h2=fft(yfilt1,rmain);
hmag2=abs(h2(1:rmag));
[b1,a1]=cheby1(cn,cr,ch,'high');
yfilt2=filter(b1,a1,y);
h3=fft(yfilt2,rmain);
hmag3=abs(h3(1:rmag));
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r=7;
set(handles.text1,'String',...
num2str(r));
function pushbutton1_Callback(hObject, eventdata, handles)
t=[0:0.000125:.05];
fs=8000;
f1=852;f2=1336;
WCU Page 58
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
y1=.25*sin(2*pi*f1*t);
y2=.25*sin(2*pi*f2*t);
y=y1+y2;sound(y,fs)
axes(handles.axes3);
plot(t,y);
set(handles.axes3,'XMinorTick','on');
title('DTMF Input');xlabel('Time');
ylabel('Amplitude');grid;
rmain=2048*2;rmag=1024*2;
cn=9;cr=0.5;
cl=.25;ch=.28;
[b,a]=cheby1(cn,cr,cl);
yfilt1=filter(b,a,y);
h2=fft(yfilt1,rmain);
hmag2=abs(h2(1:rmag));
[b1,a1]=cheby1(cn,cr,ch,'high');
yfilt2=filter(b1,a1,y);
h3=fft(yfilt2,rmain);
hmag3=abs(h3(1:rmag));
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r='*';
set(handles.text1,'String',...
num2str(r));
function pushbutton6_Callback(hObject, eventdata, handles)
t=[0:0.000125:.05];
fs=8000;
f1=852;f2=1477;
y1=.25*sin(2*pi*f1*t);
y2=.25*sin(2*pi*f2*t);
y=y1+y2;sound(y,fs)
axes(handles.axes3);
plot(t,y);
set(handles.axes3,'XMinorTick','on');
title('DTMF Input');xlabel('Time');
ylabel('Amplitude');grid;
rmain=2048*2;rmag=1024*2;
WCU Page 59
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
cn=9;cr=0.5;
cl=.25;ch=.28;
[b,a]=cheby1(cn,cr,cl);
yfilt1=filter(b,a,y);
h2=fft(yfilt1,rmain);
hmag2=abs(h2(1:rmag));
[b1,a1]=cheby1(cn,cr,ch,'high');
yfilt2=filter(b1,a1,y);
h3=fft(yfilt2,rmain);
hmag3=abs(h3(1:rmag));
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r=8;
set(handles.text1,'String',...
num2str(r));
function pushbutton7_Callback(hObject, eventdata, handles)
t=[0:0.000125:.05];
fs=8000;
f1=852;f2=1633;
y1=.25*sin(2*pi*f1*t);
y2=.25*sin(2*pi*f2*t);
y=y1+y2;sound(y,fs)
axes(handles.axes3);
plot(t,y);
set(handles.axes3,'XMinorTick','on');
title('DTMF Input');xlabel('Time');
ylabel('Amplitude');grid;
rmain=2048*2;rmag=1024*2;
cn=9;cr=0.5;
cl=.25;ch=.28;
[b,a]=cheby1(cn,cr,cl);
yfilt1=filter(b,a,y);
h2=fft(yfilt1,rmain);
hmag2=abs(h2(1:rmag));
[b1,a1]=cheby1(cn,cr,ch,'high');
yfilt2=filter(b1,a1,y);
h3=fft(yfilt2,rmain);
WCU Page 60
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
hmag3=abs(h3(1:rmag));
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r=9;
set(handles.text1,'String',...
num2str(r));
function pushbutton8_Callback(hObject, eventdata, handles)
t=[0:0.000125:.05];
fs=8000;
f1=941;f2=1209;
y1=.25*sin(2*pi*f1*t);
y2=.25*sin(2*pi*f2*t);
y=y1+y2;sound(y,fs)
axes(handles.axes3);
plot(t,y);
set(handles.axes3,'XMinorTick','on');
title('DTMF Input');xlabel('Time');
ylabel('Amplitude');grid;
rmain=2048*2;rmag=1024*2;
cn=9;cr=0.5;
cl=.25;ch=.28;
[b,a]=cheby1(cn,cr,cl);
yfilt1=filter(b,a,y);
h2=fft(yfilt1,rmain);
hmag2=abs(h2(1:rmag));
[b1,a1]=cheby1(cn,cr,ch,'high');
yfilt2=filter(b1,a1,y);
h3=fft(yfilt2,rmain);
hmag3=abs(h3(1:rmag));
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
WCU Page 61
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r='C';
set(handles.text1,'String',...
num2str(r));
function pushbutton2_Callback(hObject, eventdata, handles)
t=[0:0.000125:.05];
fs=8000;
f1=941;f2=1336;
y1=.25*sin(2*pi*f1*t);
y2=.25*sin(2*pi*f2*t);
y=y1+y2;sound(y,fs)
axes(handles.axes3);
plot(t,y);
set(handles.axes3,'XMinorTick','on');
title('DTMF Input');xlabel('Time');
ylabel('Amplitude');grid;
rmain=2048*2;rmag=1024*2;
cn=9;cr=0.5;
cl=.25;ch=.28;
[b,a]=cheby1(cn,cr,cl);
yfilt1=filter(b,a,y);
h2=fft(yfilt1,rmain);
hmag2=abs(h2(1:rmag));
[b1,a1]=cheby1(cn,cr,ch,'high');
yfilt2=filter(b1,a1,y);
h3=fft(yfilt2,rmain);
hmag3=abs(h3(1:rmag));
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
WCU Page 62
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r=0;
set(handles.text1,'String',...
num2str(r));
function pushbutton3_Callback(hObject, eventdata, handles)
t=[0:0.000125:.05];
fs=8000;
f1=941;f2=1477;
y1=.25*sin(2*pi*f1*t);
y2=.25*sin(2*pi*f2*t);
y=y1+y2;sound(y,fs)
axes(handles.axes3);
plot(t,y);
set(handles.axes3,'XMinorTick','on');
title('DTMF Input');xlabel('Time');
ylabel('Amplitude');grid;
rmain=2048*2;rmag=1024*2;
cn=9;cr=0.5;
cl=.25;ch=.28;
[b,a]=cheby1(cn,cr,cl);
yfilt1=filter(b,a,y);
h2=fft(yfilt1,rmain);
hmag2=abs(h2(1:rmag));
[b1,a1]=cheby1(cn,cr,ch,'high');
yfilt2=filter(b1,a1,y);
h3=fft(yfilt2,rmain);
hmag3=abs(h3(1:rmag));
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r='#';
set(handles.text1,'String',...
num2str(r));
function pushbutton4_Callback(hObject, eventdata, handles)
WCU Page 63
CELL PHONE CONTROLLED ROBOTIC VEHICLES USING DTMF
t=[0:0.000125:.05];
fs=8000;
f1=941;f2=1633;
y1=.25*sin(2*pi*f1*t);
y2=.25*sin(2*pi*f2*t);
y=y1+y2;sound(y,fs)
axes(handles.axes3);
plot(t,y);
set(handles.axes3,'XMinorTick','on');
title('DTMF Input');xlabel('Time');
ylabel('Amplitude');grid;
rmain=2048*2;rmag=1024*2;
cn=9;cr=0.5;
cl=.25;ch=.28;
[b,a]=cheby1(cn,cr,cl);
yfilt1=filter(b,a,y);
h2=fft(yfilt1,rmain);
hmag2=abs(h2(1:rmag));
[b1,a1]=cheby1(cn,cr,ch,'high');
yfilt2=filter(b1,a1,y);
h3=fft(yfilt2,rmain);
hmag3=abs(h3(1:rmag));
axes(handles.axes1);
plot(yfilt1);grid;
title('Filtered Low Freq. Signal');
xlabel('Time');ylabel('Amplitude');
axes(handles.axes2);
plot(yfilt2);grid;
title('Filtered High Freq. Signal');
xlabel('Time');ylabel('Amplitude');
hlow=fft(yfilt1,rmain);
hmaglow=abs(hlow);
axes(handles.axes4);
plot(hmaglow(1:rmag));
title('FFT Low Pass');grid;
xlabel('Time');ylabel('Amplitude');
hhigh=fft(yfilt2,rmain);
hmaghigh=abs(hhigh);
axes(handles.axes5);
plot(hmaghigh(1:rmag));
title('FFT High Pass');grid;
xlabel('Time');ylabel('Amplitude');
m=max(abs(hmag2));n=max(abs(hmag3));
o=find(m==hmag2);p=find(n==hmag3);
r='D';
set(handles.text1,'String',...
num2str(r));
WCU Page 64