Application of MSP430F449 in new flow meter

Publisher:数据梦行者Latest update time:2012-05-09 Source: 微计算机信息 Keywords:MSP430F449 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

Electromagnetic flowmeter is an instrument for measuring the volume flow of conductive liquid based on Faraday's law of electromagnetic induction. The choice of its excitation method directly affects the magnetic field generated by the excitation coil inside the sensor, and further affects the induced electromotive force signal output by the sensor and the measurement accuracy of the instrument. Based on the summary of existing excitation methods and the work of predecessors, I proposed a three-value trapezoidal wave excitation method. This excitation method uses a trapezoidal wave with a positive-zero-negative three-polarity rule as the excitation voltage waveform. Using a trapezoidal wave instead of a rectangular wave can reduce the magnetic field mutation caused by the rising and falling edges of the excitation waveform, effectively reducing the differential interference on the induced electromotive force, which is beneficial to the improvement of the zero point stability of the instrument and the measurement accuracy.

2. Electromagnetic flowmeter hardware system design

The hardware system of electromagnetic flowmeter based on three-value trapezoidal wave excitation mainly consists of three parts: excitation circuit, signal processing circuit and single chip computer system. Its overall structure is shown in Figure 1.

Figure 1 Overall hardware structure

2.1 Excitation circuit

The excitation circuit consists of two parts: a trapezoidal wave excitation signal generating circuit and an excitation signal power amplifier circuit. The trapezoidal wave excitation signal generating part uses a 16-bit D/A conversion chip DAC7731 to generate an excitation signal by connecting it to the USART communication module of the MSP430F449 microcontroller through the level conversion chip SN74AHC245. The output range of DAC7731 is -5V~+5V, the internal reference voltage is 10V, and the USART is a 4-wire SPI host mode. This excitation signal generating circuit divides the frequency through the timer of the MSP430 microcontroller, and the excitation frequency can be modified by software programming, which provides greater convenience for the electromagnetic flowmeter to select different excitation frequencies. The power amplifier circuit part adopts a complementary symmetrical power amplifier circuit. The excitation signal voltage is amplified by an operational amplifier, and the excitation signal current is amplified by a two-stage complementary symmetrical power amplifier circuit. The amplified signal is input into the excitation coil of the electromagnetic flowmeter as the excitation voltage. This circuit can linearly amplify the trapezoidal wave bevel part, meeting the requirements of the trapezoidal wave excitation method.

2.2 Signal Processing Circuit

Electromagnetic flowmeter is a specific application of Faraday's law of electromagnetic induction. Conductive fluid flows in a magnetic field and cuts magnetic lines of force, generating induced electromotive force. This induced electromotive force is a weak alternating signal. In actual measurement, it can basically be measured that a flow rate of 1m/s corresponds to an induced electromotive force of 0.1mv. The internal resistance of this signal is high, at the megohm level, and there are many noise signals, especially 50Hz power frequency interference, the amplitude of which is much larger than the induced electromotive force signal of the flow.

According to the characteristics of the induced electromotive force signal, the signal processing circuit is the key part of the measurement system. It is the bridge between the sensor and the single-chip microcomputer. Its function is to convert the sensor's induced electromotive force signal (trapezoidal wave excitation signal of microvolt to millivolt level) into a signal acceptable to A/D sampling through amplification, filtering, multiplication and other processing, and the flow rate information can be obtained by calculating this sampling signal. The circuit unit block diagram is shown in Figure 2.

Figure 2 Block diagram of signal processing circuit unit


The signal channel is located before the multiplication circuit. Its function is to amplify the weak signal to a sufficiently large level, and also has the function of suppressing and filtering out some interference and noise. It consists of a preamplifier circuit, a high-pass filter circuit, and an amplifier circuit. The amplified signal enters the next multiplier, which uses a four-quadrant high-speed and high-precision multiplier chip AD835. AD835 has a very high differential input impedance and does not require an external impedance conversion circuit. [page]

