The VifuLens is an interface designed with the aim to provide remote control of broadcast lenses and PT(Z) head via VISCA commands sent over a TCP network. It comprises of a microcomputer connected to the LAN, an analog interface that connects directly to the zoom, focus and iris (ZFI) lens connectors and a serial port that connects to the pan and tilt head (PT(Z)). While originally designed for Fujinon lenses and PTZOptics pan & tilt head, it can be adapted for other scenarios as well.
I started making this hardware interface and its related software within a specific project I worked on. It proved to be a necessity, because the broadcast portable camera remote PTZ head requested for that project – model PT-BRDCSTR-P from PTZOptics – has been originally designed to connect to remote lens control of compact camcorders, not to independent lenses type which usually equips ENG or EFP cameras.
Although the PT-BRDCSTR-P is an excellent product in terms of sturdiness and movement precision, it has no provisions – at least not in the version I played with – to set an absolute positioning value for zoom, because its electrical zoom interface provides only relative levels voltage output, just enough for zoom in / rest / zoom out. Zoom status reading (lens position feedback) is not implemented and also focus and iris status reading back of actual positions did not seem to be implemented either – something that was explicitly required within my specific project.
Note: in principle, driving the lenses via a serial connection (on digital series lenses providing a serial communication feature) would have been a better solution*, but because I didn't know right from the start the exact model of the lenses, combined with the very short time I had at my disposal to get the job done on that specific project, I thought it was unrealistic to come to an end right on time – so that's why I opted for an analog lenses driving solution, which is also somewhat more universally compatible.
* In this case, “better” means fewer wired connections to the lenses and just a little bit more accurate ZFI positioning.
The hardware interface includes own DAC and ADC converters and analog voltage level shift circuits for each of the ZFI controls. The voltage level shift circuits translates the 0V-2.047V range of the local DAC converters to the 2.5V-7.5V range as required for lens control – and vice versa, from 2.5V-7.5V range of the lens status into the 0V-2.047V range for feedback reading with the local ADC converters. As for the precision when storing and then recalling ZFI positions, the inherent dispersion related to analog component tolerances is insignificant for human perception.
To be noted that, while each of the ZFI control has and can use its own ADC hardware converter, in current software implementation it is only the zoom that actually uses the ADC feedback – while focus and iris controls just read back the “direct drive” value as passed to their respective DACs.
The hardware interface is built on top of a Raspberry Pi 2 Model B v1.2 Industrial. I deliberately chose Pi 2 instead of Pi 3, for good reasons: Pi 3 dissipates a lot more heat and also exposes some sharing trouble – though solvable – on the UART port, all which is disadvantageous for this project.
Note: Raspberry Pi 2 has no native Wi-Fi interface; if wireless connection is really necessary or perhaps advantageous for a given configuration, the lack of the embedded Wi-Fi interface can be easily overcome by using a USB Wi-Fi dongle with the Raspberry Pi 2.
The software running the interface is written in Python. All ZFI commands are processed locally, whereas all pan and tilt commands are sent to the PT(Z) head “as is”. ZFI presets are stored locally on the micro SD card, while the PT(Z) presets are stored natively within the pan and tilt head. Up to 254 presets can be stored, a limit that is being imposed by CAM_Memory VISCA control commands category.
The zoom control accepts two operating command modes: a “Standard” mode for full speed zoom movement and a “Variable” mode that tries to emulate the “seesaw” mechanical control lever of the real lenses. For variable mode, there are 8 steps of progressive speed control for each zoom direction, a number which is specified during the CAM_Zoom Tele(Variable) and CAM_Zoom Wide(Variable) VISCA control commands. All these movement speeds are in turn dependent on the zoom maximum speed control knob, located on the lens servo.
Absolute zoom positioning was not directly possible due to the “seesaw” emulation, therefore I implemented a software digital comparator that keeps in sync the physical zoom position as read via the ADC converter with the CAM_Zoom Direct VISCA control command position; otherwise, during other “normal” zoom requirements, the comparator is deactivated.
Although fully functional, the circuit board is at its first incarnation and may receive further improvements. For example, I may add an additional switch circuit for the focus and iris command to the lenses, so that the remote control on these can be deactivated programmatically. At the moment, only the zoom provides such a switch circuit.
The software is available here for download. It should run under Python v3.5 and requires the Adafruit_Python_ADS1x15 library that must be installed under Python 3.
Note: current software version is 1.4
Currently, the software accepts these VISCA control commands:
No default enclosure is provided, yet. The VifuLens circuit board requires 5V power supply with minimum 2.5A capability and provides its own DC connector. The Raspberry Pi requires no separate power supply. To be noted that some of the hardware circuits (the operational amplifiers) makes use of the 12V supplied from the lenses servo (the electrical current requirement is negligible).