Zoomkat's "El Cheapo" Webcam Pan/Tilt Controller

May 29, 2004

Updated March 11, 2005

Zoomkat's home page

Homemade web controlled webcam pan/tilt control. The servo controller is based on the ezservo1 engineered chip ($6.95) available from Kronos Robotics. The schematic below shows how to wire up the various components to the ezservo chips. This setup saves some $$$ and complexity. Every thing can be put on one small circuit board. All the parts seem to be available from Kronos except the the small circuit board (I think they may have a larger board) and phone wire, which are available at Radio Shack. The hookup wires are just pieces of wire from the cat3 four conductor phone wire. I used an NPN transistor in place of the RS232 driver chip to simplify my setup a bit. The NPN transistor is acting as a signal inverter. The serial port goes to +12v for a 0 bit and -12v for a 1 bit. The chip uses TTL (transistor threshold level) with +5v for a 1 bit and 0v for a 0 bit. When the serial port goes to +12v for a 0 bit, it turns the transistor on, allowing current flow thorugh the transistor, dropping the voltage on the collector side to 0 (it dumps the voltage faster than it can be supplied from the power supply through the 10k resistor) supplying the chip with a 0 bit. When the serial port goes to -12v for a 1 bit, the transistor turns off, allowing the voltage on the collector side to build back up to +5v supplying a 1 bit to the chip. I used a 22k resistor on the serial port line so hopefully up to four chips could be used in parallel for four remote pan/tilt cams. If fewer chips are used or the operation is eratic, this value could be reduced to 15k or 10k. The serial port can't put out much current, so using the largest value with steady operation is best. The diode on the ground pin of the 7805 voltage regulator increases the output to ~5.7v for the servos. The diode on the output of the 7805 regulator drops the voltage back down to ~5.0v for the ezservo chip, and also provides some isolation for the chip from voltage dips when the servos move under load. Kronos has the servos, or you can get them here a little cheaper if you are buying more than one. This is the basic setup. Hopefully I can add more details later.

New 9/13/04, some more info on the files used to control the ezservo chip via a webserver here. For security reasons, I currently use the Apache web server and put the control batch files in the cgi-bin folder (use cgi-bin instead of cgi in the URL). Save the page as ezservo.txt, and open with notepad set to wordwrap to read. Putting this in a web page format is just to big of a pita. Look at the page source of my other pan/tilt webcam here to see how to use java menu drop downs for the servo positions.

If it is still on line, check the webcam pan/tilt test unit here.

Some simple cam setups here.

Info on using batch files to send bytes to the servo controller (and how to wire the serial port connector for use with win95/98) here.

parts (also available at Radio Shack):
7805 voltage regulator
NPN transistor (2N2222A or 2N3904 type)
2 diodes (1N914 or 1N4148 type)
10k and 22k resistors
10uf capacitor (1uf and larger will also work)
circuit board and 18 pin chip holder
9 pin female D sub connector
6 feet of 4 conductor phone wire


Below is the circuit board with the components mounted on it. Where possible, the leads from the parts are soldered together under the board. The pix is of the older chip setup that used a resonator (tan thing on the far side of the chip socket). The newer ezservo chips don't use a resonator.


Below is the circuit board wired up.


Below are pix of the simple pan/tilt cam setup using two servos.




The basic schematic showing how to make a simple servo controller using an ezservo chip.
See the ezservo chip data sheet for the rest of the wiring.


Counter