Sunteți pe pagina 1din 51

PC Controlled Robot

CHAPTER 1 INTRODUCTION
1.1 OVERVIEW In defense service many times it is not affordable in many situations to put human life in trouble in case of rescue operations and emergencies. Requirement of such a situation is to take the inner view of situation without risking any lives. For this purpose a non-living system should be employed. Therefore, we developed an idea to build a robot that does more than just move in a maze. Having a video signal makes this Robot very useful as a vehicle used for searching and exploring places that human being is limited to such as detecting mines and exploring the unsafe environment. Controlling the robot from different computer a terminal through the internet gives the user flexibility to access it from any computer terminal at any place. Project Goals Our goal for the design of project was originally developed from the thought of creating a micro-robot, a robot that finds its way in a maze. This Robot is going to be controlled from a computer with a wide range of functions that we are going to be discussed below. The robot will be controlled from a computer terminal. The user can use the computer to control by using different keys on the computer. The keys on the computer tell the robot to move forward or reverse, turn right or left, or stop. The on-board RF receiver is sensitive enough for a control range of up to 50 metre. We are also putting a video camera on the robot and sending the video signal on the robot to computer so that the user knows what exactly the Robot is heading. Possible Approaches In order to design the Computer-Controlled-Robot, we have considered some Possibilities in designing approaches. There are three major parts: 1. The micro-controller (for robot). 2. The wireless transmitter-receiver (between robot and computer terminal).
3.

The video signal.

1.2 BLOCK DIAGRAM

PC Controlled Robot Fig.[1.1] shows the basic block diagram of wireless robot with pc interface.

fig.1.1 Block Diagram of PC Controlled Robot

This project is based on RF Transreception and microcontroller which includes 1. PC:Personal Computer is basically used for monitoring the robotic assembly. It is interfaced to RF transmitter with the help of serial port IC(MAX 232) .It is also used for live picture reception from CCTV.Thus PC is used to position the robot in different direction. 2. RF module:PC RF module Microcontroller Motor Driver Unit CCTV Video transmitter TV tuner Card Power Supply

PC Controlled Robot It is a transreceiver module used for both receiving and transmitting purpose.RF module of 433 MHz is used for this application. It uses AM modulation for transfer of signal. Its coverage area is almost 50m. The cheapest way to remotely control a device for a wide range is via Modulation Technique Now-a-days due to this wide-spread use the required components are quite cheap, thus making it ideal for us to use modulation technique for our project. This topic will explain the theory of operation of RF modulator The modulator accepts a bit stream as its input and converts it into electrical waveform suitable for transmission over the communication channel. Modulation is a process designed to match the properties of the transmitted signal to the channel through the use of a carrier wave. Modulation is used in communication system for reducing noise and interference, for simultaneously transmitting several signals over a single channel. For this project AM modulation is used. The modulation is required for the following reason To reduce noise and interference To overcome equipment limitations. For multiplexing. For frequency assignment.

3. Microcontroller:Microcontroller of 8-bit (89C2051) is used in this project. The control signals are received by microcontroller and accordingly will generate control signals to drive the motors. It is programmed so as to get forward, reverse, right, left direction of motor. The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2 Kbytes of Flash memory available in 20 pin dual in line package. The device is compatible with the industry standard MCS-51 instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications.

4. Motor Driver unit:-

PC Controlled Robot It uses power transistor TIP 122/127.It is used in Darlington pair form. It is used for control of dc motors. DC motors are connected to robotic assembly through which robot is moved in different direction. 5. CCTV:It is a closed circuit TV camera for live video transmission. It is in Mega pixel range. It gives steady picture output to the video transmitter. 6. Video Transmitter:Video transmitter is a 4- pin modulator use for general purpose video transmission. It gives both audio and video signal as an output. 7. TV tuner Card:It is a video receiver, inbuilt to pc system use for receiving live picture from CCTV.The external robot is used for receiving the picture signal. 8. Power Supply:Since the robot is wireless, power supply requirement is fulfilled from DC battery. Battery of 6V is used in this project which can work for long duration, while at transmitter side ac power supply of 230V, 50Hz is used. Working The theme of the project is wireless controlled pc robot. Hence the pc (keys of keyboard) is used for controlling the direction of robot. When a key is pressed, signals are converted in RF form trough RF Transmitter using AM modulation via serial port of pc.This signal are further received by RF receiver at receiver section, where it is demodulated , act as a control signal for microcontroller which controls the direction of motor.CCTV on robot is used for picture signal reception and undergoes modulation. This are further demodulated at pc receiver. Such robots are useful in hazardous condition, since it is wireless and controller is away from maze it is highly efficient 1.3 CONCLUSION The aim of our project is to design wireless robot which is controlled by AM modulation. This project includes monitoring the robot through PC. This can be achieved by designing a system which satisfies both the constraints of our project. Automation of robot is achieved by using microcontroller AT89C2051 and Modulation. The remote location can be tracked by using CCTV camera and video transmission. The picture can be observed at T.V receiver.

