Grating displacement measurement system based on EPA

Publisher:BlissfulHeartLatest update time:2011-09-08 Keywords:EPA Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Introduction
At present, domestic research and development units of numerical control positioning devices are developing various economical workbench products, with general positioning accuracy of 1 μm, 5 μm, and 10 μm. The structural layout, displacement size, and measurement speed of the workbench are becoming more and more flexible, and the degree of automation is getting higher and higher. However, most of these workbenches are decentralized structures for single-machine monitoring. Some are connected together through RS485, fieldbus, PLC, etc. to form a simple DCS or FCS network measurement system. The systems constructed using these methods have defects such as high cost, small measurement range, low speed, instability, and limited support for applications, so their development is greatly restricted. On the contrary, industrial Ethernet has developed rapidly with its unified TCP/IP protocol and CSMA/CD multiple access method. Ethernet is not only cheap, high-speed, simple, and convenient, but also has high transmission rate, large amount of information, and strong compatibility. Therefore, it is highly valued by many industrial monitoring fieldbus development organizations.
The grating displacement measurement system based on EPA introduced in this article has the characteristics of easy function expansion, convenient networking and low cost. It can well meet the needs of precision displacement measurement and positioning in the fields of aerospace, precision mechanical instruments, CNC machine tools, etc.

1 Hardware selection of grating displacement measurement system
1.1 Main controller DS80C410 microprocessor

DS80C410 is a fast and highly integrated network microcontroller compatible with 8051. It executes instructions three times faster than ordinary 8051. Its peripherals include 10/100 Mbps Ethernet MAC, 2 serial ports, 1 CAN2.0 controller, 1 l-wrie controller and 64 I/O pins. In order to access the network, a complete TCPIPv4/6 protocol stack and operating system are embedded in the ROM. The network protocol stack supports 32 TCP connections at the same time and can transmit data at a rate of 5 Mbps through the Ethernet MAC.
For half-duplex operation mode, DS80C410 shares the Ethernet physical medium with other nodes on the network. DS80C410 follows the Ethernet carrier sense multiple access protocol with collision detection (CS-MA/CD) when accessing the physical medium. MAC waits for the physical carrier to be idle before trying to send. Since there are many nodes in the network, different nodes may conflict when sending. When a conflict is detected, the MAC waits for a random time slot before trying to send again. Unless there is an instruction to interfere, the MAC will try to send the conflicting frame again, and automatically abandon the sending frame after 16 times. For full-duplex communication mode, the physical medium and DS80C410 are directly connected to another node, allowing data to be sent and received simultaneously without conflict, so no media access method is required. For full-duplex communication, the flow control mechanism uses PAUSE control frames. When time is needed to release the receive data buffer, the DS80C410 can initialize the PSUSE frame and request other nodes trying to send frames to suspend several time slots.
Compared with other microcontrollers, the DS80C410 has powerful instruction operation functions and does not require external memory expansion. The two internally integrated serial ports facilitate the functional upgrade and expansion of the entire system. In addition to the ports used to form the industrial Ethernet interface circuit, there are a large number of idle ports that can be used for other purposes. At the same time, the system can realize real-time communication at a network transmission speed of 10/100 Mbps in the industrial field, which is convenient for the system to realize network testing. In addition, it executes instructions three times faster than the ordinary 8051, so it is helpful to improve the response time of the system. After comprehensive consideration, DS80C410 is selected as the main controller of the entire grating displacement measurement system.
1.2 Ethernet transceiver chip LXT972ALC
This design requires an Ethernet interface with a twisted pair as the transmission medium. The Intel LXT972ALC used here is such a transceiver chip. It complies with the Fast Ethernet protocol and supports the 10/100 Mbps MAC standard. The LXT972ALC device implements the MII defined by the standard IEEE802.3. It provides an independent channel for data transmission from MAC to LXT972ALC. Each channel has its own clock, data bus and control signal.
1.3 Network transformer
The output data of the Ethernet transceiver chip LXT972ALC must also be processed by a network isolation transformer. The function of the network isolation transformer is to convert the signal into a balanced signal transmission to reduce common mode interference and increase the data transmission distance. The design uses Belfuse's S558-5999-T7 network isolation transformer. The two inputs and two outputs of the transformer are connected to the TPIP/N, TPOP/N and RJ45 of the Ethernet transceiver chip LXT972ALC respectively.

