As a tool for precision measurement, grating has been widely used in precision instruments, coordinate measurement, precise positioning, high-precision precision machining and other fields due to its own advantages [1, 2]. The grating measurement technology is based on the Moiré fringe signal formed by the relative movement of the grating. A series of processing is performed on this signal to obtain the displacement of the relative movement of the grating [3]. Combine the grating displacement sensor with microelectronics technology to measure linear displacement to achieve higher measurement accuracy. In this paper, the grating is used as the sensing element, which becomes a periodically changing electrical signal (approximately sinusoidal signal) after the receiving element. The logic direction circuit is used to distinguish the positive and negative displacements, and the single-chip microcomputer is used to process the data and display the results. The software is implemented in assembly language.
1 hardware circuitThe hardware circuit of this design is mainly composed of a single-chip microcomputer 89C51, a counter 8253, a subdivision and direction identification circuit, a signal conversion circuit and a grating displacement sensor. As shown in Figure 1.
1.1 Grating displacement sensor
The grating displacement sensor includes the following parts: grating; grating optical composition. The role of the grating optical system is to form moiré fringes; photoelectric receiving system. The photoelectric receiving system is composed of photosensitive elements, which convert the optical signal of the Moiré fringe into electrical signals. The photosensitive elements used in this system are 4 silicon photocells.
1.2 Signal conversion circuit
Signal conversion is to convert the sinusoidal electrical signal output by the photosensitive element into a square wave signal. In the comparator LM339 used in this article, the moiré fringe from the grating shines on the photosensitive element silicon photocell, and the electrical signals output by them are added to the positive input terminals of the two comparators of the LM339. The negative input terminals are respectively prefabricated with a certain reference voltage, and the reference voltage should make the high and low level widths of the square wave output by the grating the same.
1.3 Subdivision and direction identification circuit
1.3.1 Subdivision circuit
In order to record the number of fringes moved on the grating and determine the rate of movement of the grating, a 4-pole silicon photocell is used in the sensor to receive the moiré fringe signal. Adjust the width B of the Moiré fringe so that it is exactly the same as the width of the 4 silicon photocells. Then 4 signals with 90° phase difference can be directly obtained, that is, 4 times of subdivision can be performed. as shown in picture 2.
1.3.2 Direction identification circuit
In addition to the property of magnitude, displacement also has the property of direction. In order to distinguish the displacement direction of the scale grating, it is impossible to output a signal only by a photosensitive element. There must be more than two signals to judge the displacement direction according to their phase difference. Therefore, this design uses 4 silicon photocells to receive the Moiré fringe signal, and the output signals of the 4 channels are sequentially different in phase by 90°. The direction identification circuit designed with this feature is shown in Figure 3. In the figure, u1, u2 and u3, u4 respectively use the same circuit to realize the difference of the displacement direction. When the Moiré fringe moves up (assuming that it passes through the first two silicon photovoltaic cells, at this time u1, u2 have signals, u3, u4 have no signals), point A in the figure has count pulses, and point B is at a constant level; When the Er fringe moves down (assuming that it passes through the first two silicon photocells, at this time u1, u2 have signals, u3, u4 have no signals), point B in the figure has count pulses, and point A is at a constant level. Two different counters are used to record the number of pulses formed by moving up and moving down respectively to realize direction identification.
1.4 LED display
This article uses a dynamic 4-digit display. The first bit is the sign, the moiré is moved up to be positive, and the down is moved to be negative; the second and third bits are integer bits; the fourth bit is decimal places. Connect all segment selection lines in parallel, controlled by the P1 port of the single-chip microcomputer, and the common cathode common terminal is controlled by P3.0, P3.1, P3.2, and P3.3 respectively to realize the time-sharing gating of everybody.
2 Software partThe software part mainly consists of acquisition subroutine, data processing and display subroutine [4].
The acquisition subroutine completes the reading and conversion of the count value; the data processing subroutine completes the linearization of the collected data; the display subroutine displays the results in a loop. The flow of the program is shown in Figure 4.
In this article, the designed hardware uses a comparator LM339 to convert the output signal of the photosensitive device into a square wave signal, and a logic direction identification circuit is used to accurately judge the forward and reverse movement of the grating; and two counters of 8253 are used to align each other. Reverse the two signals for counting, then use 89C51 for data processing and send it to the display for display. The hardware structure is simple, the cost is low, the work is reliable, and the accuracy is relatively high; the software is implemented in assembly language, the program is simple, the readability is strong, and the efficiency is high.
ZGAR Vape Pods 1.0
ZGAR electronic cigarette uses high-tech R&D, food grade disposable pods and high-quality raw material. A new design of gradient our disposable vape is impressive.We equip with breathing lights in the vape pen and pods.
Our team has very high requirements for product quality, taste allocation and packaging design. Designers only use Hong Kong designers, e-cigarette liquid only imports from the United States, materials are food grade, and assembly factory wants medical grade without ground workshop.
We offer best price, high quality Pod System Vape,Pods Systems Touch Screen,Empty Pod System, Pod Vape System,Disposable Pod device,Vape Pods to all over the world.
ZGAR Vape 1.0 Pods,ZGAR Vape Pods 1.0 ,Pod Systems,Atomizer, E-cigarette, Empty Pod Vape Manufacturer and Supplier in China
ZGAR INTERNATIONAL(HK)CO., LIMITED , https://www.szvape-pods.com