Application of Rotary Encoder in Line Speed ​​Detection and Control

Publisher:乐基儿vosLatest update time:2012-10-29 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

This project is a technical transformation project for a cable factory. The equipment to be transformed is a cable-twisting machine made using the principle of cable bundles. The transformation content is to replace the entire electrical control system. The pay-off reel of this cable-twisting machine is fixed, and the take-up reel is fixed on the reel frame to complete the dual movements of twisting and taking up. During operation, the cable reel DC motor drives the cable reel to complete the cable take-up movement, and the cable arrangement motor drives the cable reel to arrange the cable neatly. Driven by the large reel motor, the reel frame is driven by the gear box to achieve axial rotation, completing the cable twisting movement, which is the key to ensuring the pitch. The line speed is determined by the rotation speed of the take-up reel. If the speed of the take-up motor is constant, the line speed of the take-up reel will increase as the take-up shaft becomes thicker. Therefore, in order to ensure a constant take-up speed, the speed of the take-up motor should be gradually reduced.

1 System Design Principles

According to the production process requirements of cables, the running speed of cables of different models is constant. Usually, the running speed of the cable is detected by the cable-driven rotary encoder . The schematic diagram of cable line speed measurement is shown in Figure 1.

Cable line speed measurement diagram

In this project, the rotary encoder used is the TRDJ1000 series, which outputs 1,000 pulses per rotation. Therefore, the cable routing speed can be calculated based on the number of pulses detected within a certain period of time. In practical applications, it is measured with a rotary encoder with extremely high processing accuracy and a circumference of 500 mm. The driving wheel is coaxially installed with the rotary encoder, and the driving wheel is in contact with the cable. During the cable production process, the friction force pulls the measuring wheel to rotate, so that the linear displacement (length) of the cable is converted into a pulse digital signal output of the rotary encoder.

Assuming that the number of count pulses per revolution of the rotary encoder is NP (number of pulses/revolution), the angular resolution of the rotary encoder (unit: (°)/pulse) is:

P=360/NP

Assuming that the radius of the active guide wheel fixed on the rotary encoder shaft is rm, the displacement resolution of the rotary encoder (unit: m/piece) is:

Ps=27πr/NP

At this time, if the number of counted pulses is N (pieces), the displacement S (unit: m) measured by the rotary encoder is:

S=Ps·N

The cable routing speed V (unit: m/s) is:

V=S/T

Where: T is the time used to receive N pulses (unit: s).

2 Hardware Circuit Design Principles

The detection circuit uses the AT89C51 microcontroller as the control core, as shown in Figure 2. The pulse output by the rotary encoder is converted into a TTL level pulse of 0~5 V after level conversion and sent to the external interrupt INT0 terminal of the AT89 C51 microcontroller. Every time a pulse is received, the microcontroller interrupts once, and the counting pulse memory is increased by 1. After comparing with the standard pulse value, the P0 port of the microcontroller outputs a given value digital quantity, which is then converted into a given value analog quantity through D/A conversion and sent to the wire-receiving motor speed regulator to control the motor speed. The D/A conversion chip here uses the TLC7226IDW with 8-bit data input and four-channel analog output. If you need to improve the motor speed control accuracy, you can choose other D/A conversion chips with 10-bit or 12-bit data input.

Hardware circuit design principles

When the cable is working, when the take-up motor drives the cable to move, it drives the driving wheel of the rotary encoder to rotate, so that the rotary encoder rotates and outputs pulses. The pulse is sent to the photocoupler for isolation, shaping, and level conversion, and then sent to the 12th pin of AT89C51. The external interrupt INTO counts the pulses. Every time a pulse is received, the microcontroller executes the external interrupt INT0 subroutine once, and the pulse count memory is increased by 1. For example, it is read once every 1 s, so that the number of counted pulses can be compared with the standard number of pulses, so the current line speed can be determined.

The linear velocity is calculated as follows:

For example, the linear velocity V is required to be 0.1 m/s.

The number of pulses per second output by the rotary encoder = V·Np/C

Where: C is the circumference of the rotary encoder driving wheel (unit: m). Therefore, when the linear speed is 0.1 m/s, the standard number of pulses output by the rotary encoder per second = 0.1×1000/0.5 = 200 pulses/s.

3 Software Design

It runs in the timer interrupt and executes once per second in the timing subroutine. That is, it queries whether the number of pulses received per second is the same as the standard pulse. The line speed control subroutine is shown in Figure 3.

Line speed control subroutine

First, read the value of the pulse count memory and compare it with the standard pulse number. If it is equal to the standard pulse, the pulse count memory value is cleared, indicating that the wire speed is equal to the standard speed at this time; if it is greater than the standard pulse number, it means that the line speed is greater than the standard line speed. Therefore, the speed regulator set value must be reduced by 1 to reduce the speed of the wire-receiving motor; if it is less than the standard pulse number, it means that the line speed is less than the standard line speed. The speed regulator set value must be increased by 1 to increase the speed of the wire-receiving motor, thereby forming a closed-loop line speed control feedback system to control the rotation speed of the wire-receiving motor and keep the line speed constant.

4 Conclusion

The above-mentioned line speed control system has been successfully applied in actual technical transformation, saving nearly one million yuan of technical transformation funds for the enterprise. The results show that the system has the characteristics of stable and reliable operation, simple circuit, high measurement accuracy, low cost, etc., which fully meets the requirements of cable production process. Its simple circuit design and typical control method have high reference value.

Reference address:Application of Rotary Encoder in Line Speed ​​Detection and Control

Previous article:A scheme for realizing a triode switch circuit
Next article:Grounding resistance reduction scheme for grounding device

Latest Analog Electronics 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号