Design of interruption point detection function of security monitoring and debugging instrument

Publisher:小熊掌心Latest update time:2011-07-30 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Introduction
The image adjuster, also known as the security monitoring adjustment instrument, is an instrument used to test the monitoring system. During the on-site construction and maintenance of the monitoring project, it is often necessary to test the posture, communication lines, power supply, etc. of the camera equipment. The use of this instrument can reduce daily workload and improve work efficiency. During the
on-site installation and maintenance process, the coaxial cable often breaks, such as being pulled off by external force or bitten off by mice, resulting in the inability to transmit images. Most cables are hidden in places that are not easy to detect, such as in the ceiling, underground, and wall pipelines, which puts forward the need to add a disconnection detection function to the instrument. By testing at one end of the cable, the length of the cable (that is, the location of the breakpoint) can be directly measured, thereby helping construction personnel to quickly confirm the fault location and repair it in time.

1 Detection principle
According to TDR theory, a low-voltage pulse is sent at one end of the coaxial cable. When the terminal load impedance is equal to the cable characteristic impedance, the transmitted pulse is completely absorbed by the load and no reflected wave is generated. If the cable terminal load impedance is not equal to the cable characteristic impedance, an echo reflection is generated. Its reflection coefficient is defined as the ratio of the reflected wave amplitude Ureflection to the incident wave amplitude Uincident:
a.JPG
Where: ZL is the load impedance of the cable; z0 is the characteristic impedance of the cable.
It can be seen from formula (1):
① When the load impedance matches the transmission line impedance, that is, ZL=Z0, ρ=0, the incident wave is completely absorbed by the load;
② When the load impedance is infinite (open circuit), that is, ZL=∞, ρ=+1, the transmitted wave has the same amplitude and polarity as the incident wave;
③ When the load impedance is infinitesimal (short circuit), that is, ZL=0, ρ=-1, the transmitted wave has the same amplitude and opposite polarity as the incident wave.
In actual testing, since the pulse is sent and received at the same end, it is necessary to avoid the superposition of the trailing edge of the incident wave and the leading edge of the reflected wave here; at the same time, in order to reduce the shortest test length, a pulse with a narrower pulse width should be selected. When the length of the test cable increases, due to the transmission line loss, the pulse width should also be appropriately increased. The pulse width and the length of the tested cable can be calculated by formula (2):
d.JPG
Where: L represents the length of the test cable; v represents the transmission speed of the pulse in the cable; t represents the round-trip time of the pulse rising edge in the transmission line.
The transmission speed of the pulse in the coaxial line is different from the speed of light and is related to the type of line. For example, the transmission speed in the SYV75-5-2 coaxial line is about 200m/μs. Since the pulse is sent and received at the same end, it is necessary to avoid the superposition of the reflected wave and the incident wave, and the pulse width of the test pulse should be ensured to be less than the round-trip time of the pulse rising edge in the tested cable. If the shortest length of the coaxial line is 5m, the pulse width is:
e.JPG

2 Design and implementation
According to the above principle, the breakpoint detection function is designed, and its principle block diagram is shown in Figure 1.

f.JPG


The single chip microcomputer is responsible for LCD driving, setting the transmission pulse width, processing the measurement results, scanning the buttons, etc.; the LCD display part is responsible for displaying the test results; the pulse generation module is used to generate low-voltage narrow pulses with adjustable pulse width; the transmission conditioning circuit is responsible for amplifying the pulse signal, and the receiving conditioning circuit is used to convert the pulse signal into a voltage range (0-3.3 V) that the CPLD can receive; the counting module is used to record the time interval between the incident pulse and the reflected pulse. [page]

2.1 Pulse generation module
The pulse generation module and the counting module are both implemented by CPLD logic circuits. The CPLD uses Altera's MAX II series EPM240T device, which supports an internal clock of up to 300 MHz, and its speed can meet the measurement requirements.
The pulse generation module consists of a pulse width setting unit and a pulse output unit. In order to save the I/O port resources of the microcontroller, the pulse width setting is implemented by a set of 16-bit serial input and parallel output shift registers. When the microcontroller resources are sufficient, this unit can be omitted. The pulse output unit is implemented by a state machine, as shown in Figure 2.

g.JPG


