ROOFTOP PTZ CAM

 

This camera, like the one on the weather station pole, is a Sony Model FCB-LX470. It was given to me by a friend from work. It is a security cam module and so it had no housing. I fabricated a housing out of my favorite material for this sort of thing: zinc. It comes in a roll of 50 feet and is intended for placement on roof ridges for moss control. It is very malleable and solders nicely and that makes it easy to work with.

Commands for all the camera functions – and this Sony has a bunch! – are done via a serial connection to the control PC.

 

The PTZ Pedestal Version-1

The pedestal uses two BBQ rotisserie gearboxes given to me by my neighbor across the street, Mr. Bill. The AC motors were removed, and in the first generation - in use for a couple years - they were replaced with unipolar stepper motors. The stepper motors were driven by signals from the parallel port of the control PC that in turn controlled high current transistors on a board from a DIY Kit-113. Although this worked, I could never get the rotational speed needed to make it work like I wanted. The gear reduction was too much. So, the camera could be moved, but only in almost imperceptible increments.

In time, due to the normal PC crashes, power bumps, etc. and almost all happening when I wasn’t nearby to react, the switching transistors were stressed to the point of failure. This was because the PC “hangs”, caused usually by power bumps would leave all eight parallel port pins enabled with max current flowing through all eight transistors and the stepper motor windings. Often, my warning that this was happening was the smell of cooking plastic wafting through the house. Those transistors would be so hot they could boil water!

Web control of this version was through a combination of control software from Brian Lane  for controlling the camera, an Apache web server for pedestal control, a Shockwave Flash control panel I wrote, and a VB6 executable that I also wrote for sending step signals to the parallel port.

Camera commands sent from the Flash control panel were handled by Brian’s BDLCam which sent them to the camera via the serial port. Pan and tilt commands from the control panel would involve calling a batch file in the cgi-bin folder of the Apache web server, which in turn would call the VB6 executable, passing command line arguments to it appropriate for direction and step size that the control panel requested. Having the batch files work correctly involved a trick gleaned from Zoomkat’s page.

Because the DIY board was toast, and I wasn’t really happy with the whole setup anyway, it was time to move on to:

The PTZ Pedestal Version-2

For this version, I decided to try moving away from stepper motors altogether. I brought the pedestal down from the roof and made my modifications. This time I used DC motors culled from an HP printer/scanner and one from an old VCR(thanks, Jennifer – it seems I was unable to repair your VCR after all).

My original intent was to control the DC motors using DPDT relays with the relays being controlled via the parallel port. When digging through my junk collection for suitable relays, I came up one short of enough to do the job. In poking around the web exploring options, I ran across this little jewel: Dual H-Bridge. Change of plans once I began reading what the H-Bridge could do for me. Relays out: H-Bridge in. So I ordered the kit, soldered it up after receiving it in a couple days of the order(Hobby Engineering was very prompt), and connected the motors and power supply. Now I have the opposite problem! The gear reduction isn’t enough for the high speed DC motors. It moves way to freakin’ fast now! In the previous incarnation of the pedestal, I had placed limit switches and a mechanical stop but never made use of them since the puny, slow steppers couldn’t hurt anything anyway. Now with this new setup, I will absolutely have to incorporate these limit switches into the software algorithm or gears will strip or something will break.

The Software

For controlling things this go-round I had some goals in mind:

  1. Since I’m into Java programming now, I’d like to do it in all Java if possible.
  2. I want this one server to handle both the camera commands and the pan/tilt commands. This will mean I’ll have to successfully talk to both the serial and parallel ports.
  3. I would like “move until released” capability for the pan/tilt directions, at selectable speeds if at all possible.
  4. I will need to capture the signals from the limit switches and use that to somehow prevent any further motion in that direction while allowing movement in the opposite direction.
  5. Make use of the eight output pins of the parallel port(pins 2..9) and perhaps some of the easier to use status pins to accomplish the above. (Might have to put output pins in read mode to read feedback).
  6. Win Powerball so I can buy more neat stuff from Hobby Engineering.

At the time of this writing, I have somewhat accomplished all but items three and six. Those two still remain my goal.

<more to come>