You are on page 1of 48

Acknowledgement

I would like to extend my heartfelt gratitude to the following persons who have made the completion of this project possible. Our mentor, Mr. B.P Arun, for his vital support and encouragement. Mr. Vimal, our workshop assistant, for his understanding assistance. My classmate Anshul and younger brother Manuj for helping in collection of material required for the project.

2012

20 June

CERTIFICATE
This is to certify that Devesh Varshney from Maharaja Surajmal Institute of Technology ,Janankpuri ,affiliated to GGSIPU, of ELECTRONICS & COMMUNICATIONS branch has undergone a 6 weeks training on ROBOTICS AND EMBBEDED SYSTEM under the guidance of Mr. B.P Arun and has submitted this report as a part of project work as described by the PLC Institute of Electronics. . Signature of supervisor: Name: Mr. B.P. Arun Designation: Mentor Date:
For the Project:

CELL PHONE OPERATED LAND ROVER

Introduction
Conventionally, wireless-controlled robots use RF circuits, which have the drawbacks of limited working range, limited frequency range and limited control. Use of a mobile phone for robotic control can overcome these limitations. It provides the advantages of robust control, working range as large as the coverage area of the service provider, no interference with other controllers and up to twelve controls. Although the appearance and capabilities of robots vary vastly, all robots share the features of a mechanical, movable structure under some form of control. The control of robot involves three distinct phases: perception, processing and action. Generally, the preceptors are sensors mounted on the robot, processing is done by the on-board microcontroller or processor, and the task (action) is performed using motors or with some other actuators. Project overview In this project, the robot is controlled by a mobile phone that makes a call to the mobile phone attached to the robot. In the course of a call, if any button is pressed, a tone corresponding to the button pressed is heard at the other end of the call. This tone is called dual-tone multiple-frequency (DTMF) tone. The robot perceives this DTMF tone with the help of the phone stacked in the robot. The received tone is processed by the 8051microcontroller with the help of DTMF decoder MT8870. The decoder decodes the DTMF tone into its equivalent binary digit and this binary number is sent to the microcontroller. The microcontroller is preprogrammed to take a decision for any given input and outputs its decision to motor drivers in order to drive the motors for forward or backward motion or a turn. The mobile that makes a call to the mobile phone stacked in the robot acts as a remote. So this simple robotic project does not require the construction of receiver and transmitter units. DTMF signaling is used for telephone signaling over the line in the voice-frequency band to the call switching centre. The version of DTMF used for telephone tone dialing is known as Touch-Tone.

Cell operated land rover

EMBEDDED SYSTEMS
What is an Embedded System?
In general, "embedded system" is not an exactly defined term, as many systems have some element of programmability. For example, handheld computers share some elements with embedded systems such as the operating systems and microprocessors which power them, but are not truly embedded systems, because they allow different applications to be loaded and peripherals to be connected. An embedded system is a computer system designed to perform one or a few dedicated functions, often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. In contrast, a generalpurpose computer, such as a personal computer, is designed to be flexible and to meet a wide range of an end-user's needs. Embedded systems control many of the common devices in use today. Embedded systems are controlled by a main processing core that is typically either a microcontroller or a digital signal processor (DSP). Since the embedded system is dedicated to specific tasks, design engineers can optimize it reducing the size and cost of the product and increasing the reliability and performance. Some embedded systems are mass-produced, benefiting from economies of scale.

Characteristics of an Embedded System


1. Embedded systems are not always standalone devices. Many embedded systems consist of small, computerized parts within a larger device that serves a more general purpose.
2. The program instructions written for embedded systems are referred to as

firmware, and are stored in ROM or Flash m They run with limited computer hardware resources: little memory, small or non-existent keyboard and/or screen.

