Vous êtes sur la page 1sur 22

TABLE OF CONTENTS

1. Abstract 2. Circuit diagram 3. Explanation 4. Working 5. Program code 6. PCB Layout


7. Fabrication and Assembly

8. Conclusion 9. Reference 10. Datasheet

ABSTRACT
You can control appliances through your PCs serial port using a pair of ASK transmitter and receiver modules. The received signal is decoded by a AT89C52 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.

Fig.1 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 PCs serial port 2. RF transmitter and receiver 3. Decoding of the received signals using the microcontroller

Asynchronous serial communication is established between the computer and AT89C52 microcontroller through wireless RF link. The microcontroller and computer are both synchronised with each other. The baud rate of data transfer is 1200.

Transmission of the control signal through PCs 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 avaialble 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.

CIRCUIT DIAGRAM
CIRCUIT OF TRANSMITTER:

Fig.2: Circuit of transmitter section

CIRCUIT OF RECIEVER:

Fig.4: Circuit of receiver section

EXPLANATION
Transmission of the control signal through PCs 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 avaialble 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 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 a MAX232 converter.

For signal-level conversion, MAX232 requires four capacitors (10F) 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.

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. 3.

Fig. 3:ASK-modulated signal

RF reception. The ASK receiver module (Fig. 4) 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 AT89C52 microcontroller is connected to the data pin of the 434MHz ASK module receiver. So the AT89C52 detects the transmitted data at its pin 10 (RXD).

WORKING

The AT89C52 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 AT89C52 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 AT89C52 microcontroller is made off. The AT89C52 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. Burn the code into AT89C52 and mount the components on the receiver PCB. Mount the populated PCB, 12V battery and four motors on a suitable chassis, preferably a 2015cm2 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 USBtoserial 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 the 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 a 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 datastream. The devices will be controlled as per the input from the keyboard.

PROGRAM CODE
#include<reg51.h> sbit m1a = P1^1;//output 1(O1) sbit m1b = P1^2;//output 2(O2) sbit m2a = P1^3;//output 3(O3) sbit m2b = P1^4;//output 4(O4) void RXDATA(unsigned char);unsigned char RX(void);void MSDELAY(unsigned char);void A();void S();void D();void W(); void Z();void C();void U();void E();void Q(); void main( ) { unsigned char a; SCON=0X50; TMOD=0X20; TH1=-24; TR1=1; PCON=0X40; P1=0X00; while(1) { a=RX(); RXDATA(a); } } void RXDATA(unsigned char a) //Receiving a byte data through serial port { switch(a) { case('A'): A( ); break;

case('S'): S( ); break; case('D'): D( ); break; case('W'): W( ); break; case('Q'): Q( ); break; case('E'): E( ); break; case('U'): U( ); break; case('C'): C( ); break; case('Z'): Z(); break; } }

void D( ) //Right drifts { unsigned char i; P1=0; m1a=1; for(i=0;i<=9;i++)//PWM for 1/3 duty cycle { m2a=1; MSDELAY(15); m2a=0;

MSDELAY(30); } P1=0; } void S( ) //Backward movement { P1=0; m1b=1; m2b=1; } void A() //Left drift { unsigned char i; P1=0; m2a=1; for(i=0;i<=9;i++)//PWM for 1/3 duty cycle { m1a=1; MSDELAY(15); m1a=0; MSDELAY(30); } P1=0; } void W( ) //Forward movement { P1=0; m1a=1; m2a=1; } void U() //Stop { P1=0; }

void E() //Sharp forward right turn { P1=0; m1a=1; } void Q( ) //Sharp forward left turn { P1=0; m2a=1; } void Z( ) //Sharp backward right turn { P1=0; m2b=1; } void C() //Sharp backward left turn { P1=0; m1b=1; } unsigned char RX() data { // Function to receive a

EMERGENCY: RI=0; while(RI==0); if(SM0==1)//Check for framming error { SM0=0; goto EMERGENCY; } return(SBUF);

} void MSDELAY(unsigned char b) 3.6Ms { unsigned char i; unsigned int j; for(i=0;i<=b;i++) for(j=0;j<=310;j++); } //Delay of

PCB LAYOUT

FABRICATION AND ASSEMBLY

PCB fabrication is a process of making a printed PCB board. In the printed PCB board the connections between the components is made previously with the help of copper tracks

according to the required circuit. Because of this it is also known as Printed Wiring Board(PWB). It a very efficient method for manufacturing of electronics circuits in large scale. The steps required in the pcb fabrication process are:

