Pc Based Wireless Toy Car Control Essay

MERCHANT POLYTECHNIC COLLEGE, BASNA DEPARTMENT OF ELECTRONICS & COMMUNICATION CERTIFICATE This is to certify that Mr.

DURGESH. L. CHAUBEY From MERCHANT POLYTECHNIC College having Enrolment No:096360311077 has completed Report on the Problem Definition/ Semester V Project Report/ Final Project Report having title PC BASED WIRELESS TOY CAR CONTROL in a group consisting of 4 persons under the guidance of the Faculty Guide: V. D. PATEL & N. K. PATEL.

We Will Write a Custom Essay about Pc Based Wireless Toy Car Control Essay
For You For Only $13.90/page!


order now

The mentor from the industry for the project Name: Dharmeshsinh Parmar Industry: Automation Engineers. Contact Details: + 91- 9427604676Institute Guide – IDP/ Industry Guide-IDP Head of Department MERCHANT POLYTECHNIC COLLEGE, BASNA DEPARTMENT OF ELECTRONICS & COMMUNICATION CERTIFICATE This is to certify that Mr. VIVEKKUMAR. V.

KSHATRIYA From MERCHANT POLYTECHNIC College having Enrolment No:096360311035 has completed Report on the Problem Definition/ Semester V Project Report/ Final Project Report having title PC BASED WIRELESS TOY CAR CONTROL in a group consisting of 4 persons under the guidance of the Faculty Guide: V. D. PATEL & N. K. PATEL. The mentor from the industry for the project Name: Dharmeshsinh Parmar Industry: Automation Engineers.

Contact Details: + 91- 94276-04676 Institute Guide – IDP/ Industry Guide-IDP Head of Department MERCHANT POLYTECHNIC COLLEGE, BASNA DEPARTMENT OF ELECTRONICS & COMMUNICATION CERTIFICATE This is to certify that Mr. MAHESH. B. MALI From MERCHANT POLYTECHNIC College having Enrolment No:106360311095 has completed Report on the Problem Definition/ Semester V Project Report/ Final Project Report having title PC BASED WIRELESS TOY CAR CONTROL in a group consisting of 4 persons under the guidance of the Faculty Guide: V. D.

PATEL & N. K. PATEL. The mentor from the industry for the project Name: Dharmeshsinh ParmarIndustry: Automation Engineers. Contact Details: + 91- 94276-04676 Institute Guide – IDP/ Industry Guide-IDP Head of Department MERCHANT POLYTECHNIC COLLEGE, BASNA DEPARTMENT OF ELECTRONICS & COMMUNICATION CERTIFICATE This is to certify that Mr. PAVAN. B.

KHATRI From MERCHANT POLYTECHNIC College having Enrolment No: 106360311046 has completed Report on the Problem Definition/ Semester V Project Report/ Final Project Report having title PC BASED WIRELESS TOY CAR CONTROL in a group consisting of 4 persons under the guidance of the Faculty Guide: V. D. PATEL & N. K. PATEL. The mentor from the industry for the projectName: Dharmeshsinh Parmar Industry: Automation Engineers.

Contact Details: + 91- 94276-04676 Institute Guide – IDP/ Industry Guide-IDP Head of Department INDEX CHAPTER: 1 INTRODUCTION OF INDUSTERY CHAPTER: 2 INTRODUCTION OF PROJECT CHAPTER: 3 LITERATURE SURVEY CHAPTER: 4 SUMMARY OF PROJECT CHAPTER: 5 PROJECT DETAILS * DEFINATION * BLOCK DIAGRAM * CIRUIT DIAGRAM * TRANSMISSION OF THE CONTROL SIGNAL THROUGH PC’s SERIAL PORTCIRCUIT * CIRCUIT OF TRANSMITTOR SECTION * PARTS LIST * RF TRANSMISSION * ASK MUDULATED SIGNAL * ASK MODULE SPECIFICATION * RF RECEPTION * CHAPTER: 6 CIRCUIT OF RECEIVER SECTION Decoding of the received signal with P89V51RD2 * Driving the DC motors * Relay connections to motors CHAPTER: 7 CONTROLLING THE TOY CAR CHAPTER: 8 SOFTWARE PROGRAMMING * FLOW CHART OF THE PROGRAM * KEIL C ? vision 4. 1. OPERATION * Screenshot of ‘Options for Target 1’ window * Program compilation output screen CHAPTER: 9 Programming the chip using Flash Magic * Screenshot of ‘Flash Magic’ window CHAPTER: 10 CONSTRUCTIONAND TESTING * P89v51rd2 Microcontroller * GENERAL DISCRIPTION * FEATURES * BLOCK DIAGRAME OF P89V51RD2 * PIN DIAGRAME * PORT DETAIL * SERIAL PROGRAMMING OF THE MICROCONTROLLER * SBUF REGISTER * SCON REGISTER SCON REGISTER DETAILS * PROGRAMMING THE MICROCONTROLLER TO TRANSFER DATA SERIALLY (ALGORITHM) * TIMERS/COUNTERS 0 AND 1 * TMOD REGISTER * TMOD REGISTER DETAIL * TCON REGISTER * TCON REGISTER DETAILS * TIMER 2 * T2CON REGISTER DETAILS * RS-232 serial communication * RS232 on DB9 (9-pin D-type connector) * Pin Number Signal Description * RS232 on DB25 (25-pin D-type connector) * 25-pin D-type connector Pin assignment CHAPTER: 11 keil micro vision 3. 1 * STARTING A NEW ASSEMBLER PROJECT * CREATING SOURCE FILE * Adding File to the Project * Add file to group ’Source Group 1’ * Running the Keil Debugger CHAPTER 12 FLASH MAGICCHAPTER 13 SODH YATRA CHAPTER 14 REFRENCES ACKNOWLEDGEMENT * We are grateful for being provided an opportunity to work at “AUTOMATION ENGINEER”, working in such an esteemed organization has not only honed our skills in the engineering context, but has also Contributed in making more complete individuals out of us.

