Project Description
The project is a two-axis camera positioning system which will take inputs from a serial port of a computer and position an Internet camera accordingly via a two-axis mechanism and H-Bridge controlled circuit.
Project Objectives
1) To build a logic controlled, two-axis camera platform with 90° of freedom in the vertical plane and 180° of freedom in the horizontal plane.
Design Considerations
Many considerations for the camera positioning platform were taken into account while building the system. The first consideration for the camera platform came after examining the materials that were available, it was apparent that over-design was inevitable. The materials on-hand composed of aluminum plate that was at least twice the thickness that was needed for sound structure. The larger materials for the platform would make it easier build a system that would support larger video cameras. For instance, the same platform which is design specifically for an internet camera that weighs 10 ounces, will not support a full-size digital camera that has zoom or other functions. The second consideration when building the platform was to make a platform that could be the basic design for someone else to make improvement upon.
Build
The Main Base
The build started with the base. Building the base proved to be the most challenging part of the entire process. I starting by roughly estimating the size of the camera and the round base needed to support the tower that holds the camera. After rough cutting the desired size base out of aluminum stock, I squared it off in the mill until the exact dimensions (5" x 5.5" x 1.5") were achieved.
The next step was to add a recess for the main bearing and tower base. After numerous hours of experimenting with different ideas, the machine that proved to have the best results was the lathe. To prepare the base for the lathe, a ½" hole was drill through the center and a long bolt was inserted. A nut was then tightened onto the bolt to secure the main base, the free end of the bolt was then inserted into the jaws of the lathe and secure. With this set-up a 4.5" diameter, .3" deep recess was cut into the main base.
After the relief was cut for the base of the tower, a place for the support bearing needed to be cut. To complete this process, a boring bar was used on the mill for the upper and lower part of the bearing. The upper and lower parts of the bearing consisted of two different diameter pieces.
The Tower
To start the tower, a piece of ½" plate was cut into 4.4" diameter circle. Five holes were then drilled in the plate for 8-32 ¾" flat head screws which would attach the base plate of the tower to supports and the support for the tower to two rotate upon. Next, a center support was turned down on the lathe to fit into main support bearing. The center support then was drilled and tapped for the 8-32 flat head screw that attaches to the tower base.
For the tower supports, two .5" x 2" x 6" pieces were rough cut and squared in the mill. The pieces were then measured for the location of the bearing placement. Once the location was established for the bearings, a hole was drilled completely through each support for the axial and two recess were cut for the bearing relief using the end mill.
Once the supports were done, ½" round aluminum stock was selected and turn down on the lathe to couple with the bearings in each support. Milled flats were then cut on both sides of the axial to provide a flat surface for the socket head screws to be fastened to. To complete the axial, two holes were drilled, one to attach the Internet camera and another to trip limit switches at the end of rotation.
Future Improvements
The tower with the limit switches mounted on it should be rebuilt or extended to allow for an increase in space to mount the switches. The existing design does not allow for the full 90° of vertical rotation because of a the lack of space for the switch. Increasing the size of the support would allow for relocation of the top limit switch and therefore increase the range of motion.
Adding a large relief notch under the base to allow for motion of an allen wrench should be added. Adding the relief notch would allow access to the set screws around the center support of the tower base. Under the existing design, the entire tower and main bearing must be lifted out of the main base to make any major adjustments.
The last improvement which should be considered is adding a set screw to the main base for the main support bearing. Currently, because of the absence of the set screw, a certain amount of "sloppiness" is present during rotation of the tower. If a set screw is added the "sloppiness" would be eliminated and thus many future problems can be avoided.
H-bridge Circuit
The two motors are each controlled by a H-bridge circuit. It consists of five X-FET transistors, a filter capacitor and four NAND gates. The NAND gates accept the inputs from the computer and determine which transistors are on. This in turn determines which way current is flowing through the motor. Depending on which transistors are on, determines which way the motor spins. The motors are each 12 VDC gear-driven motors. The motors are also turned on and off by another signal from the computer which turns another transistor on and off allowing current to travel through the H-bridge circuitry.
Voltage Regulator Circuitry
The voltage regulator circuitry is necessary because the Basic Stamp 2 chip requires 5 VDC and the motors and the H-bridge circuitry requires 12 VDC. The voltage regulator basically is a DC to DC converter. It converts a 12 VDC input to a 5 VDC output.
Basic Stamp 2 Chip
The Basic Stamp 2 Chip is used to interface between the computer and the motor control circuitry. There are 16 I/O pins available on the Basic Stamp 2 chip and there are 12 utilized on our project. There are 8 input pins and 4 output pins. The 8 input pins are for the four limit switches which are activated at the farthest range of motion up, down, left or right. The other four input pins are the direction pins that are receiving the output from the computer to move the camera platform up, down, left or right. The four outputs are for the H-bridge circuits. There is one H-bridge circuit for each motor. The H-bridge requires a input to turn the motor on and an input for direction.
The Basic Stamp Chip was selected because of its availability to us. It also has the desired number of input and output pins with a few left for future additions. It is very flexible and easy to program. The following is the program we used for our basic stamp chip.
Basic Stamp 2 Programming
but4 var byte
but5 var byte
but6 var byte
but7 var byte
but4 = 0
but5 = 0
but6 = 0
but7 = 0
input 0
input 1
input 2
input 3
input 4
input 5
input 6
input 7
output 8
output 9
output 10
output 11
low 8
low 9
low 10
low 11
loop:
BUTTON 4,1,255,255,but4,1,right
BUTTON 5,1,255,255,but5,1,left
BUTTON 6,1,255,255,but6,1,up
BUTTON 7,1,255,255,but7,1,down
goto loop
right:
if IN0 = 1 then loop
high 8
pause 5000
low 8
goto loop
left:
if IN1 = 1 then loop
high 8
high 9
pause 5000
low 8
low 9
goto loop
up:
if IN2 = 1 then loop
high 10
pause 5000
low 10
goto loop
down:
if IN3 = 1 then loop
high 10
high 11
pause 5000
low 10
low 11
goto loop