You are on page 1of 48

1

CHAPTER 1

INTRODUCTION

1.1 OVERVIEW
Stepper motor, due to their positional accuracies and fast response, is now finding
applications in computer peripherals, process control, machine tools, robotics and various
surveillance systems. Especially in process control like silicon processing, I.C. Bonding and laser
trimming applications, it is necessary to control the stepper motor from remote place. Here
describes DTMF for controlling stepper motor through AT89C51 microcontroller with existing
GSM network for the advantage of simplicity and audibility DTMF of mobile phone for
controlling Motor remotely. Mobile devices, like cell phone or smart phone are being used to
monitor and control remote devices. Human-Robot interaction mechanisms that allow a human
commander to control a mobile robot via cellular phone is to target to develop here.
In the present project the angular position of a stepper motor has been controlled
remotely using GSM link based DTMF signaling through microcontroller. Wireless position
control can also be achieved through RF transmitter and receiver but in case of RF
communication; devices using similar frequencies such as wireless phones, scanners, wrist
radios, personal locators etc. can interfere with transmission. In the present scheme GSM based
DTMF signaling Technology has been used to implement here for controlling the angular
position of the stepper motor remotely anywhere in the world through mobile phone network.
DTMF decoder has been used to decode the DTMF signal. The decoded signal has been read by
the microcontroller through its I/O port and generates the control signal to position the stepper
motor at the desired angle. Experimental results show that the system has good linearity and
repeatability. The error in measurement of angular position is less than the previous result of
2.7%.

2
1.2. PROBLEM STATEMENT
In the proposed work DTMF signal has been generated by pressing the keys on the user
mobile phone key pad and the decoded output corresponding to the key pressed is shown in the
Table 1. DTMF signals from 12 different keys on the user mobile key pad have been used here
to generate the desired angular position signal for the stepper motor. Transition from 1 to 0 of Qtest bit signifies that the system mobile phone is receiving the valid DTMF signal or the key pad
tone from the user mobile phone. The decoded output bits are Q0, Q1, Q2 and Q3 respectively
which after inversion have been fed to the microcontroller to store as desired angular position
signal. The microcontroller then executes the software for generating the required bit pattern for
the stepper motor and sends the same to the driver circuit so that the stepper motor rotates at the
desired angular position as set by the user.

TABLE 1 Frequency assignments in a DTMF system

Equivalent decimal value (m) of the decoded output of the corresponding key pressed on
user mobile phone has been plotted against the measured angular position (m) in Fig.1.1. The
curve shows a linear relationship. Calculated angular position (c) and the measured angular
position (m) in degree, corresponding to the key pressed on the user mobile phone has been
plotted. This is also a linear curve. The percentage error in measuring the angular position has

3
been shown in Fig. which indicates that the error lies within 2.77% , this error can again
minimized by different methods as follows the project.
TABLE 2 DTMF Data Output

Figure 1.1 Equivalent Decimal Value (m) from the Decoder vs. Measured Angular Position (c)

The range of angular position achieved is 3.5 to 24 with a resolution of 1 step angle
(1.8). If the desired angular position is beyond 24, a combination of two or more keys decided
by Table 1 may be pressed to achieve that particular angular position. As example, to achieve
the angular position of 57, where 57=24+24+9, a combination of key positions to be pressed
may be 1, 1, 9. Thus any anguler position in between 0 to 360 with a resolution of one step
angle (1.8) may be achieved with different combination of keys press. Also the mode of rotation
i.e. forward or reverse can be selected by pressing the appropriate keys on the user mobile phone.
The experimental results indicate that the system has good linearity and repeatability

Overall block diagram of the present project is shown in Fig 1.3. From the block diagram
it is clear that two mobile phones have been used, one is with the user or operator side and the
other is in the system or experimental setup side which may be located at any distance from the
user and connected through mobile network. When the user makes a call to the mobile phone of
the system, it receives the call as it is always in auto receiving mode. Thus the user and the
system are connected via mobile network. Now if user presses any key on the key pad, DTMF
tone is generated which corresponds the desired angular position of the stepper motor. This
DTMF signal is received by the system mobile phone located at the receiving side. There it is

5
decoded by the DTMF decoder. The hex inverter has been used to maintain the voltage level
properly

Figure 1.2 Percentage Error Curve

Fig 1.3 Overall block diagram of the present project


1.3. OBJECTIVE

The main objectives of the proposed projects are listed below


1. To determine accurate position control system/control board irrespective of the integrated
systems,
2. To utilize the existing GSM network as the low cost remote RF communicator.

1.4. SCOPE

Man has invented many machines and in almost all the machines, ultimately motions
have been controlled by in-situ or through remote techniques. In this direction, the use of DTMF
(Dual Tone Multiple Frequency) technique by GSM system available in a mobile or cell phone
or a GSM modem is becoming an interesting topic, as it offers many convenient solutions for
controlling the various motors both in forward and reverse directions. In fact, once a motor gets
controlled, its motion can be translated in many dimensions. The Cell Phone Application group
in the Incubation Cell at the SBIT has utilized two cell phones in controlling three motors. In
actual situation, DTMF signals have been utilized to control three motors mounted in a robot
developed at the SBIT. In it motors control the movement of the any machine In GSM based
DTMF technique controls can be used in business machines, process control, machine tools and
robotics. Especially in different areas of robotics, process control like silicon processing, I.C.
Bonding and Laser trimming applications, it is necessary to control the stepper motor from
remote places

1.5. REPORT ORGANIZATION

This report consist of five chapters, this chapter discuss about overview of project,
problem statement, objective research, project scope and report organization
Chapter 1 presents the background of the existing project; the importance and
application of wireless remote position control of machines using DTMF based GSM System
and emphasizes the scope and objectives of the current implementations etc.

