Vous êtes sur la page 1sur 74

www.final-yearprojects.co.cc | www.troubleshoot4free.

com/fyp/

SUMMER TRAINING PROJECT REPORT on

BY: CHETNA SACHDEVA PLC EN. NO.:752

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

JANUARY,2011

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

ACKNOWLEDGEMENT
First and foremost, I express my gratitude to my teacher Mr. B.P. Arun, PLC Institute of Electronics, also our supervisor for his teaching and consistent guidance at each and every step of my project. Without his push and direction, this project would not have been completed. Next, I thank Mr. Amit and Mr. Vimal, workshop assistants at PLC Institute of Electronics for the vital practical assistance they rendered. I am thankful to them especially for their consummate help in arranging whatever I required for the project. Lastly, I wish to express my sincere thanks to all my colleagues, friends and family who helped me directly or indirectly in the completion of this project. Date: 16th November,2010

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

CERTIFICATE

This is to certify that CHETNA SACHDEVA, student of B.Tech (Electronics and Communication Engineering) from MAHARAJA SURAJMAL INSTITUTE OF TECHNOLOGY, GURU GODIND SINGH INDRAPRASTHA UNIVERSITY has undergone 6 weeks of training on EMBEDDED AND ROBOTICS using the 8051 microcontroller, from 6TH June 2010 to 25TH July 2010 under the guidance of Mr. B.P.Arun, at the PLC Institute of Electronics.

Signature of Supervisor: Name of Supervisor: Date:

_________________ Mr.B.P. Arun

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

INTRODUCTION

We are living in the Embedded World. We are surrounded with many embedded products and our daily life largely depends on the proper functioning of these gadgets. Television, radio, CD player of our living room, washing machine or microwave oven in our kitchen, card readers, access controllers, palm devices of our work space enable us to do many of our tasks very effectively. Apart from all these, many controllers embedded in our car take care of car operations between the bumpers and most of the times we tend to ignore all these controllers. Theoretically, an embedded controller is a combination of a piece of microprocessor based hardware and the suitable software to undertake a specific task. These days designers have many choices in microprocessors and microcontrollers. Especially, in 8 bit and 32 bit, the available variety really may overwhelm even an experienced designer. Selecting a right microprocessor may turn out as the most difficult first step and it is getting complicated as new devices continue to pop-up. I have used 8051 microcontroller for my project, the very basic one. Atmels AT89S52 is the most widely used in this category. This has been used in my project.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

TABLE OF CONTENTS

1. INTRODUCTION TO EMBEDDED SYSTEMS 2. INTRODUCTION TO 8051 MICROCONTROLLER 3. INTRODUCTION TO PROJECT 4. MECHANICAL AND ELECTRICAL STRUCTURE 5. ELECTRONICS STRUCTURE 5.1 8051 Microcontroller Module 5.2 DTMF Module 5.3 H-Bridge Module 6. SOFTWARE STRUCTURE 6.1 Installation and Usage of IDE software 6.2 Installation and Usage of PLC Burner 6.3 Program Code 6.4 Hardware Tools Used for Installation 7. BIBLIOGRAHY

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

EMBEDDED SYSTEMS
What is an Embedded System? 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 general-purpose 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. Physically, embedded systems range from portable devices such as digital watches and MP3 players, to large stationary installations like traffic lights, factory controllers, or the systems controlling nuclear power plants. Complexity varies from low, with a single microcontroller chip, to very high with multiple units, peripherals and networks mounted inside a large chassis or enclosure. 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.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

ROBOTICS AND AUTOMATION


Robot A robot is a virtual or mechanical artificial agent. In practice, it is usually an electro-mechanical machine which is guided by computer or electronic programming, and is thus able to do tasks on its own. Another common characteristic is that by its appearance or movements, a robot often conveys a sense that it has intent or agency of its own. In simple terms, it is a machine associated with mechanical motion. For example, washing machine, bikes, CD-ROM of a PC etc. are all robots. Robotics The study of robots is robotics. Technically, robotics is the engineering science and technology of robots, and their design, manufacture, application, and structural disposition. Robotics is related to electronics, mechanics, and software. Therefore, it is sometimes termed as Mechatronics. Automation Automation is the use of technologies to reduce the need for human work in the production of goods and services. Robotics is one of the many ways to achieve this. The use of robots offers many advantages such as reduced risk, increased accuracy and increased productivity.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

