Intelligent Vortex Flow Measurement System
Published on:2015-1-4 9:55:32 Hits:

This paper introduces a modified keyboard input by Vortex nonlinearity coefficient method. Data processing and testing with the MCS-51, and discuss the use of a 8155 meter intelligent keyboard / monitor and printer interface to minimize the hardware design technology in the 8031 microprocessor intelligent meter.

MeSH Vortex Flow linear correction minimize hardware interface


In the petroleum and chemical production process, the flow of liquid and gas pipeline measurement and control of production process automation is an important part. Vortex has a wide range, no moving parts, reliable operation, easy maintenance, low pressure loss, with certain metering accuracy and so on. [1] in particular in a wide range, its measurement and the medium density, viscosity and other physical parameters irrelevant, thus generally welcomed. This article describes the application of MCS-51 microcontroller design intelligent vortex flowmeter, the inherent nonlinearity of the vortex flowmeter correction, and a display, print, type, and data processing functions detection parameters, thus broadening the vortex flowmeter range of applications.



Vortex flowmeter is based on the principle of Karman vortex street made of a fluid oscillatory flow meter. That is placed in a non-flowing fluid streamlined symmetrical shape of the object (called a vortex flow sensor vortex shedder), it will have two columns a regular whirlpool that Karman vortex street in their downstream sides, its swirl frequency proportional to the flow velocity: [2]

F = S tu / d (1)

Where vortex frequency F-

d- vortex shedder width

u- flow velocity

S t - Strouhal number

St value width d of the vortex shedder and related Reynolds number Re. When the Reynolds number Re <2 × 10 4 cases, St is a variable: when Re in the range of 2 × 10 4 ~ 7 × 10 6 of, St value is substantially unchanged, this range of flow meter basic measurement range .

Equation (1) shows that when d and St for a given value, the average velocity of the fluid vortex frequency F u generated proportional to take advantage of this feature made the vortex flowmeter. Because the average velocity of the vortex is not measured by the sensor, and the flow rate of the body is about both sides of the vortex occurs. [3] For a turbulent state, different Reynolds number, velocity distribution is different. That under different flow rates with different velocity distribution, and thus illustrate the vortex flow sensors detected on both sides of the main body to reflect the relationship between velocity and the average velocity of the vortex pipeline occurred is not uniquely determined. This shows that the non-linear error vortex flow sensor is its detection mechanism of the decision. In actual use, the first draw of the sensor meter factor and frequency of the test curve f (F).

K = f (F) = KG (F) (2)

Formula G (F) is of the same diameter for each one instrument same curve shape (only different displacements). K is the average meter factor. In this paper, MCS-51 microcontroller intelligent vortex flowmeter, by the shape of the experimental curve G (F) prior to curing EPROM flowmeter, and let users combine site-specific conditions through the keyboard input value K achieve vortex nonlinear correction Street sensor.

Hardware Design

Figure 1 is a block diagram of the hardware system.


Block diagram of a hardware chart

According to the design requirements, microcomputer application system [4], including: (1) accept the transmitter sent pulses proportional to the flow, and its timing, counting circuit; (2) monitor, keyboard, printer interface circuit; (3) external memory expansion circuit; main circuit are described below:

A keyboard / monitor and printer interface [5]

To make the interface hardware as little as possible, the design, only a 8155I / O interface chip to complete the keyboard input of intelligent instrumentation, LED output interface tasks and printer output. The PC port 8155 is used as the display and keyboard scan output through choice, PB port is used to display the output field and the decimal point, the 8031 INTO used as external interrupt input keyboard response, PA output port is used as an external printer. As shown in Figure 2.


Figure 2 keyboard / monitor and printer interface circuit

(1) Display Interface Design

Design 6 LED display as the display output of the instrument. The PB 8155 is defined as output ports, including low four PB0 ~ PB3 output display data BCD code, and by the 74LS249 BCD decoder decodes the code segment LED evacuation end, PB4 as a measurement result by the drive after the decimal point pick-emitting segment LED decimal point; PB5 as polarity control bits individually control an LED sign to display the measurement results. 8155 PC port is defined as output ports, PC0 ~ PC5 were controlled 6 LED strobe bit, to achieve dynamic scanning display.