7
Chapter 2 presents the review of different literature surveys using with the project
development aspects and how ideas in the literature help me design the project titled remote
position control of stepper motor using GSM Technology operate with large degree of accuracy.
Chapter 3 mainly discuss the area of study of different hardware and soft ware for the
design and implementation of the projects ,that is the various devices like 89c51 micro controller
,DTMF decoder ,GSM systems, stepper motors, programming and simulation soft wares and
finally the PCB design using ORCAD etc.
Chapter 4 documents the implementation of the theory derived in Chapter 4 using
graphic user interface for ALP in motor control applications, here I also discuss the development
of program, testing of program, simulation in register mode and hardware modes, PCB design
using ORCAD, upto this level the project is wired on bread board, apply DTMF codes for
control the motor.
Chapter 5 showcases the performance of the work presented by deploying the ALP
program first testing ,position control accuracy PCB design ,errors and modification methods etc
,I test the computation performance in real-world situations directly interface the controller and
motor DTMF decoders etc
Chapter 6 concludes with the dissertation key points identifying avenues for extending
my project on next phase

CHAPTER 2
LITERATURE RIVIEW

Ahmed, Vasif; Ladhake, Siddharth A.-2010 This paper describes the development of an ultra
low cost cell phone based remote control application for induction motor-pump based irrigation
in agriculture. Rural areas in many states of India are plagued by frequent power cuts and
abnormal voltage conditions. The developed system ensures that water is distributed to field
whenever normal conditions exist based on task specified. The task is initially specified through
keyboard / SMS. A novel concept of number of miscalls in specified duration has been used to
reduce the operational cost of the system to bare minimum. Information is exchanged in form of
messages / miscalls between the system and the user cell phones.

8
Dong-ying Ju; Rui Zhong -2011 In the paper a system with abilities of remote monitor and
remote control based on BREWTM, a wireless application platform, is designed for an
autonomous mobile robot (ROBO-E). The construction of network environment, real-time image
transfer and autonomous and manual control program of the autonomous mobile robot of the
remote wireless monitor and control system are presented by using Internet and cell phone
network. It is realized to monitor and operate the ROBO-E remotely and wirelessly by using a
developed application through Internet

Sagarika Pal1, Niladri S. Tripathy -2011 This work describes the development of innovative
low cost cell phone based remote control application for induction motor-pump based irrigation
in agriculture. The developed system ensures that water is distributed to field whenever normal
conditions exist based on task specified. A novel concept of miscall for specified duration has
been used to reduce the operational cost of the system and for the convenience of farmers facing
difficulty in typing messages. Information is exchanged in form of miscalls / message between
the system and the user cell phones. The system is based on AT 89C51 micro-controller and
includes protection against single phasing, over-current, dry running and other desirable features.
DS1307 and DS18S20 are used for time and temperature measurement respectively. It is
expected that system will relieve hardships of farmers relating water distribution to a great extent

Ahmed,V.; Ladhake,S.A -2011 Stepper motor is found in a lot of applications so it is necessary


to control the stepper motor from remote places. This paper describes a remote angular position
control system of stepper motor using DTMF Technology as an alternative means of
communication using Radio Frequency (RF) with advantages of simplicity and audibility. DTMF
Technology has been used here to implement acoustic communication for controlling the angular
position of the stepper motor remotely anywhere in the world through mobile phone network.
The desired value of angular position signals, in terms of DTMF tones have been generated by
using a mobile phone. The microcontroller has been used to implement the control algorithm
after receiving the DTMF tone. Since no extra transmitting and receiving device is needed except
mobile phone, the system is very much simple, rugged, and cost effective. The experimental
results indicate that the system has high resolution, repeatability and error is also within tolerable
limit.

Rajesh Kumar, Manpreet Singh, Raman, Ashish Riyal-2012 This paper describes the
controlling of a Robot using DTMF technique and are helpful to the Army for making a blast at
the target. The robot is controlled by a cell phone that makes call to the other Cell phone
connected to the robot. If any button of operators cell phone is pressed then tone corresponding
to that button is received at the other end of the call.

Suman Khakurel, Ajay Kumar Ojha, Sumeet Shrestha, Rasika N. Dhavse-2010 It discuss
Robotics and automation engrosses designing and implementation of prodigious machines which
has the potential to do work too tedious, too precise, and too dangerous for human to perform. It
also pushes the boundary on the level of intelligence and competence for many forms of
autonomous, semi- autonomous and tele-operated machines. Intelligent machines have assorted
applications in medicine, defense, space, under water exploration, disaster relief, manufacture,
assembly, home automation and entertainment. Prime motive behind this project is to design and
implement in hardware, a mobile controlled robotic system for maneuvering DC motors and
remotely controlling
the electric appliances. Mobile platform is to be in the form of a robot capable of standard
locomotion in all directions.

A. P. Bagade, S. L. Haridas P. R. Indurkar-2012 This paper is an example of embedded


system and mobile communication as all its operations are controlled by intelligent software
inside the microcontroller and communication takes place using a cell-phone. Here is a circuit
that lets you operate the home appliances like lights and water pump from the office or any other
remote place. So if anyone forgets to switch off the lights or other appliances while going out, it
help him to turn off the appliance with his cell-phone. The cell-phone works as a remote control
for the home appliances or any other devices which we want to operate. We can control the
desired appliance by pressing the corresponding key and through this circuit we can operate 6
devices at a time. This system also gives you voice acknowledgement of the appliance status.
This means it gives us the information about that particular appliance, weather it is switched on
or off.

10
Toms Tormo Franco-2010 This paper describes users with a new interface for controlling
robots, which allows the use of the phone as a joystick, thanks to the orientation sensors the
smartphones include. The robots can also be controlled by a joypad-like set of buttons, which the
user can use to send basic orders to the robot as move forwards, move backwards, turn left or
turn right. Movement orders are sent to the robot using the Serial Port Profile (SPP) of the
Bluetooth specification

