|
Throughout the project, major development work was carried out in order to create a working system. Many decisions were changed along the way. The final system block diagram showing each subsystem is shown below.

Figure 34 - Final System Design
The controlling PC communicates with the system controller through a serial port (RS232) on the controller. The control software is implemented on a FPGA board which decodes commands, controls the data modulator and drives the servo motor signals. These servo motors are mounted on a pan and tilt head which and enable it to scan an area. Mounted on the head is a camera with a IR light pass filter, using this the camera is able to detect the homing beacon (IR LED) mounted on the receiver. To detect the beacon, the controlling PC performs image processing on the stream coming from the camera through a capture card connected to the PC. Now the position of the receiver is known, the transmitter is able to send data using a PIC based RC5 IR modulator which is demodulated by a hardware chip mounted on the receiver and decoded by another PIC.
When the receiver, receives a data string it performs a crude acknowledgement by disabling the IR Beacon for 2 seconds and re-enabling it. The image processing software is able to detect this.
 Figure 37 - Main Board
The transmitter is designed so that it can be mounted on the top of a standard photography/video tripod to provide a stable base since the head is relatively heavy. The receiver is mounted on a plastic base to keep the receiver vertical and stable. The controller circuit and associated components are mounted on a ¾” thick MDF base. The wiring loom between the controller and camera contains 9 lines. 5 are 16x0.2mm multicore (Power & Servo), and 4 are 7x0.2mm multicore (Camera) terminating in 2.54mm pitch connectors and headers.
There are four main distinct pieces of software required in the system to allow it to operate. These are the AreaScanning program, the controller program, the IR modulator program and also the IR decoder program.
This is a Matlab piece of software which issues commands to the controller to move the servos and also control the modulator PIC. The programs main function is to capture the images from the camera and detect the IR beacon. This program has complete control over every other part of the system.
(Main File: AreaScan.m – Matlab folder on CD)
The purpose of this piece of software is to decode data received serially over the serial port and extract the commands. The software then performs the selected command, either enabling or disabling the modulator, passing data to the modulator, or setting up the servo positions. The controller takes the desired position for the servo and encodes the pulse stream to drive the servo to this position. This software is written in Verilog for implementation on a FPGA at 50MHz.
(Project: FPGAPanTilt – Quartus\Projects folder on CD)
The purpose of the IR modulator program is to take a specified value and modulate it through the IR Led driver circuit. The program implements the RC5 coding scheme which is modulated at a frequency of 36kHz to prevent noise. The program generates the full digital waveform required to drive the LED. The program is written in assembly for implementation on a PIC 16F877A at 20MHz.
(Project File: IRTrans.mcp – PIC folder on CD)
The IR decoder takes the demodulated stream from the demodulator chip and extracts the data received from the transmitter. After data has been received, the program disables the IR beacon to acknowledge the transmission and then re-enables it after 2 seconds. The program is written in assembly for implementation on a PIC 16F877A at 20MHz.
(Project File: IRDecAck.mcp – PIC folder on CD)
|