(2) Keyboard Interface Design

Keyboard interface shown in Figure 2, composed by six key keyboard. 8031 as a keyboard with an external interrupt INTO state output. In the six keys, two keys is defined as "a key plus" and "minus a key." Another four keys are printed keys, programmable keys, the option key and reset key. After pressing the programming key to enter programming mode, the user enters the average meter factor. Options button to display the kind of flow is used to determine the expression (such as volume flow rate, mass flow rate, etc.), the column scanning signal from the PC keyboard port output of LED strobe bit: keyboard input signal line obtained from the keyboard is closed. No key is pressed, the key state is open, INTO bit high, the interrupt will not be triggered; if the key is pressed, the key state is closed, INTO level from high to low, the interrupt is triggered by the falling edge, thus an interrupt request to the CPU. After reading the PC port CPU interrupt output state judge PC0 ~ PC5 output of low level to complete the key scan and key identification.

(3) Printer Interface Design

GP 16 using a common smart micro-printer, comes with 8039 microcontroller. It can be sent to 8031 data as a string, data or graphics printed in three ways; it is shown in the interface design of the instrument 2, it's eight three-state bidirectional data lines D0 ~ D7 directly PA0 8155 ~ PA7 connected to the port address chip select signal CS and chip-select signal decoder 8155 microcontroller system utility output Y7, WR and RD directly with 8031 WR, RD connected to the hardware design is very simple.

Extended two external memory

(1) EPROM program memory expansion

Since there is no EPROM within 8031, so 8031 needs to expand outside a EPROM2764 (8K bytes). At low 8 sent P0 port address, the address is latched by the falling edge of the control signal ALE to latch high five by P2.0 ~ P2.4, latches using 74LS373 latch control end directly connected with the ALE. The program memory read strobe control output EPROM2764 PSEN allows end OE.

Extension (2) the data memory

MCS-51 microcontroller within 128 bytes of RAM, its capacity can not meet the design requirements, so the native extensions RAM6264 an 8K bytes of static. Outside the native extensions of RAM and EPROM circuit shown in Figure 3:


Figure 3 External Memory Expansion

As can be seen from the figure and the address range EPROM2764 RAM6264 is the same, but their control signal is not the same. 2764 strobe is PSEN, while 6264's read or write is controlled by RD or WR model, so no data conflicts.

Software design [6]

The modular software structure, the four main parts are as follows.

A main program

Main instrument based monitoring procedures. The program is running, you must first initialize the system, clearing the working unit, set the initial value of the counter and the flag, the self-test indicator, open break, start the counter and so on. The instrument uses miniature keyboard and LED indicators match, so that the various functions of the instrument clear and orderly.

Keyboard routines include: scanning keyboard subroutine. Its function is to find out whether a key is pressed, the input key programs; key scanner; Table drivers; Universal Display subroutine. Key scanning routine function is based on the location of the key scan line by line. Table driver is to determine what the key is a function key. Universal Display subroutine function is to display buffer word code into the code segment into the display, display a variety of fonts. Almost all programs should be used in this procedure, so called Universal Display subroutine to display the function block phase difference.

2 interrupt service routine

Measuring instruments, conversion programs are connected via the interrupt mode with the main program, two timer counter as the gate using the microcontroller. Because the flow measurement frequency is very important, so the timer TO is used to evaluation, and as high-level interrupt. Measuring frequency measurement interrupt service routine flow chart shown in Figure 4.

3 function block program

Instrument input through keyboard commands, the user can always get the results you want, which use the function block. Function block comprising: a display, printing, and other functional blocks is cleared. Action display function block is transferred to the appropriate entry parameters according to the user's needs, and then converted yards, to the display buffer. Print program includes print mass flow and volume flow, instantaneous flow rate and total flow.

4 Use the calculation routine includes calculation of the flow of the program

System uses a floating point arithmetic routines, these operations subroutines can be called directly.

  • 电话咨询

  • 86 400 888 7116