Hardware Components

General Connectivity

For most brands of PTZ Cameras, RS-485 is the standard means of communications. In cases where a DVR (PC Based, or an embedded DVR that uses RS-232 only) is to communicate with the PTZ Camera, an RS-232 to RS-485 converter must be connected to the serial port on the back of the DVR using a standard 9 pin connector, included in the unit.

The Merit-Lilin? cameras require a Power Cable (12VDC to the camera, or 24VAC if an external housing is used), a video cable (RG59 or RG6) and a data cable (Cat 5 or Cat5e is very suitable).

Serial Protocols

Installers should be aware that there are some adapters that are RS-232 to RS-422, not RS-232 to RS-485. Which adapter to use depends on the camera specifications. Merit-Lilin? cameras use RS-485. Other brands may use RS-422.

RS-422

RS-422 is not used by Merit-Lilin? PTZ cameras and consequently is not covered in this document. Other manufacturers do use RS-422.

RS-485

A pair of wires from the RS-232 to RS-485 adapter to the camera is required. Some RS-485 solutions use 4 wires, but this is not the case with our products. Cat5 or Cat5e is the best wire to use. Convention states that the solid will be connected to the positive terminal, and striped to the negative, and states usage of the blue wire pair. The other 3 pairs can be used to run power, if required, and the distance from the PTZ to the power supply is not too far. For longer runs, 2 pairs of wires on the PTZ control line will lessen the resistance and increase the maximum length.

PSG currently uses an internal RS-232 to RS-485 adapter. It is installed internally in the DVR. Figure 1 shows the entire RS-232 to RS-485 Kit. The board is installed in the back of the DVR. For kits purchased with a DVR the board is pre-installed. The power cable (Red, Yellow and 2 black wires with white ends) connect to one of the power connectors inside the PC. These normally power hard drives, but in this case, it powers the RS-232 to RS-485 adapter. There is a male and female and it can be connected to any power adapter that fits. This unit is also pre-installed when purchased with a DVR. The Black wire goes from the Serial (RS-232) port on the back of the Video capture board (looks like a funny telephone jack). There is also a green connector that plugs into the upper green connector on the board. Note the polarity on the connector. The green connector has two terminal screws that need to be loosened, then insert the wires connected to the PTZ and then tighten again. At that point they are plugged into the board.

Camera Connections

All figures and illustrations in this document are taken from a Merit-Lilin? Model 7625 PTZ Camera, however, any of the 76XX Series or the 7000 Series use the same connectors and principles.

Figure 3 shows where the positive and negative leads are connected, when the camera is not enclosed in an outdoor housing. This is also where the connections will be made (power and video) in cases where no external housing is being used.

Figure 4 shows the connections for a camera enclosed in an outdoor housing. Note that the same pin configuration is used on the smaller connector block as in Figure 3.

When an external housing is used, the video, control and power connectors are connected to the unit located inside the housing itself. Instead of connecting the camera, power and RS-485 connectors to the camera itself, they are connected to the unit in the housing, shown in Figure 4. Figure 5 shows the connection required.

The 24VAC inputs labeled on figure 2 have both input and output connections. The inputs come from a 24VAC power source (1 Amp minimum). The output wires are connected to the 24VAC to 12VDC inverter that is included with the Camera. The inverter is placed inside the box attached to the housing. The power supply should be attached with 2 screws that originally held a small rack located where the 24VAC to 12VDC adapter is located in Figure 5. The output from the AC/DC adapter box connects to a connector on the circuit board.

Connecting to Keyboards

To connect to the Merit-Lilin? style keyboard, the cable end connecting to the keyboard needs a 3 pin DIN connector as in figure 8. The unit must be taken apart and the positive cable (blue solid) is connected to pin 1. The negative cable (blue stripe) is connected to pin 2. Pin layout is shown in Figure 9. Notice on Figure 9 that the DIN is keyed (there is a slot, visible below the screw hole on the front of Figure 9). Use that slot to see which pin is which. Some people use solder to connect the ends, we have found that sticking the exposed wire through the hole and twisting it tight makes for an adequate connection.

To use the keyboard and the DVR to control the system simultaneously, keep in mind that if both units send commands at the same time, the camera will be unable to interpret either signal. RS-485 protocol does not have any form of error correction; the signals sent are simple binary data. If two senders try to send data at the same time, the data will be corrupted. We have, however, had some users who claim they are able to connect a Keyboard/Joystick Controller (PIH-800II) and the RS-232 TO RS-485 adapter in parallel to a camera, and have the camera function. In testing we have found this works, but is not a completely reliable solution. We found that disconnecting the PIH-800II made the RS-232 TO RS-485 work better. Also, when the keyboard and the RS-232 TO RS-485 controller are both connected, the keyboard works well, but the RS-485 controller signals do not have the same strength, and the camera movements are less than when the controller is not connected. We suspect this is because the keyboard is sending some sort of signal constantly to the cameras.

RS-485

Fig 11 – Camera ID Settings Table