MICROPROCESSOR VS MICROCONTROLLER
Microprocessor and microcontroller are two popular terms in world of computer. However, microprocessor and microcontroller has different functions and features. These differences are explained below. S.No. 1. Microprocessor Microprocessors generally require external components or circuits to implement program memory, RAM memory and Input/output. Microprocessors tend to be designed to perform a wider set of general purpose functions, for example, microprocessor in a PC performs a wide range of tasks related to the general requirements of a PC such as performing the necessary calculations for a very wide set of software applications, performing Input/Output for the main subsystems, peripheral control and etc. Intel's 8085, 80386,8089 and Pentium are examples of microprocessors. Microcontroller Microcontrollers incorporate program memory, RAM memory and input/output port into one chip. Microcontrollers are usually designed to perform a small set of specific functions, for example as in the case of a Automatic Braking System which performs a small set of input processing function to regulate the brakes on all four wheels.

2.

3.

Microchip's PIC series and Atmel's AVR series, and AT89S52 etc are examples of microcontrollers.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

8051 MICROCONTROLLER
The 8051 is the first microcontroller of the MCS-51 family introduced by Intel Corporation at the end of the 1970s. The 8051 family with its many enhanced members enjoys the largest market share, estimated to be about 40%, among the various microcontroller architectures. The architecture of the 8051 family of microcontrollers is referred to as the MCS-51 architecture, or sometimes simply as MCS-51. The microcontrollers have an 8-bit data bus. They are capable of addressing 64K of program memory and a separate 64K of data memory. The 8051 has 4K of code memory implemented as on-chip Read Only Memory (ROM). The 8051 has 128 bytes of internal Random Access Memory (RAM). It has two timer/counters, a serial port, 4 general purpose parallel input/output ports, and interrupt control logic with six sources of interrupts. Besides internal RAM, the 8051 has various Special Function Registers (SFR), which are the control and data registers for on-chip facilities.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

COMPARISON OF 8051 FAMILIES

Features Total Pins I/O Pins ROM (in KB) RAM (in bytes) Interrupt Sources Timers Serial Port

8031 40 32 0KB 128 6 2 1

8051 40 32 4 KB 128 6 2 1

8052 89C1051 89C2051 89C4051 40 32 8 KB 256 8 3 1 20 15 1 KB 128 6 2 1 20 15 2 KB 128 6 2 1 20 15 4 KB 128 6 2 1

DIFFERENCE BETWEEN 89C AND 89S SERIES In 89C Series of microcontrollers, serial programming is used while in 89S Series of microcontrollers, parallel programming is used. Parallel programming is faster than serial programming but requires a larger number of wires. Since I was not very much concerned with the speed of programming, I chose the 89S series.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

BLOCK DIAGRAM OF 8051 MICROCONTROLLER

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

PIN DIAGRAM OF 8051 MICROCONTROLLER

PIN DESCRIPTION PIN 9: PIN 9 is the reset pin which is used to reset the microcontrollers internal registers and ports upon starting up. PINS 18 & 19: 8051 has a built-in oscillator amplifier. Hence, we need to only connect a crystal at these pins to provide clock pulses to the circuit. PIN 40 and 20: Pins 40 and 20 are VCC and Ground respectively. The 8051 chip needs +5V, 500mA to function properly.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

PIN 29: It is called PSEN. This is "program select enable". This pin is used for parallel programming. PIN 30: PIN 30 is called ALE (address latch enable), which is used when multiple memory chips are connected to the controller and only one of them needs to be selected. This pin is high when address needs to be given to ports P0 and P2, otherwise for data it is kept low. PIN 31: It is called EA(External Access). If external memory is connected, then it should be connected to ground to indicate the presence of external memory(RAM/ROM). Ports There are four 8-bit ports: P0, P1, P2 and P3. PORT P1 (Pins 1 to 8): The port P1 is a general purpose input/output port which can be used for a variety of interfacing tasks. The other ports P0, P2 and P3 have dual roles or additional functions associated with them based upon the context of their usage. PORT P3 (Pins 10 to 17): PORT P3 acts as a normal I/O port, but Port P3 has additional functions such as, serial transmit and receive pins, 2 external interrupt pins, 2 external counter inputs, read and write pins for memory access. PORT P2 (Pins 21 to 28): PORT P2 can also be used as a general purpose 8-bit port when no external memory is present, but if external memory access is required then PORT P2 will act as an address bus in conjunction with PORT P0 to access external memory. PORT P2 acts as A8-A15. PORT P0 (pins 32 to 39): PORT P0 can be used as a general purpose 8-bit port when no external memory is present, but if external memory access is required then PORT P0 acts as a multiplexed address and data bus that can be used to access external memory in conjunction with PORT P2. P0 acts as AD0-AD7.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

INSTRUCTION SET OF 8051


