International Journal of Scientific & Engineering Research, Volume 1, Issue 3, December-2010 1

ISSN 2229-5518

Mobile Controlled Robots for Regulating DC Motors and their Domestic Applications

Suman Khakurel, Ajay Kumar Ojha, Sumeet Shrestha, Rasika N. Dhavse

Abstract— 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, defence, 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. The robot can be oper- ated in two ways; either by a call made to the mobile phone mounted on the robot or by communication with a computer through a wireless module. Signals from the receiver mobile phone are transformed into digital outputs with the assistance of a decoder. Microcontroller processes these decoded outputs and generates required signal to drive the DC motors. Outputs from the microcontroller are processed by the motor driver to get sufficient current for smooth driving of DC motors and electronic equipments. Consequently, motion of the robot can be regulated and the electric appliances can be controlled from a remote locality. Various levels of automation can be attributed to the robot by suitably modifying the programme loaded on the microcontroller chip.

Index Terms— Mobile Controlled Robot; DC motors; DTMF; CM8870.

—————————— • ——————————

1 INTRODUCTION

HE robot, integrated with a mobile phone, forms the crux of this project. This integrated architecture is controlled by a supplementary mobile phone, which in- itiates the call. Once the call is associated, any button pressed corresponds to a unique tone at the other end. The tone is termed as ‘Dual Tone Multiple Frequency’ (DTMF), which is perceived by the robot with the help of a cellular phone stacked in it. The received tone is fed into the DTMF decoder (CM8870), which decodes the DTMF tone into its equivalent binary. Binary output from the decoder is consequently administered by the microcon- troller (P89C61X2). P89C61X2 is pre-programmed to take necessary decisions corresponding to the given set of bi- nary inputs. Output from P89C61X2 is provided to the drivers L293D and ULN2003. The former of which acts as a regulator to drive the DC motor while; the latter can be
provided to drive the electrical appliances.
Cellular phone generating the call acts as a remote con- trol obviating the need for construction of superfluous receiver and transmitter units and thus can be used for tele-control of electronic appliances. Similar work has been done by Mr. D. Manojkumar and his project group taking industrial application into consideration. However, this project focuses on the tele/remote control of the elec- tronic appliances and provides the detailed analysis of the methodology, components, algortihm used and the re- sults.

2 CIRCUIT DESCRITPTION

2.1 Circuit Introduction

Crucial components utilized in this project are: DTMF decoder (CM8870), microcontroller (P89C61X2) and mo- tor driver/cotroller (L293D and ULN2003). The pictorial integration of the same is illustrated in Fig. 1.

Fig 1: Block Diagram of Mobile Controlled Robot

All types of CM8870 series use digital counting tech- niques to detect and decode the 16 DTMF tone pairs into a 4-bit code output. An in-built dial tone rejection circuit eliminates the need for pre-filtering. When an input sig- nal given to pin2 (IN-) in single-ended input configura- tion is recognised to be effective, a correct 4-bit decoded signal corresponding to the DTMF tone is transferred to Q1 (pin 11) - Q4 (pin 14) outputs. Q1- Q4 pins of the DTMF decoder are connected to port pins (P1.0 - P1.3) of
P89C61X2 resepectively after an inversion process, facili-

IJSER © 2010 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 1, Issue 3, December-2010 2

ISSN 2229-5518

tated by the NOT gates (IC7404).
P89C61X2 is a low-power, 8-bit, CMOS microcontroller based on the 80C51 family architecture. Outputs from port pins P4.0 through P4.3 and P4.7 of the microcontrol- ler are fed to the inputs IN1 through IN4 and enable pins (EN1 and EN2) of the motor driver L293D respectively. Switch S1 is used for manual reset. The microcontroller output is not sufficient to drive the DC motors, so current drivers are used for motor rotation.
L293D is a quad, high-current, half-H driver designed to provide bidirectional drive currents of up to 600mA at voltages from 4.5V to 36V, making it easier to drive DC motors. Whereas, ULN2003 is a high voltage, high current darlington drivers comprised of 7 NPN darlington pairs. It features integral clamp diodes for switch nductive loads. L293D consists of four drivers. Pins IN1 through IN4 and OUT1 through OUT4 are input and output pins of the drivers 1 through 4 respectively. Drivers 1 and 2are enabled by enable pin 1 (EN1) while, drivers 3 and 4 are enabled by pin 9 (EN2). When drivers are enabled, out- puts corresponding to their inputs are active.

2.2 DTMF Signals

DTMF refers to the system of representation, coding and decoding of audio signals generated by the superposition of two pure sinusoidal tones. This system is very com- monly used for telephone signalling over the line in voice frequency band to the call switching centre. Mark and Space are the significant parameters, affiliated with DTMF tones. A time span, for which DTMF digit tone is actually producing sound, is called “Mark" time and the silence duration between each one of the digits is termed
as "Space".
made by augmentation of sinusoidal waves of frequencies
1336Hz and 770Hz to the other end of the line. Various possible tones and frequency assignments in a DTMF sys- tem are shown in Table 1.

2.3 CM8870