PC Controlled Robot

CHAPTER 2 HARDWARE DESIGN


2.1 SERIAL PORT 2.1.1 Serial cords The serial cables are required to interface the PC to the transmitter circuit. It is a 9-pin serial extension cord. They are connected to the pc comport via male-female connector. The cords serially transmit the data. The schematic of connector is shown in the figure[2.1].

fig.2.1 Serial port connector

2.1.2 Max 232 Driver The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-232 inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V and a typical hysteresis of 0.5 V, and can accept 30-V inputs. Each driver converts TTL/CMOS input levels into EIA-232 levels.

PC Controlled Robot The pin diagram is shown in the following figure [2.2]. It is 16 pin IC package. It can also formed by using pair of transistors. But we have used specialized interface IC like the MAX232.

fig.2.2 Pin diagram It receives the data from comport and transfer it serially to the RF modulator. The schematic of interfacing of pc with max 232 driver circuit is shown in fig.[2.3]. This circuit features the best noise rejection and is very reliable and protected against discharges and short-circuits. RS-232 is simple, universal and well understood. RS232 data is bi-polar.... +3 TO +12 volts indicates an "ON or 0-state (SPACE) condition" while A -3 to -12 volts indicates an "OFF" 1-state (MARK) condition. Modern computer equipment ignores the negative level and accepts a zero voltage level as the "OFF" state. In fact, the "ON" state may be achieved with lesser positive potential. This means circuits powered by 5 VDC are capable of driving RS232 circuits directly.

fig.2.3 Interfacing of pc with max 232 driver circuit

PC Controlled Robot 2.1.3 RF Modulator RF Theory When you hear someone say RF he or she is generally referring to radio frequency data communications RF is the wireless transmission of data by digital radio signals at a particular frequency. It maintains a two-way, online radio connection between a mobile terminal and the host computer. The mobile terminal, which can be portable, even worn by the worker, or mounted on a forklift truck, collects and displays data at the point of activity. The host computer can be a PC, a minicomputer or a much larger mainframe. RF itself has become synonymous with wireless and high-frequency signals, describing anything from AM radio from 535 kHz to 1605 kHz to computer LANs at 2.4 GHz. However, radio frequency has traditionally defined frequencies from a few kHz to ~ 1 GHz with Microwave being the consideration. We notice that the frequency spectrum is quite fragmented and dense. This encompasses one of the reasons that we are constantly pushing applications into higher and higher frequencies. However, some of the other reasons accounting for this push into higher frequencies include efficiency in propagation, immunity to some forms of noise and impairments as well as the size of the antenna required. The antenna size is typically related to the wavelength of the signal and in practice is usually wavelength. A basic RF system consists of up to three components: 1) A mobile RF terminal; 2) A base station (sender/receiver); and 3) A network controller. The mobile terminal forms the link (interface) between the user and the RF system. It collects the data to be sent, receives instructions or data from the host, and allows the user to view the data or messages on its display screen. The terminal also has a radio sender/receiver and antenna to provide communication with the rest of the system. The base station has a system antenna and acts as a bridge between wireless and wired networks. It is connected to a controller, (controller can be a separate

PC Controlled Robot device or included in the base station), which in turn is connected to the host. The controller receives and processes information it gets from the host computer and passes this information to the mobile terminals via the base station.

The advantages of a RF communication system are many. Start with the simple fact that if it is wireless, you don't have to lay cable all over your facility. Cable is expensive, less flexible than RF coverage and is prone to damage. For new facilities, implementing a wireless infrastructure may be more cost effective than running cable through industrial environments, especially if the space configuration may change to support different storage space allocation or flexible manufacturing stations.

RF module (433MHz) Features a) Transmitter Module Working voltage : 3-12 volts Range LOS,Open Ground :80m Working current :10-15Ma Working mode :AM Transport speed :4Kb/sec

b) Receiver Module Working voltage : Receive Frequency: Transport Speed : 5V 315/433 MHz 4Kb/sec