Towards the completion of this project as a part of our engineering training curriculum, we would like to thank all who have been instrumental in our growth as engineering professionals. * I offer my gratitude to our Project Guide V. D.

Patel AND N. K. Patel to guide us through all the odds. I am also thankful to J. H.Modi, Head of E. C. Department, Merchant Polytechnic Basna for providing us an opportunity to work in such an esteemed organization.

* We also give our sincere thanks to all the other employees of AUTOMATION ENGINEERS,who have always encouraged and motivated us and providing valuable guidance at each and every phase of our training. It has been a fascinating learning experience, which will always remain etched in our hearts and memory. * Our obligations remain to all those people and friends who have directly or indirectly helped us in successful completion of our project.

DURGESH CHAUBEYVIVEK KSHATRIYA MAHESH MALIPAVAN KHATRIABSTRACT * Computers and the related technologies are becoming more and more ubiquitous. Various technical arenas in the Field of Electronic & communication Engineering has come very near to the common people. A day will come, somewhere in the long future, when PC is referred to in the same class of Food, clothing and shelter”. * Here we will see how you can control a toy car through your PC’s serial port using a pair of ASK transmitter and receivers modules. The receives signal is decoded by a P89V51RD2 microcontroller and fed to the motor driver circuitry to move the toy car in forward, backward, right or left direction.

All the signales in RF domain One of the very basic examples of a utility of this is toy car moving through your PC. * The main application of this project is that we can operate and control a toy car through a single computer. As for example we can control a toy car in forward, backward, right drift, left drift sharp forward left turn, sharp forward left turn, sharp backward right turn, sharp backward left turn and stop respectively.

Each of the control signals is fed from the keyboard and sent through the serial com port. Similarly we can control all the electrical devices of our house CHAPTER-1 INTRODUCTION OF INDUSTRY * The automation engineer is an association of two EC Engineers, with natural inclinations of following a less common path satisfying our creativity, interest and spirit. * One, the junior engineer, DHARMENDRA SINGH, a graduate from LD college of Engineering, EC-2001 batch,(AMIE (AM099760-1)), was in a search of a carrier where he can work and study hard but enjoy freedom of independence.

He decided to explore engineering in depth and make a carrier in control engineering.  Second, the senior engineer, K P KANZIA (Chartered Engineer (EC), AMIE (AM61587/3)) has very long years of on hand experience in Electronic Circuit design and Microcontroller programming in C language. He possesses an ability to implement theories to create control systems for controlling processes and machines. He has an extraordinary creativity that generates ideas to solve any technical problem, if supporting infrastructure provided. * The third, the last one but not the least, JANAKSINH, who has provided a strong platform for the establishment, running and developing our activities.He has been an encouraging partner of our firm and a guiding force for future planning CHAPTER – 2 INTRODUCTION OF PROJECT * Here we show how you can control a toy car through your PC’s serial port using a pair of ASK transmitter and receiver modules. The received signal is decoded by a P89V51RD2 microcontroller and fed to the motor driver circuitry to move the toy car in forward, backward, right or left direction. All the signals are in RF domain.

* Asynchronous serial communication is established between the computer and P89V51RD2 microcontroller through wireless RF link.The microcontroller and computer are both SYNCHRONIZED with each other. * The P89V51RD2 is an 8051 microcontroller with 64kB Flash and 1024 bytes of data RAM. A key feature of the P89V51RD2 is its X2 mode option.