CM8870 is a DTMF receiver incorporating switched capa- citor filter technology and an advanced digital count- ing/averaging algorithm for period measurement. CM8870 provides full DTMF receiver capability by inte- grating both the band split filter and digital decoder func- tions into a single 18-pin DIP, SOIC, or 20-pin PLCC package. Filter section uses a switched capacitor tech- nique for both high & low group filters and dial tone re- jection. CM8870 decoder uses digital counting techniques for the detection and decoding of all 16 DTMF tone pairs into a 4 - bit code. This DTMF receiver minimizes external component count by providing an on-chip differential input amplifier, clock generator, and a latched three-state interface bus.
TABLE 2
DTMF Data Output
TABLE 1
Frequency assignments in a DTMF system
DTMF assigns a specific frequency (consisting of two separate tones) to each key so that it can easily be identi- fied by an electronic circuit. Any signal generated by the DTMF encoder is a direct algebraic summation, in real time, of the amplitudes of two sine or cosine waves of different frequencies, i.e., pressing ‘5’ will send a tone
Input to the circuit from the receiver phone’s headset is given to pin 2 of CM8870. The digital outputs are ob- tained at pins 11, 12, 13 and 14. Table 2 shows the DTMF data output combinations of CM8870. It is very essential to choose the values of capacitor & resistor as the audio signal to be fed to CM8870 is very weak. For DTMF de- coding, in the project, the circuit used is Single Ended Input configuration as shown in Figure 2.

IJSER © 2010 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 1, Issue 3, December-2010 3

ISSN 2229-5518


Fig 2: Single Ended Input Configuration of CM8870

2.4 P89C61X2 AND IC 7404

With reference to the Figure 4, CM8870 generates binary outputs Q1, Q2, Q3, and Q4 at respective pins 11, 12, 13 and 14. These digits are negated using 4 NOT gates of a

7404 HEX INVERTER.

Fig 3: Hex Inverters in HD74LS04

IC7404 is a 14 pin DIP IC which has 6 inverters, of which, only 4 are used. Inputs are given to the pins 1, 3, 5 and 13 while; corresponding outputs are taken from the pins 2, 4, 6 and 12. Pin 7 is a ground and Pin 14 is Vcc. This inverted input is given to port 1 of microcontroller at pins 1, 2, 3, 4 and 5 which are P1.0, P1.1, P1.2, P1.3 and P1.4 respectively.
Microcontroller is programmed to give outputs at port pins P3.3 to P3.7 from pins 13 to 17 which are fed to the DC motor driver L293D. The driver output is fed to the DC motors, responsible for driving the robot. Crystal fre- quency used in the circuit is 11.0592 MHz .These codes to drive DC motors are written on 80C51 using ‘C’ and con- sequently simulated on "Keil µVision". The program is uploaded on 80C51 controller using "Flash Magic”.

Fig 4: Circuit Schematic of P89C61X2 and IC 7404

2.5 L293D AND ULN2003

Microcontroller output is not sufficient to drive DC mo- tors. So, high-voltage and high-current drivers are re- quired. L293D is a quadruple high-current, half-H driver which is designed to provide bidirectional drive currents of up to 600-mA at voltages ragning from 4.5 V to 36 V.

Fig 5: Drivig DC motors with L293D

All inputs are TTL compatible and each output is a complete totem-pole drive circuit, with a Darlington tran- sistor sink and a pseudo-Darlington source. Drivers are enabled in pairs, with drivers 1 and 2 enabled by ENA- BLE 1 and drivers 3 and 4 enabled ENABLE 2. When an enable input is high, the associated drivers are enabled. Consequently, their outputs are active and in phase with
their inputs. When the enable input is low, those drivers

IJSER © 2010 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 1, Issue 3, December-2010 4

ISSN 2229-5518

are disabled and their outputs are off and in the high- impedance state. With the proper data inputs, each pair of drivers forms a full-H (or bridge) reversible drive suitable for solenoid or motor applications. An integrated diagram of L293D with DC motors is shown in Fiugure 5.
Two DC motors used in the project are of 30 rpm
which can be enabled by making the pins 1 and 9 high. Motor inputs for first section are at pins 2 and 7 and that for the second is at pins 10 and 15. Outputs are taken from pins 3 and 6 for first section and pins 11 and 14 for second. The direction of roation of motor (clockwise or anti-clockwose) is dependent upon inputs at the respec- tive pins. Thus, two motors together give forward, left, right and backward motions.
TABLE 3
Functional Logic of L293D

3 ALGORITHM/FLOWCHART

An algorithm is designed to rotate motors in different directions viz. forward, backward, left turn, right turn and stop corresponding to the thrust applied on the mo- bile keys assigned to them. The algorithm for the same is mentioned below and the flowchart is shown in Fig. 7
1. Make port 1 as input port
2. Make port 3 as output port
3. Check if input at port 1 is EA Hex then move ro- bot in forward direction else goto step 4.
4. Check if input at port 1 is E5 Hex then move ro- bot in backward direction else goto step 5.
5. Check if input at port 1 is E8 Hex then robot takes right turn else goto step 6.
6. Check if input at port 1 is E7 Hex then robot takes left turn else goto step 7.