CHAPTER 3

STUDY AREA DESCRIPTION


3.1 GLOBAL SYSTEM FOR MOBILE (GSM)

GSM is the most successful digital mobile telecommunication system in the world today.
It is used by over 800 million people in more than 190 countries. In the early 1980s, Europe had
numerous coexisting analog mobile phone systems, which were often based on similar standards
(e.g., NMT 450), but ran on slightly different carrier frequencies. To avoid this situation for a
second generation fully digital system, the groupe spciale mobile (GSM) was founded in 1982.
This system was soon named the global system for mobile communications (GSM), with the
specification process lying in the hands of ETSI (ETSI, 2002), (GSM Association, 2002). In the
context of UMTS and the creation of 3GPP (Third generation partnership project, 3GPP, 2002a)
the whole development process of GSM was transferred to 3GPP and further development is
combined with 3G development. 3GPP assigned new numbers to all GSM standards.

However, to remain consistent with most of the GSM literature, this GSM section stays with
the original numbering will present the ongoing joint specification process in more detail. The
primary goal of GSM was to provide a mobile phone system that allows users to roam
throughout Europe and provides voice services compatible to ISDN and other PSTN systems.
The specification for the initial system already covers more than 5,000 pages; new services, in

11
particular data services, now add even more specification details. Readers familiar with the
ISDN reference model will recognize many similar acronyms, reference points, and interfaces.
GSM standardization aims at adopting as much as possible.
GSM is a typical second generation system, replacing the first generation analog systems, but
not offering the high worldwide data rates that the third generation systems, such as UMTS, are
promising. GSM has initially been deployed in Europe using 890915 MHz for uplinks and 935
960 MHz for downlinks this system is now also called GSM 900 to distinguish it from the later
versions. These versions comprise GSM at 1800 MHz (17101785 MHz uplink, 18051880
MHz downlink), also called DCS (digital cellular system) 1800, and the GSM system mainly
used in the US at 1900 MHz (18501910 MHz uplink, 19301990 MHz downlink), also called
PCS (personal communications service) 1900. Two more versions of GSM exist. GSM 400 is a
proposal to deploy GSM at 450.4457.6/478.8486 MHz for uplinks and 460.4467.6/488.8496
MHz for downlinks. This system could replace analog systems in sparsely populated areas.

A GSM system that has been introduced in several European countries for railroad
systems is GSM-Rail (GSM-R, 2002), (ETSI, 2002). This system does not only use separate
frequencies but offers many additional services which are unavailable using the public GSM
system. GSM-R offers 19 exclusive channels for railroad operators for voice and data traffic.
Special features of this system are, e.g., emergency calls with acknowledgements, voice group
call service (VGCS), voice broadcast service (VBS). These so-called advanced speech call items
(ASCI) resemble features typically available in trunked radio systems only. Calls are prioritized:
high priority calls pre-empt low priority calls.

12

Figure 3.1 GSM system architecture


3.1.1. SYSTEM ARCHITECTURE

As with all systems in the telecommunication area, GSM comes with a hierarchical,
complex system architecture comprising many entities, interfaces, and acronyms. Figure 3.1
gives a simplified overview of the GSM system as specified in ETSI (1991b). A GSM system
consists of three subsystems, the radio sub system (RSS), the network and switching subsystem

13
(NSS), and the operation subsystem (OSS). Each subsystem will be discussed in more detail in
the following sections. Generally, a GSM customer only notices a very small fraction of the
whole network the mobile stations (MS) and some antenna masts of the base transceiver
stations (BTS).

3.1.2. SUBSYSTEMS
As the name implies, the radio subsystem (RSS) comprises all radio specific entities, i.e.,
the mobile stations (MS) and the base station subsystem (BSS). Figure shows the connection
between the RSS and the NSS via the A interface (solid lines) and the connection to the OSS via
the O interface (dashed lines). The A interface is typically based on circuit-switched PCM-30
systems (2.048 Mbit/s), carrying up to 30 64 kbit/s connections, whereas the O interface uses the
Signalling System No. 7 (SS7) based on X.25 carrying management data to/from the RSS.

Base station subsystem (BSS): A GSM network comprises many BSSs, each controlled by a
base station controller (BSC). The BSS performs all functions necessary to maintain radio
connections to an MS, coding/decoding of voice, and rate adaptation to/from the wireless
network part. Besides a BSC, the BSS contains several BTSs.
Base transceiver station (BTS): A BTS comprises all radio equipment, i.e., antennas, signal
processing, amplifiers necessary for radio transmission. A BTS can form a radio cell or, using
sectorized antennas, several cells and is connected to MS via the Um interface (ISDN U
interface for mobile use), and to the BSC via the Abis interface. The Um interface contains all
the mechanisms necessary for wireless transmission (TDMA, FDMA etc.) and will be discussed
in more detail below. The Abis interface consists of 16 or 64 kbit/s connections. A GSM cell can
measure between some 100 m and 35 km depending on the environment (buildings, open space,
mountains etc.) but also expected traffic.
Base station controller (BSC): The BSC basically manages the BTSs. It reserves radio
frequencies, handles the handover from one BTS to another within the BSS, and performs paging
of the MS. The BSC also multiplexes the radio channels onto the fixed network connections at
the A interface.
3.1.3. CHANNEL ALLOCATION

14

Figure 3.2 GSM TDMA frame

Figure 3.2 shows the TDM frame format. Each of the 248 channels is additionally
separated in time via a GSM TDMA frame, i.e., each 200 kHz carrier is subdivided into frames
that are repeated continuously. The duration of a frame is 4.615 ms. A frame is again subdivided
into 8 GSM time slots, where each slot represents a physical TDM channel and lasts for 577 s.
Each TDM channel occupies the 200 kHz carrier for 577 s every 4.615 ms.