Abstract
Conventionally, wireless controlled robots user circuits, which have a drawback of limited working range, limited frequency range and limited control. Use of mobile phones 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 robot vary vastly, all robots share the feature of a mechanical, movables structure under some form of control. The control of robot involves three distant phases: perception, processing, action. Generally, the preceptors are sensors mounted on the robot, processing is done by the on board microcontroller and the task is performed using motors or with some other actuators. In the project the robot is controlled by a mobile phone that makes a call to the mobile phone attached to the robot. In the course of a call, if any button is pressed a tone corresponding to the button pressed is heard at the other end called Dual Tone Multiple frequency (DTMF) tone. The robot receives these tones with help of phone stacked in the robot. The received tone is processed by the microcontroller with the help of DTMF decoder IC m8870 these IC sends a signals to the motor driver IC l293d which drives the motor forward, reverse etc The microcontroller AT89S52 in this project is programmed as follows: On pressing 2, the robot will move forward. On pressing 4, the robot will move left. On pressing 6, the robot will move right. On pressing 8, the robot will move backwards. On pressing 5, the robot will stop.

Block Diagram of land rover:

List of components and tools


The mechanical components used, their quantity and dimensions are listed below.

Table of Contents Sno. 1. 2. 3. 4. 5. 6. 7. Components DC Motor Wheels Castor wheel Chassis Nut-Bolt Clamps Cell-phone Description Plastic Geared 12 Volt, 150 rpm Plastic 6-inches in dia Bake-lite sheet 9X7inches Brass Steel Nokia 1100 Quantity 2 2 1 1 3 2 1

The following tools were used to assemble the mechanical components.

S.No. Tool 1. Drilling Machine 2. Screw Driver

SELECTION OF MATERIAL
Selection of suitable material is of utmost importance while making a project as it decides how powerful and handy the project will be. The material is selected as per the requirement of the project, how and where it is intended to use. The reasons for selecting the material I have used in my project are listed below: 1. I selected a chassis of dimension 9 inches X 7 inches because too large a chassis can cause problems in balancing and can make robot topple. Too small a chassis would not be able to accommodate all the modules used and the cellphone required to operate the robot. Therefore, an optimum size was selected. 2. I selected 12V, 200rpm Geared DC Motors, which is enough to drive my robot. The speed these motors provide is an optimum one and hence the selection. 3. The wheels were selected very carefully as I wanted the ones that do not wear out easily so that I can drive my robot in almost all conditions.

MODULES USED
The following three modules have been used in the project 1. 8051 module : Brain of the landrover 2. H-Bridge : Motor driver circuit 3. DTMF module : Interprets signals from mobile These modules are described in detail in the next sections

8051 MODULE
A Microcontroller is a single IC which contains a CPU, RAM, and ROM as well as the remaining circuitry of a computer such as serial interface, parallel interface, timers, and counters and interrupt-handling circuits. Microcontrollers are used in small and minimum component designs which perform control oriented activities. It can be programmed by the user as per the requirement. Out of all the microcontrollers available, 8051 microcontroller is the most widely used. It is produced by companies like Atmel, Philips etc and various series are available, which differ in memory size, interrupt handling capacity etc. I have used AT89S52 microcontroller in my project, which is a product of Atmel. It has 32 I/O Pins, 4 KB ROM and 128 bytes RAM.

Table of Contents

8051 module :
S.no. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Components Resistors Diodes Capacitors Description 1k ohms X ohms Y ohms IN 4007 33 pico farad micro farad 7805 12 volt supply Quantity

4 1 1 1 1 1 1 1

Voltage regulator DC supply connector 2/3 pin connectors Micro-switch LED Oscillator 11.32 MHz 8051 base 32 pins 8051 MCU

List of Tools and Material

S.No. 1. 2. 3. 4.

Tool/Material Soldering Machine Solder Wire (flux) Cutter Tin Wire

Architecture of 8051 :

Snapshot of 8051 module :

DTMF MODULE
This module has been used to decode the signals received from the cell phone and to pass these decoded signals to the 8051 module, which then acts accordingly. Further description of the module is as follows.

Dual-tone multi-freq uency (DTMF) signaling is used for telecommu nication signaling over analog telephone lines in the voice-freque ncy band between telephone handsets and other commu nications devices and the switching center. The version of

