In the process of logging in an oil field, surface operators need to know the depth of the oil well, the speed of the cable going down the well, and the load carried by the cable. Only by grasping these data timely and accurately can the logging work be carried out smoothly to ensure the safety and reliability of the logging process. Therefore, we have developed a DSP-based tension, depth, and speed measurement system. The system has high accuracy, strong reliability, and fast processing speed, making it an ideal monitoring tool for ground operators.
2 Strain sensor and photoelectric encoder
2.1 Strain sensor
The tension on the cable causes mechanical deformation of the strain sensor, and the sensor converts the mechanical deformation into an electrical signal output, thereby measuring the tension.
. Working voltage: DC 12V
. Output range: 0~12mV
. Output sensitivity: 1mv/v
2.2 Photoelectric encoder
The rotating shaft of the photoelectric encoder is coaxially fixed on the center of a measuring wheel with a known circumference. When the measuring wheel rotates, the encoder rotates synchronously and outputs a pulse signal. In this way, a certain length corresponds to a certain number of pulse signals, and the depth value can be calculated by calculating the pulse signals. The speed value is obtained by sampling the depth value per unit time.
. Working voltage: DC 5V
. Working current: 40mA
. Pulse type: Two orthogonal pulse signals, through the logic circuit, the identification of the rotation direction of the photoelectric encoder and the output of the depth pulse can be completed.
3 System structure and working principle
The millivolt signal generated by the strain sensor is input to the amplifier for amplification, and then sent to the A/D converter for analog-to-digital conversion, converted into a binary sequence and sent to the DSP for processing. In order to ensure the reliability of A/D conversion, the V/F device LM331 is used to realize analog-to-digital conversion and convert the voltage signal into a frequency signal. This device has high reliability and takes up less resources.
The two orthogonal signals generated by the photoelectric encoder are input to the CPLD, and after processing, two signals are generated. One way is the direction identification pulse, which is used to identify the rotation direction of the photoelectric encoder. The other is counting pulses, used to complete the conversion of depth parameters. Both pulses are input to the DSP. see picture 1.
4 core hardware circuit design
4.1 TMS320VC33 processor
This chip is a 32-bit floating-point high-performance digital signal processor introduced by TI. The instruction cycle is divided into two types: 13ns and 17ns. A single cycle completes 32-bit integer and 40-bit floating-point multiplication. The on-chip 34K 32bit SRAM is divided into 2 16K and 2 2K blocks. The block integrates a DMA channel, a synchronous serial port, and two 32bit timers; the total storage space is 16M 32bits, program, data and I/O space All of them are included, and the address space can be divided according to different requirements; with program boot function, after the system is reset, the program can be loaded from the slow external memory to the fast on-chip RAM to run; support IEEE Std 1149.1 (JTAG) Standard; 0.18-m process, 1.8V core voltage, 3.2VI/O voltage; low power consumption (<200mW@150MFLOPS). The chip combines the advantages of floating-point arithmetic and fixed-point arithmetic, with high arithmetic precision and fast arithmetic speed, and is suitable for fast processing occasions.
4.2 High-precision real-time clock/calendar SD2001E
This system requires real-time recording of test data within 24 hours (ie "black box" function), so the real-time clock device SD2001E with I2C bus interface is selected to record the measurement parameters, the name of the operator and the specific operating time (year, Month, day, hour) as data for problem analysis. The device can provide 32k bits and 10 billion erasing and writing times of non-volatile SRAM; internal integration of crystal oscillator, battery and power management circuit, can ensure the normal operation of the chip when the system is powered off, the clock travel time is more than 10 years ; I2C bus interface (including real-time clock part and SRAM part); built-in high-precision crystal oscillator, accuracy <5ppm, that is, within a month, the travel time error does not exceed 13 seconds (25C); Second BCD code input/output; automatic calendar to year 2099 (including automatic leap year conversion function).
4.3 SST39VF320 memory
The chip is a CMOS multi-purpose FLASH device with a capacity of 2M 16 and is an ideal large-capacity memory. It can meet the requirements of data recording within 24 hours in this measuring system, and the recorded content is the measured values ​​of tension, depth, and speed. The device provides a working voltage of 2.7-3.6V; ultra-reliability, 100,000 erasing and writing times, permanent data storage; low power consumption, effective current 9mA, standby current 3A, automatic low power consumption mode 3A; 70ns and 90ns fast Reading time; address and data latch function; 2KWord sector erasing and 32KWord block erasing capabilities; fast erasing and word programming capabilities; compatible with CMOS I/O ports.
4.4 Serial E2PROM AT24C512
The chip is a 64k byte serial E2PROM with an I2C bus interface. The measurement data is stored in it, and the data will not be lost when the system is powered off, which brings great convenience to the operator. The device has a limited number of erasing and writing. It can first write data into the NVRAM on the SD2001E chip during work, and then transfer the data to the AT24C512 when the NVRAM is full. This can greatly reduce the number of refreshes and extend the service life.
4.5 Chinese graphic LCD display module OCMJ4X8C
OCMJ4X8C is a liquid crystal display module with serial/parallel interface and a Chinese character library inside, which has a strong control display function; the liquid crystal display dot matrix is ​​128 64, which can display 4 lines with 8 Chinese characters per line; Chinese characters with 2Mbits CGROM, the font ROM contains 8192 16 16 dot matrix Chinese font library, which can easily display Chinese characters; with 16 kbit 16 8 dot matrix ASCⅡ character library, it can easily display English characters and other commonly used characters; provided A 64 256 dot GDRM drawing area, which can easily construct graphics; provides 4 groups of 16 16 dot matrix character creation spaces, which can conveniently create characters; can realize the same screen of Chinese characters, ASCⅡ codes, dot matrix graphics, and self-selected fonts display.
By adopting this liquid crystal display module, a friendly Chinese graphics and digital man-machine interface are realized.
4.6 Mini Chinese Character Printer
This system adopts MP-A (D) 16-8 printer with a 2k byte data buffer and Chinese character library, which has a faster printing speed of Chinese characters and graphics; it has rich text modification functions and convenient Interface; with 16 16 dot matrix and 12 12 dot matrix and national standard first and second level Chinese character library; can easily print Chinese characters and German, French, English, Japanese and other characters; can print all ASCâ…¡ characters, mathematical symbols, special symbols, Optional symbols, dot matrix curves and bar codes, etc.; can print 16 16, 12 12, 8 16, 16 8, 8 8, 6 12 dot matrix Chinese characters or 5 7, 6 8, 8 12, 8 16 dot matrix ASCâ…¡ characters.
5 System software design
5.1 Introduction to the main process
The program flow is shown in Figure 2. This flow is the main flow of the system. The program is programmed by assembly language and adopts modular programming. When a module is called, the corresponding function is executed, which is convenient for modification and maintenance. Set up two detection units, check whether the content of this unit has changed in the main loop, if there is a change, it means that the system is abnormal, and re-initialize the settings. In the software, redundancy technology and watchdog technology are used to ensure the correct execution of the program. The external interrupt 1 completes the keyboard management task. When a key is pressed, the external interrupt 1 interrupt is applied to execute the keyboard monitoring program; the depth pulse is shaped and input to the external interrupt 0 for pulse counting. At this time, the I/O port judges the level of the discriminating pulse. It is stipulated that the encoder is forward rotation when low level, and the encoder is reverse rotation when high level. The addition program is executed in the forward rotation, and the subtraction program is executed in the reverse rotation. After the tension signal is converted by V/F, it is converted into a frequency signal and sent to the counter 1 to complete the calculation of the tension signal. Timer 0 generates the system clock signal and sets it as the highest interrupt priority.
5.2 Introduction to keyboard monitoring process
Figure 3 ~ Figure 7 is the system keyboard management flow chart, the keyboard management chip is 8279, and the keyboard operation program is completed by external interrupt 1. The system has 16 keys, 6 function keys, and 10 numeric keys. Among them, each function key is a dual-function compound key, each key is: K1/K2; angle/print, record mode; tension alarm/tension increment alarm; depth alarm/immediate depth; equivalent/speed alarm; reset /restore. The K1/K2 keys are the entry keys of the system. Only by pressing this key can you enter the keyboard operation. The key value is 28H. The value of the flag bit K determines whether it is the up-shift key function or the down-shift key function. When the bit K is 1, it is the function of the up shift key, and when the bit K is 0, it is the function of the down shift key. The flag bit K is cleared when the system is initialized. K1 mode is the function of the shift key, corresponding to angle, tension alarm, depth alarm, equivalent and zero reset. The key values ​​are 29H, 30H, 31H, 38H and 39H respectively. K2 mode is the downshift key function, corresponding to printing and recording mode, tension increment alarm, instant depth, speed alarm and recovery, the key values ​​are 39H, 40H, 41H, 48H and 49H respectively. Press the K1/K2 key repeatedly, the keyboard function will switch back and forth between K1 mode and K2 mode. The key values ​​of the number keys 1, 2, 3, 4, 5, 6, 7, 8, 9 and 0 are 01H, 09H, 11H, 19H, 21H, 00H, 08H, 10H, 18H and 20H, respectively. The keyboard interrupt program flow is shown in Figure 3 ~ Figure 7.
5.3 Introduction to the process of deep pulse sampling and tension signal sampling
The two orthogonal pulse signals generated by the encoder are processed by CPLD to generate direction-discriminating pulses and counting pulses, which are input to the I/O port of the TMS320VC33 processor and external interrupt 0 respectively to complete the determination of the encoder rotation direction and the depth The accumulation of pulses is shown in Figure 8.
Timer 0 is used as the public clock of the system to generate tension A/D clock and speed sampling clock. The counter 1 records the digital signal generated by the A/D conversion of the tension analog signal. The time corresponding to the initial value of timer 0 is the sampling time of the A/D converter. After the timer is started, it counts down and generates an interrupt signal after it is reduced to 0. The system transfers to the interrupt service subroutine, the timer 0 is given the initial value again, and the value of the counter 1 is read to the data buffer, as shown in Figure 9.
6 Conclusion
The measurement system has been used on site many times, and the measurement is accurate and the work is stable. It can reliably record real-time measurement data within 24 hours, and smoothly realize the "black box" function, which provides a reliable basis for users to find the cause of the accident, and is highly praised by users
An electrical appliance used to protect electrical equipment from high transient overvoltage hazards and to limit the duration of continuous flow.This term includes any external clearance necessary for the normal functioning of the appliance during operation and installation, whether or not it is a unit as a whole.
Surge protector, also known as lightning arrester, is an electronic device that provides safety protection for all kinds of electronic equipment, instruments and communication lines.When the electric circuit or communication lines or for outside disturbance suddenly produce peak current in voltage, surge protector in a very short time conduction tap, to avoid surge damage to other devices in the circuits.[1]
Surge protector, suitable for ac 50/60 hz, rated voltage 220 v to 380 v power supply system, the indirect lightning and thunder and lightning directly affect transient over voltage surge protection, or other applicable to the family home, the third industry and the surge protection industry requirements.
Surge Protector,Surge Voltage Protector,Eco-Friendly Surge Protector,Lightning Protection Surge Protector
YANGZHOU POSITIONING TECH CO., LTD. , https://www.cndingweitech.com