15

Fg 3.3. Internal block diagram

3.2. MICROCONTROLLER AT89C51


3.2.1 DESCRIPTION
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

16
the industry-standard MCS-51 instruction set and pinout.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 internal block diagram is shon in Fg 3.3

3.2.2. FEATURES
Compatible with MCS-51 Products

4K Bytes of In-System Reprogrammable Flash Memory


Endurance: 1,000 Write/Erase Cycles
Fully Static Operation: 0 Hz to 24 MHz
Three-level Program Memory Lock
128 x 8-bit Internal RAM
32 Programmable I/O Lines
Two 16-bit Timer/Counters
Six Interrupt Sources
Programmable Serial Channel
Low-power Idle and Power-down Modes

3.3. DTMF SIGNAL OF MOBILE PHONE AND DTMF RECEIVER


DTMF is the signal to be transmitted to the counterpart when the keypad buttons (Figure
3) of the mobile phone are pushed. Each button pushed creates two tones of differing frequency.
One tone belongs to the high frequency range and the other tone low frequency. Voice tones
generally range from 0Hz to 4000Hz. A DTMF tone includes two frequencies in this range
(TABLE 3). The DTMF tone corresponding to five buttons consists of mixed frequencies of
770Hz and 1336Hz corresponding to row 1 and column 1 in TABLE 3. The A, B, C, D buttons
are not used in general mobile phone. These buttons are reserved for special use. The DTMF
tones of mobile phones are generated by the same process as with general telephone, Fig. 3.4.
Phone Keypad layout.

17

Fig. 3.4. Phone Keypad layout.


TABLE 3 DTMF tone

The DTMF tones generated from mobile phones are transmitted over mobile
communication networks to a GSM external modem that is incorporated in the mobile robot. The
CDMA external modem sends the voice signals with the DTMF tone to the DTMF receiver
through a stereo ear phone jack. As the Figure 3.5 shows, the DTMF receiver passes the DTMF
tone through a zero crossing detector and divides the width frequency and the height frequency
into a high group filter and a low group filter. The DTMF receiver calculates a point of
intersection between the two frequencies. The DTMF receiver modulates this signal through a
digital detection algorithm and outputs a 4-bit binary signal to Q1, Q2, Q3, Q4. Table 4 presents
the values corresponding to the generated digital binary signal. The DTMF receiver processes the
interrupt to the connected microprocessor-based control board. The microprocessor-based
control board receives the 4-bits through Q1, Q2, Q3, Q4. These values range from 1 to 12.
Table 4 generated digital binary signal

18

Figure 3.5. The diagram of DTMF receiver.

3.4. STEPPER MOTOR

19
A stepper motor is the simpler of the two kinds of motors that we can control with a
digital system. Its operation is shown in simplified form in Figure 3.6 .The motor consists of a
permanent magnet rotor mounted on the shaft. Surrounding the rotor is a stator with a number of
coils that can be energized to form electromagnetic poles. The figure shows that, as coils are
energized in sequence, the rotor is attracted to successive angular positions, stepping around
through one rotation. The magnetic attraction holds the rotor in position, provided there is not
too much opposing torque from the load connected to the motor shaft. The order and rate in
which the coils are energized determines the direction and speed of rotation.

Figure 3.6. Operation of a stepper motor.


Practical stepper motors have more poles around the stator, allowing the motor to step
with finer angular resolution. They also have varying arrangements of coil connections, allowing
finer control over stepping. In practical applications, current through the coils is switched in
either direction using transistors controlled by digital circuit outputs. The fact that the motor is
activated by the on/off switching of current makes stepper motors ideal for digital control.

CHAPTER 4

IMPLIMENTATIONS

20

4.1. DEVELOPMENT STAGES


The implementation is done in 3 stages as shown below
1. Develop the program and compile it,
2. Simulate the 8051 C,
3. Writing program into the chip.

1.Develop ALP

2.Simulate the program


3. Write the program in 89c51
Micro controller

34

Fig 4.1 the implementation flow chart

4.1.1. THE PROGRAM DEVELOPMENT AND ASSEMBLING.


You can call a third party external assembler package to assemble your input program
lines. The simulator captures the output file coming out of the assembler and displays the same
in a separate window for your convenience. You can activate this only when using Normal View.
When you get assembly errors, you can keep both Text Editor Window and the Assembler output
window side by side to analyze the output file. It is a convenient feature helping you in
debugging process. We have tested the simulator with freeware cross assembler supplied by the
Atmel, ASM51. The assembler is made available in the accompanied CD ROM. Actually this

21
ASM51 is a DOS program. But when you call this assembler through simulator, you need not
open DOS window separately. Assembling and data capturing tasks are handled by the simulator
itself. You really don't know that everything is happening in the DOS environment. Then you
can even load the assembled program straight into the simulator memory. You can configure the
whole process of developing the program and then loading the same into simulator memory in a
single step. This is an important and time saving feature that helps you save time during
repeated debugging operations. You should start the program entry by opening the Text Editor.
Click Load Text File in the File menu for this. A file open dialog box will appear on the screen
to prompt you to select an existing file (available in the disk) or enter a new file name and then
press Open button

4.1.2. SAMPLE ALP


$MOD51
ORG 0000H

MAIN: ACALL CAPTURE


ACALL TEST0
ACALL TEST1
ACALL TEST2
ACALL TEST3
ACALL TEST4
ACALL TEST5
ACALL TEST6
ACALL TEST7
ACALL TEST8
ACALL TEST9

CAPTURE:

MOV A,#0FFH;COLLECT DTMF SIGNAL AND STORE ON

R0
MOV P1,A

22
MOV A,P1
MOV R0,A
RET

TEST0:

MOV A,R0;TEST THE DATA IS 0001


ANL A,#0FH
XRL A,#01H
JZ R00
ACALL TEST1