DTMF used for telephone tone dialing is known by the tradem arked term Touch-Tone (canceled March 13, 1984 ), and is standardized by ITU-T Recomme ndation Q.23. It is also known in the UK as MF4. Other multi-frequency systems are used for signaling internal to t h e telephone network. DTMF are the audible sounds you hear when you press keys on your phone. It was designed for optimal performance with each tone being very distinct. This makes decoding the tone very easy even in surrounding noise. It is this performance that

makes DTMF ideal for clear transmission and reception in remote control (wireless or through phone lines) applications. The DTMF keypad is laid out in a 44 matrix, with each row representing a low frequency, and each column representing a high frequency. Pressing a single key (such as 1) will send a sinusoidal tone for each of the two frequencies (697 and 1209 hertz (Hz)). The multiple tones are the reason for calling the system multifrequency. These tones are then S.No. Component Quantity decoded by 1. Zero PCB 1 the switching center to 2. IC 8870 1 determine 3. 18 Pin IC Base 1 which key 4. 22 pF Capacitors 2 was pressed. 5. 1K Resistors 6 6. 7. 8. 9. 10K Resistors 22K Resistors 1 2 1 1 As per requirement As per requirement

Table of 100K Resistor


320K Resistors 5V Power Supply LEDs Pin Connectors

Contents 1

DTMF Module:

10. 11. 12.

List of Tools and Material

S.No. 1. 2. 3. 4.

Tool/Material Soldering Machine Solder Wire (flux) Cutter Tin Wire

Circuit diagram of DTMF Module :

Snapshot of DTMF Module:

H-BRIDGE MODULE

This module is the motor driver circuit. It drives the motors forward or backward on the basis of signals received from the 8051 module. Further description of the module follows.

Brief Description
An H-bridge is an electronic circuit which enables a voltage to be applied across a load in either direction. These circuits are often used in robotics and other applications to allow DC motors to run forwards and backwards. H-bridges are available as integrated circuits, or can be built from discrete components.

The H-Bridge arrangement is generally used to reverse the polarity of the motor, but can also be used to 'brake' the motor, where the motor comes to a sudden stop, as the motor's terminals are shorted, or to let the motor 'free run' to a stop, as the motor is effectively disconnected from the circuit. The L293D is a quadruple half H-bridge bidirectional motor driver IC that can drive current of up to 600mA with voltage range of 4.5 to 36 volts. It is suitable to drive small DC-Geared motors, bipolar stepper motor etc.

Table of Contents

H-Bridge module:
Sno. Components
1. Resistors

Description
10k Ohm

Quantity
4

1k Ohm

2. 3. 4. 5.

Birgsit LED L293D Base L293D IC

3 volt 16 pins

1 2 1 1

Snapshot of H-Bridge module:

Circuit Diagram using ICL293D

The ICL293D has two internal H-Bridges

ASSEMBLING
All the above described modules are assembled to get the final project. The final circuit diagram is as shown below:

Flowchart

Input/output pin description


Port3 has been used as the Input Port and Port4 as the Output Port in the project. Five pins of port3 (from P3.0 to P3.4) are required to receive signals from the DTMF decoder. Four pins of port4 (from P4.0 to P4.3) are required to pass interpreted signals to the motor driver circuit.

Port3 receives the decoded signals from DTMF Decoder and the microcontroller interprets them and sends the output signals to Port4. The motor driver circuit receives signals from this port and accordingly controls the rotation of motors and wheels leading to the desired movement of the robot. The signals received at the input port as per the desired movement of the robot and the signals passed onto the output port based on the interpretation are depicted in the table below.
0: High 1: Low

Robot Movement Forward Backward Left Right Stop

Input Pins P1.4 1 1 1 1 1 P1.3 0 1 0 0 0 P1.2 0 0 1 1 1 P1.1 1 0 0 1 0 P1.0 0 0 0 0 1 P2.3 1 0 1 0 1

Output Pins P2.2 0 1 0 1 1 P2.1 1 0 0 1 1 P2.0 0 1 1 0 1

PROGRAM
Assembly Language Program Code
LED0 EQU P0.0

