Development of a speed measuring instrument based on infrared

Publisher:dadigtLatest update time:2012-07-27 Source: 21ic Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

There are many methods for measuring rotor speed, but most are relatively complex [1]. Currently, there are four main methods for measuring rotational speed [2]: mechanical, electromagnetic, photoelectric, and laser. The mechanical method mainly uses the principle of centrifugal force. A fixed mass hammer that rotates with the shaft drives the free sleeve to move up and down. The measurement results are obtained according to the different sleeve positions corresponding to different speeds. The principle is simple and direct, and no additional electrical equipment is required. It is suitable for contact speed measurement occasions with low accuracy requirements. The electromagnetic system consists of an electromagnetic sensor and a gear mounted on the shaft. The main shaft rotates to drive the gear to rotate. When the teeth pass through the sensor, the magnetic resistance of the circuit changes. After amplification and shaping, a pulse is formed, and the speed value is obtained through the pulse. Due to the limitations of the processing accuracy of the gear, the minimum resolution interval of the teeth, and the maximum counting frequency of the circuit, the measurement accuracy cannot be guaranteed. The photoelectric structure is similar to the electromagnetic structure. The rotating gear is replaced by a photoelectric encoder or a black and white reflective stripe, and the electromagnetic sensor is replaced by a photoelectric receiver. The measurement result is obtained by counting the reflected light pulse signal. Due to the limitations of the minimum resolution interval of the stripes and the maximum counting frequency of the circuit, the measurement accuracy cannot be guaranteed. The measured speed value is the average value of the interval between two counting pulses, just like the electromagnetic method. Laser velocimetry (LDV) is a developing speed measurement technology that obtains the instantaneous angular velocity of the rotating body through the laser Doppler effect. In theory, it has a very high instantaneous speed measurement accuracy, but the actual product accuracy is not high enough and the price is expensive, which is limited in actual use.

By improving the existing electromagnetic sensor, a new sensor suitable for instantaneous speed measurement is designed, which has certain practical significance in the instantaneous state analysis of rotating machinery.

Based on the traditional electromagnetic system, this paper develops a new type of speed measuring instrument using infrared radiation technology. It is easy to install and has low requirements on the surrounding environment. It can easily complete the speed measurement. It has a wide dynamic measurement range and high measurement accuracy.

2 System Design

The overall structure of the speed measurement system is shown in Figure 1, which mainly includes an infrared speed sensor (composed of an infrared transmitting and receiving circuit and a toothed disc), a signal processing circuit, a single-chip microcomputer, and a digital display part. Its working process is as follows: When the toothed disc rotates, due to the shielding of the gear teeth, the infrared light path between the infrared transmitting tube and the receiving tube is intermittent, and the signal processing circuit converts this changing light signal into an electrical pulse signal. A pulse signal means that the toothed disc rotates one tooth. The single-chip microcomputer counts the pulses, and at the same time, it uses its internal timer to count the number of pulses received. The rotation speed of the toothed disc can be calculated based on the number of pulses and the time used, and finally the rotation speed is displayed through the digital display part.

11.jpg

2.1 System Hardware Design

According to the principle of infrared speed measurement, the circuit design of the system is shown in Figure 2.

22.jpg

This system uses the AT89C52 single-chip microcomputer, which is a low-voltage, high-performance CMOS 8-bit single-chip microcomputer produced by ATMEL Corporation of the United States. It contains 8KB of repeatedly erasable Flash program memory and 256B of random access memory (RAM). The device is produced using ATMEL's high-density, non-volatile storage technology, and is compatible with the standard MS-51 instruction system and 8052 product pins. It has an 8-bit central processing unit (CPU) built in. The powerful AT89C52 single-chip microcomputer is suitable for many more complex control applications. [page]

In the circuit, an infrared photodiode is selected as the light receiving device. It forms a pair of infrared transmitting and receiving tubes together with the infrared light emitting diode. The infrared photodiode is in the reverse working state in the circuit. When there is no light irradiation, the photodiode is in the cut-off state, the reverse resistance is large, and the reverse current (dark current) is small. As the light increases, the photodiode is in the on state, its reverse resistance decreases, and the reverse current (photocurrent) increases. There is a linear relationship between its photocurrent and illumination.

The speed display uses the character liquid crystal display module (LCM) JHD12864, which can display 16×8 or 16×16 dot matrix characters. Its main control drive circuit is HD44780, which has standard interface characteristics and adapts to the operation timing of M6800 series and MCS-51 series MCU; the module has 64 bytes of custom character RAM inside, which can customize the display characters. The module is powered by +5V power supply and has a total of 20 pins. Its interface with the microcontroller is shown in Figure 2, where the variable resistor RW2 is used to adjust the contrast of the display.

3.2 System Software Design

3.2.1 Timing scheme selection