The design engineer can choose to run the application with the conventional 8051 clock rate (12 clocks per machine cycle) or select the X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the same clock frequency. Another way to benefit from this feature is to keep the same performance by reducing the clock frequency by half, thus dramatically reducing the EMI.The Flash program memory supports both parallel programming and in serial In- System Programming (ISP). Parallel programming mode offers gang-programming at high speed, reducing programming costs and time to market. ISP allows a device to be reprogrammed in the end product under software control. The capability to field/update the application firmware makes a wide range of applications possible.

* The P89V51RD2 is also In-Application Programmable (IAP), allowing the Flash program memory to be reconfigured even CHAPTER – 3 LITERATURE SURVEY This project is based on controls the toy car in which power supply is given to the system with the help of transmitter and receiver which is given to the different transmitter and receiver. * There are different modes through which we change it systematically. Now the supply is given to the microcontroller from transmitter circuits with the help of pc. * Microcontroller gives the supply to two different serial communication, one is to rs232, second is to max232. * Then the command is displayed on pc LCD by performing its PROGRAMME in its particular software. There was some of the projects were done in steps by our group which is mentioned below: * Analysis of project * Working on block diagram * Circuit diagram’s implementation using ORCAD and other FLASH MEGIC and KEIL MICRO VISION 3. 1software.

* Hardware’s implementation and software’s implementation * Finally last process done by our group was testing and troubleshooting which was also done with some of the help of our faculty. CHAPTER – 4 SUMMARY OF PROJECT * You can control a toy car through your PC’s serial port using a pair of ASK transmitter and receiver modules.The received signal is decoded by a P89V51RD2 microcontroller and fed to the motor driver circuitry to move the toy car in forward, backward, right or left direction. All the signals are in RF domain. * The different stages for wireless control are: 1. Transmission of the control signals from a PC port 2. RF transmitter and receiver. 3.

Decoding of the received signals using microcontroller 4. Motor Driver * Asynchronous serial communication is established between the computer and P89V51RD2 microcontroller through wireless RF link. The microcontroller and computer are both SYNCHRONIZE with each other.The baud rate of data transfer is 1200.

* There are many ports available at the base of your PC in order to send data to the connected peripherals. Serial port, parallel port and USB port are some of the ports for connecting to the peripherals. * The serial data port transmits or receives the data serially (1-bit data per TX or RX clock pulse). It is based on IEEE RS-232 standard, which defines voltages and baud rates for serial communication between devices connected to it.

Most desktop computers have an RS-232 serial port as it has a very simple circuitry and is cheap and easy to handle. The program is written in ‘C’ and compiled using KEIL C software. The hex code generated using KEIL software is burnt into the chip using Flash Magic programming software from NXP (Philips) Semiconductors. CHAPTER: 5 PROJECT DETAILS DEFINITION:- Pc based wireless toy car control is a concept by which we can move a car in any direction, we can move a car in forward, backward, turn right, turn left through the pc using the transmitter and receiver with the microcontroller p89v51rd2. BLOCK DIAGRAME * Fig. shows the block diagram for PC based wireless control of a toy car. The different stages for wireless control are 1.

Transmission of the control signals from a PC’s serial port. 2. RF transmitter and receiver. 3. Decoding of the received signals using the microcontroller. 4.

Motor drivers * Asynchronous serial communication is established between the computer and P89V51RD2 microcontroller through wireless RF link. The microcontroller and computer are both SYNCHRONIZED with each other. The baud rate of data transfer is 1200. CIRCUIT DIAGRAM:- Transmission of the control signal through PC’s serial port:-. * The first part of the project is transmission of control signals through the serial port of the PC.The control signals are W, S, D, A, Q, E, C, Z and U to control the toy car in forward, backward, right drift, left drift, sharp forward left turn, sharp forward right turn, sharp backward left turn, sharp backward right turn and stop, respectively. Each of the control signals is fed from the keyboard and sent through the serial com port.

The signal is then transmitted wirelessly by the ASK transmitter module. * PC’s serial com port. There are many ports available at the base of your PC in order to send data to the connected peripherals.Serial port, parallel port and USB port are some of the ports for connecting to the peripherals. * The serial data port transmits or receives the data serially (1-bit data per TX or RX clock pulse). It is based on IEEE RS-232 standard, which defines voltages and baud rates for serial communication between devices connected to it.

Most desktop computers have an RS-232 serial port as it has a very simple circuitry and is cheap and easy to handle. * Windows-based 9-pin serial port DB9 connector has the configuration as shown in Table I. The RS-232 standard serial port has nine pins having different functions for transmitting and receiving data.

Of these, only three pins (pins 2, 3 and 5) are mostly used for sending and receiving data. Only pins 3 and 5 are used in this project. The RS-232 standard has specific voltage levels for data logic 0 and logic 1 (-3 to -15V for logic 1, and +3 to +15V for logic 0).