ACALL: Absolute Call ADD, ADDC: Add Accumulator (With Carry) AJMP: Absolute Jump ANL: Bitwise AND CJNE: Compare and Jump if Not Equal CLR: Clear Register CPL: Complement Register DA: Decimal Adjust DEC: Decrement Register DIV: Divide Accumulator by B DJNZ: Decrement Register and Jump if Not Zero INC: Increment Register JB: Jump if Bit Set JNZ: Jump if Accumulator Not Zero JZ: Jump if Accumulator Zero LCALL: Long Call LJMP: Long Jump MOV: Move Memory JBC: Jump if Bit Set and Clear Bit JC: Jump if Carry Set JMP: Jump to Address JNB: Jump if Bit Not Set JNC: Jump if Carry Not Set MUL: Multiply Accumulator by B NOP: No Operation ORL: Bitwise OR POP: Pop Value From Stack PUSH: Push Value Onto Stack RET: Return From Subroutine RETI: Return From Interrupt

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

RL: Rotate Accumulator Left RR: Rotate Accumulator Right SETB: Set Bit SJMP: Short Jump SUBB: Subtract From Accumulator With Borrow SWAP: Swap Accumulator Nibbles XCH: Exchange Bytes XCHD: Exchange Digits XRL: Bitwise Exclusive OR

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

OBJECTIVE
The objective of this project is to design a Cellphone Controlled Robotic Car. It is based on the technology DTMF, abbreviated for Dual Tone Multi Frequency. DTMF signaling is used for telephone signaling over the line in the voice frequency band to the call switching center. The version of DTMF used for telephone dialing is known as touch tone. DTMF assigns a specific frequency (consisting of two separate tones) to each key so that it can easily be identified by the electronic circuit. 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 the call, if any button is pressed, control corresponding to the button pressed is heard at the other end of the call. This tone is called dual tone multi frequency tone (DTMF). Based on this tone received the robot takes the appropriate action. The received tone is processed by the AT89S52 microcontroller with the help of DTMF decoder IC8870. The decoder decodes the DTMF tone in to 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 microcontroller 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.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

SNAPSHOT OF THE PROJECT


8051 Module Wheel

H-Bridge Module

DTMF Module

Cellphone

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

LIST OF COMPONENTS AND TOOLS


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

S.No. 1. 2. 3. 4. 5. 6.

Component Chassis Wheel Nut Bolt Clamps Cellphone 1 4 12 12 4 1

Quantity

Dimension L X B(in inches) 8X5 Diameter(in cm) 7 2 inches long As per dimension of nut As per size of motors ---------

The following tools were used to assemble the mechanical components. S.No. 1. 2. 3. Tool Drilling Machine Screw Driver Hammer

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

Chassis The sheet used for switches in household switching boards has been used as the chassis of the robot. The height of the robot is so adjusted that the wheels uniformly touch the ground in order to make a smooth moving.

Wheels The wheels are mechanically connected to the D.C. motors in order to make the robot move. The wheels are made up of rubber in order to increase the friction.

Nuts and Bolts Nuts and bolts are used in order to mechanically couple the D.C. motors and wheels to the base of the robot.

Clamps The clamps are used in order to hold the D.C. motors. The clamps provide efficient grip to the motors so that motors do not change position while the robot is moving.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

SELECTION OF MATERIAL
Selection of material is an important activity while making a project as it decides how powerful and useful 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 8 inches X 5 inches because too large a chassis causes the robot to topple and causes difficulty in controlling it. 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.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

ELECTRICAL ACTUATORS
DESCRIPTION OF A MOTOR In any electric motor, operation is based on simple electromagnetism. A current-carrying conductor generates a magnetic field; when this is then placed in an external magnetic field, it will experience a force proportional to the current in the conductor, and to the strength of the external magnetic field.

Every DC motor has six basic parts -- axle, rotor (or armature), stator, commutator, field magnet(s), and brushes. In most common DC motors), the external magnetic field is produced by highstrength permanent magnets1. The stator is the stationary part of the motor -- this includes the motor casing, as well as two or more permanent magnet pole pieces. The rotor (together with the axle and attached commutator) rotates with respect to the stator. The rotor consists of windings (generally on a core), the windings being electrically connected to the commutator. The above diagram shows a common motor layout -- with the rotor inside the stator (field) magnets. The geometry of the brushes, commutator contacts, and rotor windings are such that when power is applied, the polarities of the

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