The amplified signal is multiplied by the signal fed back by the coil through the hardware multiplier, and the product signal is output. Since the MSP430 microcontroller is powered by a unipolar power supply, the A/D voltage input on the chip is also a unipolar input, that is, 0~3.3V, and the signal output by the multiplier AD835 is a bipolar signal, so the signal must be converted into a unipolar signal through a level boosting circuit. The level boosting circuit consists of two parts. The first part completes the function of adding 1.6V to the input signal and then outputs it in an inverted manner, and the second part inverts the inverted output signal. In this way, the initial input signal is boosted by 1.6V, so that it can enter the next A/D for sampling.

2.3 Single-Chip Microcomputer System

This measurement system uses TI's MPS430F449 microcontroller as the electromagnetic flowmeter CPU, and together with the crystal oscillator input module, reset circuit, display module and keyboard module, it forms a microcontroller system. The MSP430F449 ultra-low power microprocessor is a new type of microcontroller launched by IT companies. It has a 16-bit reduced instruction structure, contains a 12-bit fast A/D, 60K bytes of FLASH ROM, 2K bytes of RAM, and rich on-chip resources, including ADC, PWM, several TIMERs, serial ports, watchdog timers, etc. The reset circuit of the microcontroller system uses a method of pulling the pin voltage down to GND and then releasing it to cause a system reset. The keyboard module of the system uses an independent key-type keyboard. Three independent keys are connected to P1.1, P1.2 and P1.3 of MSP430F449 respectively with three pull-up resistors, and these three ports are set to the rising edge interrupt enable mode, and the interrupt handler is used to judge the keyboard input.

3 System Software Design

The system software consists of the main program, keyboard menu processing, timer interrupt, trapezoidal wave excitation signal generation, A/D sampling, LCD display, etc. The system program flow chart is shown in Figure 3.

As can be seen from the flow chart, the system software achieves the purpose of filtering by averaging 1000 points collected at equal intervals, that is, obtaining the DC component. The data collected from these 1000 points are stored in an array. Every time a new point is collected, the oldest point in the array is replaced. The array stores the latest sampling points, and the sum of these points is obtained by point-by-point method, that is, except for the first 1000 data collected, which need to be summed once, the sum can be obtained by subtracting the data of the earliest point and adding the data of the latest point (a new sum is obtained for each new point collected). Then smooth the sum obtained each time, and calculate the average value of these 1000 points as the DC component. The purpose of smoothing is to make the obtained data more stable and not display jumps due to occasional errors or fluctuations. The average value obtained by dividing the smoothed sum by 1000 is considered to be the DC component obtained by software filtering.

4 Test results and conclusions

The inner diameter of the sensor used in the test is 50mm, and it is calibrated with a standard measuring tank. The excitation frequencies of low-frequency rectangular wave excitation, three-value low-frequency rectangular wave excitation and three-value trapezoidal wave excitation are all 6Hz, and the maximum amplitude of the excitation voltage is ±8V.
Since the zero point stability of the instrument is mainly reflected in the measurement accuracy of small flow rates (generally below 0.25m/s), the test is mainly concentrated in this flow rate section. From the test results, it can be shown that the three-value trapezoidal wave excitation method has a smaller relative error at the same calibration flow rate than the low-frequency rectangular wave excitation method, and at the test point close to zero flow rate (calibration flow rate is 0.079m/s), the measurement relative error under the three-value trapezoidal wave excitation method is -4.8%, which is less than -6.9% under the low-frequency rectangular wave excitation method, indicating that the proposed three-value trapezoidal wave excitation method is effective in improving zero point stability.

5 Conclusion

Through the collaborative design of software and hardware, this system enables users to change the excitation frequency, trapezoidal wave slope and high and low zero value excitation time ratio through keyboard settings. When the flow rate changes little and the measurement accuracy is required, a lower excitation frequency is selected to ensure better zero point stability and measurement accuracy. When the flow rate changes greatly and the measurement real-time requirement is high, a higher excitation frequency is selected to ensure the response speed of the electromagnetic flowmeter. Compared with the existing electromagnetic flowmeter, which has difficulty in meeting different measurement requirements with a single excitation frequency, certain breakthroughs have been made. Therefore, it has high promotion and application value and economic benefits.
The innovation of the author of this article: a new signal processing method under the three-value trapezoidal wave excitation mode is proposed.