According to different timing schemes, the timing methods of digital speed measuring devices are mainly M method, T method and synchronous M/T method. M method speed measurement is to read the number of pulses M within the equal time interval △t, and calculate the speed by M/△t. The higher the speed, the more M is counted within the △t time, and the speed measurement error caused by ±1 count pulse error is smaller, so this method is suitable for high speed. T method speed measurement is to calculate the speed based on the clock pulse count value m corresponding to the time interval between two adjacent pulses. The slower the speed or the more pulses per revolution, the more count value m is, and the error caused by ±1 count pulse of the counter is smaller, so this method is suitable for low speed. The absolute error measured by the above two methods is inversely proportional to the speed sampling time T (Hp: time interval △t or count value m), so in the case of steady-state measurement and low real-time requirements, a larger T can be taken to ensure sufficient measurement accuracy. However, in dynamic measurement and real-time control systems, there are often higher requirements for the real-time performance of speed measurement. Therefore, the sampling time T cannot be arbitrarily large. In order to solve the contradiction between a small period and high speed measurement accuracy, the synchronous M/T method can be used. The characteristic of this method is that the timing time △t' is not fixed, but is based on the recording of complete disk pulses. The main purpose is to try to synchronize M with △t'. The timing starts from an integer number of disk pulses and ends at an integer number of disk pulses. What is recorded is an integer number of disk pulses, and it is "synchronized" with the timing. The principle is shown in Figure 3. Within the sampling time △t, the actual timing time △t' starts at the falling edge of the first disk pulse and ends at the falling edge of the last pulse, so an integer number of disk pulses is obtained, eliminating the error introduced by ±1 pulse in the M method and the T method. In view of the comparison of several methods, the synchronous M/T method is used in the design of this speed measurement system.

33.jpg

3.2.2 Software Structure Division

The structured software design method is adopted to make the design simple, easy to debug and transplant, and improve programming efficiency. The system software is divided into four modules as shown in Figure 4: tooth counting module, timing module, speed calculation module and speed display module. The most important ones are the timing module and the speed calculation module.

44.jpg

(1) Timing module

As shown in Figure 2, when the infrared light emitted by the infrared emitting tube is not blocked by the gear teeth, the receiving tube is in the on state when exposed to the infrared light, and the voltage input to the interrupt port of the microcontroller through the inverter is high, and no interruption occurs; when the infrared light emitted by the infrared emitting tube is blocked by the gear teeth, the receiving tube is not exposed to the infrared light and is in the off state, and the voltage input to the interrupt port of the microcontroller through the inverter jumps to a low level. Thus, the interrupt program is activated to count the pulses. The counting flow chart is shown in Figure 5. Since the counting needs to be synchronized with the timing, it is necessary to turn on the timer when the first infrared light is blocked (Pass=0 when the infrared light is blocked, otherwise Pass=1), that is, when the interrupt port potential changes from high to low. Since the gear disc in the experiment has a total of 108 teeth, in order to improve the real-time measurement, the 108 teeth are divided into 9 equal parts. When the count value (Num) is 12, the timer is turned off and the timing value of the timer is read. [page]

55.jpg

(2) Speed ​​calculation module

Since the system uses the synchronous M/T method to measure the speed, the parameters required to calculate the speed are the number of disk pulses and the timing value. In this system, the AT89C52 microcontroller uses an external crystal oscillator with a frequency of 12MHz, so each machine cycle is 1us. The counting pulse cycle of the microcontroller timer is one machine cycle. If the timer counts from zero when it is turned on, and its count value is m when the timer is turned off, then the timing time is m microseconds. The program for calculating the speed is as follows.

m=TH0×256 //Read the counter's count variable TH0 and shift it left by 8 bits

m=TH0+TL0 //Get the number of clock pulses

time=m //Calculate the timing time

n=60*106/(9*time) //Calculate the speed r/min

5 Conclusion

The innovation of the author of this article is to replace the traditional electromagnetic sensor with an infrared sensor. The hardware circuit of the system is simple, the measurement speed range is wide, and it has high measurement accuracy. It also has a fairly high accuracy for low speed measurement. It also makes full use of the internal resources of the single-chip microcomputer and has a high cost performance. It can be used for non-contact detection and control of speed in various industries.

References

[1] Qian Jianqiang, Xue Min. Infrared photoelectric speed measuring instrument [J]. Industrial Metrology 2003, 6: 33-35

[2] Bao Hong, Liu Mingjian. Research on digital Hall tachometer[J]. Journal of Guangdong Institute of Technology. 1996, 9(3): 67~70

[3] Tian Guohua, Yang Qing, et al., Research and implementation of real-time operating system μC/OS-II porting on LPC2210 [J]. Microcomputer Information, 2005, 21-12: 33-36.

Reference address:Development of a speed measuring instrument based on infrared

Previous article:Improving R&D Competitiveness with Next-Generation Network Analyzers
Next article:Introduction to the design of portable vibration analyzer

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号