energized winding and the stator magnet(s) are misaligned, and the rotor will rotate until it is almost aligned with the stator's field magnets. As the rotor reaches alignment, the brushes move to the next commutator contacts, and energize the next winding. Given our example two-pole motor, the rotation reverses the direction of current through the rotor winding, leading to a "flip" of the rotor's magnetic field, driving it to continue rotating.

SPECIFICATION OF DC MOTOR The electrical actuators used in the project are Geared DC Motors. Their specification is as under.

Electrical Actuators Geared DC Motor

Quantity 4

Voltage Rating 12V

Speed 200rpm

ASSEMBLING AND TROUBLESHOOTING 1. The D.C. Motors are mechanically coupled to the base of the robot using clamps. The grip of the motor to the clamp should be and there should not be any loose bolting. 2. Wheels are mechanically coupled with the motors. 3. All the nuts and bolts must be tightly fitted after mechanical coupling of motors and wheels.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

MODULES USED
The following three modules have been used in the project:

S.No.

MODULE NAME

BRIEF DESCRIPTION

1. 2. 3.

8051 Module DTMF Module H-Bridge Module

Brain of the Robo Car Interprets signals from mobile Motor driver circuit

These modules are described in detail in the next sections.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

8051 MODULE
The 8051 module is the BRAIN OF THE ROBOT. Further description of the module is as follows.

SNAPSHOT

Diodes

33 pF Capacitor

7805 Voltage Regulator

LED

10 microF Capacitors Port1 10K Resistor

Pin Connectors (Port0)

Port2 Port3

11.0592 MHz Crystal Oscillator

IC AT89S52 on 40 Pin IC Base

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

It refers to the 0th pin of the port.

CIRCUIT DIAGRAM

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

LIST OF COMPONENTS

S.No. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.

Component Zero PCB IC AT89S52 40 Pin IC Base 1N4007 Diodes 11.0592MHz Quartz Crystal 33 pF Capacitor 10 microF Capacitor 7805 Voltage Regulator 1K Resistor 5V Power Supply LEDs Pin Connectors 1 1 1 4 1 2 2 1 1 1 1

Quantity

As per requirement

LIST OF TOOLS AND MATERIAL

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

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

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

TESTING AND DEBUGGING This module was tested using the I/O Cards, USB Cables and PLC Burner Kit. The following problems were faced during the course of testing and were corrected accordingly. 1. On providing ground, the supply was getting OFF. This was due to short-circuiting, which was removed using soldering machine. 2. Some ports were not showing any response on the I/O Cards. This was due to short-circuiting of port pins, which was removed. After the removal of above problems, the module worked properly and was ready to be used in the project.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

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

BRIEF DESCRIPTION Dual-tone multi-frequency (DTMF) signaling is used for telecommunication signaling over analog telephone lines in the voice-frequency band between telephone handsets and other communications devices and the switching center. DTMF, also known as touch-tone, are the audible sounds you hear when you press keys on your phone. The DTMF keypad is laid out in a 4 X 3 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 decoded by the switching center to determine which key was pressed. 1209 Hz 697 Hz 770 Hz 852 Hz 941 Hz 1 4 7 * 1336 Hz 2 5 8 0 1447 Hz 3 6 9 #

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

SNAPSHOT

Mica capacitor

22pF Capacitors

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

3.5791 MHz Crystal Oscillator LEDs Resistors

1K Resistors

IC8870 on 18 Pin IC Base

CIRCUIT DIAGRAM

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

LIST OF COMPONENTS
S.No. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Component Zero PCB IC 8870 18 Pin IC Base 3.5791MHz Crystal Oscillator 22 pF Capacitors 1K Resistors 10K Resistors 22K Resistors 100K Resistor 320K Resistors 5V Power Supply LEDs Pin Connectors 1 1 1 1 2 6 1 2 1 1 1 6 As per requirement Quantity

LIST OF TOOLS AND MATERIAL

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

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

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

TESTING AND DEBUGGING This module was tested using a cellphone, whose earphones were connected to the two input pins of the module. The following problems were faced during the course of testing and were corrected accordingly. 1. Initially, on giving power supply the LED was not glowing and I inferred that module is not receiving power. But later on it was found that LED was defective, which was thus changed. 2. The module was not decoding the signals sent to it. It was due to a missing connection and minor short-circuiting. It was corrected. After the removal of above problems, the module worked properly and was ready to be used in the project.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

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.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

SNAPSHOT

Power LED 1K Resistor


12V 0V 5V

5V LED

10K Resistors

Pin Connectors

Control Inputs

Motor Inputs

IC L293D On

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

16 Pin IC Base

CIRCUIT DIAGRAM

Basic Circuit Diagram of H-Bridge

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