2 Sensors
There are many types of sensors, and their advantages and disadvantages also have their own emphasis. In comparison, grating sensors not only have the advantages of high speed, high precision, and non-contact measurement, but also have a large magnification and error averaging effect in displacement detection, so they are widely used in the field of precision displacement measurement and precision positioning control.
2.1 Basic principles of grating displacement measurement
Grating sensors are mainly composed of scale gratings, indicator gratings, and photoelectric devices (light-emitting and photosensitive devices). When two gratings overlap at a small angle, interference will occur, and interference fringes with alternating light and dark will be formed in a direction roughly perpendicular to the grating lines, which is the so-called Moire fringes. As the two gratings move relative to each other, the fringes also move, and there will be changes in the light and dark on the fixed photosensitive device. The light and dark change cycles are counted, and the relative displacement of the two gratings can be calculated according to a certain corresponding relationship. This is the basic principle of grating displacement measurement. Generally, the width of the Moire fringes is much larger than the width of the grating grid, so the Moire fringes actually play an optical amplification role. Its magnification is

Where T is the spacing of the moiré fringes, d is the grid width of the grating, and θ is the angle between the two grating lines (in radians). The grid width of the grating is an important factor that directly affects the measurement resolution and accuracy. For different grating rulers, the measurement resolution, accuracy and range are different. The grating pitch of the grating sensor is usually 0.02 mm (50 line pairs/mm) and 0.04 mm (25 line pairs,/mm). The output signal has two square wave signals with a phase angle difference of 90° and four sinusoidal signals with a phase angle difference of 90°. Since the square wave signal is a digital quantity, it does not require A/D conversion and can be directly processed by DS80C410. Therefore, this article focuses on the square wave input signal, and for the sinusoidal wave signal, it can be transformed into a square wave signal output after shaping.
This article uses the SGC-4.2 grating ruler with high threshold logic (HTL) signal output as the displacement measurement element. The characteristic of this grating ruler is that the threshold voltage is relatively high, so its noise tolerance is relatively large and it has strong anti-interference ability. Its main disadvantage is that the working speed is relatively low, so it is mostly used in some industrial control equipment that does not require high working speed but has high anti-interference ability.
2.2 Principle of quadruple frequency circuit design
In practical applications, the grating sensor outputs two square wave signals A and B with a phase difference of 90°. As shown in Figure 1, the number of pulses of the two-phase signals A and B represents the displacement of the grating, marking the forward and reverse movement of the grating. The quadruple frequency signal is counted by the counter and converted into relative position. There are generally two ways to implement the counting process: one is to implement it by the internal timing counter of the microprocessor; the other is to count the forward and reverse pulses by the reversible counter.

The grating signals A and B have the following relationship:
① When the grating moves forward, the phase of the A phase signal output by the grating leads the B phase by 90°. In one cycle, the two-phase signals have a total of 4 relative changes: 00-10-11-01-00. In this way: every time a change occurs, the reversible counter will realize an up-count, and a total of 4 up-counts can be realized in one cycle, thereby realizing the four-fold frequency counting of the forward state.
② When the grating moves backward, the phase of the A phase signal output by the grating lags behind the B phase signal by 90°. In one cycle, the two-phase signals also have 4 relative changes: 00-01-11-10-00. Similarly, if every time a change occurs, the reversible counter will realize a down-count, and a total of 4 down-counts can be realized in one cycle, thus realizing the four-fold frequency counting of the reverse state.
③ When the line is disturbed or a fault occurs, other state transitions may occur, and the counter does not perform counting operations at this time.
Based on the above analysis, we can make a state transition diagram of the processing module, as shown in Figure 2. Among them, "+" and "-" represent the counter plus/minus 1, and "0" means the counter does not act.