Working Temperature : 10 to +70 degree

PC Controlled Robot Working Current : 0.5 0.8 mA

2.2 MICROCONTROLLER IC AT89C2051 Features Compatible with MCS-51 Products 2 Kbytes of Reprogrammable Flash Memory 2.7 V to 6 V Operating Range Fully Static Operation: 0 Hz to 24 MHz Two-Level Program Memory Lock 128 x 8-Bit Internal RAM 15 Programmable I/O Lines Two 16-Bit Timer/Counters Six Interrupt Sources Programmable Serial UART Channel Direct LED Drive Outputs On Chip Analog Comparator Low Power Idle and Power Down Modes

2.2.1 Pin Description The AT89C2051 is a low-voltage, high-performance CMOS8-bit microcomputer with 2 Key- test of Flash programmable and erasable read only memory.

fig 2.4 Pin diagram

PC Controlled Robot

The device is manufactured using Atmels high density nonvolatile memory technology and is compatible with the industry standard MCS-51 instruction set and pin out. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications. The AT89C2051 provides the following standard features: 2 Kbytes of Flash, 128 bytes of RAM, 15 I/O lines, two 16-bit timer/counters, five vector two-level interrupt architecture, a full duplex Serial port, a precision analog comparator, on-chip oscillator and clock circuitry. In addition, the AT89C2051 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset. The pin diagram AT89C2051 is shown in fig.[2.4]. P ort 1 is an 8-bit bidirectional I/O port. Port pins P1.2 to P1.7 provide internal pull-ups. P1.0 and P1.1 require external pull-ups. P1.0 and P1.1 also serve as the positive input (AIN0) and the negative input (AIN1), respectively, of the on-chip precision analog comparator. The Port 1 output buffers can sink 20 mA and can drive LED displays directly. When 1s are written to Port1 pins, they can be used as inputs. When pins P1.2 to P1.7 are used as inputs and are externally pulled low, they will source current (IIL) because of the internal pull-ups.Port 1 also receives code data during Flash programming and program verification. In table [2.1] Port 3 pins P3.0 to P3.5, P3.7 are seven bidirectional I/O pins

PC Controlled Robot with internal pull-ups. P3.6 is hard-wired as an input to the output of the on-chip

comparator and is not accessible as a general purpose I/O pin. The Port 3 output buffers can sink 20 mA. When 1s are written to Port 3 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups.

table 2.1 Port P3 functions

Data Polling The AT89C2051 features Data Polling to indicate the end of a write cycle. During a write cycle, an attempted read of the last byte written will result in the complement of the written data on P1.7. Once the write cycle has been completed, true data is valid on all outputs, and the next cycle may begin. Data Polling may begin any time after a write cycle has been initiated. Ready/Busy The Progress of byte programming can also be monitored by the RDY/BSY output signal. Pin P3.1 is pulled low after P3.2 goes high during programming to indicate BUSY. P3.1 is pulled High again when programming is done to indicate READY.

PC Controlled Robot

2.2.2 Oscillator Characteristics XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in fig. [2.4] . Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven. There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide- by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed 2.2.3 Lock Bit Protection Mode table 2.2 Lock bit mode Program Lock Bits LB1 LB2 1 2 3 U P P U U U Protection Type No program lock features. Further programming of the Flash is disabled. Same as mode 2, also verify Is disabled.

On the chip are two lock bits which can be left un-programmed (U) or can be programmed (P) to obtain the additional features listed in the table [2.2]. 2.2.3.1 Program Verify If lock bits LB1 and LB2 have not been programmed code data can be read

PC Controlled Robot back via the data lines for verification: 1. Reset the internal address counter to 000H by bringing RST from L to H. 2. Apply the appropriate control signals for Read Code data and read the output data at the port P1 pins. 3. 4. 5. Pulse pin XTAL1 once to advance the internal address counter. Read the next code data byte at the port P1 pins. Repeat steps 3 and 4 until the entire array is read. The lock bits cannot be verified directly. Verification of the lock bits is achieved by observing that their features are enabled. 2.2.3.2 Chip Erase The entire PEROM array (2 Kbytes) and the two Lock Bits are erased electrically by using the proper combination of control signals and by holding P3.2 low for 10 ms. The code array is written with all "1"s in the Chip Erase operation and must be executed before any non-blank memory byte can be reprogrammed. 2.2.4 Counter/Timer Many microcontroller applications required the counting of external events such as the frequency of pulse train or the generation of precise internal time delay between computer actions, for this purpose the Timer/Counter is provided. Each timer/counter may be programmed to count internal clock pulses, acting as a timer, or programmed to count external pulses as a counter. The counters are divided into two 8-bit registers called the timer low (TL), timer high (TH) bytes. All counter action is controlled by bit states in the timer mode control register (TMOD) as shown in fig.[2.5], the timer/counter control register (TCON) as shown in fig.[2.6], and certain program instructions. The Timer or Counter function is selected by control bits C/ T in the Special Function Register TMOD. Four operating modes of timer/counter are selected by bit-pairs (M1, M0) in TMOD. Modes 0, 1, and 2 are the same for both Timers/Counters. Mode 3 is different.