But the microcontroller defines logic 0 and logic 1 by voltage levels 0-0. 5V and 4. 5-5V, respectively. So you have to convert the RS-232 standard signal level into the microcontroller signal level. For that purpose, * We have used MAX232 converter.For signal-level conversion, MAX232 requires four capacitors (10? F) and a 5V supply. Since we are using 9V supply, a single voltage source voltage regulator IC 7805 is required to supply power to MAX232. Now, the serial port signal, which is at RS-232 logic, can be converted into 5V TTL-level signal.

* The transmitter section built around MAX232 is shown in Fig. Circuit of transmitter section:- The transmitter section built around MAX232 is shown in Fig. PARTS LIST:- RF transmission:- * The 5V supply from 7805 voltage regulator IC powers the RF ASK transmitter module through its pin 3.

This module actually collects the binary signal from the data pin (which is connected to the MAX232) and modulates this binary signal with amplitude-shift keying (ASK) digital modulation scheme by a carrier frequency of 434 MHz and transmits the data through the antenna. The concept of the ASK signal is shown in Fig. ASK-modulated signal:- ASK Module Specifications:- RF reception:- * The ASK receiver module receives the 434MHz signal  and demodulates it. The baseband signal is a 10-bitdigital signal with the first bit as start bit, the following eight bits as data bits and the last bit as stop bit.The received data is sent to the microcontroller. The RXD pin (p3. 0) of P89V51RD2 microcontroller is connected to the data pin of the 434MHz ASK module receiver. So the P89V51RD2 detects the transmitted data at its pin 10 (RXD).

CHAPTER: 6 Circuit of receiver section Decoding of the received signal with P89V51RD2:- * The P89V51RD2 is an 80C51 microcontroller with 64kB flash, 1024 bytes of data RAM, 32 input/ output (I/O) ports, three 16-bit timers/counters and two pins for serial data transmission and reception. Timer 1 is used for serial communication. It is operated with an 11.

0592MHz crystal.  A key feature of the P89V51RD2 is its X2 mode option. You can choose to run the application with the conventional 80C51 clock rate (12 clocks per machine cycle) or select the X2 mode (six clocks per machine cycle) to achieve twice the throughput at the same clock frequency.

* The Flash program memory supports both parallel programming and in serial in-system programming (ISP). It is also in-application programmable (IAP), allowing the Flash program memory to be reconfigured even when the application is running. * In this project, timer 1 (TH1) is used in mode 2 (8-bit auto-reload).It is used to set the baud rate.

Here it is loaded with a value of E8 hex (or -24) and so the baud rate is set at 1200. The SCON register is loaded with a hex value of 50, indicating serial mode 1, where 8-bit data is framed with a start bit and a stop bit. * After timer TH1 is set, it starts running until the P89V51RD2 microcontroller is made off. The P89V51RD2 waits until it receives a start bit. After receiving the start bit, it receives the 8-bit data and places the data in SBUF register. Then the framing error is checked.

If there is framing error, the byte received is discarded.Otherwise, the content of SBUF is compared with the ASCII code of alphabets W, S, D, A, Q, E, C, Z and U. When a match is found, the operation related to each alphabet is executed. Then the toy car stops or moves in a particular direction as per this value. Driving the DC motors:- * Port pins p1. 1 through p1.

4 of the microcontroller drive four relays through a relay-driver circuitry comprising transistors T1 through T4. The four relays, in turn, control four motors of the toy car (Fig. 5). Two relays control the forward and reverse rotations of a motor.The left two motors are connected in parallel and so are the two motors of the right. So two motors are controlled simultaneously using two relays. * Each of the four relays is 12V, single- changeover electromagnetic type to control the PMDC motor (12V, 50-rpm).

The relays play an important role in isolating the controlling circuit and PMDC motors to protect the microcontroller and other low-current devices from the relatively high-current-driven motors. Basically, these are switches that connect or disconnect the motors from the 12V supply. Control signals from the microcontroller energies or de-energies the relays.That is, when a control signal makes a pin of P89V51RD2 high, the transistor connected to it conducts to energies the corresponding relay. * Here +12V terminal of the battery is connected to normally-open (N/O) contacts of all the relays and the ground terminal is connected to normally-closed (N/C) contacts of the relays. * This means when all the relays are not energies, positive and negative terminal ends of all the motors connect to the ground terminal of the battery, so the motors will not rotate. If all the relays energies, ends of the motors connect to +12V and the motors don’t rotate.If any of the relays energies, one end of the respective motor connects to +12V and the other end to the ground.

This makes the motor rotate. Energies of the relay decide clockwise or anticlockwise movement of the motor. *  Q1 output from the microcontroller is fed to the base of transistor T1. When Q1 is high, TRANSISTOR T1 conducts and relay RL1 energies to make the pole (P) shift towards N/O contact. This connects +12V to the positive terminal of motor M1 on the front left of the toy car.