Among them, clk_50m is the clock input terminal, pulse_with is the pulse width setting port, pulse_out is the pulse output port, and enable is the enable output port. When enable=1, pulse_out outputs a high level with a width of Tclk_50m×(pulse_with+1). For example, when pulse_with=0, the default value of the pulse width is t=Tclk_50m×(0+1)=20 ns. By setting different pulse_with, the input pulse width is adjustable, so that the pulse width can be adjusted when measuring cables of different lengths, making the measurement results more accurate.
As shown in Figure 3, the counting module is implemented by a 16-bit counter and a 16-bit parallel input and serial output shift register circuit. The enable end of enalble is used to prevent interference pulse input from starting the counter; start_counter is the pulse input that starts and stops the counter, and the rising edge is valid; clk_50m is the counter clock, which affects the measurement accuracy. The higher its frequency, the smaller the measurement error range of the cable; Q is the count value output; EOC is the count end mark.
The start of the counter is triggered by the incident pulse, and the stop is triggered by the reflected pulse. The count value is output by the Q data interface, and a high level is output after the count stops. The microcontroller queries the count end flag EOC, and reads the count value when the level is 1.
2.2 Conditioning circuit
2.2.1 Transmitting conditioning circuit
The transmitting conditioning circuit is composed of an amplifier circuit, as shown in Figure 4(a). The field effect tube M1 converts the input positive pulse into a negative pulse with a maximum value of 12 V, and then after being inverted by M2, it can be injected into the cable under test and the receiving conditioning circuit. Here, MOS tubes are used instead of op amp chips to realize the amplification and inversion of signal pulses, which is convenient for saving costs and shortening the transmission delay of signals.

h.JPG

[page]

2.2.2 Receiving conditioning circuit
The receiving conditioning circuit is shown in Figure 4(b). The output of the transmitting conditioning circuit is connected to the input of the receiving conditioning circuit, and the cable under test is connected at the same time. M3 reduces the voltage of the incident pulse and the reflected pulse, and transmits them to the counting module in the CPLD after being inverted by M4 to control the start and stop of the counting module. Among them, TVS is a transient voltage suppression diode, which is an overvoltage protection device.
2.2.3 Principle simulation
In Figure 5, waveform 1 is the test pulse generated by the pulse generation module, which is input to the position in the circuit ① of Figure 4. Waveform 2 is the test waveform diagram of the position in the circuit of Figure 4 (the test point is the connection point between the test module and the cable under test). The first pulse is the amplified test pulse, which is injected into the cable under test, and the second pulse is the return pulse at the breakpoint of the cable under test. Waveform 3 is the waveform of waveform 2 after passing through the receiving conditioning circuit, which will be input to the counting module of the CPLD. The rising edge of the first pulse triggers the counting module to start counting, and the rising edge of the second pulse triggers the counting module to stop counting. The actual test waveform is shown in Figure 6.

i.JPG

[page]

3 Software Design
The program implements the automatic measurement function, and the user does not need to estimate the cable length in advance and adjust the test pulse width. The automatic measurement process is shown in Figure 7.

j.JPG


After selecting the line type, the specific process is as follows:
①First, start outputting from the narrowest pulse 20 ns (PW=O), and detect EOC after delay. (When EOC is equal to 0, it means that there is no reflected pulse returning);
②After the pulse width is increased by 40 ns (PW+=2), it is output again, and EOC is detected after delay, and this is repeated until the return pulse (EOC=1) is detected, or ≥ the maximum output pulse width range;
③When PW≥256, it exceeds the measurement range, returns Length=0, and the measurement fails;
④When EOC=1, read the measured value, calculate the test cable length according to the cable type and return the Length value, otherwise return Length=0, and the test fails;
⑤After the length value is converted into data, it is displayed on the LCD.

4 Experimental results
In order to make the measurement accurate, it is necessary to measure the signal transmission speed of different cables. Select three cables, use an oscilloscope and test pulses to test the transmission speed of each cable. Use each speed value as a constant to calculate the count value of the counting module, and you can get the length measurement results of the three cables. The experimental results are listed in Table 1.

k.JPG


Through the test of three types of cables, it can be seen that the test error is within ±2%, which can fully meet the needs of actual projects.

5 Conclusion
This paper systematically discusses the implementation principle of breakpoint detection, designs relevant software and hardware modules, integrates them into the image adjuster, and conducts calibration experiments on various cables. The experimental results show that the measurement accuracy of this functional module is high and can fully meet the actual needs of the project site.

Reference address:Design of interruption point detection function of security monitoring and debugging instrument

Previous article:Design of portable power quality analyzer based on DSP+ARM
Next article:Two power supply designs in handheld terminal tester

Recommended Content
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号