fig. 2.5 Command Word of TMOD Register

PC Controlled Robot

fig. 2.6 Command Word of TCON Register

fig. 2.7 Timer/Counter 1, Mode 1- 16 Bit Counter

PC Controlled Robot

Here the timer/counter 1 is used as a counter in mode 1 . The working of this mode is illustrated in fig.[2.7].When timer /counter1 is used as a counter, C / T =1, Gate=0, pin T1 supplies pulses to counter1, (hence here the output of clamper and comparator circuit is connected to pin T1), M1=0, M0=1, (for mode 1) and the TR1 is set high to start the counting. 2.3 MOTOR DRIVER CIRCUIT

PC Controlled Robot

fig. 2.8 Motor Driving Circuit The motor driving circuitry in fig [2.8] uses power transistor (TIP122/127). Transistor TIP 122/127 Feature Darlington 5ampere Complementary Silicon Power transistor. C-E Breakdown Voltage is 100Vdc. Total power dissipation is 65W. Monolithic Construction with Built-in-Base Shunt Resistors. Available in TO-220AB Compact Package 2.4 CIRCUIT DIAGRAM

PC Controlled Robot

fig 2.9 circuit diagram of robotic assembly

The schematic of robotic assembly is shown in fig [2.9]. The circuit designed around microcontroller AT89C2051 which controls all the operation according to program .The clock frequency of 12 MHz is generated using a crystal.

PC Controlled Robot The microcontroller is powered with 5V output of DC voltage regulator 7805.for driving motor.

2.5 CONCLUSION The system is designed according to our constraints. The robot is controlled with RF module and microcontroller. Two DC motors are implemented to control the motion of robot. The control signals are received by microcontroller and accordingly microcontroller will generate signals to drive motors.

CHAPTER 3 SOFTWARE DESCRIPTION

PC Controlled Robot The microcontroller program is the most important part of our project. It is written in assembly language. Following flow chart describes logic of program 3.1 FLOWCHART START A
Check Any Signal Count=06H Yes Measure the Width of Start Pulse Clear Register A Equal To Width of RC5 Count=Count-1 Yes Count=1EH Count=Count-1 Copy the status of RXD line into carry Delay=888sec No

No

Rotate (A) with carry Is Count =0 Yes Delay=1778sec

No

A Continued
Is Count= 0 Yes Delay=444sec No

PC Controlled Robot

Is A=20H

Yes

Jump to subroutine Move Forward

No Yes

Is A=21H

Jump to subroutine Move Backward

No Is A=11H Yes

Jump to subroutine Turn Left

No Is A=10H Yes

Jump to subroutine Turn Right

No Is A=3B H Yes

Jump to subroutine Stop Vehicle

Continued
No Is A=32H Yes

Jump to subroutine Toggle Relay

No Jump to Start

PC Controlled Robot

Continued

Forward Subroutine

Move Forward

Set both motors in forward direction

Jump to Start

PC Controlled Robot

Backward subroutine
Move Backward

Set both motors in backward direction

Jump to Start

Turn left subroutine

Turn Left

Set left motors in backward & right motor in forward direction

Delay 2 sec

Stop both motors

Jump to Start Turn Right

Set right motors in backward & left motor in forward direction

Turn right subroutine


Delay 2 sec

Stop both motors

Jump to Start

PC Controlled Robot

Stop vehicle subroutine


Stop Vehicle

Stop both motors

Jump to Start

Toggle relay subroutine


Toggle Relay

Check status of relay

Is Set

Yes Reset relay

No Set relay

Jump to start

fig.3.1 Flow chart of Microcontroller Program 3.2 PROGRAM INCLUDE 89C2051.mc