Circuit Diagram using ICL293D

The ICL293D has two internal H-Bridges.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

LIST OF COMPONENTS
S.No. 1. 2. 3. 4. 5. 6. 7. 8. 9. Component Zero PCB IC L293D 16 Pin IC Base 10K Resistors 1K Resistors 5V Power Supply 12V Power Supply LEDs Pin Connectors Quantity 1 1 1 4 2 1 1 2 As per requirement

LIST OF TOOLS AND MATERIAL

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

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

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

TESTING AND DEBUGGING This module was tested using DC Motors. The following problems were faced during the course of testing and were corrected accordingly. 1. The module was not able to drive the motors as there was a wrong connection, which was corrected by removing the soldering first and then inserting a jumper. After the removal of the above problem, the module worked properly and was ready to be used in the project.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

ASSEMBLING AND WORKING


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

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

WORKING OF THE ROBOT The robot works as follows. 1. The modules are assembled as shown and power supply is given to the robot. 2. A call is made to the cellphone attached to the robot, which is kept on Auto Answer mode. Once the call is accepted, the robot can be controlled by the cellphone that made a call to the robot. 3. In the course of the call, when a key is pressed the corresponding tone is heard at the cellphone attached to the robot. This tone is sent to DTMF Decoder(IC 8870) for decoding. 4. The decoded signals from this module are sent to 8051 module (AT89S52) for interpretation. The microcontroller takes the decision on this basis and passes signals to the motor driver circuit (L293D) to make the motors turn accordingly. 5. The motors turn based on the signals received from the 8051 module and thus, the robot moves in the desired direction with the help of wheels attached to the motors.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

FLOWCHART
START

A P3

CMP with

02

MOVE FORWARD MOVE BACKWARD DD

CMP with

08

CMP with

04

MOVE LEFT

CMP with

06

MOVE RIGHT

CMP with

05

STOP

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

INPUT/OUTPUT PIN DESCRIPTION


Port3 has been used as the Input Port and Port0 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 port0 (from P0.0 to P0.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 Port0. 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. Robot Input Pins Movement P3.4 P3.3 P3.2 P3.1 P3.0 Forward Backward Left Right Stop
0: High 1: Low

1 1 1 1 1

0 1 0 0 0

0 0 1 1 1

1 0 0 1 0

0 0 0 0 1

Output Pins P0. P0.2 P.1 P0.0 3 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 0 1 1 1 1

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

PROGRAM
Assembly Language Program Code

ORG 00H MAIN: MOV A,P3 CJNE A,#11110010B,NXT AJMP FWD NXT: NXT1: NXT2: NXT3: 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 P0,#11111010B AJMP MAIN MOV P0,#11110101B AJMP MAIN MOV P0,#11111001B AJMP MAIN MOV P0,#11110110B AJMP MAIN MOV P0,#11111111B AJMP MAIN

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

TOOLS USED

SOFTWARE TOOLS

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

1.

8051IDE

2. PLCIE Burner

Pc 8 5 . x l _ 0 1e e

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

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

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

8051IDE

INSTALLATION OF THE SOFTWARE

1.

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

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

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

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

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

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

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

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

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

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

7. Click on Finish. The installation completes here and the software is ready to use.

1 2 1 3 2

USAGE OF THE SOFTWARE

The sample IDE window is shown below.

5 3

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

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:

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

FIL E1

FIL E2

FIL E3

FIL E4

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.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

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.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

3. Select Advanced option in the window that appears and click on Next.

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

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

5. The installation window appears and installation starts.

6. Click on Finish. Installation completes here.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

USAGE OF SOFTWARE

The sample window of PLCIE Burner is as shown.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

The following steps describe how to use this software to burn a program to AT89S52 microcontroller.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

First of all, select the chip AT89S52 by clicking on Chip and then selecting AT89S52 from the drop-down menu.

Then follow the following steps to burn the program.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

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.

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

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

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

HARDWARE TOOLS USED FOR BURNING


The following tools were used to burn the Assembly Program on the microcontroller chip and testing it. 1. I/O Cards(2)

2. USB Cable and Connectors

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

3. PLC Burner Kit Reset Switch Power Section

ISP

LCD Interface

USB Input

www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/

BIBLIOGRAPHY

1. 2. 3. 4. 5.

8051 MICROCONTROLLER AND EMBEDDED SYSTEMS by Muhammad Ali Mazidi, Janice Ali Mazidi, Rolin D. Mckinley 8051 MICROCONTROLLER by K.J AYALA en.wikipedia.org www.8051tutorial.com www.ikalogic.com

Vous aimerez peut-être aussi