3 Overall design of grating displacement measurement system
The block diagram of the grating displacement measurement system is shown in Figure 3. When the system is working, the SGC-4.2 grating ruler converts the position signal into an HTL voltage signal output first, and then processes it into a standard square wave signal after filtering and rectification by the conditioning circuit. Then the controller DS80C410 counts the external square wave signal through the internal high-speed counter. On the one hand, it issues motor action instructions to the servo driver to control the motor-driven displacement actuator movement; on the other hand, it reads and writes through the Ethernet transceiver chip XT972ALC, and uploads the measurement information of the industrial site to the industrial Ethernet network, which is convenient for managers to make global decisions.

4 Hardware design of grating displacement measurement system
The hardware implementation of the grating displacement measurement system mainly includes the design of displacement detection circuit, power supply circuit, human-machine interface and sound and light alarm circuit as well as industrial Ethernet interface circuit.
4.1 Grating displacement detection circuit based on integrated chip
The grating signal detection circuit can be composed of photosensitive transistor, comparator LM339, and two 74193 in series. However, this design scheme often requires the addition of more programmable counters, with many circuit components, complex structure, increased power consumption and decreased stability. Therefore, when this paper performs frequency doubling processing on the pulse signal coming out of the SGC-4.2 grating ruler (50 lines/mm), the 4-fold frequency dedicated integrated circuit chip QA740210 is selected to achieve it. After the signal is subdivided by 4, a counting pulse with a resolution of 5μm can be obtained, which has achieved a high accuracy in industrial measurement and control. The QA740210 integrated circuit can quadruple the frequency of two orthogonal square waves, and can distinguish the phases according to the phase relationship of the input signals, generating two-way plus and minus counting signals, which can be directly sent to the DS80C410 high-speed counter for counting.
[page]

In order to make QA740210 work properly, it is necessary to design an oscillator composed of X0, X1, and X2. The oscillation frequency has nothing to do with the power supply voltage, but only depends on the total time constant of charging and discharging, that is, it is related to the value of R1 and C1. This article selects R1 = 100 Ω, C1 = 10μF, and the oscillation frequency f = 250 kHz. The specific implementation circuit is shown in Figure 4.

The SGC-4.2 grating sensor outputs an HTL square wave signal, and the operating voltage of the QA740210 is +5 V, so the output of the double frequency pulse must be realized through level conversion. The level conversion circuit is shown in Figure 5.

4.2 Power supply circuit
When designing the entire control system, if the power supply system is too complex and redundant, it will not only cause electromagnetic interference to other circuits, but also have poor economic benefits. Therefore, all chips in the design are selected with 5 V, 3.3 V or 1.8 V power supply voltage. In this way, when designing the power supply, only three LM2596s and some capacitors, inductors, diodes, etc. are needed to directly convert the 24 V voltage into the required voltage. The circuit design is not only easy but also very economical. The power supply circuit is shown in Figure 6. When using it specifically, you can choose LM2596-5V, LM2596-3.3V, LM2596-1.8V chips as needed. To obtain +1.8 V and +5 V, use the connection method of Figure 6(a), and to obtain +3.3 V, use the connection method of Figure 6(b).

4.3 Human-machine interface and sound and light alarm circuit
In order to limit the movement of the displacement actuator within the specified range, the limit switch must be set by software, and there is a limit switch at each boundary. When hitting the limit switch, a "1" level is output from the output port P5.2 through DS80C410. After the resistor voltage is divided, the control terminal MT of 7920A obtains a voltage of about +1.5 V, so the waltz music signal is output from its music signal output terminal OUT. After amplification by the amplifier circuit M51182L, the speaker is driven to emit the corresponding alarm music sound. The volume can be achieved by adjusting the 10 kΩ potentiometer. At the same time, the light-emitting diode is turned on, the red light alarms, and the motor is controlled to stop running. The specific circuit is shown in Figure 7.