PC Controlled Robot ORG 0000H START: MOV SP, #0FH MOV TCON, #00H MOV TMOD, #11H POLL: JB P3.0, POLL CALL DELAY1 JB P3.0, START MOV TMOD, #11H MOV TCON, #00H MOV TH1, #FCH MOV TL1, #86H SETB TR1 POLL1: JB TF1, START JNB P3.0, POLL1 CLR TR1 MOV A, TL1 CLR C SUBB A, #86H MOV R6, A MOV A, TH1 SUBB A, #FCH MOV R7, A MOV A, R6 ; ; ; ; ; ; set stack pointer to 0FH location. clear TCON register set timer1 in mode 1. set delay of 444sec. jump to start ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; set timer 1 in mode 1 clear TCON register set count for generating delay of 888sec start timer 1 check timer 1 flag until pulse received on P3.0 otherwise jump to start time out stop timer 1 load accumulator with contains of TL1 clear carry flag subtract direct byte 86H from accumulator save content of accumulator to R6 load accumulator with contains of TL1 subtract direct byte FCH from accumulator with borrow save content of accumulator to R7 load accumulator with contains of R6

poll for low pulse on pin P3.0 if bit 3.0 is set within 444sec,

PC Controlled Robot CLR C ADDC A, #BCH MOV R6, A MOV A, R7 ADDC A, #017 MOV R7, A MOV A, #FFH CLR C SUBB A, R6 MOV R6, A MOV A, #FFH SUBB A, R7 MOV R7, A MOV R5, #0EH LOOP: CALL DELAY2 DJNZ R5, LOOP MOV R5, #06H MOV A, #00H LOOP1: MOV C, P3.1 RLC A ; ; ; ; ; ; clear carry flag add direct byte BCH to accumulator save content of accumulator to R6 load accumulator with contains of R7 add direct byte 017H to accumulator with carry ; ; ; ; ; ; ; ; ; ; ; ; save content of accumulator to R7 load accumulator with direct byte FFH clear carry flag subtract R6 from accumulator save content of accumulator to R6 load accumulator with direct byte FFH subtract R7 from accumulator with borrow save content of accumulator to R7 load counter R5 with direct byte 0EH call delay 2 subroutine decrement counter, jump if not zero load counter R5 with direct byte 06H. clear accumulator ; ; copy status of P3.1 to carry rotate accumulator left through carry

PC Controlled Robot CALL DELAY2 CALL DELAY2 DJNZ R5, LOOP1 CJNE A, #020H, SKIP1 LJMP SUB1 SKIP1: CJNE A, #021H, SKIP2 ; ; ; ; ; ; call delay 2 subroutine call delay 2 subroutine decrement counter, jump if not Zero compare direct byte 20H with accumulator, if not equal then skip jump to subroutine 1 compare direct byte 21H with accumulator, if not equal then skip LJMP SUB2 SKIP2: CJNE A, #011H, SKIP3 LJMP SUB3 SKIP3: CJNE A, #010H, SKIP4 LJMP SUB4 SKIP4: CJNE A, #03BH, SKIP5 LJMP SUB5 SKIP5: CJNE A, #032H, START LJMP SUB6 SUB1: CLR P1.0 SETB P1.1 CLR P1.2 SETB P1.3 ACALL DEL1 LJMP START SUB2: CLR P1.1 SETB P1.0 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; jump to subroutine 2 compare direct byte 11H with accumulator, if not equal then skip jump to subroutine 3 compare direct byte 11H with accumulator, if not equal then skip jump to subroutine 4 compare direct byte 11H with accumulator, if not equal then skip jump to subroutine 5 compare direct byte 11H with accumulator, if not equal then skip jump to subroutine 6 clear bit P1.0 set bit P1.1 clear bit P1.2 set bit P1.3

call DEL1 subroutine jump to the start of program ; ; clear bit P1.1 set bit P1.0

PC Controlled Robot CLR P1.3 SETB P1.2 ACALL DEL1 LJMP START ; ; ; ; clear bit P1.3 set bit P1.2 jump to the start of program

call DEL1 subroutine

SUB3:

CLR P1.0 SETB P1.1 CLR P1.3 SETB P1.2 ACALL DEL1 ACALL DEL1 CLR P1.0 CLR P1.1 CLR P1.2 CLR P1.3 LJMP START ; ;

; ; ; ;

clear bit P1.0 set bit P1.1 clear bit P1.3 set bit P1.2

call DEL1 subroutine call DEL1 subroutine ; ; ; ; ; ; ; ; ; clear bit P1.0 clear bit P1.0 clear bit P1.0 clear bit P1.0 jump to the start of program clear bit P1.1 set bit P1.0 clear bit P1.2 set bit P1.3