R00:

ACALL ROTATE0
RET

TEST1:

MOV A,R0;TEST THE DATA IS 0010


ANL A,#0FH
XRL A,#02H
JZ R11
ACALL TEST2

R11:

ACALL ROTATE1
RET

TEST2:

MOV A,R0
ANL A,#0FH
XRL A,#03H
JZ R22
ACALL TEST3

R22:

ACALL ROTATE2
RET

TEST3:

MOV A,R0
ANL A,#0FH
XRL A,#04H
JZ R33

23
ACALL TEST4
R33:

ACALL ROTATE3
RET

TEST4:

MOV A,R0
ANL A,#0FH
XRL A,#05H
JZ R44
ACALL TEST5

R44:

ACALL ROTATE4
RET

TEST5:

MOV A,R0
ANL A,#0FH
XRL A,#06H
JZ R55
ACALL TEST6

R55:

ACALL ROTATE5
RET

TEST6:

MOV A,R0
ANL A,#0FH
XRL A,#07H
JZ R66
ACALL TEST7

R66:

ACALL ROTATE6
RET

TEST7:

MOV A,R0
ANL A,#0FH
XRL A,#08H
JZ R77
ACALL TEST8

R77:

ACALL ROTATE7
RET

24
TEST8:

MOV A,R0
ANL A,#0FH
XRL A,#09H
JZ R88
ACALL TEST9

R88:

ACALL ROTATE8
RET

TEST9:

MOV A,R0
ANL A,#0FH
XRL A,#0AH
JZ R99
ACALL TEST0

R99:

ACALL ROTATE9
RET

ROTATE0:

MOV A,R0
MOV B,#0AH
MUL AB
MOV R1,A

LL0: MOV A,#08H


MOV P2,A
ACALL DELAY1
MOV A,#04H
MOV P2,A
ACALL DELAY1
MOV A,#02H
MOV P2,A
ACALL DELAY1
MOV A,#01H
MOV P2,A
ACALL DELAY1

25
DEC R1
JZ X0
SJMP LL0
X0:

ACALL DELAY1;AFTER COMPLETING ONE COMPLETE

STEP COMMAND,DELAYED
RET

ROTATE1:

MOV A,R0
MOV B,#0AH
MUL AB
MOV R1,A

LL1: MOV A,#08H


MOV P2,A
ACALL DELAY1
MOV A,#04H
MOV P2,A
ACALL DELAY1
MOV A,#02H
MOV P2,A
ACALL DELAY1
MOV A,#01H
MOV P2,A
ACALL DELAY1
DEC R1
JZ X1
SJMP LL1
X1:

ACALL DELAY1;AFTER COMPLETING ONE COMPLETE

STEP COMMAND,DELAYED
RET

ROTATE2:

MOV A,R0

26
MOV B,#0AH
MUL AB
MOV R1,A
LL2: MOV A,#08H
MOV P2,A
ACALL DELAY1
MOV A,#04H
MOV P2,A
ACALL DELAY1
MOV A,#02H
MOV P2,A
ACALL DELAY1
MOV A,#01H
MOV P2,A
ACALL DELAY1
DEC R1
JZ X2
SJMP LL2
X2:

ACALL DELAY1;AFTER COMPLETING ONE COMPLETE

STEP COMMAND,DELAYED
RET

ROTATE3:

MOV A,R0
MOV B,#0AH
MUL AB
MOV R1,A

LL3: MOV A,#08H


MOV P2,A
ACALL DELAY1
MOV A,#04H
MOV P2,A

27
ACALL DELAY1
MOV A,#02H
MOV P2,A
ACALL DELAY1
MOV A,#01H
MOV P2,A
ACALL DELAY1
DEC R1
JZ X3
SJMP LL3
X3:

ACALL DELAY1;AFTER COMPLETING ONE COMPLETE

STEP COMMAND,DELAYED
RET

ROTATE4:

MOV A,R0
MOV B,#0AH
MUL AB
MOV R1,A

LL4: MOV A,#08H


MOV P2,A
ACALL DELAY1
MOV A,#04H
MOV P2,A
ACALL DELAY1
MOV A,#02H
MOV P2,A
ACALL DELAY1
MOV A,#01H
MOV P2,A
ACALL DELAY1
DEC R1

28
JZ X4
SJMP LL4
X4:

ACALL DELAY1;AFTER COMPLETING ONE COMPLETE

STEP COMMAND,DELAYED
RET

ROTATE5:

MOV A,R0
MOV B,#0AH
MUL AB
MOV R1,A

LL5: MOV A,#08H


MOV P2,A
ACALL DELAY1
MOV A,#04H
MOV P2,A
ACALL DELAY1
MOV A,#02H
MOV P2,A
ACALL DELAY1
MOV A,#01H
MOV P2,A
ACALL DELAY1
DEC R1
JZ X5
SJMP LL5
X5:

ACALL DELAY1;AFTER COMPLETING ONE COMPLETE

STEP COMMAND,DELAYED
RET

ROTATE6:

MOV A,R0
MOV B,#0AH

29
MUL AB
MOV R1,A
LL6: MOV A,#08H
MOV P2,A
ACALL DELAY1
MOV A,#04H
MOV P2,A
ACALL DELAY1
MOV A,#02H
MOV P2,A
ACALL DELAY1
MOV A,#01H
MOV P2,A
ACALL DELAY1
DEC R1
JZ X6
SJMP LL6
X6:

ACALL DELAY1;AFTER COMPLETING ONE COMPLETE

STEP COMMAND,DELAYED
RET

ROTATE7:

MOV A,R0
MOV B,#0AH
MUL AB
MOV R1,A

LL7: MOV A,#08H


MOV P2,A
ACALL DELAY1
MOV A,#04H
MOV P2,A
ACALL DELAY1