7. Go to step 3 and continuously check the input.

H= High Level, L=Low level, X= Irrevelant and Z= High
Impedance (off).

As an extension to the project, we used ULN2003 driv- er and relay to control the electric appliances. ULN2003 can be used for relay driving as 500mA of driving current is required for the operation of domestic electric ap- pliances such as table fan, television, bulb lights and oth- ers. ULN2003 is high voltage; high current darlington array containing seven “open-collector darlington pairs” with common emitters. The collector current rating of a single Darlington pair is 500mA. Therefore, four different relays can be driven with a single ULN2003.

Fig 6: Logic diagram of ULN2003

Fig 7: Flowchart for the control of motor

4 EXPERIMENTAL RESULTS

We measured experimental values of the frequency of

IJSER © 2010 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 1, Issue 3, December-2010 5

ISSN 2229-5518

sinusoidal waves for DTMF and voltage level at the out- put pins of CM8870, IC 7404 and P89C61X2. These values are juxtaposed with the theoretical values in the Table 4 and 5 respectively. Table 6 shows the HEX reading obtained from output pins os CM8870 and P89C61X2.
TABLE 4
Frequency Readings

KEY

LOWER FREQUEN- CY(HZ)

HIGHER FREQUEN- CY(HZ)

KEY

TH.

EXP.

TH.

EXP.

5

770

736

1336

1340

7

852

842

1209

1187

8

852

859

1336

1327

9

852

828

1477

1465

0

941

935

1209

1225

TH= Theoretical Value, EXP= Experimental Value, MC= Microcon- trolleR

TABLE 5
Voltage Readings

LOG- IC LEV EL

OUTPUT VOLTAGE OF CM8870 (V)

OUTPUT VOLTAGE OF

7404 (V)

OUTPUT VOLTAGE OF MICRO- CONTROL- LER(V)

LOG- IC LEV EL

TH.

EXP.

TH.

EXP.

TH.

EXP.

HIG H

4.97

1.93

5

4.80

5

5.07

LOW

0.03

0.09

0

0.13

0

0.01

TABLE 6
HEX readings and decision taken

5 CONCLUSION

Hence, it can be comcluded that mobile controlled robots can be constructed using the components: IC CM8870 (DTMF decoder), IC 7404 (inverter), (P89C61X2) micro- controller and L293D/ULN2003 (motor drivers). Locomo- tion of the robot in different directions can be controlled and manuevered by pressing the assigned keys on the mobile phone (in this experiment; key ‘5’ for forward motion, key ‘7’ for left turn, key ‘8’ for stop, key ‘9’ for right turn and key ‘0’ for backward motion). Similarly, household electric appliances can be remotely controlled with the assistance of ULN2003 and relay circuit.

6 FUTURE WORKS

This project demonstrates the tele/remote control of the electronic appliances and the DC motors using mobile phone. However, a closed loop system that gives feed- back to the transmitter can be implemented so that output work done can be acknowledged by the transmitter side. DTMF receiver and transmitter IC can be used to give feedback to the controlling mobile. Similarly, modern 3G communication system may be one of the intriguing fea- tures that can be incorporated in our system to discover the status and location of the robot.

REFERENCES

[1] Chee-Seng Leong and Bok-Min Goi, "Smart Home Microcontrol- ler: Telephone Interfacing”, Springer-Verlag Berlin Heidelberg (2006)

[2] Graham Nasby, Dan Kowalewski, Michael Miner, "Interrupt

Driven I/O & Robot Pick-and-Place Workstation", ENGG*464 (Fall

2002)

[3] K. Vivek, K. Chandru, and R. Manivannan, "Building an AT89C51-based Voice-Activated Programmable Multipurpose Robot", (2007)

[4] Robert Siwy, "Generation and Recognition of DTMF Signals with the Microcontroller MSP430", Texas Instruments Deutschland GmbH SLAAE16 (October 1997)

[5] M. Ali Yousuf, R. Montúfar Chaveznava, and V. de la Cueva Cueva Hernández, "Robotic projects to enhance student participa- tion, motivation and learning", HernándezCurrent Developments in Technology-Assisted Education (2006)

[6] “The 8051 Microcontroller and Embedded Systems” 2nd edition by Muhammad A. Mazidi, Janice G. Mazidi, Rollin D. McKinley , An imprint of Pearson Education (2007)

[7] Michael J. Pont, "Embedded C", An imprint of Pearson Education

(2002)

[8] W.D. Potter, B. Bishop, "T.K. HamritaRobotics, Microcontroller, and

Embedded Systems Education Initiatives", (2005)

[9] Ben-Zion Sandler, "Robotics - Designing the Mechanics for Auto- mated Machinery", Second Edition (1999)

[10] Ed. Frank Kreith, Lewis, “Robotics Mechanical Engineering

Handbook", F.L.; et. al., Boca Raton: CRC Press LLC (1999).

IJSER © 2010 http://www.ijser.org