SUB4: CLR P1.1 SETB P1.0 CLR P1.2 SETB P1.3 ACALL DEL1 ACALL DEL1 CLR P1.0 CLR P1.1 CLR P1.2 CLR P1.3 LJMP START SUB5: ACALL DEL1 CLR P1.0 CLR P1.1 CLR P1.2 ; ; ;

call DEL1 subroutine ; ; ; ; ; clear bit P1.0 clear bit P1.1 clear bit P1.2 clear bit P1.3 jump to the start of program

call DEL1 subroutine

call DEL1 subroutine ; ; ; clear bit P1.0 clear bit P1.1 clear bit P1.2

PC Controlled Robot CLR P1.3 LJMP START SUB6: CPL P1.4 ACALL DEL1 LJMP START DELAY1: MOV TMOD, #11H MOV TCON, #00H MOV TH1, #FEH MOV TL1, #43H SETB TR1 DEL444: JNB TF1, DEL444 CLR TR1 CLR TF1 RET DELAY2: MOV TMOD, #11H MOV TCON, #00H MOV TH1, R7 MOV TL1, R6 SETB TR1 DEL889: JNB TF1, DEL889 CLR TR1 CLR TF1 RET DEL1: LOP2: LOP1: LOP: MOV R2, #80H MOV R4, #020H MOV R3, #010H NOP NOP NOP DJNZ R3, LOP ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; clear bit P1.3 jump to the start of program complement bit P1.4 jump to the start of program set timer 1 in mode 1 clear TCON register set count for generating delay of 444sec start timer 1 wait until timer 1 reach to end stop timer 1 clear timer 1 flag return to caller set timer 1 in mode 1 clear TCON register move content of R6 to TL1 start timer 1 wait until timer 1 reach to end stop timer 1 clear timer 1 flag return to caller move direct byte 80H to R2 move direct byte 20H to R4 move direct byte 10H to R3 delay delay delay decrement counter, jump if not zero

call DEL1 subroutine

move content of R7 to TH1

PC Controlled Robot DJNZ R4, LOP1 DJNZ R2, LOP2 RET 3.3 PROGRAM DESCRIPTION The project is based on RF signal decoding. Microcontroller is used for decoding. Microcontroller generates controlling signals to drive motors and relay. The motors are driven by TIP122 and TIP127 and it is used for controlling 2 DC motors. In absence of any signal microcontrollers polls for any high to low pulse on pin 3.0 When a first high to low edge occurs at pin 3.0 microcontroller starts timer 1 and again polls for pin 3.0 to go from low to high. At next leading edge at pin 3.0 microcontroller stops timer 1 and reads count from TH1& TL1 and compare it with the pulse width if the pulse width matches, microcontroller recognize it as required signal. Now microcontroller keeps execution. Now microcontroller copies start of P3.1 to carry and rotate it through accumulator & put the delay of 1 pulse width to go to next bit. This loop continues till all bits stored in accumulator. This completes the decoding the signal. Now program compares the control byte and jump on the respective subroutine. If control byte is 20H program jump to move forward subroutine this reset bits P1.0 & 1.2 set P1.1&1.3. Ports 1.0-1.3 are connected to L293D. P1.0 and 1.1 control right wheel motor and P1.2 - 1.3 controls left wheel motor. When P1.0-1.1 set to 0 1 right motor moves in forward direction and for 1 0 right motor moves in backward direction. For 0 0 &1 1 motor stop running. The same is for left motor. Therefore the above subroutine starts both motors in forward direction. If the control byte is 21H program jumps to move backward subroutine and set P1.0-1.3 to 1010b. Therefore both motor moves in backward direction. If control byte is 11H program jumps to turn left subroutine. For turning left, left motor should be set in backward direction and right motor in forward direction. Hence P1.0-1.3 sends 0110b. Similarly for control word 10H; program sets P1.0-1.3 to 1001b for turning in right direction. For control byte 3BH program sets P1.0-1.3 to 0000b to stop both motors. The control byte 32H toggles relay. ; ; ; ; ; decrement counter, jump if not zero decrement counter, jump if not zero return to caller

PC Controlled Robot When 32H is received, Program checks the status of relay by checking P1.4 bit. If bit is set, reset the bit to off the relay otherwise set the bit to ON relay and jump to start of program.

3.4 CONCLUSION Microcontroller executes the main program and generates controlling signals. The control program is written in assembly language. After programming the microcontroller fetches program code one by one and executes it and generates signals according to the code. The robot can be moved forward, backward, left, right and can rotate about its center.

