Febuary 11, 2003
Updated May 29, 2004
New 5/29/04, make your own inexpensive (~$16) servo controller for use with a homemade pan/tilt webcam here.
This is version #3 of a homemade web controlled parallel port video switcher made from Radio shack parts, using the 74HCT259 8-Bit Addressable latch (Radio Shack 276-2868, $1.49) chips. I use this type switcher with the Ivista webcam software for webcam remote control. It can be used with other webcam programs, but you will need to make accomidations with a webserver CGI setup for web control (see zoomkat's home page for more info). This type switcher should work for up to 40 cams (using 5 chips) video/audios in, and one video/audio out to capture card and audio card. The schematic (bottom) shows the wiring for four parallel port pins to switch 8 cams video/audio on/off using 2 resistors and 2 transistors per cam. The combined output of the of these are connected at the video out and audio out RCA connectors for single seperate outputs to the video and audio cards. A combination of the parallel port pins are made high, depending on which cam is to be switched. For the basic programming to control the parallel port for the switcher, go to the "El Cheapo" page to see how to control the parallel port pins using batch files or Debug.exe. If you don't want or need web control and just want to switch the cams locally from your desktop, then just put the switcher control batch files (or shortcuts to them) on the desktop or in a folder. Double clicking the files/shortcuts will switch the cams. I've tested this type of switcher with two types of Winnov capture cards and with a generic brooktree based capture card, and noted no problems. Nothing is guaranteed about this (but mine works), so you will have to experiment like I have. And as always..., YMMV!!!
Parallel port switcher demo page (as of 4/10/02) here
Check the "El Cheapo" and the "El Cheapo #2" pages for background and info.
The Radio Shack parts for El Cheapo #3 (prices are approximate). These parts make a two chip 15 cam switcher (15 instead of 16 beacuse the resistors come 5 to the pack, and the transistors are 15 to the pack), and Some components must be bought in a pack to get just one. They can be ordered cheaper from other suppliers, but if you want to tinker *NOW*, then the price difference isn't that much of a deal. ;-)
Parts for a 15 cam switcher:
project box 270-1805 $4.00
2 circuit boards 276-150 or 276-148 $4.00
2 74HCT259 chips 276-2868 $3.00
2 22K resistors 271-1339 $1.00
2 small-signal diodes 276-1122 $1.50
15 4.7k resistors 271-1330 $3.00
2 16-pin DIP sockets 276-1998 $1.00
15 10k resistors 271-1330 $3.00 (needed if you are adding audio)
15 NPN transistors 276-1617 $2.50 (get two packs to add audio)
2 RCA 8 jack board 274-370 $6.00 (get 4 if adding audio)
1/8" mini plug 274-287 $2.00 (for audio)
RCA male plug 273-319 $2.00
25 pin male D plug 276-1547 $2.00
D plug hood 276-1549 $2.00
21' 4 conductor cat3 telephone wire 278-1310 $3.15
8 #4 X 1/2" flathead philips screws (home depot) $1.00
**IMPORTANT**: Download the 74HCT259 data sheet here so you can see the info on the chip and the logic for switching the cams.
The basic how-to-do:
Get the parts and build the hardware: The parallel switcher is a simple one transistor/resistor per cam video/audio switcher. If you use the generic NPN radio shack transistors, lay one down with the flat side down and the 3 leads sticking out to the left. To the center pin (base), you connect a 4.7k resistor for video (a 10k for audio). The other side of the resistor is connected to the appropriate 259 chip "Q" pin wire. The top transistor lead (collector) is connected to the center of the RCA connector comming from the cam video (audio), and the bottom lead (emitter) is connected to the other video (audio) transistor outputs. These are connected to the plug connector wire going to the video capture device (or audio card line in). All the grounds (RCA plug outside) are connected together, keeping audio and video seperated. Note that there are no connections made to the ground side of the parallel port connector (that would ground out the video and audio signals). The chip grounds are connected to the common video out (not video ground) going to the capture card. For audio and video from a cam, you make two transistor setups that operate as a pair. The resistors for each are both connected to the same chip "Q" pin so they operate at the same time. On the chips, parallel port pins #2, #3, and #4 are connected to the A0, A1, and A2 pins on the chips. Parallel port pins #5, #6, #7, #8, and #9 are connected to the "D" pins on the chips (one per chip) to turn the chip on and off when desired. The LE and MR pins on the chips are tied to ground. A small diode is connected between the chip "D" pin and the chip Vcc pin, with the diode band on the Vcc pin side. A 22K resistor is connected between the chip "D" pin and chip ground. Look at the schematic down the page to see the big picture. I haven't Yet put this version in a box, as I want to make it smaller than the test board below. Go to the "El Cheapo #2" page to see how to wire up the parallel port and RCA connectors.
To determine the hex number to send to the parallel port, look at the data sheet function table logic for the chip A0, A1, and A2 pins. When the "D" pin is made high on a chip, the chip "Q0" pin is high. When the "D" pin is high and a combo of the "A" pins is high, other single "Q" pins are high. When the chip "D" pin is low, the chip is turned off. Use the windows scientific calculator to convert the binary parallel port pin alignment needed into the appropriate hex number. In the binary mode (click the little Bin dot), a "1"on the far right is parallel port pin #2. Another"1" to the left is pin #3, and the other pins move to the left in similar order. A "1" sets the pin high (+5V), and a "0" sets the pin low (0V). When you have the desired pin alignment, click the little Hex dot and "voila!" the appropriate Hex number will appear. Use this Hex number in the batch files. Example: put the calculator in the Bin mode and type in 1000, and then click the hex dot. 8 is the Hex number that should appear. This sets parallel port pins 2, 3, and 4 low, and pin 5 high (+5V). Click clear, select Bin mode, and type in 10100 (this sets pins 2 and 3 low, pin 4 high, pin 6 low, and pin 7 high). Then click the Hex dot and 14 should appear. Now you are a binary/hex geek!. Double clicking the batch files should switch the cams. See the El Cheapo page for using debug.exe for testing, and info on using Userport to gain hardware access to the parallel port on NT/2K/XP.
The basic parallel port switcher #3 pix:
The above pix is of the switcher test board. The 16 wires going to the right would connect to the resistor/transistors. The 3 top wires on the left are parallel port pins 2,3,and 4 connected to the chip A0, A1, and A2 pins. The next two wires below connect to the chip "D" pins. The yellow jumper connects the chips common ground to the common video out to the capture card. The red jumper is connected to a test resistor/transistor.
The below pix is of the basic schematic for the chip and resistor/transistors.