Keywords:MSP430F449 Reference address:Application of MSP430F449 in new flow meter

Previous article:Design of insulator telemetry system based on MSP430F149
Next article:A New Hybrid Electric Vehicle Detection Technology

Recommended ReadingLatest update time:2024-11-16 23:30

ON Semiconductor showcases automotive sensor portfolio for ADAS and automotive camera vision systems
(Image source: ON Semiconductor official website) ON Semiconductor will showcase its automotive sensor portfolio at the AutoSens conference in Detroit, Michigan, with a focus on its next-generation RGB-IR image sensor solutions for cockpit applications and the Hayabusa™ series of CMOS image sensors for advanced dri
[Automotive Electronics]
ON Semiconductor showcases automotive sensor portfolio for ADAS and automotive camera vision systems
STMicroelectronics hybrid dual-shutter sensor monitors the entire cabin to improve driving safety and comfort
STMicroelectronics hybrid dual-shutter sensor monitors the entire cabin to improve driving safety and comfort Rolling shutter & global hybrid dual shutter image sensor expands the basic functions of driver monitoring, bringing a more adaptable and convenient driving experience The ave
[Automotive Electronics]
STMicroelectronics hybrid dual-shutter sensor monitors the entire cabin to improve driving safety and comfort
Design of the back-end signal processing circuit of SAW sensor
0 Introduction With the development of surface acoustic wave (SAW) technology, SAW sensors have become an important branch. Surface acoustic wave sensors are small in size, light in weight, low in power consumption, high in sensitivity, strong in anti-interference, high in precision, good in repeatability a
[Analog Electronics]
Melexis releases free online current sensor chip simulation tool
Melexis releases free online current sensor chip simulation tool Intuitive online tool simplifies design of current measurement solutions July 6, 2022, Tessenderlo, Belgium - Melexis, a global microelectronics engineering company, today announced the launch of a new current sensor chip
[sensor]
Melexis releases free online current sensor chip simulation tool
Characteristics of advanced fiber optic sensors and their applications in the industry
Fiber optic sensors, which emerged with the development of optical fiber and fiber optic communication technology, have a sensing sensitivity many times higher than traditional sensors. They can work normally in many special environments such as high voltage, high noise, high temperature, and strong corrosion. They can
[Test Measurement]
Interfacing the DS18X20/DS1822 1-Wire Temperature Sensor in a Microcontroller Environment
This application introduces the user to simple 1-Wire software for connecting a microcontroller to the DS18B20, DS18S20, and DS1822 1-Wire temperature sensors. This article uses the DS5000 (compatible with 8051) microcontroller as an example. Software examples are given to illustrate the implementation of delay, reset
[Microcontroller]
Interfacing the DS18X20/DS1822 1-Wire Temperature Sensor in a Microcontroller Environment
ACEINNA Launches Rugged Open-Source Inertial Measurement Unit Sensor to Optimize Vehicle Navigation
According to foreign media reports, ACEINNA has launched a new OpenIMU300RI inertial measurement unit (IMU), which is durable, open source, and has built-in nine-degree-of-freedom (9-DOF) inertial sensor technology, which can be used for autonomous driving off-road, construction, agriculture, and automobiles. This new
[Automotive Electronics]
ACEINNA Launches Rugged Open-Source Inertial Measurement Unit Sensor to Optimize Vehicle Navigation
Intelligent sensor hardware design based on IEEE1451 standard interface
1 Introduction From the digital revolution brought by microprocessors to the rapid development of virtual instruments, the requirements for the comprehensive accuracy, stability, reliability and response of sensors are getting higher and higher. Traditional sensors can no longer meet various test requirements. W
[Industrial Control]
Intelligent sensor hardware design based on IEEE1451 standard interface
Latest Test Measurement 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号