CHAPTER 4 VIDEO TRANSMISSION SYSTEM


4.1 CCTV CAMERA 4.1.1 CCD The majority of our cameras utilize Charge Coupled Devices, silicon chips that are sensitive to light, that measure about 1/3 diagonally. The huge growth in the camcorder market has led to a dramatic improvement in the sensitivity and resolution of these chips, and has also reduced the overall cost of modern cameras.

PC Controlled Robot

4.1.2 DSP Digital Signal Processing improves many aspects of the picture quality including; edge enhancement and Back Light Compensation. The DSP chip-set replaces a number of analogues ICs and utilizes built in intelligence to maintain optimum picture performance without the need for external adjustment. 4.1.3 Resolution This is measured in TVL or Television Lines by using a special test chart which has a series of patterns that relate to certain resolutions. The camera should be able to define all the patterns up to its specification, the patterns with a higher number of TVL than the camera can resolve will appear blurred. Many components in a CCTV system use TVL to define their performance, the lowest resolution component will be the limiting factor in the performance of the entire system. 4.1.4 Sensitivity This rates a cameras ability to see in the dark, it is measured in lux, which is a measurement of light. So when we say a camera has a sensitivity of 0.1 lux it should provide a useable video signal in those lighting conditions. As the low-light performance is also affected by the lens used we usually quote an F-stop to show how the figures were achieved.

4.1.5 Electronic Shutter This is a function that allows a camera fitted with a manual iris lens to automatically adjust the video level under varying light conditions. Without this function the camera would white-out or need to be used with an auto iris lens. It effectively reduces the cost of installing cameras in many applications where an auto iris lens would have been used, however we still recommend auto iris lenses for most external installations.

4.2 TV TRANSMISSION THEORY

PC Controlled Robot One of the most advanced forms of transmission today is television. Although the concept of television transmission is simple and easy to understand, the practical application of these concepts is highly complicated and beyond the scope of this manual.

fig 4.1 Block diagram of TV Transmitter

As shown in fig.[4.1], a video camera captures visual images and slices (scans) them into about 495 horizontal lines. Each line varies in intensity along its length> in negative type transmissions, a stronger signal will be transmitted when the lines are dark and a weaker signal will be transmitted when the lines are light. After the video processing, the varying voltages are added to the output of a sync pulse generator. This will enable TV receivers to synchronize the saw-tooth oscillators with the saw-tooth scanning voltages applied at the camera. This is essential for the timing and true reproduction of the video at the receiver. This composite signal is fed to an AM modulator along with the carrier frequency. The resulting AM signal is then amplified and passed through a sideband filter. The carrier and sidebands are fed into a diplexer which prevents them from interfering with the FM audio transmitter. The microphone transforms sound into electrical signals. After processing, the audio is fed into a FM modulator, amplified, and fed into the same diplexer as the AM video signal. The diplexer keeps electrical isolation between the two transmitters.

PC Controlled Robot The maximum deviation of the FM audio signal is plus or minus 25 KHz. Remember that wideband FM is 75 KHz and narrowband FM is 4 KHz. When the transmitted signal is demodulated at the receiver, the signal appears as in the fig.[4.2].

fig 4.2 Location of carriers and sidebands in a 7 MHz monatural TV channel This signal contains (1) varying DC components that represent changes in illumination for the picture lines (0-4.2 MHz video frequencies); (2) varying frequencies centered around 4.5 MHz (FM audio information); and (3) the horizontal and vertical sync pulses . A transmitter is actually a combination of two separate transmitters. The sound transmitter is an FM system very similar to a broadcast. FM station with a difference that TV audio system uses 50 KHz deviation to conserve bandwidth, whereas broadcast FM uses 75 KHz deviation. The video or picture signal is amplitude-modulated on to a carrier. The composite transmitted signal is a combination of both AM and FM principles. This is done to minimize interference effects between the two at the receiver, since an FM receiver is sensitive to AM signals and an AM receiver has rejection capabilities to FM. 4.2.1 TV Transmitter The video transmitter combines line level audio and video signals, and transmits the signal up to 300 feet. The circuit can be powered from a 9 volt battery. It is suggested that a 12 volts dc supply to be used during the alignment procedure. This would insurance maximum transmission range and best possible picture. Aligning the TV transmitter as in fig.[4.3] requires no special equipment whatsoever, and it is a very simple procedure. The transmitters output can be tuned to be received on any TV channel from 2to 6.the range of channels is wide enough so that