Relay connections to motors * When Q2 output is high, TRANSISTOR T2 conducts and relay RL2 energies to make P shift towards N/O contact.This connects +12V to the positive terminal of motor M2 on the left back of the car. * When Q3 output is high, TRANSISTOR T3 conducts and relay RL3 energies to make P shift toward N/O contact. This connects +12V to the positive terminal of motor M3 on the right front. * When Q4 output is high, TRANSISTOR T4 conducts and relay RL4 energies to make P shift toward N/O contact. This connects +12V to the positive terminal of motor M4 on the right front.

* When Q4 output is high, TRANSISTOR T4 conducts and relay RL4 energies to make P shift toward N/O contact. This connects +12V to the positive terminal of motor M4 on the right back.CHAPTER: 7 CONTROLLING THE TOY CAR ‘W’ forward movement (Q1=1, Q2=0, Q3=1, Q4=0):- *  The toy car moves forward when all the motors move clockwise.

To achieve this, the output logic at Q1, Q2, Q3 and Q4 should be high (1), low (0), high (1) and low (0), respectively. Character ‘W’ is defined in the code to give 1010 bits in the output. That is, when you type ‘W’ character from the keyboard, the microcontroller generates 1010 bits at its port pins `p1. 1 through p1. 4. This signal is sent to relay-driver section T1 through T4. ‘S’ backward movement (Q1=0, Q2=1, Q3=0, Q4=1):- Backward movement takes place when all the motors move anticlockwise. So signal 0101 is sent to relay-driver section T1 through T4.

Character‘s’ is defined in the code to give 0101 bits in the output. ‘D’ right drift (Q1=1, Q2=0, Q3=1, Q4=0 (for 54 ms) and Q1=1, Q2=0, Q3=0, Q4=0 (for 108 ms)):- *  Right drift is possible by rotating the left motors at a high speed and the right motors at a low speed. This is possible with the pulse-width-modulated (PWM) pulse given to the right motors. The right motors are given a pulse train of 33 percent duty cycle so that these rotate at one-third the speed of the left motors.The car takes a right turn in forward direction resulting in a drift. So signal 1010 is sent for 54 ms and a signal of 1000 for the next 108 ms to transistors T1 through T4.

Character ‘D’ is defined in the code to generate the 1010 and 1000 signals with 54 ms and 108 ms delays, respectively. ‘A’ left drift (Q1=1, Q2=0, Q3=1, Q4=0 (for 54 ms) and Q1=0, Q2=0, Q3=1, Q4=0 (for 108 ms):- *  Left drift is possible by rotating the right motors at a high speed and the left motors at a low speed. This is possible with the PWM pulse given to the left motors.The left motors are given a pulse train of 33 per cent duty cycle so that these rotate at one-third the speed of the right motors.

The car takes a left turn in forward direction, resulting in a drift. So signal 1010 is sent for 54 ms and signal 0010 for the next 108 ms to transistors T1 through T4. Character ‘A’ is defined in the code to generate 1010 and 0010 signals with 54ms and 108ms delays, respectively.

‘Q’ sharp-forward left turn (Q1=0, Q2=0, Q3=1, Q4=0):- *  The toy car moves to the left sharply in the forward direction when the left motors are static and the right motors move clockwise.So signal 0010 is sent to transistors T1 through T4. Character ‘Q’ is defined in the code to generate 0010 bits in the output. ‘E’ sharp-forward right turn (Q1=1, Q2=0, Q3=0, Q4=0):- *  The car moves to the right sharply in the forward direction when the left motors move clockwise and the right motors are static. So signal 1000 is sent to transistors T1 through T4.

Character ‘E’ is defined in the code to generate 1000 bits in the output. ‘C sharp-backward left turn (Q1=0, Q2=0, Q3=0, Q4=1):- *  Sharp left turn takes place when the left motors are static and the right motors move anticlockwise.The car moves to the left sharply in the backward direction. So signal 0001 is sent to transistors T1 through T4.

Character ‘C’ is defined in the code to generate 0001 bits in the output. * ‘Z’ sharp-backward right turn (Q1=0, Q2=1, Q3=0, Q4=0):- *  The car moves to the right sharply in the backward direction when the left motors move anticlockwise and the right motors are static. So signal 0100 is sent to transistors T1 through T4. Character ‘z’ is defined in the code to generate 0100 bits in the output. ‘U’ stop (Q1=0, Q2=0, Q3=0,Q4=0):- *  To stop the car, all the motors should be static.This is achieved by sending signal 0000 to the output of the microcontroller at its port pins p1.

1 through p1. 4. Character ‘u’ is defined in the code to generate 0000 bits in the output to stop the toy car. CHAPTER: 8 SOFTWARE PROGRAM:- FLOW CHART OF THE PROGRAM * Fig shows flow-chart of the program. The program is written in ‘C’ and compiled using KEIL C software.

The hex code generated using KEIL software is burnt into the chip using Flash Magic programming software from NXP (Philips) Semiconductors. KEIL C ? vision 3. 1. OPERATION:= * Run KEIL ? Vision3 application from the desktop.

From ‘Project’ menu, select ‘New Project’ option. Name the project as ‘efytoy. uv2’ and save it. * Select microcontroller P89V51RD2 from the database under NXP (Philips) option. * Right-click ‘Source Group1’ option in ‘Project Workspace’ window on the left-hand side of the screen. Click ‘Add Files to Source Group 1’ option to add the toy car .

c file. * Right-click ‘Target1’ option from ‘Project Workspace’ and select ‘Options for Target 1. ’ The window appears as shown in Fig. Screenshot of ‘Options for Target 1’ window * 5.

Change the XTAL (MHz) value to 11. 0592 as used in the project.Click ‘Output’ menu and tick the button against ‘Create HEX File’ option.

6. Now close the window and go to the main window. Compile the project by clicking ‘Build Target’ option. The program will be compiled with the message as shown in Fig.

Program compilation output screen * Now, the efytoy. hex code will be generated in the directory where the PROJECT FILE EFYTOY. UV2 is located.

This hex code is used for programming the chip. CHAPTER: 9 Programming the chip using Flash Magic Screenshot of ‘Flash Magic’ window * Run the Flash Magic software and select the device as P89V51RD2 and ‘Erase all Flash’ option as shown in Fig. In the ‘Advanced Option,’ uncheck ‘Use DTR to control RST’ and ‘Assert DTR and RST while com port open’ options.

* Browse the efytoy. hex file from your PC and load it onto the main screen. Press ‘Start’ button to program the chip.

CHAPTER: 10 Construction and testing An actual-size, single-side PCB of the transmitter circuit is shown in Figure its component layout is given * An actual size, single-side PCB of the receiver circuit and its component layout is shown in fig * Burn the code into P89V51RD2 and mount the components on the receiver PCB. * Mount the populated PCB, 12V battery and four motors on a suitable chassis, preferably a 20? 5cm2 metal chassis. Use proper nuts and bolts to fix them firmly on the chassis.

Four wheels, each of 7cm dia. , are attached to shafts of respective motors. * After mounting the components on the transmitter PCB, connect the circuit to the serial port of the computer using a serial cable. If your PC has a USB port only, you may use a USB-to-serial converter. Now switch on the 9V power supply using switch S1. * Before sending the data from your computer, check which comport is connected to the circuit. Set the baud rate of comport to 1200, stop bit to 1 and data bits to 8.

Go to ‘Device Manager’ option from your desktop to do these settings. Now run the signal serial communication software such as Terminal v1. 9b, select the com port and make the aforementioned settings.

After completing all the settings and component assembly, switch on the power supply to the transmitter and receiver circuits. Run Terminal v1. 9b software and activate the connection by pressing ‘Connect’ button followed by W, S, D, A, Q, E, C, Z or U key on the keyboard. The ASCII code corresponding to that key will be transmitted serially in a 10-bit (1 start bit+8 data bits for ASCII code+1 stop bits) binary data stream.

The toy car will move as per the input from the keyboard. P89V51RD2 microcontroller General description:- * The P89V51RB2/RC2/RD2 are 80C51 microcontrollers with 16/32/64 KB flash and1024 B data RAM. * A key feature of the P89V51RB2/RC2/RD2 is its X2 mode option.

* The P89v51RD2 is an 8bit, 80c51 compatible, 5v, low power microcontroller with 64kb flash and 1024bytes of data RAM. Its key features are ISP and X2 mode option. The user can choose to run the application either using conventional 80c51 clock rate (12 clocks per machine cycle) or X2 mode(6 clocks per machine cycle).By using X2 mode we can achieve twice the same throughput at the same clock frequency. * Flash memory supports both parallel and in serial in-system programming (ISP). Parallel programming mode offers gang-programming at high speeds, thereby reducing programming costs and time to market.

Whereas, ISP on the other hand, allows a device to be reprogrammed in the end product under software control. * It is also In-Application Programmable (IAP), allowing flash program memory to be reconfigured even while the application is running. FEATURES:= * 80c51 central processing unit 5v operating voltage from 0 to 40Mhz * 64 Kb of on-chip Flash program memory with ISP (In-System Programming) and IAP (In-Application Programming) * SPI (Serial Peripheral Interface) and enhanced UART * PCA (Programmable Counter Array) with PWM and Capture/Compare functions * Four 8-bit I/O ports with three high-current Port 1 pins (16 MA each) * Three 16-bit timers/counters * Programmable Watchdog timer (WDT) * Eight interrupt sources with four priority levels * Second DPTR register * TTL- and CMOS-compatible logic levels * Low power modes * Idle modeBLOCK DAIGRAME OF P89V51RD2 PIN DIAGRAME PORT DETAILS:- * RD2 has four ports namely port0, port1, port2 and port3. * PORT0: It is an 8-bit open drain bi-directional I/O port, without internal pull-up resistors.

If the pins have ‘1’ then it can be used as high impedance inputs. It is multiplexed low-order address and data bus during access to external code and data memory. It uses strong internal pull-ups when transitioning to ‘1’s and external pull-ups during programming verification. * PORT1: It is an 8-bit bi-directional I/O port with internal pull-ups.They are pulled high when ‘1’s are written to them and can be used as inputs. They receive low-order address bytes during external mode programming. * PORT2: It is an 8-bit bi-directional I/O port with internal pull-ups. They are pulled high when ‘1’s are written to them and can be used as inputs.

It sends high-order address byte during fetches from external program memory and during access to external data memory that use 16-bit address. * PORT3: It is an 8-bit bi-directional I/O port with internal pull-ups. They are pulled high when ‘1’s are written to them and can be used as inputs.It sends high-order address byte during fetches from external program memory and during access to external data memory that use 16-bit address.

SERIAL PROGRAMMING OF THE MICROCONTROLLER:- * In this section we discuss the serial communication registers of the P89v51RD2 and also show how to program them to transfer and receive data serially. To allow data transfer between the PC and the microcontroller without any error, we must make sure that the baud rate of the microcontroller system matches the baud rate of the PC’s com port (baud rate is defined as the number of signal changes per second). In this project, we use the Rx pin of the microcontroller to receive data from the GPS Rx, and we use the TX pin of the microcontroller to transmit data through the XBEE module. SBUF Register:- * It is an 8-bit register used solely for serial communication in the microcontroller. For a byte of data to be transferred via the TXD line, it must be placed in the SBUF register.

Similarly, SBUF holds the byte of data when it is received by the microcontroller’s RXD line. SCON Register:- * The SCON is an 8-bit register used to program the start bit, stop bit and data bits of data framing, among other things.SCON REGISTER DETAILS:- PROGRAMMING THE MICROCONTROLLER TO TRANSFER DATA SERIALLY (ALGORITHM):- The TMOD register is loaded with the value 20H, indicating the use of Timer1 in mode (8-bit auto-reload) to set the baud rate. * The TH1 is loaded with the baud rate (assuming XTAL=11. 0592MHz). * The SCON register is loaded with the value 50H, indicating serial mode1, where an 8-bit data is framed with the start and stop bits.

* TR1 is set to start the Timer1. * For receiving the data serially RI flag is cleared and the RI flag is monitored continuously to see if an entire character has been received yet.When the RI is raised, SBUF has the byte. * For transferring the data serially TI flag is cleared and the character byte to be transferred is written into the SBUF register. The TI flag is monitored to see if the character has been transferred completely. * To transmit/receive the next character, repeat the procedure. TIMERS/COUNTERS 0 AND 1:- * The P89v51rd2 has three timers. They are timer0, timer1 and timer2.

They can be used as either timers or event counters. TMOD REGISTER:- * Both timer0 and timer1 use the same register, called TMOD, to set the various timer operation modes.TMOD is an 8-bit register in which the lower 4 bits are set aside for timer0 and the upper 4 bits for timer1. In each case the lower 2 bits are used to set the timer mode and the upper 2 bits to specify the operation. TMOD REGISTER DETAIL:- TCON register:- * It is a bit-addressable register.

The TR0 and TR1 flags which are used to turn on or off the timers are part of a register called TCON (timer control). This register is an 8-bit register. As shown in table the upper four bits are used to store the TF and TR bits of both Timer0 and Timer1. The lower four bits are set aside for controlling the interrupt bits.TCON Register Details:- TIMER 2:- Timer 2 is a 16-bit Timer/Counter which can operate as either an event timer or an event counter, as selected by C/T2 in the special function register T2CON. T2CON Register Details:- RS-232 SERIAL COMMUNICATION * RS-232 (Recommended standard-232) is a standard interface approved by the Electronic * Industries Association (EIA) for connecting serial devices.

In other words, RS-232 is a long STABLISHED * standard that describes the physical interface and protocol for relatively low-speed * Serial data communication between computers and related devices. An industry trade group, the Electronic Industries Association (EIA), defined it originally * For teletypewriter devices. In 1987, the EIA released a new version of the standard and changed * The name to EIA-232-D. Many people, however, still refer to the standard as RS-232C, or just RS- * 232. * RS-232 is the interface that your computer uses to talk to and exchange data with your * Modem and other serial devices. The serial ports on most computers use a subset of the RS- * 232C standard.

RS232 on DB9 (9-pin D-type connector):- There is a standardized pin out for RS-232 on a DB9 connector, as shown below Pin Number Signal Description:- * 1 DCD Data carrier detect * 2 RXD Receive Data * 3 TXD Transmit Data * 4 DTR Data terminal ready * 5 GND Signal ground * 6 DSR Data set ready * 7 RTS Ready to send * 8 CTS clear to send * 9 RI Ring INDICATOR * 25-pin D-type connector Pin assignment RS232 on DB25 (25-pin D-type connector):- * In DB-25 connector most of the pins are not needed for normal PC communications, and * Indeed, most new PCs are equipped with male D type connectors having only 9 pins.Using a 25- * pin DB-25 or 9-pin DB-9 connector, its normal cable limitation of 50 feet can be extended to * Several hundred feet with high-quality cable. RS-232 defines the purpose and signal timing for * Each of the 25 lines; however, many applications use less than a dozen.

There is a standardized * Pin out for RS-232 on a DB25 connector, as shown below. 25-pin D-type connector Pin assignment Chapter: 11 KEIL micro VISION 3. 1 * Open KEIL from the Start menu * The Figure below shows the basic names of the windows referred in this document STARTING A NEW ASSEMBLER PROJECT * Select New Project from the Project Menu. Name the project ‘xyz’ * Click on the Save Button.

* The device window will be displayed. * Select the part you will be using to test with. For now we will use the NXP (founded by PHILIPS) Semiconductor part P89V51RD2. * Double Click on the NXP Semiconductor. * Scroll down and select the DS89C420 Part * Click OK * CREATING SOURCE FILE * Click File Menu and select New. * 2. A new window will open up in the Keil IDE. * 3.

Click on File menu and select Save. * 4. Name the file xyz. asm * 5. Click the Save Button Adding File to the Project * Right Click on Target 1 in project window. * Select Options for Target.

Select Target Tab * Change XTAL (MHZ) 11. 0592 * Select Output Tab * Click on Create Hex File check box * Click OK Button Add file to group ’Source Group 1’ * Click on target 1. * Right click on source group 1 * Add file to group ’Source Group 1’ * Select ASM source file. * Select file XYZ and ADD after close window. * After save file. And click on build target. * After that write a program. * After save file and build target.

* 5. Click on Debug Menu and Select Start/Stop Debug Session Running the KEIL Debugger * The KEIL Debugger should be now be Running. * Click on Peripherals, register window, memory window. Step through the code by pressing F11 on the Keyboard. * To exit out, Click on Debug Menu and Select Start/Stop * Debug Session Chapter: 12 FLASH MAGIC * Be sure you have made all the setting exact. * After loading your .

HEX file , click start button push then reset button on P89V51RD2 board* * Philips P89V51RD2 Programmer/Dev. Board – With Serial Port http: // NOTE:- * Be sure you have made all the setting exact (Page 1-4) . * After loading your . HEX file , click start button push then reset button on P89V51RD2 board* * Philips P89V51RD2 Programmer/Dev. Board – With Serial Port Chapter 13sodhyatra We find our project with the help of our head of DIPARTMENT Mr.

J. H. MODI and also our project guidance teacher Mr. V. D. Patel &Mr. N. K.

Patel. * First of all for this project we find a company in the AHMEDABAD. In the PALADI there are we face many company’s interview but no one company like to us.

So we discuss with our guidance teacher Mr. V. D. Patel &Mr.

N. K. Patel. so he was give him a idea about AUTOMATION ENGINEER in the AHMEDABAD. * Then with help of our HOD J. H.

MODI he tell us to about company in the PALADI so, we are going to PALADI and meet to MR. DHARMENDRA PARMER. First we decided to know about the Project so we decided go the company and got the training about the project. * Then get information about the project and its instrument so we decided, search the website for information of project. * Then we discussion in group then we decided information about project are divide in four part. And then in four parts is given in One-one member.

* Then we discussion in group so we decided get information about the PC BASED WIRELESS TOY CAR CONTROL. * He was gave him a information about different project idea and we choose PC BASED WIRELESS TOY CAR CONTROL SYSTEM.CHAPTER– 10 REFERENCES * We take this project by thinking about the securities of the houses as well as our lives. So that we take this project as for electronics purposed home security system. * We take suggestions from our faculty guide Mr. N. K.

PATEL as well as Mr. V. D.

PATEL as they plays a vital role in making our project under IDP based project. * We also search some of the sites such as: * www. electronicsforyou. com * www.

Esskayinstitute. com * www. microcontrollerprojects. com * www.

edaboard. com * 8051 C Mazidi * www. usb.

org for USB 2. 0 Specifications. * WWW. GOOGLE. COM FOR SEARCHING ALL DETA SHEETS.