In this article we will show how to connect an analog HD PTZ camera to a DVR. A PTZ camera is a camera that can pan, tilt and zoom (hence PTZ). It can be controlled manually or it can be set to survey an area via a preset/pattern mode. Each analog PTZ camera as a few physical connectors that need to be wired properly, here we will instruct how to setup a PTZ camera by using the RS-485 standard and using the correct protocol as well (Pelco P or D).
Basic steps to connect a PTZ camera to a DVR:
1. Identify the physical RS-485 connector in the camera.
2. Identify the physical RS-485 connector in the DVR.
3. Run the wire between the DVR and the PTZ.
4. Set the dip-switches on the camera to choose the parameters.
5. Log into the DVR and setup the PTZ parameters.
How to control a PTZ camera
PTZ cameras have an internal motor to control the position of the lens that can move horizontally (known as pan) or vertically (known as tilt) and there’s also a motor to control the optical zoom (zooming in and out).
By controlling the PTZ movements, an operator can patrol a certain location by sending commands using a controller (joystick), or a virtual controller through the DVR (Digital Video Recorder) or using a software installed in a computer located in a remote monitoring center. To send the commands, it is necessary to connect a two-wire cable (positive and negative) from the back of the DVR to the PTZ camera.
In this example, the cameras are connected to the DVR with a twisted pair cable that sends the commands through a universal connection standard and a protocol that the camera and the DVR have in common (such as Pelco P or D). The twisted pair wires must be connected to the back of the DVR into the RS-485 connector.
The RS-485 PTZ control standard
By using the RS-485 standard with twisted pair cables, it is possible to send commands to the camera at distances up to 1,200m (4,000 feet) and multiple cameras can be connected to the cables in a serial line. In the image below, you can see the connector used for the command via RS-485. Note that they are labeled “positive and negative”, which is important when making the connections.
Depending on the model of the equipment, these labels may be different, there are DVRs and cameras that show: TX + / TX- or RX + / RX-. TX is the transmitter and RX is the receiver. Following this logic, the DVR should be the TX that transmits the commands and the RX camera that receives the command.
The important thing to keep in mind is that positive and negative wires should be properly connected to the DVR and to the camera. The device’s manual has instructions for that and not all manufacturers follow the same rules, so it will vary from camera to camera.
In addition to the physical connection using the RS-485 standard, it is also necessary to configure the camera ID and the communication protocol that will be used between the devices. This communication protocol is developed by the manufacturer itself, so if the DVR and camera are from the same manufacturer, there will be no problems, but if they are from different brands we must use a universal protocol.
There is a universal protocol called Pelco P and another called Pelco D, they are available in cameras and DVRs from different manufacturers, so if we have different brands of equipment we can use this protocol.
The Pelco-P and Pelco-D protocols
Pelco is a large camera manufacturer that created this communication protocol for PTZ cameras. This standard became popular among system integrators/installers, so other manufacturers besides having their own protocols, also let Pelco’s protocol available on their equipment for compatibility. When both devices (PTZ and DVR) are manufactured by the same company they usually use the same protocol, so there’s no need to use Pelco’s. As a rule, never use the Pelco protocol if the camera and the DVR are made by the same manufacturer, always use the native protocol.
On the situation where the devices have different brands, it is necessary to choose the common protocol between them, in this case Pelco P or D for example.
A PTZ camera usually has a physical switch where you can choose the protocol. Below is an example of how a PTZ camera’s protocol is configured. A small arrow can be rotated to a specific position in which a number or letter represents the protocol.
Using a table from the camera manufacturer’s manual you can choose the protocol that will be used, as shown in the illustration below:
It is also necessary to configure the DVR with the same parameters used in the camera. In the above example, the parameters have been configured on the camera using a system with a rotating arrow, other cameras may, however have a set of small switches known as “Dip Switches” that can be placed in the “on and off” positions to obtain the desired setting.
A table for the correct combination of these switches (“Dip Switches”) can also be found in the camera manufacturer’s manual.
How to setup the DVR for PTZ control
See below a Pelco-P protocol configuration example for a DVR (in this case it’s a Hikvision DVR), just go to the PTZ menu and search for these settings for each of the cameras. Other parameters such as Data Bit, Stop Bit, Parity, and Flow Control may appear on the menu.
In the menu above that the DVR has several types of protocols from different manufacturers, that can be different according to each brand. Not all DVRs will have these protocols that we see in this menu, but they will all have the Pelco protocol that is easily found in other manufacturers’ equipment, so use it by default when you want to set up a different brand’s devices.