Formation of PCB layout: For the formation of printed PCB board we first require the PCB layout i.e. the layout of the circuit which is to be made on the pcb. There are many software available for the formation of PCB layout. Some of them are EXPRESS PCB, EAGLE etc.. In this project I have used the Express PCB for the formation of the layout. Express PCB is a very strong tool for designing the circuits. It is free and very easy to use software. It is the best tool for the beginners. In the front screen display of the Express PCB the circuit is to be made inside the box shown by the yellow line. It is very easy to design the circuit. Just add the required components from the component list and connect them according to the given circuit. The connections should be made such that no two connecting wire should cross each other and no component should overlap. Once the circuit is formed take the printout of the circuit on the glossy paper for the further process.

Transferring the layout Image to PCB Once the PCB layout is formed it should be transferred onto the PCB. There are three methods for this process: 1. Press and Peal method 2. Screen printing method 3. Photolithographic process Here we use the press and peal method for transferring the layout to PCB. It is the very simple and easy to use method. It is also cost effective. This method can be used in home for designing the PCB. The basic steps are:
In this process at first the print out of the layout is taken on the Glossy paper with the

help of the laser printer. Then the layout image is transferred on to the copper board with the help of the IRON or laminating machine.
After laminating the paper stuck to the board. Now the board is placed in the water so

that the paper is removed leaving only the toner behind. Copper Etching The process of removing the unwanted copper from the board is known as etching. The chemical used for the etching is ferric chloride. The board now produced above is dipped in ferric chloride. The copper is etched from the board where the toner is not present i.e. the copper below the toner is left and else where the copper is removed. The etching is done in the etching Furnace. The board is placed in the furnace for an hour. The furnace is specially made for the etching purpose. Inside the furnace the bubbles are produced in the solution which makes the etching faster. After etching the board is cleaned with the Tri

Chloro Ethylene to remove the toner so that only copper tracks are left behind.

Drilling After Completion of etching and toner is removed the last step left is drilling. In order to mount components on the board the holes should be made on the board. The process of making holes is known as Drilling. The drilling machine is used for this purpose. Just make the holes where required according to the circuit and mount the components.

CONCLUSION
Wireless Robot can be a tremendous change in world of wireless communication and robotics.As we are living in an age of Information Technology. Electronics is at the very foundation of the Information and Computer Age and robotics. The giant strides that we have made in the areas of Communications and Computers are possible only because of the great successes that we have achieved in the field of Electronics. It is sometimes unbelievable, how many electronics gadgets that we carry these days in our personal life. Digital Wrist-watch, Calculator, Cell-phone, Digital Diary or a PDA, Digital Camera or a Video camera, etc.

The different type of Electronic equipments that has invaded our offices and homes these days is also mind boggling. Many things we use at home and office are remote controlled, for example, Television (TV), Air-Conditioners, Audio equipment, Telephone, etc. It is almost close to magic how even a child, now-a-days, can switch channels, or increase decrease the volume of sound in a TV at home by just clicking on a few buttons sitting at the comfort of a sofa away from the Television apparently without any physical wiring or connection!

There are certain advantages of Robotics. They are as :


-

Increased productivity, safety, efficiency, quality of products Can work in hazardous environments, no need for support Need no environmental comforts Work continuously w/o fatigue, boredom, etc.

Have repeatable precision at all times Can be more accurate than humans Have many capabilities beyond those of humans Can process multiple stimuli/tasks simultaneously

Apart from advantages there are some disadvantages too. They are as follows: Robots can displace humans -

economic & social problems

Cant respond to unpredictable emergencies Safety measures needed to prevent injury to operators or other machines Although superior in some ways, robots have limited capabilities

degrees of freedom, dexterity, sensors, vision systems, real-time response

Costly

REFERENCE

1. 2.

Working of Wireless Robot -www.scribd.com/doc/13625301/RF-Robot Functionality of Transmitter communication.html Transmitter Kingdom & & Recieverthebookshq.com/books/wireless-robot

3.

Reciever-www.active-robots.com/.../radio-communication.shtml - United

4. 5.

Circuit diagrams-www.roboticsindia.com/archive/index.php/t-1539.html Circuit diagrams- http://www.crazyengineers.com/forum/ce-robotics/34663-problem-ht12eht12d.html

DATASHEETS
Here in this file I m attaching some of the datasheets of the components used in my circuit. It will help in understanding the components to a greater new level. The datasheets of the components which I m attaching are as follows

AT89C51 MICROCONTROLLER

Vous aimerez peut-être aussi