LED1 EQU P0.1 LED2 EQU P0.2 LED3 EQU P0.3 ORG 00H MAIN: MOV A,P1 CJNE A,#11110010B,NXT AJMP FWD NXT1: NXT2: NXT3: NXT4: FWD: BWD: LEFT: RIGHT: STOP: CJNE A,#11111000B,NXT1 AJMP BWD CJNE A,#11110100B,NXT2 AJMP LEFT CJNE A,#11110110B,NXT3 AJMP RIGHT CJNE A,#11110101B,MAIN AJMP STOP MOV P2,#11111010B AJMP MAIN MOV P2,#11110101B AJMP MAIN MOV P2,#11111001B AJMP MAIN MOV P2,#11110110B AJMP MAIN MOV P2,#11111111B AJMP MAIN

TOOLS USED
SOFTWARE TOOLS

The following software was used for the development of the project:

1. 8051IDE

2. PLCIE Burner

P _ 01ee lc 8 5. x

8051IDE is used for writing the program code in Assembly Language.

PLCIE Burner is used to burn the program on the microcontroller.

8051 IDE
Installation of the software
1.

Open the contents of the CD. The following window will appear.

2. Double click on 8051. The following window will be displayed.

3. Double click on setup. The installation window appears.

4. Click on Next and provide the user name and company name.

5. Again click on Next and installation window will appear.

6. Click on Install and the installation process will start.

7. Click on Finish. The installation completes here

Usage of the Software

The sample IDE window is shown below.


2 1 3 2

5 3

1. Window 1 is the main window where the program is written. 2. Window 2 shows the output window, which on the execution of the program shows the errors occurred, warnings encountered and other similar data. This is selected by pointing to view output. 3. Window 3 shows the registers used along with their values. For dynamic variation of these values and reflecting their values in the memory, one needs to Simulate. This is selected by pointing to view Registers. 4. Window 4 shows Port Window which shows the values acquired by the ports. This window is also useful when simulating. This is selected by pointing to view Ports. 5. Window 5 shows the values of important internal variables including Timers, TMOD, IE etc.

On writing the program in the program window, the program is compiled (converted to .HEX file) by selecting Assemble Assemble. The errors, if any, as mentioned above, will be shown on the output window. On assembling the program, in the folder containing the file, the following files are created:

FILE 1

FILE 2

FILE 3

FILE 4

1. File 1 is a .ASM file and is the file in which you have written your program. 2. File 2 is a .HEX file 3. File 3 is a shortcut to the .ASM file 4. File 4 is a .LST which contains all the commands, important definitions of the labels and the addresses of each command.

PLC BURNER 51
Installation of the Software
1. Open the contents of the CD and extract files to desktop.

2. Connect the development kit with the PC. 3. Select Advanced option in the window that appears and click on Next.

4. Specify the path of the drivers and click on Next.

5. The installation window appears and installation starts.

6. Click on Finish. Installation completes here.

Usage of Software

The sample window of PLCIE Burner is as shown.

The following steps describe how to use this software to burn a program to AT89S52 microcontroller. 1. Click on Open. A window will appear. Select the .HEX file you wish to burn on the microcontroller and click Open.

2. A confirmation window will appear. Click OK.

3. Click on Write. The burning process will start. On completion click Close.

PROBLEMS FACED
Although the concept & design of the project seemed perfect, there were some problems faced while actual implementation:

Connecting hands free of cellphone to DTMF decoder IC input: There were several types of HandsFree cords available in the market, the right one had to be chosen from them. Several ways to break up the cords and connect them to the input of IC 8870 were tried & some were newly developed by us (e.g. Connecting Audio Jack of PCs speakers to the cell phone with help of an extender). Solution: Finally the earplugs of the hands free cord were removed and the resulting set of wires was connected in appropriate manner to the input of decoder IC.

Snapshot :

PLC Institute of Electronics


F-22/102,Ist Floor,Sector-3 Near SBI bank Delhi-110085 Contact no: - +(91)-(11)-47501919 , 989989080 Website- www.plcie.com

Pin diagram of L293 :

Pin diagram of 8870 :