4.4 Industrial Ethernet interface circuit
The industrial Ethernet interface circuit is composed of microcontroller DS80C410, Ethernet transceiver LXT972ALC, network isolation transformer S558-5999-T7, RJ45 connector and double-glue wire. The function of the Ethernet interface circuit is, on the one hand, to upload the observation data of the industrial site to the Ethernet network, so as to facilitate the relevant management departments or individuals to make decisions and management; on the other hand, it is to transmit the data and operation commands of the industrial Ethernet to the industrial site, so as to manage the measurement system on site to work effectively and in real time. When only on-site measurement is carried out without Ethernet communication, the microcontroller DS80C410 can directly control the entire on-site equipment. Therefore, the measurement system has the advantages of both the operability of single-system on-site measurement and the convenience of networked measurement. The entire industrial Ethernet interface circuit is omitted.

5 Measures to improve measurement resolution and accuracy
5.1 Effect of temperature on measurement accuracy and compensation
Due to thermal expansion and contraction, the spacing of the grating lines will change with temperature, which will inevitably affect the measurement accuracy. In situations where the temperature changes greatly and the accuracy requirements are relatively high, temperature compensation must be performed. For the same material and the same structural form, the characteristics of temperature-induced deformation are the same. The compensation steps are to set the output of the grating to a standard output without temperature error when the ambient temperature is 20°C, select a series of equally spaced temperature points around 20°C, and after a number of positive (reverse) temperature strokes, measure the overall deformation value of the scale at these temperature points to obtain temperature deformation related data. These data are used to fit the characteristic curve, and the fitting curve can correct the temperature error. It is sufficient to select a second-order or third-order polynomial for the fitting curve, which is in the form of:
ε=a3t3+a2t2+azt+a0 (2)
where ε is the deformation of the grating scale, t is the temperature, and ai is the coefficient to be determined. The fitting method uses the least square method, and the obtained fitting polynomial represents the approximate relationship between temperature and grating deformation. There are two ways to compensate: one is to store the coefficients of the curve in a non-volatile memory and directly calculate the above polynomial when correcting; the other is to make the above curve into a table, look up the table and interpolate when compensating.
5.2 Improve the anti-interference ability of the system
When the grating sensor is measured in a vibrating environment, it often encounters interference. At the edge of phase A or phase B, that is, at the level jump, due to slight vibration, countless small peaks will appear at the edge, causing the counter to be falsely triggered and affecting the counting accuracy. For this reason, the flying reading of the timer/counter or the judgment of the pulse validity can be used to improve the measurement accuracy of the system.

Keywords:EPA Reference address:Grating displacement measurement system based on EPA

Previous article:Design of Oil Well Pressure Test System Based on MSP430
Next article:Research on the Triaxial Acceleration Test of Type XX Shell

Recommended ReadingLatest update time:2024-11-17 00:45

Design and implementation of EPA industrial control network security test system
0Introduction One of the great advantages of the upstream control network based on EPA is that it integrates the EPA control system with the enterprise's e-commerce, material supply chain and ERP to form an efficient and smooth "transparent network" to improve work efficiency. However, the overall network t
[Industrial Control]
Principle and design of grating displacement measurement system based on EPA
introduction At present, domestic research and development units of numerical control positioning devices are developing various economical workbench products, with general positioning accuracy of 1μm, 5μm, and 10μm. The structural layout, displacement size, and measurement speed of the workbench are becomi
[Test Measurement]
Principle and design of grating displacement measurement system based on EPA
Design and implementation of EPA communication protocol in μC/OS-II embedded system
  1. Introduction   "EPA System Architecture and Communication Specification for Industrial Measurement and Control Systems" (hereinafter referred to as EPA) is a real-time communication specification based on industrial Ethernet. It effectively solves the deterministic communication problem of Ethernet communication
[Microcontroller]
Design and implementation of EPA communication protocol in μC/OS-II embedded system
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号