30
MOV A,#02H
MOV P2,A
ACALL DELAY1
MOV A,#01H
MOV P2,A
ACALL DELAY1
DEC R1
JZ X7
SJMP LL7
X7:

ACALL DELAY1;AFTER COMPLETING ONE COMPLETE

STEP COMMAND,DELAYED
RET

ROTATE8:

MOV A,R0
MOV B,#0AH
MUL AB
MOV R1,A

LL8: MOV A,#08H


MOV P2,A
ACALL DELAY1
MOV A,#04H
MOV P2,A
ACALL DELAY1
MOV A,#02H
MOV P2,A
ACALL DELAY1
MOV A,#01H
MOV P2,A
ACALL DELAY1
DEC R1
JZ X8

31
SJMP LL8
X8:

ACALL DELAY1;AFTER COMPLETING ONE COMPLETE

STEP COMMAND,DELAYED
RET

ROTATE9:

MOV A,R0
MOV B,#0AH
MUL AB
MOV R1,A

LL9: MOV A,#08H


MOV P2,A
ACALL DELAY1
MOV A,#04H
MOV P2,A
ACALL DELAY1
MOV A,#02H
MOV P2,A
ACALL DELAY1
MOV A,#01H
MOV P2,A
ACALL DELAY1
DEC R1
JZ X9
SJMP LL9
X9:

ACALL DELAY1;AFTER COMPLETING ONE COMPLETE

STEP COMMAND,DELAYED
RET

DELAY1:

MOV R3,#0FFH
MOV R4,#0FFH

32
LLL:

DJNZ R3, LLL

LLLL:

DJNZ R4 ,LLLL
RET
END

4.1.3. SIMULATE THE 8051 C


Top view Simulator gives an excellent simulation environment for the Industry's most
popular 8 bit microcontroller family, MCS 51. It gives all the required facilities to enable the
system designers to start projects right from the scratch and finish them with ease and
confidence. The following figure indicates the facilities available in the simulation environment
that give you required development power to handle your next real time embedded system design
applications Topview Simulator is the total solution giving many state of art features meeting the
needs of the designers possessing different levels of expertise. If you are a beginner, then you
can easily learn about 8051 based embedded solutions without any hardware. If you are an
experienced designer, you may find most of the required facilities built in the simulator that
enable you to complete your next project without waiting for the target hardware. The simulator
is designed by the active feedback from the demanding designers and when you use this in your
next 8051 project, you are assured of definite savings in time and increase in productivity. The
features of the simulator are briefly tabulated here.
DEVICE SELECTION A wide range of device selection, including generic 8031 devices and
Atmel's AT89CXX series 8031 microcontrollers.
PROGRAM EDITING Powerful editing feature for generating your programs and the facility
to call an external assembler to process input programs.
CLEARVIEW GUI ENVIRONMENT ClearView GUI facility gives all the internal
architectural details in the strategically placed windows. Information about the Program, Data
Memory, Registers, Peripherals, SFR Bits, Memory Bits are clearly presented in many windows
to make you understand the program flow very easily.

33
PROGRAM EXECUTION A variety of program execution options include Single Stroke full
speed execution, Single Step, Step Over and Break Point execution modes give you total control
over the target program. Clear View updates all the windows with the correct and latest data and
it is a convenient help during your debugging operations. You may find how this Top view
Simulator simplifies the most difficult operation of the program development, debugging, into a
most simple task.

Fig 4.1.Assembled program using simulator

SIMULATION FACILITIES

Powerful simulation facilities are incorporated for I/O lines,

interrupt lines and the clock sources meant for Timers/Counters. Many external embedded
building blocks can be simulated:

Range of Plain Point LED's and Seven Segment LED Display options.

LCD modules in many configurations.

Momentary ON keys, Toggle Switches.

34

A variety of keypads upto 4 X 8 key matrix.

All modes of on-chip serial port communication facility.

IIC components including RTC, EEPROMs.

SPI Bus based EEPROM devices.

Fig 4.2. simulation is running

4.1.4. WRITING PROGRAM INTO THE CHIP.


The Device Programmer is meant for programming all the Atmel's 89CXX Family devices
using any standard personal computer. In fact, the programmer is an external addon card that can
be connected to the host computer at the serial port.. The programmer supports entire family of
Atmel's 89CXX devices:

35

AT89C1051

AT89C2051

AT89C4051

AT89C51

AT89LV51

AT89C52

AT89LV52

AT89S53

AT89LS53

AT89C55

AT89LV55

AT89S8252

AT89LS8252

PROGRAMMING OPERATIONS.
The programmer maintains a separate buffer area for the devices flash memory and also
for EEPROM memory (in 89S8252) space in the personal computer. Initially the programming
data (Hex/Binary Files) has to be loaded into this buffer area and then transferred into the device.
When the buffer holds the relevant data, using proper commands, the data can be manipulated,
disassembled and then also be viewed as the assembly program.
The programmer also supports programming the flash memory space using SPI bus in
devices, 89S8252, 89LS8252, 89S53 and 89LS53. For this purpose, a separate 5 pin connector is
provided onboard. Using this facility, the flash memory area of the device can be programmed
using SPI bus even after the device has been soldered in the target hardware.

36

Fig 4.3. Selection of chip


