Airflow meter based on C8051F single chip microcomputer

Publisher:笑脸猫Latest update time:2011-02-28 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
introduction

The cotton airflow meter studied in this project is based on the relevant provisions of the cotton fiber "micronaire value" test method GB6468-1992, combined with the current microcomputer monitoring system technology, using the single-chip microcomputer C8051F, with the characteristics of fast testing speed, easy maintenance, low cost and high efficiency.

Micronaire is a measure of the air permeability of a ball of cotton under specific conditions. Practical experience shows that the Micronaire value is closely related to spinning. If the Micronaire value is too high or too low, the spinning performance of the cotton fiber will be poor. Only cotton fibers with moderate Micronaire values ​​can achieve more comprehensive spinning economic benefits.

1 Basic principles of airflow instrument

This instrument is an airflow type Micronaire value measuring instrument. The basic principle of the Micronaire airflow instrument is to use an airflow of a certain pressure to pass through a fiber plug of a certain mass in a fixed volume. Due to the different surface areas of the fibers, the resistance to the airflow is different, and the pressure difference or flow rate generated at both ends of the fiber plug is also different. Fibers with small surface areas have small resistance to airflow and large flow rate (or small pressure difference); conversely, the flow rate is large (or large pressure difference). Therefore, the air permeability of the fiber can be indicated according to the change of flow rate or pressure difference. The mass and volume of the sample are constants for the instrument, and the change of air permeability can be calibrated in Micronaire value units.

In the formula: A is the cross-sectional area of ​​the sample tube; L is the height of the sample tube; △P is the pressure difference at both ends of the sample tube; S is the specific surface area of ​​the fiber; μ is the air viscosity coefficient; ε is the void ratio of the fiber in the sample tube (the volume of the space inside the fiber assembly and the total volume of the assembly); K is a constant.

From the formula, we can see that the smaller the surface area of ​​the fiber (i.e., the thicker the fiber), the greater the flow rate, which means the better the air permeability of the fiber, and the higher the measured micronaire value, the better the maturity of the fiber. Therefore, in general, the better the fiber maturity, the higher its micronaire value, that is, the two are positively correlated. 2 Hardware Design

According to the principle of airflow meter, we use C8051F023 single chip microcomputer as the core control. The core of this single chip microcomputer is high speed 8051 microcontroller.

The instrument has two sensors, namely, air pressure sensor and weighing sensor. According to the design accuracy requirements of this instrument, micro-weight sensor and micro-pressure sensor are selected. The hardware block diagram is shown in Figure 1.

Working process of the instrument: After weighing 8 g of cotton sample on the electronic scale, evenly put it into the sample tube to form a fiber plug with a fixed density. The air pump inflates the air storage cylinder to generate constant pressure. The constant pressure air flows through the air resistance (the fiber plug in the sample tube) into the instrument, forming an air pressure difference at both ends of the sample tube. Since cotton fibers with different micronaire values ​​have different resistance to air flow, the pressure difference formed is also different. The air pressure sensor converts this pressure difference signal into electrical quantity. After the single-chip microcomputer processes the data, it displays the micronaire value and micronaire value level, and can also complete the calculation of the average value.

3. Software Design

The instrument control program is designed according to the structured programming method, which divides the entire program into several subprograms to facilitate debugging and inspection.

After the instrument is powered on, the microcontroller first queries whether the instrument needs weight calibration. If necessary, it performs weight calibration. Otherwise, it determines whether the horse value calibration is performed. If it is, it performs horse value calibration. Otherwise, it determines whether it is weighed. After weighing 8 g of cotton, the program determines whether the P1.7 port is low level. If it is, it performs horse value determination. Otherwise, it still enters the weighing subroutine. Since our instrument can only measure horse values ​​in the horse value range of 2.5 to 7.0, when the horse value is obtained, it is first determined whether the horse value is full. When the measured value is lower than 1 V, that is, the horse value is lower than 2.5, the horse value is considered to be full and E000 is displayed. If the horse value is not full, the horse value true value is calculated according to the empirical formula. Finally, the horse value grade is determined. According to the national standard, the horse value range of 3.7 to 4.2 is A grade, 3.5 to 3.6, 4.3 to 4.9 is B grade, and below 3.4 or above 5.0 is C grade. After the judgment is completed, the single chip microcomputer calls the display subroutine to display the horse value and corresponding grade of the quilt cotton sample.

Figure 2 is a flow chart of the main program.

The entire software subroutine includes weight calibration subroutine, horse value calibration subroutine, weighing subroutine, horse value measurement subroutine, display subroutine and some algorithm subroutines, etc.

Through the design of the sensor and its amplifying circuit, we know that when the air pressure is zero, the voltage is 0.500 V, and when the full air pressure is 400 Pa, the voltage is 2.46 V. The curve is shown in Figure 3.

Considering the accuracy requirement, we choose A/D conversion to 10 bits, the reference voltage is 2.5 V, when the input analog quantity is 2.5 V, the converted digital quantity is 210=1 024 (800H). According to the hardware circuit, when there is no cotton in the sample tube, the air pressure difference measured after the airflow passes through is 0, and the voltage sent to the single-chip microcomputer is 0.500 V, that is, according to the equation:

The corresponding digital quantity is 0CDH. According to formula (4) and the data in Table 1, a corresponding table between micronaire value and digital quantity can be calculated. This table is input into the program as the basis for calculating the micronaire value.

We found out the corresponding voltage value of the standard cotton sample specified by the national standard through experiments, and found that they are not linearly related, and cannot be expressed by a simple mathematical expression. Therefore, we use the segmented processing method to express their logical relationship. And mathematical modeling is carried out based on this law. The specific flow chart is shown in Figure 4.

The above true value of the horsepower value does not take into account the calibration deviation, so the horsepower value should be compensated. First, determine whether the horsepower value is low, medium, or high, then call out the deviation obtained in the horsepower value calibration from the EEPROM memory, and after calculation, obtain the horsepower value that matches the actual value.

4 Experimental tests

The designed instrument was calibrated according to the relevant provisions of the national standard GB6468-1992 cotton fiber "Micronaire value" test method. Using different cotton samples with micronaire values ​​of A, B, and C, at room temperature of about 21°C, the measured data error does not exceed ±0.1. The accuracy of the instrument fully meets the requirements.

5 Conclusion

The design of this instrument is closely combined with my country's national conditions. It has the characteristics of good human-machine interface, convenience, speed, small size and good cost performance. The designed instrument adopts single-chip control, uses electronic weighing, and air pressure sensor to measure the micron value. It has the functions of automatic calibration of standard cotton samples or standard plugs and automatic grading of micron value, and can intelligently eliminate abnormal data. It is a new generation of new products for measuring micron value.

Keywords: C8051F single chip microcomputer Airflow meter "micronaire value"
Reference address:Airflow meter based on C8051F single chip microcomputer

Previous article:Different initialization between C8051F and 80C51 series microcontrollers
Next article:Analysis of the Problem of Program Loss in C8051Fxxx

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号