This is a 2 (or sometimes 4) wire that must be connected + to + and ? to -. These are connected in a series (i.e. not star topology). Each camera is assigned a unique address using dip switches on the bottom of the camera (See Figure 6). The RS-485 protocol only defines the hardware protocols. Note that baud rates, parity bits, stop bits, start bits and flow control all have to match. Most PTZs use 9600 Baud, 8N1 with no flow control. Cameras are addressed (Camera ID) using a binary system. That means each switch represents a binary digit (bit). The simplest way to look at this is to assign each of the switches a value: See Figure 11.

The Merit-Lilin? cameras can use 1 to 64 as valid addresses (Camera ID) for PTZ Cameras. All the switches that are on, add that particular value to the address, so if switches 1 and 4 were on, the address of the camera would be 9. If switches 2, 5 and 6 were on, that is address 50. Cameras come configured as address 1. In most cases, no changes will be needed to run a single PTZ Camera. See the Camera ID Settings Table to see what pins represent what value. Figure 10 shows what the switch box looks like.

Fig 10

Software Components

Protocols

Once hardware compatibility has been established, then the camera protocols within the software need to be established. If RS-485 is voice, then Camera Protocols are language. The protocol of the camera must match the device sending the commands. Within the software, several different types of cameras can be selected. Over the same RS-485 adapter, the same type of protocol must be used for all cameras.

Pro LE Series

The LE series is an embedded Linux-based DVR, and we have no efficient way to create screen captures for this white paper. When we installed the PTZ into the LE, we had to change the settings. By default, the flow control was turned on, and we had to turn it off. After we made that change and rebooted and selected the camera, the PTZ worked without any problems. We used a GV-NET, as they are these type of adapters are not product or OS dependent.

Pro GV Series

Fig 12

From the main Screen in the GV Series Software (V 6.0 is used here, but 5.4.1, 5.4 and 5.3 are all very similar) click on the Hammer/Screwdriver button. This will bring up the General Settings (Figure 12) on the System Configure page. On the top right-hand corner is the option to select a PTZ camera. Check the PTZ device setup check box and select the type of camera installed in the system. To configure the camera, click on the little plug just to the right of the PTZ Device setup checkbox, Figure 13.

This will bring up another window to configure the camera. The actual settings on this screen will change by camera. The most important setting is in the bottom left hand corner. ?Activate?. Check this box and that will enable PTZ functionality of the camera.

Ensure that any settings required are configured for that camera. The com port will be the port that the RS-232 to RS-485 adapter is installed on, and the baud rate will normally be 9600, however, please consult the cameras specifications for details.

Once this has been completed, the PTZ will be operable. Confirmation can be made by clicking on the PTZ controller on the main screen just below the ?eyes? and then moving the camera.

Troubleshooting PTZ Cameras

The following is a list of most common errors when installing PTZ Cameras:

1. Camera has no Video

This is usually because the power is not getting to the camera, or the video cable is not connected properly. The best way to test this is to remove the power from the camera and then plug it in. Watch to see if the camera initializes (the head will spin around and make noises). If that does not happen, there is no power to the camera. If it does happen, there is no video to the cameras.

2. Camera has video, but there are lines through the displayed video or the image has lines or other noise.

We have found that power supplies are often the cause of this. We use a 12VAC 1 Amp regulated power supplies. These work the best and filter the noise that is passing through to the video.

3. Have good video but can?t move camera.

The first thing to look at is the RS-232 to RS-485 module. When you click on the control buttons for the camera in the software, does a light flash (TX or RX) on the unit. If it does not, then that means that the device is not configured properly in the software.

Configuration issues would involve not selecting the right com port in the software, not having the comm. Port configured properly in Windows? or in the software itself, or the wrong type of camera is selected in the software. It is important to ensure that the camera is compatible with the software system being used.

If it does flash, then that means that the signal is getting to the camera. In this case, look for continuity in the cable you are using. It might be as simple as switching the pair of wires being used. Often times, the wires can get twisted enough that they break inside the plastic housing. Using a multi-meter and a resistor at the other end of the pair should give you a good test, or attaching a 9V battery to one end of the cable and checking voltage at the other end. Make sure that positive is to positive and negative is to negative. Often times playing around with the wires jams up the camera, and you have to disconnect the power to it and plug it back in.

Final Warning

For installers who have not setup and configured PTZ cameras, it is always a good idea to set the camera up at your shop first using short wire runs. Ensuring you can setup and configure the camera properly will greatly reduce your installation time.

Many people who have installed cameras (including the writer) had a simple issue that became difficult because the troubleshooting was done in a ceiling.

Almost all issues with cameras tend to be wiring, either the wire is plugged into the wrong place, or the polarity is wrong. If you set-up at your location before bringing the product to your customer, you know that the system works and trouble shooting is much easier, and much less likely to be required.

Also, do not plug any 24V device directly into the camera. The housing needs 24VAC to make the heater and fan work, but the camera uses 12 Volts only. Plugging the 24V directly into the camera fries the camera, the warranty and your nerves.