Encoder detection equipment with display and detection method
By using encoder detection equipment with display, combined with a host computer and a single-chip microcomputer, real-time display of encoder data and power protection can be achieved, solving the problems of low encoder detection efficiency and insufficient accuracy, and improving detection efficiency and accuracy.
Patent Information
- Application Number
- CN202511135904.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-08-14
AI Technical Summary
The existing encoder installation zero adjustment detection efficiency is low, the single zero adjustment accuracy cannot be guaranteed, the encoder feedback data cannot be observed in real time, there is a risk of incorrect line connection, which affects the detection work.
An encoder detection device with display is designed. It combines the host computer and the single-chip microcomputer to display the encoder data in real time through the display screen. The power protection module is used to protect the encoder. The inertia and slot torque errors are reduced during the motor zeroing process, and data analysis and verification are realized.
It improves the efficiency of encoder detection, reduces the risk of encoder damage, improves zero adjustment accuracy and system safety, and reduces cost losses.
Smart Images

Figure CN120800459A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of encoder detection, and particularly relates to an encoder detection device with display and a detection method. BACKGROUND
[0002] With the development of control technology, motor manufacturing technology and emerging materials, the development of servo control technology is also more and more rapid. A servo control system is composed of a servo motor, a position sensor and a drive controller. The drive controller realizes speed and position control of the motor through information feedback of the sensor. Information feedback of an encoder is a key part of the servo control system. The servo control system is developing in the direction of performance, integration and digitization, and thus requires an encoder with high precision, fast transmission and strong convenience.
[0003] At present, installation and zero adjustment detection of the encoder is generally performed by manual adjustment. A specified voltage is output by an external power supply, the rotor is locked at a specified position for zero adjustment calibration, and then the encoder is installed on the motor. This installation and detection method has low efficiency, cannot guarantee single zero adjustment precision, cannot observe encoder feedback data in real time, has the risk of line connection error, and brings adverse effects to the detection work of the encoder. SUMMARY
[0004] In view of the problems in the prior art, the present application provides an encoder detection device with display and a detection method. The encoder controller is combined with an upper computer. When the encoder is detected, the data of the encoder can be analyzed and processed, real-time updating of the displayed data is realized, the operator can intuitively read the data, and the work efficiency is improved.
[0005] To solve the above technical problems, the technical scheme adopted by the present application is as follows:
[0006] The application provides a display-equipped encoder detection device, characterized by comprising an upper computer, a single-chip microcomputer and a power supply, the upper computer is connected with an operable display screen, the upper computer, the single-chip microcomputer and the encoder are powered by the power supply, the upper computer is provided with a parameter setting module and an upper computer communication module, the single-chip microcomputer is provided with a first communication module, a second communication module, a data processing module and a CRC check module, the first communication module is in communication connection with the encoder, the second communication module is in communication connection with the upper computer communication module, the power supply is provided with a power protection module, the power protection module comprises a voltage stabilizing power module, a relay, a current sampling resistor and a comparator switch circuit, the relay comprises a single-pole double-throw switch and a coil, the output end of the voltage stabilizing power module is connected with the input contact of the single-pole double-throw switch, the first output contact of the single-pole double-throw switch is connected with the input end of the encoder, the second output contact of the single-pole double-throw switch is connected with one end of the current sampling resistor, the output end of the encoder is connected with the other end of the current sampling resistor, and the comparator switch circuit comprises a comparator, an optocoupler and a triode which are sequentially connected, the other end of the current sampling resistor is connected with the noninverting input end of the comparator, the inverting input end of the comparator is connected with an overcurrent point setting resistor, and the collector of the triode is connected with the coil of the relay.
[0007] Further, a light-emitting diode is arranged between the second output contact of the relay and the current sampling resistor.
[0008] Further, the first communication module and the encoder are connected through SPI communication.
[0009] Further, the display-equipped encoder detection device according to claim 1 is characterized in that the second communication module and the upper computer communication module are connected through RS485 communication.
[0010] The detection method of the display-equipped encoder detection device comprises encoder data reading, encoder positive and negative reverse connection protection and encoder zero setting.
[0011] The encoder data reading comprises the following steps.
[0012] Step S11) According to different encoder reading bit numbers, the detection parameters of the encoder are set on the display screen.
[0013] Step S12) The single-chip microcomputer sends a read-write instruction to the encoder.
[0014] Step S13) After the encoder receives the correct read-write instruction, the collected data are stored through DMA reception interruption and memory data transmission.
[0015] Step S14) The encoder feeds back the collected data to the single-chip microcomputer, and the single-chip microcomputer analyzes the data.
[0016] Step S15) The single-chip microcomputer carries out CRC check on the parsed data, and if the check is passed, the single-chip microcomputer sends the data to the upper computer;
[0017] Step S16) The display screen displays the feedback data of the encoder in real time, and the feedback data and the set detection parameters are displayed correspondingly;
[0018] The positive and negative reverse connection protection of the encoder comprises the following steps:
[0019] Step S21) The input end of the power supply of the encoder supports 9-36V voltage input, and a voltage conversion output of 5V voltage is carried out by a voltage stabilizing power supply module;
[0020] Step S22) The current sampling resistor converts the current signal into a voltage signal, and the current of the encoder is collected;
[0021] Step S23) The resistance value of the setting resistor is adjusted to set the overcurrent value;
[0022] Step S24) When the current of the encoder exceeds the overcurrent value, the comparator outputs a high level, so that the optocoupler and the triode are turned on, the relay coil flows through the action voltage, and the relay cuts off the loop flowing to the power supply of the encoder, and the power supply of the encoder is stopped;
[0023] The zero adjustment of the encoder comprises the following steps:
[0024] Step S31) Direct current is passed through the UV two phases of the motor of the encoder, U+, V-, and the given current is the rated current of the motor;
[0025] Step S32) The rotor of the motor of the encoder is deflected, and the encoder reading at this time is recorded as the initial zero point A0;
[0026] Step S33) According to the zero point, 3 positions of clockwise rotation and counterclockwise rotation of the rotor are taken respectively, and the angles are 30°, 60° and 90° of electric angle respectively;
[0027] Step S34) Direct current of the rated current size is passed through the UV two phases at each position, the rotor is deflected, and the encoder reading at this time is recorded as A1-A6;
[0028] Step S35) The average value of A1-A6 is obtained
[0029] Step S36) The rotor is turned to the position, and the encoder reading is zeroed in the upper computer, and the zero adjustment is successful.
[0030] Compared with the prior art, the present application has the following technical effects:
[0031] The application establishes man-machine interaction display module and encoder data processing module, when encoder detection is carried out, operation can be carried out on the display screen, the data of the encoder can be analyzed and checked by the single-chip microcomputer, and the encoder feedback data is displayed in real time according to the analyzed data, the real-time update of the display data is realized, the intuitive reading of the data by the operator is facilitated, and the work efficiency is improved;
[0032] The application designs a power protection module, which protects the encoder by cooperation of a sampling resistor, a relay, an optocoupler, a triode and a comparator;
[0033] During normal operation, the single-pole double-throw relay always transmits 5V voltage to the encoder, so that the encoder normally operates; when the power supply of the encoder is connected reversely, the relay cuts off the output 5V voltage, effectively reduces the risk of damage of the encoder, improves the system safety and reliability, and reduces the cost loss;
[0034] During the zero adjustment of the motor, direct current is passed to the motor UV two phases to make the rotor obtain a larger electromagnetic torque, the influence of the friction of the rotating shaft on the zero adjustment is reduced, different angle positions are selected to take an average value, the error caused by inertia and tooth slot torque during the zero adjustment is reduced, the precision of the zero adjustment of the motor is improved, and the accuracy of the position deviation of the encoder is improved. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 It is the system structure block diagram of the application;
[0036] Figure 2 It is the circuit diagram of the power protection module of the application;
[0037] Figure 3 It is the encoder data reading flow chart of the application;
[0038] Figure 4 It is the positive and negative reverse connection protection circuit design drawing of the application.
[0039] The marks of parts in the drawings are as follows:
[0040] 1 host computer, 2 single-chip microcomputer, 3 power supply, 4 encoder,
[0041] U1 voltage stabilizing power module, U2 comparator, K relay,
[0042] R2 current sampling resistor, OC optocoupler, Q triode,
[0043] D1 rectifier diode, D2 light emitting diode. DETAILED DESCRIPTION
[0044] Clearly, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present application.
[0045] The present embodiment discloses an encoder detection device with display, as shown in the figure, comprising host computer 1, single-chip microcomputer 2 and power supply 3, host computer 1 is connected with display screen, host computer 1, single-chip microcomputer 2 and encoder 4 are powered by power supply 3. Figure 1
[0046] Host computer 1 is provided with parameter setting module and host computer 1 communication module, single-chip microcomputer 2 is provided with first communication module, second communication module, data processing module and CRC check module, first communication module and encoder 4 are connected through SPI communication, second communication module and host computer 1 communication module are connected through RS485 communication.
[0047] Power supply 3 is provided with power protection module, as shown in the figure, power protection module comprises voltage stabilizing power module U1, relay K, current sampling resistor R2 and comparator switch circuit, voltage stabilizing power module U1 adopts URB2405S-6WR3 linear stabilizer, relay K adopts jzc-36f-005 series, relay K comprises single-pole double-throw switch and coil, output terminal of voltage stabilizing power module U1 and input contact 2 of single-pole double-throw switch are connected, first output contact 4 of single-pole double-throw switch and input terminal of encoder 4 are connected, second output contact 3 of single-pole double-throw switch and one end of current sampling resistor R2 are connected, output terminal of encoder 4 and the other end of current sampling resistor R2 are connected. Figure 2
[0048] As shown in the figure, comparator switch circuit comprises comparator U2, optocoupler OC and triode Q connected in sequence, comparator U2 adopts LM2903AVQDRQ1, optocoupler OC adopts ACPL-M49T, triode Q adopts D1816 high-voltage high-power triode. Figure 2 The other end of current sampling resistor R2 and positive input terminal of comparator U2 are connected, overcurrent point setting resistor R3, R4, R6 are connected to inverse input terminal of comparator U2, collector of triode Q and coil of relay K are connected, rectifier diode D1 is arranged between collector of triode Q and coil of relay K, model ES2D-E3 / 52T paster rectifier diode.
[0049]
[0050] The second output contact 3 of the single-pole double-throw switch and the current sampling resistor R2 are provided with a light-emitting diode D2. When the current passing through the current sampling resistor R2 is too large and exceeds the set overcurrent value, the comparator U2 outputs a high level to make the optocoupler OC and the transistor Q conduct, the coil of the relay K flows through the action voltage, the circuit supplying power to the encoder 4 is cut off, the encoder 4 stops supplying power, and the relay K is switched to the No. 3 contact to make a voltage appear across the light-emitting diode D2, and the fault green light is lit.
[0051] The embodiment discloses a detection method of an encoder detection device with display, which comprises encoder data reading, encoder positive and negative reverse connection protection, and encoder zero setting.
[0052] As shown in the figure, Figure 3 The encoder data reading comprises the following steps:
[0053] Step S11) setting detection parameters of the encoder 4 on the display screen. In actual use, the parameters are set according to different reading bit numbers of the encoder 4;
[0054] Step S12) sending a read-write instruction to the encoder 4 by the single-chip microcomputer 2;
[0055] Step S13) after the encoder 4 receives the correct read-write instruction, storing the collected data through DMA reception interruption and memory data transmission;
[0056] Step S14) feeding back the collected data to the single-chip microcomputer 2 by the encoder 4, and analyzing the data by the single-chip microcomputer 2;
[0057] Step S15) performing CRC check on the analyzed data by the single-chip microcomputer 2, and sending the data to the upper computer 1 by the single-chip microcomputer 2 if the check is passed;
[0058] Step S16) displaying the feedback data of the encoder 4 on the display screen in real time, and displaying the feedback data and the set detection parameters correspondingly;
[0059] The display screen displays the feedback data of the encoder 4 in real time according to the set parameter values, including single-turn number, multi-turn number and CRC check alarm display.
[0060] As shown in the figure, Figure 4 The encoder positive and negative reverse connection protection comprises the following steps:
[0061] Step S21) supporting 9-36V wide-range voltage input at the input end of the power supply of the encoder 4, and outputting 5V voltage through voltage conversion by the voltage stabilizing power supply module U1;
[0062] Step S22) converting the current signal into a voltage signal by the current sampling resistor R2, and collecting the current of the encoder 4;
[0063] Step S23) Set the overcurrent value of the encoder 4 by adjusting the resistance value of the resistor to set the overcurrent value of the encoder 4;
[0064] Step S24) When the current of the encoder 4 exceeds the overcurrent value, the comparator U2 outputs a high level, the optocoupler OC and the transistor Q are turned on, the relay K coil flows through the operating voltage, the relay K cuts off the circuit supplying power to the encoder 4, the power supply of the encoder 4 is stopped, and the relay K switches to another contact to make a voltage appear across the light-emitting diode D2, and the fault light is lit.
[0065] The zero setting of the encoder includes the following steps:
[0066] Step S31) Direct current is applied to the UV two phases of the motor of the encoder 4, U+, V-, and the given current is the rated current of the motor;
[0067] Step S32) The rotor of the motor of the encoder 4 is deflected, and the reading of the encoder 4 at this time is recorded as the initial zero point A0;
[0068] Step S33) According to this zero point, 3 positions are taken in the clockwise and counterclockwise rotation of the rotor respectively, and the angles are 30°, 60°, and 90° respectively;
[0069] Step S34) Direct current of the rated current size is applied to the UV two phases at each position, the rotor is deflected, and the reading of the encoder 4 at this time is recorded as A1-A6;
[0070] Step S35) The average value of A1-A6 is obtained
[0071] Step S36) The rotor is turned to the position, and the reading of the encoder 4 is zeroed in the upper computer 1, and the zero setting is successful.
[0072] The above is only an embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or direct or indirect application in other related technical fields based on the content of the specification and drawings of the present application is also included in the patent protection scope of the present application.
Claims
1. An encoder detection device with display, characterized in that: The system comprises a host computer, a single-chip microcomputer and a power supply, wherein the host computer is connected to an operable display screen, the host computer, the single-chip microcomputer and the encoder are all powered by the power supply, the host computer is provided with a parameter setting module and a host computer communication module, the single-chip microcomputer is provided with a first communication module, a second communication module, a data processing module and a CRC check module, the first communication module is connected to the encoder for communication, the second communication module is connected to the host computer communication module for communication, the power supply is provided with a power protection module, the power protection module comprises a voltage-stabilized power supply module, a relay, a current sampling resistor and a comparator switch circuit, the relay comprises A single-pole double-throw switch and a coil, the output end of the voltage-stabilized power supply module is connected to the input contact of the single-pole double-throw switch, the first output contact of the single-pole double-throw switch is connected to the input end of the encoder, the second output contact of the single-pole double-throw switch is connected to one end of the current sampling resistor, the output end of the encoder is connected to the other end of the current sampling resistor, the comparator switching circuit includes a comparator, an optocoupler and a transistor connected in sequence, the other end of the current sampling resistor is connected to the non-inverting input end of the comparator, the inverting input end of the comparator is connected to the overcurrent point setting resistor, and the collector of the transistor is connected to the coil of the relay.
2. The encoder detection device with display according to claim 1, characterized in that: A light emitting diode is provided between the second output contact of the single-pole double-throw switch and the current sampling resistor.
3. The encoder detection device with display according to claim 1, characterized in that: The first communication module and the encoder are connected via SPI communication.
4. The encoder detection device with display according to claim 1, characterized in that: The second communication module is connected to the host computer communication module via RS485 communication.
5. A detection method using the encoder detection device with display according to claim 1, characterized in that: Including encoder data reading, encoder positive and negative reverse protection and encoder zero adjustment; The encoder data reading includes the following steps: Step S11) setting various detection parameters of the encoder on the display screen according to the number of bits read by the different encoders; Step S12) the single chip microcomputer sends the read and write instructions to the encoder; Step S13) After receiving the correct read and write instructions, the encoder transmits the collected data to the memory via DMA receive interrupt; Step S14) The encoder feeds back the collected data to the single chip microcomputer, which analyzes the data; Step S15) The MCU performs a CRC check on the parsed data. If the check passes, the MCU sends the data to the host computer; Step S16) The display screen displays the encoder feedback data in real time, and the feedback data and the set detection parameters are displayed correspondingly; The encoder reverse polarity protection includes the following steps: Step S21) The input end of the encoder power supply supports 9-36V voltage input, and the voltage-stabilized power supply module performs voltage conversion to output 5V voltage; Step S22) The current sampling resistor converts the current signal into a voltage signal and collects the encoder current; Step S23) setting the overcurrent value by adjusting the resistance of the overcurrent point setting resistor; Step S24) When the encoder current exceeds the overcurrent value, the comparator outputs a high level, turning on the optocoupler and transistor, causing the relay coil to flow through the operating voltage, causing the relay to cut off the circuit supplying power to the encoder, and the encoder stops supplying power; Encoder zeroing includes the following steps: Step S31) Direct current is applied to the U and V phases of the encoder motor, U+ and V-, with the given current being the rated current of the motor; Step S32) The encoder motor rotor deflects, and the encoder reading at this time is recorded as the initial zero point A0; Step S33) Based on this zero point, three positions are taken in the clockwise and counterclockwise directions of the rotor, with angles of 30°, 60°, and 90° in electrical angle respectively; Step S34) Direct current of rated current is supplied to the UV phases at each position, causing the rotor to deflect. The encoder readings at this time are recorded as A1-A6; Step S35) Take the average value of A1-A6 to get Step S36) Rotate the rotor to Position, reset the encoder reading to zero on the host computer, and the zero adjustment is successful.
Citation Information
Patent Citations
Motor absolute position detection device and method based on single-core two-way technology
CN103759747A
Motor safety control system and control method
CN113193811A
Many rings of conversion module and encoder
CN206479188U
Take encoder of display control
CN207675780U
Detection system for measuring output signals of encoder
CN214583362U