PC Controlled Robot the unit will not interface with other TV viewers who are nearby. To comply with FCC rules, it is mandatory the nearby TV viewers are not disturbed by the transmission. 4.2.2 Circuit Description

Figure 4.3 is the schematic diagram of TV transmitter circuit. Video signals input at jack J1 are first terminated by resistor R6 and coupled through capacitor .the fig 4.3 TV Transmitter Potentiometer R3is used to set the gain of the video signal; its effect is similar to that of the contrast control on TV set. Bias control R7 can be used to adjust the black level of the picture so that some level of signal is transmitted, even for a totally dark picture. Thats the way TV transmitter can maintain proper synchronization. Potentiometer R3 and R7 are cross adjusted for the best all-round performance. The RF transformer T1 and its internal capacitor form tank circuit of a Hartley oscillator that is tuned to 4.5 megahertz higher than the video carrier frequency. The FM modulated sub carrier is applied to modulator section trough C5 and R9.resistor R9 adjust the level of Sub carrier signal. The operating frequency is set by coil L4, which is 3.5 turns of 24 gauge enameled wire formed containing a standard ferrite slug.

PC Controlled Robot That coil is part of Colpitts tank circuit also containing C7 and C9. The tank circuit forms Q4s feedback network, so that Q4 oscillates at a set frequency. The RF output from oscillator section is amplified by Q5 and Q6, whose supply voltage comes from the modulator section. Antenna matching and low-pass filtering is performed by C12, C13, and L1. Resistor R12 is optional; it is added to help match the output signal to any kind of antenna. [3]

4.3 CONCLUSION The surveillance is achieved by using receiver can be used for reception.
CCTV

camera and video transmitter. The

remote location at a distance of 100m can be monitored. Any general purpose TV

CHAPTER 5 RESULT & CONCLUSION


5.1 INTODUCTION Our effort to design the pathfinder robot system results in a versatile robot that has demonstrated several surveillance applications successfully. Since the mechanical assembly is robust. It can work well in the critical conditions. It is useful in military application, Geographical survey. The camera and video transmission system mounted on the robot shows live picture of survey site at the TV receiver where human can not

PC Controlled Robot reach. Due to the use of only two motors robot can be moved in all direction. Since it uses 6V, 4.5AH battery it can work for longer duration. 5.2 FUTURE DEVELOPMENTS The speed of vehicle can be increased using high torque dc motors and reducing the weight of assembly with the help of nickel-cadmium batteries. Our system employs analog video transmission techniques and can be received by any ordinary receiver. Therefore for security reason we have to switch over to digital transmission along with encryption. For wide range of application GPS (Global Positioning System) technology can be used effectively in place of RF module.

BIBLIOGRAPHY
1. Ayala, K.J., The 8051 Microcontroller, Penram Int. Publications, (2nd Edition). 2. Bhurchandi, K.M., & Ray, A.K., Advanced Microprocessors and Peripherals, TMH Publications. 3. George Kennedy, Electronics communication system, third edition McGraw-Hill Book Company. 4. Muhammad Ali Mazidi, The 8051 Microcontroller and Embedded Systems, Pearson Education.

PC Controlled Robot 5. www.atmel.com 6. www.CCTP.com 7. www.datasheetcatalog.com 8. www.intel.com 9. www.nationalsemiconductor.com 10. www.sbprojects.com 11. www.microchip.com

PC Controlled Robot

PC Controlled Robot

PC Controlled Robot

PC Controlled Robot

PC Controlled Robot

PC Controlled Robot

PC Controlled Robot

PC Controlled Robot

PC Controlled Robot

PC Controlled Robot

PC Controlled Robot

PC Controlled Robot

PC Controlled Robot

PC Controlled Robot

ABSTRACT

Todays era of technological advancement demands for the system with less cost and with more functioning capabilities. Wireless connectivit y is providing an excellence alternative for transferring desired information. In defense service many times it is not affordable in many situations to put human life in trouble in case of rescue operations and emergencies. Requirement of such a situation is to take the inner view of situation without risking any lives. For this purpose a non-living system should be employed. So considering all this facts we have designed a wireless robot with pc interface which can help us in above situations and many more. Our systems consist of a camera and a video transmitter circuit mounted on wireless robot. It can broadcast the live pictures from the site it surveys. This system uses microcontroller IC and AM modulation technique which makes the system completely automatic and wireless.

S-ar putea să vă placă și