Application of grating sensor in automatic displacement measurement system

<

I. Introduction

With the development of electronic technology and single-chip technology, grating sensors have been widely used in displacement measurement systems, and gradually transformed into intelligent directions.

Fig. 2 is a schematic diagram showing the principle of an automatic measurement system for displacement using a grating sensor. The system uses the moire fringe generated by the grating movement to combine with the electronic circuit and the single-chip microcomputer to complete the automatic measurement of the displacement. It has the discriminating grating moving direction, preset initial value, automatic positioning control and over-limit alarm, self-test and Power-down protection and temperature error correction. The following describes the working principle and design ideas of the system.

Second, electronic subdivision and judgment circuit

The essence of the grating measurement displacement is to measure the grating pitch as a standard ruler. At present, high-resolution grating scales are generally expensive and difficult to manufacture. In order to improve the system resolution, it is necessary to subdivide the moiré fringes. The system uses an electronic subdivision method. When the two gratings overlap at a slight tilt angle, moiré fringes are generated in a direction substantially perpendicular to the grating line, and the moire fringes move up and down as the grating moves. In this way, the measurement of the grating pitch is converted into the measurement of the number of moiré stripes, and the same amount of moiré is optically amplified, and the magnification is:

(1)

Where: W is the moire fringe width; d is the grating pitch (pitch); θ is the angle between the two gratings, rad

Within one moire fringe width, four optoelectronic devices can be placed at regular intervals to achieve electronic subdivision and sheep direction. The grating scale of the grating is 50 pairs/mm, and the grating pitch is 0.02mm. If four subdivisions are used, the counting pulse with a resolution of 5μm can be obtained, which has reached a very high level in general industrial measurement and control. High precision. Since the displacement is a vector, that is, to detect its size and to detect its direction, at least two photoelectric signals having different phases are required. To eliminate common mode interference, DC components, and even harmonics, we used a differential amplifier consisting of a low drift op amp. The four optical signals obtained by the four power-on devices are respectively sent to the input terminals of the two differential amplifiers, and the two signals output from the differential amplifiers have a phase difference of π/2. To obtain the judgment and count pulses, the two The road signals are shaped, firstly shaped into a square wave with a duty ratio of 1:1, and the reversible counter is input through the four subdivision judgment circuits composed of two NOR gate 74LS54 chips, and finally sent to the single chip microcomputer composed of 8031. Processing in the system.

Third, the single chip and interface circuit

To achieve reversible counting and increase measurement speed, the system uses a 193 reversible counter. Assuming that the operating speed of the working platform is v, the grating sensor pitch is d, and the subdivision number is N, the frequency of the counting pulse is:

(2)

If v=1m/s, d=20μm, N=20, then f=1MHz, the corresponding counting time interval is 1, obviously it is incompetent for the response of the 8031 ​​single-chip system to be 2μs. After being divided by the reversible counter, the measurement speed can be greatly improved.

Since 193 is a 4-bit binary output, in order to interface with the single chip microcomputer, the two pieces of 193 are cascaded, so that up to 255 pulses can be counted. If the pulse is repeated, the carry end or the borrowing end will output a pulse to the single chip T0. The T1 end counts to ensure that the signal sent to the 8031 ​​is not lost.

The length of the system can be measured up to several meters (determined by the actual length of the grating), and the minimum resolution is μm, requiring 7 display data. The symbol is not displayed during forward running, and the "-" sign is required for reverse running, so together with the sign bit, a total of 8 display blocks are required. In order to meet the application habits of the whole people, the display block uses a common cathode LED.

In order to realize the intelligence of the measurement system, a 2×8 mode keyboard matrix is ​​set up, including 0 to 9 total 10 numeric keys and 6 function keys: L/A length/angle transfer function key; +/- symbol conversion Function key; ΔT temperature error correction function key; EXE execution key; ENT preset key CE (clear key). The keyboard, the display and the single chip are connected by an interface chip 8155. Among them, the 8155 PA port is set to the basic output mode, as the 8-bit LED display segment code line; the PB port is set as the output mode, as the 8-bit LED bit selection line; the PC port is set as the input mode, as the keyboard line scan line. The PB mouth selection line is strobed for 1 bit each time, and each time it is displayed for 1ms, due to the inertia of the human eye, an 8-bit display block can be simultaneously displayed.

Since the pulse from the pre-circuit 74LS54 is divided by two 193, the direct entry into the 8031 ​​is only a "large" number greater than 255, and the "small" number less than 255 is output by the two 193 outputs through the I/O interface. Input to 8031 ​​internal processing, this I / O interface chip is realized by expanding a piece of 8255. Among them, the 8255PB port is set as the basic input mode, PB0-PB3 is used as the 1#193 input, and PB4 to PB7 are used as the 2#193 input. The lower bits of the PA port and the PC port are set as outputs, and are output as system parallel BCD codes. Since the 8031 ​​MCU has no internal ROM, it should be expanded by a 2732 (4k EPROM). Only use PSEN chip select, no need to increase address decoding. To latch the address signal input to the 8031P0 port, a 74LS373 address latch is required between 8031 ​​and 2732.

Fourth, software design

According to the hardware circuit and system function requirements, we designed the software program. Thanks to the temperature error correction subroutine, the detection accuracy can be greatly improved. The grating sensor is an opto-mechatronic structure, the grating scale is made of glass, and the outer casing is made of aluminum. When the ambient temperature changes, it will inevitably cause the structural size change to cause the grating pitch to change, which brings detection error. When the ambient temperature is set to 20 °C, it is the detection standard value. When compared with the standard value, the displacement error value caused by the temperature change is measured. The displacement error-temperature specificity curve is measured immediately, and the error-temperature is fitted by the characteristic curve. The equation is used as the basis for software temperature error correction. The system software adopts modular structure, and the software is simple, compact and reasonable.

V. Conclusion

According to the above hardware circuit and software design, the experimental accuracy of the system can be better than ±5μm. At present, the smart meter developed by us using the grating sensor for automatic measurement of length and angle has formed a series of products, the resolution can be from 20μm to 1μm, with stable performance, strong anti-interference ability, small size, compact structure, low cost, etc., has been successfully applied in hangar reconstruction and related photoelectric size and position detection systems.

Global hardware network

Concerned about surprises

Tag: Grating Measurement Differential Amplifier Electronic Subdivision Sensor Single Chip System

Previous: Application of Photoelectron in Sensor Technology Next: How to solve the problem in the practical application of oxygen sensor

0603 SMD LED

As a small SMD LED , 0603 SMD LED (1608 SMD LED) is used in various electronic products. You will see them simply on your keyboard, stereo, phone, indicator light and electronic product. They are widely used for indicator lights, game console lights and power buttonsin. When the number of SMD LED quantity is very large, we usually need a fast placement machine to mount it on the PCB board. Because this is a very small lamp and requires tweezers and a good eye to install. Machine will be much faster to do this things. There have kinds of color available in our factory like 0603 RGB SMD LED, 0603 White SMD LED, 0603 Green SMD LED, 0603 Blue SMD LED, 0603 Red Smd Led , 0603 orange SMD LED, 0603 amber SMD LED, 0603 yellow SMD LED ect.

0603FIRC-73L14I100-730nm-IR-LED-0603-IR-LED_06

0603 SMD LED, 1608 SMD LED, 0603 LED, 0603 SMD LED datasheet, 0603 RGB SMD LED

Shenzhen Best LED Opto-electronic Co.,Ltd / BESTSMD CO LIMITED(HK) , https://www.bestsmd.com