Design and implementation of a hydrological cableway testing system

Publisher:森绿企鹅Latest update time:2014-10-27 Source: 21icKeywords:AT89S8252  ADC0809 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
     Cableway flow measurement is a unique flow measurement method based on my country's national conditions. It is particularly suitable for measuring the cross-sectional area and average flow velocity of natural riverbeds where the flow measurement section is easily changed. It is irreplaceable by other flow measurement methods. Hydrological cableway testing itself is a dynamic change process of a complex spatial system. Factors such as cableway bouncing, mechanical motion inertia, and flow velocity changes all affect the accuracy of flow measurement, and it is a random variable. These main variables are established into mathematical models, corresponding programs are compiled, and input into microcomputers. The microcomputer automatically calculates and adjusts to obtain correct results, which will greatly improve the accuracy of hydrological testing and provide results data in a timely manner.

  After nearly 50 years of development, hydrological flow measurement has become mainly based on cableway flow measurement, especially cableway flow measurement technology, which has developed rapidly in recent years and has basically formed the conditions for standardized construction. For example, cableway erection has developed from diversification to the basic use of open cruise ship labor-saving method; hydrological winches have developed from hand-cranked, belt-connected to slip-speed electric drive, DC servo motor drive to ordinary AC asynchronous motor drive winch used in conjunction with AC variable frequency speed regulation; cableway signals have developed from DC wired, AC wired, AC wireless and radio signals to ground loop transmission of cableway integrated signals; flow velocity measurement has evolved from electric bells, sound counting and self-counting, time counting and direct flow velocity measurement to direct calculation of flow results report; starting point distance and water depth measurement have evolved from knot measurement and rope length counting measurement to actual distance measurement with automatic correction of sag arc; driving control has also developed from manual, electric, slip speed regulation to DC thyristor speed regulation to today's AC variable frequency speed regulation; the overall bypass flow measurement system has also developed from manual to semi-automatic to fully automatic control flow measurement system.

  1 System Configuration

  The system block diagram is shown in Figure 1.

 

   The AT89S8252 single-chip microcomputer is used. Since the data volume of river channel testing is large and the calculation is relatively complex, and the memory capacity inside the single-chip microcomputer is limited, external memory RAM6116 and ROM6264 are added. The input acquisition interface of the external signal is based on the multi-channel A/D chip ADC0809, which sends the cableway signal and water level signal to the single-chip microcomputer P1 port and P3 port to undertake the interface of other input and output signals. The following introduces the main interface circuit and working process based on the characteristics of hydrological testing.

  1.1 ADC0809 interface circuit

  ADC0809 is a CMOS monolithic successive approximation A/D converter. The main features of ADC0809 are:

  1. It is an A/D converter with 8-channel analog input and 8-bit digital output.

  2. Conversion time is 100μs.

  3. The analog input voltage range is 0V~+5V, and no zero point and full scale calibration is required.

  4. Low power consumption, about 15mW.

  He transforms the water level change signal of the telemeter and the velocity, deflection, water surface and bottom signals sent by the cableway and transmits them to the single chip microcomputer. The interface has the characteristics of simple circuit, stable and reliable, strong anti-interference, etc.

 

 

  1.1.1 Acquisition of water level signal

  The teletype water level gauge is used to monitor the change of water level. In order to obtain the water level signal, the sensor part of the teletype water level gauge has been modified. Reed relays J3, J4, and J5 are added inside the sensor, and the internal battery is removed and the power is directly supplied by the system. Resistors R5~R8 form a voltage divider, and the voltage divider outputs to the ADCIN2 port circuit as shown in Figure 2. When the water level changes, the float rises and falls accordingly. The float rises and falls 3 cm, and the magnetic steel inside the sensor rotates one circle, that is, a reed relay will be turned on and off once for every 1 cm change. When J3, J4, and J5 are respectively energized, the voltage of the IN2 port is about 1.6 V, 2.5 V, and 3.2 V respectively. When no relay is energized, the voltage of the IN2 port is +5 V. According to the voltage value of the ADCIN2 port, it can be determined which reed relay is turned on and off. The change law of the voltage at the IN2 terminal can be used to know whether the water level rises or falls as shown in Figure 3. In Figure 3, (a) is rising and (b) is falling.

 

 

  1.1.2 Acquisition of surface and bottom signals

  When measuring the vertical depth, the lead fish starts to descend after it moves to the designated vertical position of the river section. Once the lead fish touches the water surface, the depth counter starts to count the depth. When the lead fish continues to descend and touches the bottom of the water, the bottom switch closes and stops counting. The count value is the initial value of the depth of this vertical line. The working process is as follows: During the descent of the lead fish, the single-chip microcomputer continuously reads the voltage at the ADCIN1 port. Before the lead fish enters the water, the relays J1 and J2 are in the normally closed position. The voltage at the input terminal IN1 of ADC0809 is determined by the voltage divider of R3 and R4 to be 2.5 V. Once the lead fish touches the water surface, the +5 V voltage passes through the underwater plate → river water → lead fish → auxiliary rope 1 → ADC0809 to make the voltage at the IN1 terminal rise to more than 3 V. The single-chip microcomputer determines that the lead fish has touched the water surface based on the voltage at the IN1 port and starts the water depth counting. At the same time, it makes P3.4 output a high level and the relay J1 connects to the normally open contact. From the circuit diagram, it can be seen that the river water resistor is connected in parallel with R4 to make the voltage at the IN1 port about 1.5 V. When the lead fish continues to descend until it touches the river bottom, the river bottom switch K2 is pressed through, and the voltage at the ADCIN1 port in the circuit connected to the 4.5 V battery E1 inside the lead fish drops below 0 V. The microcontroller determines that it has reached the river bottom, stops counting the water depth, and outputs a signal through the P1 port to stop the water depth motor from running.

  1.1.3 Obtaining the deflection signal

  The cableway is equipped with a special inclinometer to correct the water depth measurement error caused by the water flow that causes the lead fish to not fall vertically to the bottom of the water. The inclinometer can measure the angle at which the lead fish deviates from the normal position due to the water flow, and then correct the water depth error by looking up a table or calculating with a formula according to the size of the deflection angle. Manual measurement is to estimate the size of the deflection angle by eye according to the scale of the inclinometer, and the error is large. We slightly modified the inclinometer to add a potentiometer W1 and the corresponding circuit as shown in Figure 1. The displacement of the deflection angle is converted into the rotation of the potentiometer through a mechanical linkage device to change the resistance value of W1, and the voltage change caused by the change in deflection angle is sent to the ADCIN0 port by using the auxiliary cable 2. Considering the particularity of field work, a wirewound potentiometer with stable performance and good sealing is used. Since the voltage change at the IN0 port is not linearly related to the deflection angle, the deflection angle value is determined by software lookup table. In order to reduce the influence of mechanical displacement, cable resistance and other factors, in actual operation, the deflection angle is measured once when the lead fish is not in the water as a reference, and the surface deflection angle and bottom deflection angle are measured once when the lead fish reaches the water surface and the bottom respectively. After correction, a more accurate deflection angle value is obtained. [page]

  1.1.4 Acquisition of flow velocity signal

  The flow velocity is measured by the velocity meter. When measuring the flow velocity, relays J1 and J2 are connected to the normally open contacts and a voltage of -5 V is applied to the underwater plate. K1 is the internal switch of the velocity meter. K1 is turned on and off once for each rotation of the velocity meter. When K1 is disconnected, the voltage of ADCIN0 port is about 1.5 V. After K1 is connected, the voltage change of ADCIN0 port is greater than 0.5 V. As long as the voltage difference of IN0 port is monitored, the rotation of the velocity meter can be judged. In actual measurement, the voltage difference of IN0 port is related to the distance of the vertical line of the measuring point and the water quality. The greater the distance, the smaller the voltage difference. In a river channel of 150 m, the voltage difference of the velocity signal is greater than 0.5 V. Using ADC0809 to monitor the velocity signal, when VREF=5V, the resolution is 0.02 V, which is enough to distinguish the rotation of the velocity meter. Considering some uncertain interference factors, the resolution of the voltage difference is set at 0.1 V, which can meet the test requirements of general medium and small rivers. For wider rivers, the voltage difference can be increased by improving the circuit or increasing the working voltage. Interface information composed of PC communication interface, etc., such as:

  (1) Travel signals such as water depth and horizontal distance;

  (2) Water level signal;

  (3) The output control signal is used to control the motor to rotate forward, reverse, or stop, so that the lead fish can move as required for fixed-point measurement.

  The interface circuit is shown in Figure 1. The circuit makes full use of the ADC0809 multi-channel analog-to-digital converter to convert complex interface information into digital signals. At the same time, the photoelectric gate is used to convert the working rope stroke (water depth and horizontal distance movement) into an electrical pulse signal, which is sent to the ATMEL89 single-chip microcomputer for processing, display, and control to complete the automatic test.

  1.2 Interface circuit for obtaining travel signal

  The travel signal of the lead fish includes the travel signal of the horizontal reciprocating movement of the lead fish and the water depth signal of the vertical movement of the lead fish when measuring the water depth. The acquisition of the displacement signal is shown in Figure 4. It is obtained by the light-cutting plate and the photoelectric gate installed on the mechanical transmission device. The design is that the light-cutting plate blocks the light once every 1 cm of cable movement, and the photoelectric gate generates a pulse. The water depth and reciprocating signals are taken from the photodiodes D3 and D4 respectively, and added to the external interrupt 0 input terminal of the single-chip microcomputer P3.2 after passing through the XOR gate. An interrupt is generated every time the lead fish moves 1 cm. The interrupt service program can distinguish whether the lead fish is moving horizontally or vertically at this time, and only one of the two is selected.

 

 

  1.3 Other circuit parts

  The input function of the P1 port is to read the operation command and initialization value from the control panel, and the output function is to output the control signal. One is to control the forward, reverse and stop of the travel motor to make the lead fish move vertically and horizontally according to the test requirements; the other is to control the closing and opening of relays J1 and J2 during the water depth measurement to obtain the water surface and bottom signals. The display and printing circuit part uses 6 LED tubes for display and a micro printer for simple printing. The P3.1 serial port is connected to the PC to transfer and further process, display and print data.

  2 System software flow chart

  The software of this system occupies about 7 kB, and the system program flow chart is shown in Figure 5.

  The program is divided into three modules: system management, operation processing, and test control. The system management module includes: initialization, system monitoring, operation switching, emergency processing and other programs. The operation processing module includes: data calculation, error correction, display and printing and other programs. The test control module is composed of many subprograms including: measuring the distance from the vertical line to the starting point, measuring the water depth of the vertical line, measuring the flow velocity of the vertical line, measuring the water level of the vertical line, interface data acquisition, etc.

  In order to minimize the measurement error and ensure that the measurement accuracy strictly complies with the requirements of hydrological regulations, a secondary water entry operation is used in the vertical line water depth measurement subroutine. The program flow is shown in Figure 6.

 

 

  In actual water depth measurement, the movement of the lead fish will cause the cable to fluctuate and jump, resulting in measurement errors. The operation we set in the program is: when the lead fish enters the water, it will stop on the water surface for 10 seconds without counting the water depth. After it stabilizes, it will rise 20 cm above the water surface and enter the water surface for the second time. After the lead fish reaches the water surface for the second time, it will start the water depth counting and stop descending, and measure the water surface deflection angle θA. The lead fish will continue to descend until it reaches the bottom of the river, stop the water depth counting, and measure the bottom deflection angle θB. Finally, the actual water depth value of the vertical line is calculated based on the dry rope length (the height of the cable to the water surface), the wet rope length (the initial value of the water depth), θA, and θB.

  3 Conclusion

  The ATMEL89 single-chip hydrological cableway test system has strong compatibility and is suitable for automatic or semi-automatic testing of medium and small rivers. It is easy to operate and has stable performance. The test accuracy meets the requirements of the "Specifications" issued by the ministry, effectively reducing the operator's labor intensity and working time.

Keywords:AT89S8252  ADC0809 Reference address:Design and implementation of a hydrological cableway testing system

Previous article:Design of Experimental System Based on AT89S51 Single Chip Microcomputer
Next article:Design and implementation of passenger car safety system based on STC89C52 single chip microcomputer

Recommended ReadingLatest update time:2024-11-15 14:33

Application of ADC0809 in gas detection monitoring and control system
  In microcontroller application systems, it is often necessary to convert detected continuously changing analog quantities such as voltage, temperature, pressure, etc. into digital quantities before they can be input into the microcontroller for processing. In this article, the author takes the application of ADC0809
[Microcontroller]
Application of ADC0809 in gas detection monitoring and control system
Basic application technology and design of ADC0809A/D converter
Basic knowledge   ADC0809 is a CMOS component with an 8-bit A/D converter, an 8-way multiplexer, and microprocessor-compatible control logic. It is a successive approximation A/D converter that can be directly interfaced with a single-chip microcomputer. (1) Internal logic structure of ADC0809   As shown in the figur
[Microcontroller]
Basic application technology and design of ADC0809A/D converter
Latest Microcontroller 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号