4.1.5. SIMULATE THE PROGRAM USING DEBUGGER HARDWARE KIT OF 89C51
Top view Debugger is the important facility meant for developing 8051 Microcontroller
based embedded solutions. Debugging is an inevitable part in any tool suite required to develop
applications in real time. A right debugging tool may save a lot of development time in any
product development process.
An exclusive version of Top view Debugger is made available for the Top view Trainer
that gives the required development power to enable you to face real time challenges with ease
and confidence. This debugger is a two part program in which the major part stays inside of the
trainer and keeps track of internal operation of microcontroller. During program execution, it
catches information on various register contents, internal /external memory areas and also
various peripherals of the microcontroller. This information is later transferred to the host
computer to which it is connected. Since it is residing in the target hardware, sometimes it is also
called, `Remote Monitor'. Second part of the debugger operates in the host computer and is

37
responsible for presenting the information received from the remote monitor in a most useful
format using a GUI environment. When you establish a reliable communication link between the
trainer and the host personal computer, the Topview Debugger automatically comes into action
Top view Debugger gives you facility to develop your programs right from the scratch.
Debuggers built-in Text Editor takes care of program entry operations. You can simply key in
your target code line by line. You can also download any input program from the disk. You can
call a third party Assembler package to assemble the keyed in programs. The debugger captures
the output file coming out of the assembler and displays the same in a separate window for your
convenience.

You can activate this editor only when using Normal view. When you get

assembly errors, you can keep both Text Editor Window and the second Assembler output
window side by side to analyze the output file. It is a convenient feature helping you in
debugging process. We have tested the debugger with the Freeware Cross Assembler supplied
by the Atmel, ASM51. This assembler is made available in the accompanied CDROM.
Actually this ASM51 is a DOS program. But when you call this assembler through
debugger you need not open DOS window separately. Assembling and Data capturing tasks are
handled by the debugger itself. You really don't know that everything is happening in the DOS
environment. Then you can even download the assembled program straight into the trainer.

38

Fig 4.4. Open the debugger program as shown below

You can configure the whole process of developing the program and then downloading the
same into the trainer into a single step. This is an important and time saving feature that helps
you save time during repeated debugging operations. You should start the program entry by
opening the Text Editor. Click Load Text File in the File menu for this. A file open dialog box
will appear on the screen to prompt you to select an existing file (available in the disk) or enter a
new file name and then press Open button

39

Fig 4.5. Open the AL Program as shown below

Fig 4.6. Assemble the ALP using the the assembler ASM51

40

Fig 4.7. Download the hex program into hardware kit and execute
4.2. THE SYSTEM SCHEMATIC CIRCUIT
The circuit schematics of the basic system or evaluation is drawn by using orcad capture.
The detail circuit for DTMF decoder and its interfacing with microcontroller, stepper motor and
its driver circuit is shown in Fig 4.8. In the present project CM8870 IC is used as DTMF
decoder. A crystal or ceramic resonator having a resonant frequency of 3.579545 MHZ has been
connected to complete the internal clock circuit. The circuit is powered by 5 volt supply. The
DTMF signal from the user mobile phone is picked up by the system mobile phone. The tip and
ring of the microphone is connected to the specified pin of CM8870 as shown in the Fig 4.8. C1,
R1 and R2 has been adjusted for gain control of the input signal. Resistance R3 and capacitor C2
has been used to set the guard time which is a time duration through which a valid DTMF tone

41
must be present for its recognition. The Q-test signal (pin 15) indicates that the valid DTMF
tone has been detected.
The output of decoder (Q0, Q1, Q2, Q3) is sent to the microcontroller AT89C51 input
port. The microcontroller executes the developed control software and generates the sequence of
bit pattern which goes to the stepper motor driver IC ULN2003A through the output port of AT89C51
micro controller. The driver in turn drives the stepper motor for rotation.

Fig 4.8 the circuit schematics

4.2. 1. TESTING THE CIRCUIT


The circuit schematics is wired on bread boards & connect the stepper motor, observe the
direction with respect to DTMF input, it is only for primary testing.
4.2.2 PCB-DESIGN USING ORCARD
The following procedures are used to draw the schematic in Orcad in capture software
1. Open Orcad Capture, draw the schematic, save, give foot print of each components,
save, as shown below

42
2. Create net list error checking, save the circuit again

Fig 4.9 orcad capture

Fig 4.10 orcad capture schematic for PCB

43
3. Then open the layout plus, auto route the board as shown below

Fig 4.11 orcad layout plus for the circuit

4 Print the bottom layer as shown below

44

CHAPTER 5
RESULT AND DISCUSSION

5.1. SEQUENCE OF OPERATIONS


In the present project, following sequence of operations have been followed for
remote position control of stepper motor.
Step 1: The user makes a call to the system mobile phone. The system mobile phone is set in
auto-receiving mode. Thus two mobile phones are connected via mobile network and the system
mobile phone is now ready to receive the tone from the user mobile phone.
Step 2: The specified key (1 or 2) of the user mobile phone is pressed for selecting the mode of
the rotation of stepper motor (i.e. forward or reverse). The keypad tone (DTMF signal) generated
due to pressing of keys of the user mobile phone is received by the system mobile phone.
Step 3: The received tone for selection of direction of motion is decoded by the developed
DTMF decoder circuit.
Step 4: Microcontroller reads the decoded signal through the I/O port and store the data in its
register which in turn decides the digital bit pattern of A, 6, 5, 9 for forward motion and 9, 5, 6,
A for reverse motion of the stepper motor.
Step 5: Now any key on the user mobile is pressed for desired angular position and the
corresponding DTMF signal is decoded and then received by the Microcontroller which executes
the software program and generates the control signal for motor rotation.
Step 6: Control signal generated by the microcontroller is fed to the I/O port and then to the
stepper motor driver for driving the stepper motor at desired angular position.

5. 2.EXPERIMENTAL RESULT
In the proposed work DTMF signal has been generated by pressing the keys on the user
mobile phone key pad and the decoded output corresponding to the key pressed is shown in the
Table 5. DTMF signals from 12 different keys on the user mobile key pad have been used here
to generate the desired anguler position signal for the stepper motor. Transition from 1 to 0 of Qtest bit signifies that the system mobile phone is receiving the valid DTMF signal or the key pad
tone from the user mobile phone. The decoded output bits are Q0, Q1, Q2 and Q3 respectively

45
which after inversion have been fed to the microcontroller to store as desired angular position
signal. The microcontroller then executes the software for generating the required bit pattern for
the stepper motor and sends the same to the driver circuit so that the stepper motor rotates at the
desired angular position as set by the user. Experimentation has been performed to record the key
position pressed on the user mobile phone and the actual angular position achieved by the
stepper motor and is shown in Table 5.
Table 5 the experimental output, key position vs rotation of stepper motor

The percentage error in measuring the angular position has been shown here which
indicates that the error lies within 1.5%. Experimental results show that the system has
1 Good linearity and repeatability,
2. By optical isolation there is no back emf from the motor side ,
3. The error in measurement of angular position is within 1.5%, than the existing
system of error 2.77%,
4. Circuit complexity is also minimized by eliminating certain components like 8255 in the
existing system.

CHAPTER 6

46
CONCLUSION AND FUTURE PLAN
In the present project GSM network based DTMF technology has been used to position
the shaft of the stepper motor at a desired angle which in turn may be used in deferent
application areas. As conventional RF wireless system has distance limitation, DTMF
technology has been used here. The system developed in this project is very much simple,
rugged, and cost effective. The experimental result shows that one step angle resolution has been
achieved in the range between 3.5 and 24. Also other angular positions beyond 24 can be
achieved by pressing a combination of two or more keys on the key pad of the user mobile
phone. The error in the measurement is within 1.5% which is tolerable. Any angular position
between 0 and 360 can be obtained from this system and the achieved angular position can be
varied only in integral multiple of one step angle (1.8). Application of such control system of
stepper motor in remote surveillance system is the future scope of this work. Next phase I want
to interface the same system with a real-time position controller like robotic arm

8. REERENCE
1. Remote Position Control System of Stepper Motor Using DTMF Technology,
International Journal of Control and Automation Vol. 4 No. 2, June, 2011 Sagarika Pal1,

47
Niladri S. 1Department of Electrical Engineering, National Institute of Technical Teachers
Training and Research, Kolkata. [Under MHRD, Govt. of India], Block-FC, Sector-III, Salt
Lake City, Kolkata-700106, India
2. A Low Cost, Easily Accessible Telepresence Using Mobile Phone Global Journal of
Computer Science and Technology Hardware & Computation Volume 12 Issue 10 Version
1.0,2012, Global Journals Inc. (USA) Online ISSN: 0975-4172 & Print ISSN: 0975-4350
3. An insight into motor control using DTMF technique, International Journal of Enterprise
Computing and Business Systems http://www.ijecbs.com, Vol. 2 Issue 1 January 2012
4. Hausila Singh and Sudhansu Sharma, Some Novel microprocessor based configurations
for controlling Remotely Located stepper Motors as Actuators of control valves, IEEE
Transaction on industrial electronics, AUGUST 1991, 38(4), PP 283-287.
5. Joao Neves Moutinho, Fernando David Mesquita, Nuno Martins and Rui Esteves Araaujo.
Progresses On The Design of a Surveillance System to Protect Forests from Fire, IEEE
Conference on Emerging Technologies and Factory Automation, 2, 16-19 Sept.2003, PP
191-194, 10.1109/ETFA.2003.1248696.
6. D. Manojkumar, P. Mathankumar, E. Saranya and S. pavithradevi, Mobile Controlled
Robot using DTMF Technology for Industrial Application, International Journal of
Electronics Engineering Research, 2010, 2( 3), PP. 349-355.
7. Ali Sekman, Ahmet Bugra Koku, and Saleh Zein-Sabatto, Human Robot Interaction via
Cellular Phones, IEEE International Conference on Systems, Man and Cybernetics, 2003,
4,PP.3937-3942
8. M. A. Mazidi, J. G. Mazidi and R. D. Mckinlay, The 8051 Microcontroller and Embedded
System, Prentice-Hall, India, 2006.
9. Sai K.V.S. and Sivaramakrishnan R , Design and Fabrication of holonomic Motion Robot
Using DTMF Control Tones, International Conference on control, Automation,
Communication and Energy Conservation, Perundurai, India, 4-6 June 2009 , pp.1-4.
10.Jegede Olawale, Awodele Oludele, Ajayi Ayodele and Ndong Miko Alejandro,
Developmemt of a Microcontroller Based Robotic Arm, proc. of the 2007 Computer
Science & IT Education Conference, Mauritius, 16-18 November 2007.
11. Andrew Gilbert, John Illingworth and Richard Bowden, Accurate Fusion of Robot ,
Camera and Wireless Sensors for Surveillance Application, IEEE 12th International

48
Conference on Computer Vision Workshops (ICCV Workshops), Kyoto, 2009, pp. 12901297.
12 Yun Chan Cho and Jae wook Jeon, Remote Robot Control System based on DTMF of
Mobile Phone , The IEEE International conference on Industrial Informatics(INDIN 2008)
DCC, Daejeon, Korea, July 13-16, 2008, pp. 1441-1446. 13. Tulijappa M Ladwa, Sanjay M
Ladwa, R Sudhrashan Kaarthik, Alok Ranjan Dhara and Nayan Dalei, Control of Remote
domestic

System

using

DTMF,

International

Conference

on

Instrumentation,

Communications, Information Technology, and Biomedical Engineering (ICICI-BME),


Bandung, Indonesia, 2009, pp. 1-6.
14.Daniel He, Christof Rhrig. Remote Controlling Technical Systems Using Mobile
Devices, IEEE International Workshop on Intelligent Data Acquisition and Advanced
Computing Systems:Technology and Applications, Rende (Cosenza), Italy 21-23 September
2009, pp.625-628.
15. T. Kubik and M. Sugisaka, Use of a Cellular Phone in Mobile Robot Voice Control,
Proceedings of the 40th SICE Annual Conference. International Session Papers, Nagoya,
2001, pp.106-111

You might also like