Summary: this system is used for oil well logging process, on the cable tension, the depth of the well and the cable down speed and other parameters of the measurement.
With a focus on the structure and working principle of the system. At the same time, the force sensor, sounding encoder, system hardware circuit design and software process. The system of high precision and small size, job stability. Both real-time measurement of the test parameters, and both the "black box" capabilities of the data records within 24 hours, as the accident analysis provides reliable basis, the higher the value of the project. Available with all measuring load, measuring length measuring speed.Keywords: strain sensors, photoelectric encoder, DSP, CPLD, I2C bus
1 Introduction
Oil well logging, ground operations personnel need to know the depth of the well, the cable down speed and cable hosted by load.
Only the timely and accurate data to make logging work smoothly, to guarantee safe and reliable logging process. Therefore, we developed based on DSP tension, depth, speed measurement system. The system accuracy, reliability, speed, ground operations personnel ideal monitoring tool.2 strain sensors and photoelectric encoder
2.1 strain sensors
The tension of the cable so that the strain sensor generates mechanical deformation, the sensor will mechanical deformation into electric signal output, thereby measured tension.
-Operating voltage: DC 12V
Output range: 0 ~ 12mV
-Output sensitivity: 1mv/v
2.2 encoder
The encoder's hinge coaxial to the perimeter of the known amount wheel Center, equivalent wheel rotation encoder synchronous rotation and output pulse signal.
In this way, a certain length that corresponds to a certain number of pulse signal, by calculating the pulse signal can be converted by the depth value. On the depth value per unit of time will get speed value of sampling.-Operating voltage: DC 5V
-Current: 40mA
Pulse type: two orthogonal pulses, can be accomplished through the logical circuit for optical encoder identification of direction of rotation and the depth of the pulse output.
3 system structure and working principle
Will strain sensor produces Millivolt signal input to the amplifier to zoom, and then fed into A/D converter with analog-digital conversion, convert to Office binary sequence into DSP processing.
In order to guarantee A/D conversion of reliability, use V/F device LM331 realization of analog-digital conversion, convert the voltage signal frequency signal. This device high reliability, small footprint.By photoelectric encoder produces two orthogonal signal input to the CPLD, processed, produced two-channel signal.
All the way to distinguish the pulse, used to identify the direction of rotation encoder. Another way to count pulse, to complete the conversion of the depth parameter. Two-channel pulse are entered into the DSP. See Figure 1.
Figure 1 system hardware implementation of block diagrams
4 core hardware circuit design
4.1 TMS320VC33 processor
The chip is a TI company introduced a 32-bit floating point high-performance digital signal processor.
Instruction cycle is divided into two 13ns and 17ns, single cycle complete 32-bit integer, 40-bit floating-point multiplication. On-chip 34K 32bitSRAM, is divided into 2 16K and 2 2 k block, the block on integrating a DMA channel, a synchronous serial ports, two 32bit timer; the total storage space for 16M 32bits, program, data, and I/O space are included, according to the different requirements for classification of address space; has a program guide features, system reset, you can program the external storage from slow to fast in loading on-chip RAM to run; support for IEEE Std 1149.1 (JTAG) standards; 0.18-m technology, 1.8V core voltage, voltage 3.2VI/O; low power consumption (< 200mW @ 150MFLOPS). The chip is a combination of floating point and fixed point arithmetic strengths, with very high precision and fast operation speed, suitable for fast processing of applications.4.2 high accuracy real time clock/calendar SD2001E
The system requirements for the test data for 24 hours of real-time records (i.e. "black box" feature), so use with I2C bus interface, real-time clock devices SD2001E to record measurement parameters, the operator's name and the specific operation time (year, month, day, hour), as a question of information.
The device can provide 32k bits and 100 billion times write endurance of nonvolatile SRAM; internal integration of crystal oscillator, battery and power management circuits, in the system power off when the chip cannot be guaranteed to work correctly, the clock time time is 10 years; I2C bus interface (including real-time clock and SRAM); a built-in high-precision crystal oscillator, precision "5ppm, namely, one month, when error is less than 13 seconds (25C), year, month, day, weekday, hour, minute, second, of the BCD code input/output; automatic calendar to 2099 (including leap years automatic conversion function).4.3 SST39VF320 memory
The CMOS chip for multi-purpose FLASH devices, 2M 16 capacity, is the ideal mass storage.
To meet this measurement system 24 hours data record, the record contents as tension, depth and speed measurement. The device provides 2.7 working voltage-3.6V; hyper-reliability, 10 million write endurance, permanent data save; Low power consumption, the effective current 9mA, standby current of 3A, automatic low power mode 3A; 70ns and fast read time 90ns; address and data latch; 2KWord sectors erased and rewritten 32KWord block; quick erased and Word programming skills; compatible with CMOS I/O port.4.4 AT24C512 serial E2PROM
The chip to 64 k bytes of serial E2PROM, with I2C bus interface.
The measured data stored on it, when the system power off when the data is not lost, give the operator a great convenience. The devices have limited write endurance, work can begin to write data in SD2001E NVRAM chip, when the NVRAM is full then the data transfer to AT24C512, which can greatly reduce the number of its refreshing to prolong service life.4.5 Chinese graphic LCD module OCMJ4X8C
OCMJ4X8C with conspiracy/and interface and internal containing Netscape's LCD display module, with strong control display; LCD dot matrix is 128 64, you can display 4 lines, each line 8 characters; have a Chinese font CGROM 2Mbits, the glyphs ROM contains 8192 16 16 dot matrix Chinese font library, you can easily display Chinese characters; 16-8 lattice 16kbit's A S C Ⅱ character library, cocoa and easily displayed in English characters and other commonly used characters; provides a 64-256 points GDRM drawing area, you can easily construct a graph; provides 4 Group 16 16 dot matrix of building space, you can easily make the text; can be realized characters, A S C Ⅱ codes, dot-matrix graphics, optional glyph with the screen display.
By using this LCD module that implements the friendly Chinese graphic and digital man-machine interface.
4.6 micro kanji printer
This system uses MP-A (D) 16-8-printer, the printer with 2k bytes of data buffer and kanji fonts, with a faster print speed of Chinese characters and graphics; text-decoration with rich functionality and easy to use interface; with 16 16 dot-matrix with 12 12 dot matrix and GB a secondary character library; you can easily print Chinese and German, French, English, Japanese, and other text; you can print all A S C Ⅱ characters, mathematical symbols, special symbols, your own symbols, lattice, curve and barcode; can peer print 16 12 12, 16, 16, 16 8 8 8 8, 6, 12 7 dot-matrix characters or 5, 6, 8, 8, 12, 8 16 dot matrix A S C Ⅱ characters.
5 system software design
Introduction of main processes 5.1
Program flow shown in Figure 2, the process for the system's primary processes.
The program consists of Assembly language programming, the modular design of the program, called a module to perform their respective functions, easy to modify and maintain. Set two detection unit, the main loop testing whether the contents of the cell changes, if there are changes in the description of the system are the exception, set the reinitialization. Software, redundant technology and watchdog technology, to ensure that correct execution. External interrupt 1 complete keyboard management tasks when a key is pressed, an external interrupt 1 break, do one of the keyboard monitor; depth pulse after having plastic surgery to the external interrupt input 0, pulse count. At this point, the judge by the I/O port to pulse level debate. Provides low level encoder is positive, and high level encoder to reverse. When you perform addition forward, reverse, perform subtraction procedure. Tension signal V/F converters, converting to frequency signal into the counter 1 to complete the calculation of tension signals. Timer 0 produces a system clock signal, set it as the highest interrupt priority.
Figure 2 software main process
Figure 3 keyboard management process 1
Figure 4 keyboard management process 2
Figure 5 keyboard management processes 3
Figure 4 6 keyboard management process
5.2 keyboard monitor process introduction
Figure 3-Figure 7 is the system keyboard management flowchart, keyboard management chip for 8279, consists of an external interrupt 1 complete keyboard operation procedures.
The system has 16 keys, 6 function keys, 10 numeric keys. Among them, each function key are dual-function compound key, the keys are as follows: K1/K2; angle/print, record mode; tension alarm/tension increment alarm; depth alarm/instant depth; equivalent/speed alarm cleared/recovery. K1/K2 keys to the system's entry key, only the first press this key to enter the keyboard operation, the key value for the flags 28H K value to determine whether the SHIFT key features key functions under the stall. -K to 1 for the SHIFT-key features-K 0 as the lower key features, system initialization flags K zero. SHIFT key K1 mode for functions, the corresponding angles, tension alarm, depth alarm, equivalent and cleared to zero, the key values are 29H, 30H, 31H, 38H and 39H. K2 model features for the next shift key, the corresponding print and logging mode, tension increment alarm, instant depth, speed alarm and recovery, key respectively 39H, 40H, 41H, 48H and 49H. Repeatedly pressing the key K1/K2, keyboard features in K1 and K2 switch back and forth between modes. Number keys 1, 2, 3, 4, 5, 6, 7, 8, 9 and 0Key values are 01H, 09H, 11H, 19H, 21H, 00H, 08H, 10H, 18H and 20H. The keyboard interrupt program flow shown in Figure 3 to Figure 7.
Figure 5 7 keyboard management process
5.3 depth pulse sampling and tension signal sampling process introduction
By encoder produces two orthogonal pulses signal generated by the CPLD processing critical to pulse and counting pulse input, respectively, to the i/o port TMS320VC33 processor and external interrupt 0, complete the rotation direction of the encoder and the depth of the pulse of cumulative, shown in Figure 8.
Figure 8 external interrupt 0 interrupt service program flow
Timer 0 as the system of public clock, produce tension A/D clock and speed sampling clock.
Register 1 record an analog signal by tension by A/D conversion of digital signals. Timer 0 corresponds to the time of initial values as A/D converter sampling time, the timer starts counting down, after being reduced to 0 after the break signal. System transferred to interrupt service routines, timer 0 restore initial value, read register 1 value to the data buffer, see Figure 9.
Figure 9 timer interrupt service routine T0
6 closing
The measuring system after many on-site use, accurate and stable measurement.
To reliably record of 24-hour real-time measurement data, a smooth implementation of the "black box" capabilities for users to find the cause of the accident has provided the reliable basis, subject to the user's high praise.Reference documents
[1], the editor of Su t DSP technology, Xidian University Publishing House
[2] Yeong-Chief Editor, the VHDL program design, Tsinghua University Press
[3] the song Editor, wanjie CPLD technologies and their applications ", Xidian University Publishing House
[4], the editor of Zhenjiang A/D and D/A converter interface technology utility line, Xidian University Publishing House
No comments:
Post a Comment