As explained in the PC part, the computer sends 3 bytes of data in every frame of video through serial port over an RF link. The microcontroller receives those 3 bytes of data.One byte represents mouse movement in X axis, one for Y axis and one represents clicks/keys pressed. The magnitude of number is directly proportional to movement of mouse in respective axis. For example if the mouse moved 10 pixels in X direction and 2 pixel in Y direction. It will transmit 10,2,0 to the microcontroller. The actual data received it at a rate of (3 x framerate/second).
Here is the schematic of the Serial Port along with a MAX233 implemented physically on our final board.
The PID Controller was implemented by the microcontroller in DEAD EYE. The block diagram can make things easier to understand that is as follows:
Its easy to get the basic idea of this part that how is the microcontroller acting. Actually the PC sends data via RF link and then the microcontroller generates the desired PWM and sends it to the H-Bridge which in turn powers the motors. Now the best part is that the encoders send pulses back to the microcontroller as feedback and then the actual motion of the motor is sensed and then again the microcontroller pulses the H-Bridge and in this way an accurate control system is established.
An H-bridge has been well explained in the previous chapters, but there is something new to the one we implemented finally, the limit switches. Now these were needed as we have to limit the motion of our gun to as far as a naked eye’s vision can see. If a switch doest short the ends, the respective side of the H-Bridge would not find a groud and hence limiting its motion to that side. The limit switches were fixed physically at locations so that the mechanical structure isn’t affected in case of false PWM Generation. Therefore the normally closed switches and the final H-Bridge is shown below
A digital optical encoder is a device that converts motion into a sequence of digital pulses. By counting a single bit or by decoding a set of bits, the pulses can be converted to relative or absolute position measurements. Encoders have both linear and rotary configurations, but the most common type is rotary. Rotary encoders are manufactured in two basic forms: the absolute encoder where a unique digital word corresponds to each rotational position of the shaft, and the incremental encoder, which produces digital pulses as the shaft rotates, allowing measurement of relative position of shaft. Most rotary encoders are composed of a glass or plastic code disk with a photographically deposited radial pattern organized in tracks. As radial lines in each track interrupt the beam between a photo-emitter-detector pair, digital pulses are produced.
The most popular type of encoder is the optical encoder, which consists of a rotating disk, a light source, and a photo-detector (light sensor). The disk, which is mounted on the rotating shaft, has coded patterns of opaque and transparent sectors. As the disk rotates, these patterns interrupt the light emitted onto the photodetector, generating a digital or pulse signal output. A similar disk was mounted on the rear axle of each motor. Its shown in the figure below and similar to the approach we used in our structure.
We designed the encoder ourselves using a (commonly known as) U Shape Infrared Sensor in series with a resistor and a Pull-UP resistor. Below is its PCB Layout :

THE 1st Protype:
As mentioned in the previous chapter, we were using power window DC motors and therefore we made a simple and light mechanical assembly for the project. The material used was ACRYLIC and that was as it had DIY capabilities. It had a low height base and a strong Y-Axis as well. But due to the change in motor selections, the whole mechanical structure had to be revised.

THE FINAL STRUCTURE:
There was a lot to be done as the time lines were getting tougher and tougher but we had to cope with it. As soon as the motors were bought and tested thoroughly, we realized that a strong and long lasting mechanical structure shall be designed that has the capabilities to work further and beyond this project as well. Therefore we shifted to metal and there was Iron, Steel, Aluminium, Cast Iron, Plastics and all sorts of nuts and bolts used for the completion.
The Base
This design was indeed a challenge in itself but it worked pretty well. The base has the ability to rotate 360 degrees clockwise and counter clockwise. It can be limited to design it for any specific application. Therefore we limited it to 180 degrees as that is what a human eye is capable of.This was designed using simple mechanics and the structure could be repaired as well (if anything goes wrong). That means that it was thought before for errors.
The first step was to create a base sheet .3 inch wide of iron in dimensions of 20inch by 20inch. There were wheels below and handles on it for easy carriage of the structure while working on it. This was chosen so that weldings could be done on it later. Then the motor holding plate along with the rotating pulley was made out of cast iron. After this the appropriate height was given to the plate and then wheels to be equal in height to the pulley were lifted using Steel Bars and all this is illustrated by the picture below:

The Top Part
The next step became to feel critical as there was further less time remaining. Then we first made an aluminium sheet of 19 inch in diameter. Then a steel plate of 3feet by 1 feet was taken. 1 feet on each side was bended at right angles and then it was cut in between for weight reduction. Its illustrated well in the picture. Then the tops ends of the bended plate were fitted with ball bearings and then an iron bar was fitted in it for rotation.

Finally the motor and the gun was mounted and the structure was complete. This was done well in time.

Contribution: Saad Ali, Wasif Ali, Dilshad.
Contact: saad.xt@hotmail.com