Encoding device and counting method
Patent Information
- Application Number
- PCT/CN2025/077789
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2026-08-27
Smart Images

Figure CN2025077789_27082026_PF_FP_ABST
Abstract
Description
Encoding device and counting method Technical Field
[0001] This disclosure relates to an encoding device, and more particularly to an encoding device and a counting method. Background Technology
[0002] AC servo motors typically have encoders to count the number of motor rotations. In existing technology, when the system power supply (or mains power) to which the motor is connected fails or is interrupted, the internal encoder stops operating. Then, when the system power is restored, the encoder must restart counting the number of motor rotations.
[0003] Furthermore, using mechanical gear-type absolute encoders requires a larger gear structure space, making it impossible to achieve a thinner design, and also presents issues with wear and reliability. Due to size and space considerations for both the motor and the encoder, most multi-turn absolute encoders currently used with AC servo motors employ external batteries. However, using external batteries presents challenges in terms of installation space and battery life.
[0004] Therefore, how to provide an encoder that can accurately count revolutions without requiring power is one of the urgent problems to be solved. Summary of the Invention
[0005] The main objective of this disclosure is to provide an encoding device that can accurately count the number of revolutions without requiring a power supply, and does not need to recount when the power supply is restored.
[0006] The present invention discloses an encoding device corresponding to a magnetic element, comprising: a first sensing unit that generates a pulse signal in response to a change in the magnetic field of the magnetic element; a second sensing unit electrically connected to the first sensing unit that receives the pulse signal and generates a trigger signal in response to a change in the magnetic field of the magnetic element; a processing unit electrically connected to the first and second sensing units that generates a complex number of transient signals based on changes in the voltage polarity of the pulse signal and changes in the level of the trigger signal, and counts a number of rotations of the magnetic element based on the transient signals; and a storage unit electrically connected to the processing unit that stores the number of rotations.
[0007] In some embodiments, when the magnetic element rotates along a first direction, the pulse signal of the first sensing unit generates a voltage polarity change in response to the change in the magnetic field of the magnetic element, and the trigger signal of the second sensing unit generates a level change in response to the change in the magnetic field of the magnetic element. The processing unit generates transient signals based on the voltage polarity change of the pulse signal and the level change of the trigger signal, and counts the number of rotations of the magnetic element based on the transient signals as an increase.
[0008] In some embodiments, when the magnetic element rotates from a first polarity to a second polarity along the first direction, the first sensing unit generates the pulse signal having a first voltage polarity, the second sensing unit generates the trigger signal having a first level, and the processing unit generates a first transient signal based on the pulse signal with the first voltage polarity and the trigger signal with the first level.
[0009] In some embodiments, when the magnetic element rotates from the second polarity to the first polarity along the first direction, the first sensing unit generates a pulse signal having a second voltage polarity, the second sensing unit generates a trigger signal having a second level, and the processing unit generates a second transient signal based on the pulse signal and the trigger signal. The processing unit counts the number of rotations of the magnetic element as increasing based on the first transient signal with the second voltage polarity and the second transient signal with the second level.
[0010] In some embodiments, when the magnetic element rotates in a second direction opposite to the first direction, the pulse signal of the first sensing unit generates a voltage polarity change in response to the change in the magnetic field of the magnetic element, and the trigger signal of the second sensing unit generates a level change in response to the change in the magnetic field of the magnetic element. The processing unit generates transient signals based on the voltage polarity change of the pulse signal and the level change of the trigger signal, and counts the number of rotations of the magnetic element as decreasing based on the transient signals.
[0011] In some embodiments, when the magnetic element rotates from a first polarity to a second polarity along the second direction, the first sensing unit generates the pulse signal having a first voltage polarity, the second sensing unit generates the trigger signal having a second level, and the processing unit generates a third transient signal based on the pulse signal with the first voltage polarity and the trigger signal with the second level.
[0012] In some embodiments, when the magnetic element rotates from the second polarity to the first polarity along the second direction, the first sensing unit generates a pulse signal with a second voltage polarity, the second sensing unit generates a trigger signal with a first level, and the processing unit generates a fourth transient signal based on the pulse signal with the second voltage polarity and the trigger signal with the first level. The processing unit counts the number of rotations of the magnetic element as decreasing based on the third transient signal and the fourth transient signal.
[0013] In some embodiments, the first sensing unit includes a Wiegand sensor, and the second sensing unit includes a magnetoresistive sensor.
[0014] Another encoding device disclosed herein is configured corresponding to a magnetic element and includes: a substrate; a first sensing unit disposed on one side of the substrate; a second sensing unit disposed on the other side of the substrate opposite to the first sensing unit, facing the magnetic element, and electrically connected to the first sensing unit; a processing unit disposed on the substrate and electrically connected to the first sensing unit and the second sensing unit; and a storage unit disposed on the substrate and electrically connected to the processing unit. When the magnetic element rotates along a first direction, the first sensing unit generates a pulse signal in response to the change in the magnetic field of the magnetic element, the second sensing unit generates a trigger signal in response to the change in the magnetic field of the magnetic element, the processing unit generates a complex number of transient signals based on the voltage polarity change of the pulse signal and the level change of the trigger signal, and counts the number of rotations of the magnetic element based on these transient signals.
[0015] In some embodiments, when the magnetic element rotates from a first polarity to a second polarity along the first direction, the first sensing unit generates the pulse signal having a first voltage polarity, the second sensing unit generates the trigger signal having a first level, and the processing unit generates a first transient signal based on the pulse signal with the first voltage polarity and the trigger signal of the first level.
[0016] In some embodiments, when the magnetic element rotates from the second polarity to the first polarity along the first direction, the first sensing unit generates a pulse signal with a second voltage polarity, the second sensing unit generates a trigger signal with a second level, and the processing unit generates a second transient signal based on the pulse signal with the second voltage polarity and the trigger signal with the second level. The processing unit then increments the count of rotations of the magnetic element based on the first transient signal and the second transient signal.
[0017] In some embodiments, when the magnetic element rotates from the first polarity to the second polarity along a second direction opposite to the first direction, the first sensing unit generates the pulse signal having a first voltage polarity, the second sensing unit generates the trigger signal having a second level, and the processing unit generates a third transient signal based on the pulse signal with the first voltage polarity and the trigger signal with the second level.
[0018] In some embodiments, when the magnetic element rotates from the second polarity to the first polarity along the second direction, the first sensing unit generates a pulse signal with a second voltage polarity, the second sensing unit generates a trigger signal with a first level, and the processing unit generates a fourth transient signal based on the pulse signal with the second voltage polarity and the trigger signal with the first level. The processing unit counts the number of rotations of the magnetic element as decreasing based on the third transient signal and the fourth transient signal.
[0019] In some embodiments, after receiving the pulse signal, the second sensing unit generates the trigger signal in response to the change in the magnetic field of the magnetic element.
[0020] The present invention discloses a counting method in conjunction with an encoding device and a magnetic element. The counting method includes: generating a pulse signal through the encoding device in response to a change in the magnetic field of the magnetic element; generating a trigger signal through the encoding device in response to a change in the magnetic field of the magnetic element; generating a complex number of transient signals based on a change in the voltage polarity of the pulse signal and a change in the level of the trigger signal; counting a number of rotations of the magnetic element based on the transient signals; and storing the number of rotations.
[0021] In some embodiments, generating the transient signals based on the voltage polarity change of the pulse signal and the level change of the trigger signal includes: generating a first transient signal and a second transient signal based on the voltage polarity change of the pulse signal and the level change of the trigger signal when the magnetic element rotates along a first direction; and counting the number of rotations of the magnetic element as increasing based on the first transient signal and the second transient signal.
[0022] In some embodiments, generating the pulse signal by the encoding device in response to the change in the magnetic field of the magnetic element includes: when the magnetic element rotates along the first direction, the pulse signal changes from a first voltage polarity to a second voltage polarity; generating the trigger signal by the encoding device in response to the change in the magnetic field of the magnetic element includes: when the magnetic element rotates along the first direction, the trigger signal changes from a first level to a second level.
[0023] In some embodiments, generating the transient signals based on the voltage polarity change of the pulse signal and the level change of the trigger signal further includes: generating a third transient signal and a fourth transient signal based on the voltage polarity change of the pulse signal and the level change of the trigger signal when the magnetic element rotates in a second direction opposite to the first direction; and counting the number of rotations of the magnetic element as decreasing based on the third transient signal and the fourth transient signal.
[0024] In some embodiments, generating the pulse signal by the encoding device in response to the change in the magnetic field of the magnetic element includes: when the magnetic element rotates along the second direction, the pulse signal changes from a first voltage polarity to a second voltage polarity; generating the trigger signal by the encoding device in response to the change in the magnetic field of the magnetic element includes: when the magnetic element rotates along the second direction, the trigger signal changes from a second level to a first level.
[0025] In some embodiments, generating the trigger signal by the encoding device based on the magnetic field change corresponding to the magnetic element includes: after receiving the pulse signal, the encoding device generates the trigger signal based on the magnetic field change corresponding to the magnetic element.
[0026] In summary, the encoding device and counting method of this disclosure utilize two different sensing units to generate signals in response to changes in the magnetic field of the magnetic element. One sensing unit (e.g., including a Wiegand sensor) generates a pulse signal in response to changes in the magnetic field of the magnetic element. The other sensing unit (e.g., including a magnetoresistive sensor) receives the pulse signal, energizes it, and generates a trigger signal in response to changes in the magnetic field of the magnetic element. Therefore, based on the voltage polarity of the pulse signal and the level of the trigger signal, the rotation direction and number of rotations of the magnetic element can be determined, and the number of rotations of the magnetic element can be counted. Thus, the encoding device and counting method of this disclosure can accurately count the number of rotations of the magnetic element in response to changes in the magnetic field of the magnetic element even without an external power supply. Furthermore, when the encoding device of this disclosure resumes normal power supply, only the level of the trigger signal needs to be checked to confirm whether the counted rotations are correct, without needing to reset or recount. Attached Figure Description
[0027] Figure 1 is a block diagram of an embodiment of the encoding device of this disclosure.
[0028] Figure 2 is a schematic diagram of the pulse signal and trigger signal when the encoding device of this embodiment rotates along the first direction.
[0029] Figure 3 is a schematic diagram of the pulse signal and trigger signal when the encoding device of this embodiment rotates in the second direction.
[0030] Figure 4 is a block diagram of a variation of the encoding device of this disclosure.
[0031] Figure 5 is a schematic diagram of an embodiment of the encoding device of this disclosure.
[0032] Figure 6 is a schematic diagram of a variation of the second sensing unit of the encoding device of this disclosure.
[0033] Figure 7A is a schematic diagram of the trigger signal when the encoding device of this embodiment rotates along the first direction.
[0034] Figure 7B is a schematic diagram of the trigger signal when the encoding device of this embodiment rotates in the second direction.
[0035] Figure 8 is a top view of a variation of the encoding device of this disclosure.
[0036] Figure 9 is a flowchart of a counting method of this disclosure.
[0037] Explanation of reference numerals in the attached drawings: 1, 1A, 2, 2A, 2B: Encoding device; 11, 21, 21A, 21B: First sensing unit; 12, 22: Second sensing unit; 13, 23: Processing unit; 131, 231: Counting logic integration element; 132: Rectifying element; 133: Voltage regulating element; 134, 234: Energy storage and voltage stabilizing element; 135: Comparison element; 136: Connection interface; 14, 24: Storage unit; 221, 222: TMR element; 25, 25A: Substrate; 237: Processor; 8: Rotor; 9: Magnetic element; D1: First direction; D2: Second direction; N: Second polarity; P, P1, P2: Pulse signal; R: Number of rotations; S: First polarity; S01~S04: Steps; T, T1, T2, T3, T4: Trigger signal. Detailed Implementation
[0038] As used herein, terms such as "first," "second," "third," and "fourth" describe various elements, components, regions, layers, and / or parts, which should not be limited by these terms. These terms are used only to distinguish one element, component, region, layer, or part from another. Unless the context clearly indicates otherwise, the use of terms such as "first," "second," "third," and "fourth" herein does not imply order or sequence.
[0039] Figure 1 is a block diagram of an embodiment of the encoding device of this disclosure. The encoding device 1 of this disclosure is configured to correspond with a magnetic element 9. The magnetic element 9 is, for example, a magnet, which can be coupled to the rotor of a motor to have the same rotation angle as the rotor of the motor. Of course, the magnetic element 9 can also be mounted on other objects that need to count the number of rotations. The magnetic element 9 is, for example, half north pole (N pole) and half south pole (S pole). As shown in Figure 2, the encoding device 1 of this disclosure includes a first sensing unit 11, a second sensing unit 12, a processing unit 13, and a storage unit 14.
[0040] The first sensing unit 11 generates a pulse signal P in response to changes in the magnetic field of the magnetic element 9. In some embodiments, the first sensing unit 11 may include, for example, a Wiegand sensor, but this is not limiting. The first sensing unit 11 generates pulse signals P of different voltage polarities in response to changes in the magnetic field. The pulse signal P is, for example, an instantaneous voltage pulse signal.
[0041] The second sensing unit 12 is electrically connected to the first sensing unit 11. The second sensing unit 12 can receive a pulse signal P and generate a trigger signal T in response to changes in the magnetic field of the magnetic element 9. The second sensing unit 12 may include, for example, a magnetoresistive sensor, such as anisotropic magnetoresistive (AMR) sensors, giant magnetoresistive (GMR) sensors, tunnel magnetoresistive (TMR) sensors, etc., but this is not a limitation. Furthermore, the second sensing unit 12 may use a full-bridge circuit architecture, which is not intended to limit the invention. Specifically, the second sensing unit 12 with a full-bridge circuit architecture can determine the rotation direction of the magnetic element 9 by the polarity of a single signal based on the resistance changes of the four magnetoresistive elements. Additionally, the second sensing unit 12 can be energized by receiving the pulse signal P and generate trigger signals T of different levels in response to changes in the magnetic field. Of course, the second sensing unit 12 can also be powered by receiving an external power source, so that different levels of trigger signals T will be generated in response to changes in the magnetic field.
[0042] The processing unit 13 is electrically connected to the first sensing unit 11 and the second sensing unit 12. In some embodiments, the processing unit 13 may include, for example, a counting logic integration element to count the number of rotations R of the magnetic element 9 based on the pulse signal P and the trigger signal T.
[0043] Storage unit 14 is electrically connected to processing unit 13 and stores the number of rotations R. Storage unit 14 may include, for example, electrically erasable programmable read-only memory (EEPROM), flash memory, ferroelectric random access memory (FRAM), static random access memory (SRAM), dynamic random access memory (DRAM), temporary registers, etc., but is not limited thereto.
[0044] Figure 2 is a schematic diagram of the pulse signals and trigger signals when the encoding device of this embodiment rotates along the first direction. As shown in Figures 1 and 2, when the magnetic element 9 rotates along the first direction D1, the first sensing unit 11 generates pulse signals P1 and P2 with changing voltage polarity in response to the change in the magnetic field of the magnetic element 9. After receiving the pulse signals P1 and P2 and being energized, the second sensing unit 12 generates trigger signals T1 and T2 with changing voltage levels in response to the change in the magnetic field of the magnetic element 9. It is worth mentioning that the first direction D1 is defined, for example, as the direction in which the number of rotations of the magnetic element 9 increases. In some embodiments, the first direction D1 is, for example, clockwise, but this is not limiting.
[0045] Specifically, when the magnetic element 9 rotates along the first direction D1 from the first polarity S (here, the S pole is taken as an example, but it is not limiting) to the second polarity N (here, the N pole is taken as an example, but it is not limiting), upon rotating 90 degrees, the first sensing unit 11 generates a pulse signal P1 with a first voltage polarity. After receiving the pulse signal P1 and being energized, the second sensing unit 12 generates a trigger signal T1 with a first level. In other words, when the magnetic element 9 rotates clockwise from the S pole to the N pole, upon rotating 90 degrees, the first sensing unit 11 will, for example, generate a voltage from its negative terminal. Therefore, the pulse signal P1 with the first voltage polarity is, for example, a pulse signal with negative polarity (negative direction), which can be digitally represented as (0 (positive terminal), 1 (negative terminal)). On the other hand, the second sensing unit 12 will correspondingly generate a trigger signal T1 with a high voltage level (first level), which can be digitally represented as (1). Therefore, the processing unit 13 can generate a first transient signal (the position is indicated by the dashed box on the left in Figure 2) based on the pulse signal P1 and the trigger signal T1. For example, the processing unit 13 can generate a first transient signal of (0,0) based on (trigger signal T1, pulse signal P1), that is, (1,0,1).
[0046] Furthermore, when the magnetic element 9 rotates from the second polarity N back to the first polarity S along the first direction D1, after rotating 270 degrees, the first sensing unit 11 generates a pulse signal P2 with a second voltage polarity. After receiving the pulse signal P2 and being energized, the second sensing unit 12 generates a trigger signal T2 with a second level. In other words, when the magnetic element 9 rotates clockwise from the N pole back to the S pole, after rotating 270 degrees, the first sensing unit 11 will generate a voltage from its positive terminal, for example. Therefore, the pulse signal P1 with the first voltage polarity is, for example, a positive polarity (positive direction) pulse signal P2, which can be digitally represented as (1 (positive terminal), 0 (negative terminal)). On the other hand, the second sensing unit 12 will correspondingly generate a trigger signal T2 with a low voltage level (second level), which can be digitally represented as (0). Therefore, the processing unit 13 can generate a second transient signal (the position is indicated by the dashed box on the right side of Figure 2) based on the pulse signal P2 and the trigger signal T2. For example, the processing unit 13 can generate a second transient signal of (0,1) based on (trigger signal T2, pulse signal P2), that is, (0,1,0).
[0047] In this way, the processing unit 13 can count the number of rotations of the magnetic element 9 as increasing based on the first transient signal and the second transient signal. That is, when the first transient signal (0,0) changes to the second transient signal (0,1), the processing unit 13 will count the number of rotations of the magnetic element 9 as increasing by one revolution.
[0048] As described above, when the magnetic element 9 continues to rotate along the first direction D1, the processing unit 13 will continuously detect the sequence of the first transient signal (0,0) changing into the second transient signal (0,1), and then repeat the above process of increasing the number of rotations.
[0049] Figure 3 is a schematic diagram of the pulse signals and trigger signals when the encoding device of this embodiment rotates along the second direction. As shown in Figures 1 and 3, on the other hand, when the magnetic element 9 rotates along the second direction D2, which is opposite to the first direction D1, the first sensing unit 11 generates pulse signals P1 and P2 with changing voltage polarity in response to the change in the magnetic field of the magnetic element 9. After receiving the pulse signals P1 and P2 and being energized, the second sensing unit 12 generates trigger signals T2 and T1 with changing voltage levels in response to the change in the magnetic field of the magnetic element 9. It is worth mentioning that the second direction D2 is defined, for example, as the direction in which the number of rotations of the magnetic element 9 decreases. In some embodiments, the second direction D2 is, for example, a counterclockwise direction, but this is not limiting.
[0050] When the magnetic element 9 rotates from the first polarity S to the second polarity N along the second direction D2, after rotating 270 degrees, the first sensing unit 11 generates a pulse signal P1 with a first voltage polarity. After receiving the pulse signal P1 and being energized, the second sensing unit 12 generates a trigger signal T2 with a second level. In other words, when the magnetic element 9 rotates counterclockwise from the S pole to the N pole, after rotating 270 degrees, the first sensing unit 11 will also generate a voltage from the negative terminal, for example. Therefore, the pulse signal P1 with the first voltage polarity is, for example, a negative polarity (negative direction) pulse signal P1, which can be digitally represented as (0,1). On the other hand, the second sensing unit 12 will correspondingly generate a trigger signal T2 with a low voltage level (second level), which can be digitally represented as (0). Therefore, the processing unit 13 can generate a third transient signal (the position is indicated by the dashed box on the left side of Figure 3) based on the pulse signal P1 and the trigger signal T2. For example, the processing unit 13 can generate a third transient signal (1,0) based on (trigger signal T2, pulse signal P1), that is, (0,0,1).
[0051] Furthermore, when the magnetic element 9 rotates from the second polarity N to the first polarity S along the second direction D2, at a rotation of 90 degrees, the first sensing unit 11 generates a pulse signal P2 with a second voltage polarity. After receiving the pulse signal P2 and being energized, the second sensing unit 12 generates a trigger signal T1 with a first level. In other words, when the magnetic element 9 rotates back from the N pole to the S pole in a counterclockwise direction, at a rotation of 90 degrees, the first sensing unit 11 will generate a voltage from its positive terminal, for example. Therefore, the pulse signal P1 with the first voltage polarity is, for example, a positive polarity (positive direction) pulse signal P2, which can be digitally represented as (1,0). On the other hand, when the magnetic element 9 rotates back from the N pole to the S pole in a counterclockwise direction at a phase of 270 degrees, the second sensing unit 12 will, for example, generate a trigger signal T1 with a high voltage level (first level), which can be digitally represented as (1). Therefore, the processing unit 13 can generate a fourth transient signal (the position is indicated by the dashed box on the right side of Figure 3) based on the pulse signal P2 and the trigger signal T1. For example, the processing unit 13 can generate a fourth transient signal (1,1) based on (trigger signal T1, pulse signal P2), that is, (1,1,0).
[0052] Therefore, the processing unit 13 can count the number of rotations of the magnetic element 9 as decreasing based on the third transient signal and the fourth transient signal. That is, when the third transient signal (1,0) changes to the fourth transient signal (1,1), the processing unit 13 counts the number of rotations of the magnetic element 9 as decreasing by one rotation.
[0053] As described above, when the magnetic element 9 continues to rotate along the second direction D1, the processing unit 13 will continuously detect the sequence of the third transient signal (1,0) changing into the fourth transient signal (1,1), and then repeat the process of counting the number of rotations to decrease.
[0054] It should be noted that this embodiment uses the second sensing unit 12 with a full-bridge circuit architecture as an example for explanation. Therefore, the rotation direction and number of revolutions of the magnetic element 9 can be determined by the polarity of a single signal, but this is not a limitation. For example, the second sensing unit 12 can also determine the rotation direction and number of revolutions by the phase difference of the trigger signals output by the two TMR elements. Furthermore, when the encoding device 1 of this embodiment resumes normal power supply (from external power), it is only necessary to confirm whether it is in the state of trigger signal T1 or trigger signal T2 to confirm whether the increase or decrease in the counted rotation revolutions is correct, without resetting or recounting.
[0055] As described above, the encoding device 1 of this embodiment is equipped with two different sensing units 11 and 12 to generate signals in response to changes in the magnetic field of the magnetic element 9. For example, the first sensing unit 11 (e.g., including a Wiegand sensor) generates a pulse signal P in response to changes in the magnetic field of the magnetic element 9. The second sensing unit 12 (e.g., including a magnetoresistive sensor) can receive the pulse signal P to be energized and generate a trigger signal T in response to changes in the magnetic field of the magnetic element 9. Therefore, based on the voltage polarity of the pulse signal P and the level of the trigger signal T, the rotation direction and number of rotations of the magnetic element 9 can be determined, and the number of rotations of the magnetic element 9 can be counted. Thus, the encoding device 1 of this embodiment can still accurately count the number of rotations of the magnetic element 9 in response to changes in the magnetic field of the magnetic element 9 even without external power supply. Furthermore, when the encoding device 1 of this embodiment resumes normal power supply, it is only necessary to check the level of the trigger signal T to confirm whether the counted rotations are correct, without resetting or recounting.
[0056] Figure 4 is a block diagram of a variation of the encoding device of this disclosure. As shown in Figure 4, in some embodiments, the processing unit 13 of the encoding device 1A may include a counting logic integration element 131, a rectifier element 132, a voltage regulator element 133, an energy storage regulator element 134, a comparator element 135, and a connection interface 136. The counting logic integration element 131 can receive a pulse signal P and a trigger signal T, and perform the above-described logical judgment to count the number of rotations R, and output the counting result of the number of rotations R to the storage unit 14 for storage via the connection interface 136. On the other hand, when the processing unit 13 receives an external power supply E, the counting logic integration element 131 can output the number of rotations R stored in the storage unit 14. In addition, the rectifier element 132, the voltage regulator element 133, and the energy storage regulator element 134 can perform necessary processing on the pulse signal P and then output it to the second processing unit 12. The comparator element 135 can perform necessary processing on the trigger signal T and then output it to the counting logic integration element 131. It should be noted that the above components are not restrictive. Depending on the design approach, some components may be omitted, or other necessary components may be added.
[0057] As described above, the processing unit 13 of the encoding device 1A in this embodiment can improve the stability of signal processing by using different components.
[0058] Figure 5 is a schematic diagram of an embodiment of the encoding device of this disclosure. As shown in Figure 5, the encoding device 2 is correspondingly arranged with the magnetic element 9. The magnetic element 9 is exemplified by a rotor 8 coupled to a motor, but its shape is not limited. The encoding device 2 of this embodiment includes a substrate 25, a first sensing unit 21, a second sensing unit 22, a processing unit 23, and a storage unit 24. The substrate 25 is, for example, a circuit board, and its shape is not limited. The first sensing unit 21 is disposed on one side of the substrate 25. The second sensing unit 22 is disposed on the other side of the substrate 25 opposite to the first sensing unit 21, facing the magnetic element 9, and is electrically connected to the first sensing unit 21. The processing unit 23 is disposed on the substrate 25 and is electrically connected to the first sensing unit 21 and the second sensing unit 22. The storage unit 24 is disposed on the substrate 25 and is electrically connected to the processing unit 23.
[0059] It is worth mentioning that the second sensing unit 22 can be positioned directly opposite the magnetic element 9, or located between the two poles of the magnetic element 9 (e.g., at the center of a ring magnet). Furthermore, the first sensing unit 21 is located on the side of the substrate 25 facing away from the magnetic element 9, and it can be located between the two poles of the magnetic element 9, or slightly off-center. Specifically, the relative positions of the first sensing unit 21, the second sensing unit 22, and the magnetic element 9 must take into account the sensing intensity and accuracy. On the other hand, the positions of the processing unit 23 and the storage unit 24 can be arranged in different locations according to the design. It should be noted that in this embodiment, the processing unit 23 is exemplified by having a counting logic integration element 231, an energy storage voltage regulator element 234, and a processor 237, but this is not a limitation. The counting logic integration element 231 and the energy storage voltage regulator element 234 are located on one side of the substrate 25 (e.g., on the same side as the first sensing unit 21), while the processor 237 is located on the other side of the substrate 25 (e.g., on the same side as the second sensing unit 22).
[0060] The first sensing unit 21, the second sensing unit 22, the processing unit 23, and the storage unit 24 are similar to the first sensing unit 11, the second sensing unit 12, the processing unit 13, and the storage unit 14 described above, and will not be repeated here. Furthermore, the counting method of the encoding device 2 in this embodiment is the same as the counting method of the encoding device 1 described above, and will not be repeated here.
[0061] It should be noted that the second sensing unit 22 of the encoding device 2 can receive the pulse signal P from the first sensing unit 21 and then generate a trigger signal T, or it can receive the trigger signal T from an external power source, which is not a limitation.
[0062] Figure 6 is a schematic diagram of a variation of the second sensing unit of the encoding device of this disclosure. Figure 7A is a schematic diagram of the trigger signal when the encoding device of this embodiment rotates in a first direction. Figure 7B is a schematic diagram of the trigger signal when the encoding device of this embodiment rotates in a second direction.
[0063] As shown in Figure 6, the substrate 25A of the encoding device 2A can be irregularly shaped according to design or requirements. Furthermore, the second sensing unit 22A in this embodiment can, for example, include two TMR elements 221 and 222. The TMR elements 221 and 222 are arranged at a preset angle (e.g., 90 degrees) to determine the rotation direction and number of revolutions by the phase difference of the trigger signals output by the TMR elements 221 and 222 respectively. The processing unit can determine whether the phase difference between the trigger signal T3 of the TMR element 221 and the trigger signal T4 of the TMR element 222 is positive (leading) 90 degrees (e.g., Figure 7A) or negative (lagging) 90 degrees (e.g., Figure 7B), which respectively represent whether the magnetic element is rotating clockwise (forward) or counterclockwise (reverse).
[0064] As shown in Figures 6 and 7A, when the magnetic element is rotating clockwise (first direction D1), the phase difference of the trigger signal T3 of the TMR element 221 is 90 degrees ahead of the phase difference of the trigger signal T4 of the TMR element 222. The voltage levels of the trigger signals T3 and T4 from 0 degrees to 360 degrees are HHLL (1100) and LHHL (0110) respectively (L represents low voltage level, H represents high voltage level, and high voltage level is higher than low voltage level). When the trigger signal T3 is detected as H (1) and the trigger signal T4 is detected as L (0), it means that the magnetic element has rotated one revolution. At this time, the processing unit will increase the number of revolutions by one.
[0065] On the other hand, as shown in Figures 6 and 7B, when the magnetic element is rotating counterclockwise (second direction D2), the phase difference of the trigger signal T4 of the TMR element 222 is 90 degrees ahead of the phase difference of the trigger signal T3 of the TMR element 221. The voltages of the trigger signals T3 and T4 from 0° to 360° are LHHL (0110) and HHLL (1100), respectively. When the trigger signal T3 is detected as L (0) and the trigger signal T4 is detected as H (1), it means that the magnetic element has rotated one revolution. At this time, the processing unit will reduce the number of revolutions by one.
[0066] Therefore, the encoding device 2A can count whether the number of rotations of the magnetic element increases or decreases based on the voltage level changes of the trigger signals T3 and T4. It is worth mentioning that either or both of the trigger signals T3 and T4 can be used in conjunction with the aforementioned pulse signal, which will not be elaborated further here.
[0067] Figure 8 is a top view of a variation of the encoding device of this disclosure. As shown in Figure 8, in some embodiments, the encoding device 2B may also have two sets of first sensing units 21A, 21B, and correspondingly paired with two sets of second sensing units (not shown). The two sets of first sensing units 21A, 21B may, for example, be arranged side by side. In this way, the comparison of the number of rotations can be detected simultaneously using the two sets of first sensing units 21A, 21B and the two sets of second sensing units, thereby improving the accuracy of detection.
[0068] Figure 9 is a flowchart of a counting method according to this disclosure. The counting method of this disclosure can be used in conjunction with the encoding device and magnetic element of the above embodiments, but it is not limiting. As shown in Figure 9, the counting method of this disclosure includes steps S01 to S05. Step S01 generates a pulse signal through the encoding device corresponding to the magnetic field change of the magnetic element. Step S02 generates a trigger signal through the encoding device corresponding to the magnetic field change of the magnetic element. Step S03 generates a complex transient signal based on the voltage polarity change of the pulse signal and the level change of the trigger signal. Step S04 counts the number of rotations of the magnetic element based on these transient signals. Step S05 stores the number of rotations.
[0069] In some embodiments, step S03 includes: when the magnetic element rotates along a first direction, generating a first transient signal and a second transient signal based on the voltage polarity change of the pulse signal and the level change of the trigger signal; and counting the number of rotations of the magnetic element based on the first transient signal and the second transient signal.
[0070] In some embodiments, step S01 includes: when the magnetic element rotates along the first direction, the pulse signal changes from a first voltage polarity to a second voltage polarity; step S02 includes: when the magnetic element rotates along the first direction, the trigger signal changes from a first level to a second level.
[0071] In some embodiments, step S03 further includes: when the magnetic element rotates in a second direction opposite to the first direction, generating a third transient signal and a fourth transient signal based on the voltage polarity change of the pulse signal and the level change of the trigger signal; and counting the number of rotations of the magnetic element as decreasing based on the third transient signal and the fourth transient signal.
[0072] In some embodiments, step S01 includes: when the magnetic element rotates along the second direction, the pulse signal changes from a first voltage polarity to a second voltage polarity; step S02 includes: when the magnetic element rotates along the second direction, the trigger signal changes from a second level to a first level.
[0073] In some embodiments, step S02 includes: after receiving a pulse signal, the encoding device generates a trigger signal corresponding to the change in the magnetic field of the magnetic element.
[0074] The counting method disclosed herein has been described in detail in the above embodiments and will not be repeated here.
[0075] In summary, the encoding device and counting method of this disclosure utilize two different sensing units to generate signals in response to changes in the magnetic field of the magnetic element. One sensing unit (e.g., including a Wiegand sensor) generates a pulse signal in response to changes in the magnetic field of the magnetic element. The other sensing unit (e.g., including a magnetoresistive sensor) receives the pulse signal, energizes it, and generates a trigger signal in response to changes in the magnetic field of the magnetic element. Therefore, based on the directionality of the pulse signal and the level of the trigger signal, the rotation direction and number of rotations of the magnetic element can be determined, and the number of rotations of the magnetic element can be counted. Thus, the encoding device and counting method of this disclosure can accurately count the number of rotations of the magnetic element in response to changes in the magnetic field of the magnetic element even without an external power supply. Furthermore, when the encoding device of this disclosure resumes normal power supply, only the level of the trigger signal needs to be checked to confirm whether the counted rotations are correct, without the need for resetting or recounting.
[0076] The foregoing outlines components of several embodiments to enable those skilled in the art to better understand the concepts of the embodiments of the present invention. Those skilled in the art should understand that the embodiments of the present invention can be used as a basis to design or modify other processes and structures to achieve the same purpose and / or benefits as the embodiments described herein. Those skilled in the art should also understand that these equivalent structures do not depart from the concept and scope of the present invention, and various changes, substitutions, and other options can be made therein without departing from the concept and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the claims.
Claims
1. An encoding device, corresponding to a magnetic element, comprising: A first sensing unit generates a pulse signal in response to the change in the magnetic field of the magnetic element; A second sensing unit is electrically connected to the first sensing unit, receives the pulse signal, and generates a trigger signal in response to the change in the magnetic field of the magnetic element. A processing unit, electrically connected to the first sensing unit and the second sensing unit, generates a complex number of transient signals based on the voltage polarity change of the pulse signal and the level change of the trigger signal, and counts the number of rotations of the magnetic element based on these transient signals; and A storage unit is electrically connected to the processing unit and stores the number of rotations.
2. The encoding device of claim 1, wherein when the magnetic element rotates along a first direction, the pulse signal generates a voltage polarity change in response to the change in the magnetic field of the magnetic element, the trigger signal generates a level change in response to the change in the magnetic field of the magnetic element, the processing unit generates the transient signals based on the voltage polarity change of the pulse signal and the level change of the trigger signal, and counts the number of rotations of the magnetic element based on the transient signals as increasing.
3. The encoding device as claimed in claim 2, wherein when the magnetic element rotates from a first polarity to a second polarity along the first direction, the first sensing unit generates the pulse signal having a first voltage polarity, the second sensing unit generates the trigger signal having a first level, and the processing unit generates a first transient signal based on the pulse signal with the first voltage polarity and the trigger signal with the first level.
4. The encoding device of claim 3, wherein when the magnetic element rotates from the second polarity to the first polarity along the first direction, the first sensing unit generates the pulse signal having a second voltage polarity, the second sensing unit generates the trigger signal having a second level, and the processing unit generates a second transient signal based on the pulse signal with the second voltage polarity and the trigger signal with the second level. The processing unit increases the number of rotations of the magnetic element based on the first transient signal and the second transient signal.
5. The encoding device of claim 2, wherein when the magnetic element rotates in a second direction opposite to the first direction, the pulse signal generates a voltage polarity change in response to the change in the magnetic field of the magnetic element, the trigger signal generates a level change in response to the change in the magnetic field of the magnetic element, the processing unit generates the transient signals based on the voltage polarity change of the pulse signal and the level change of the trigger signal, and counts the number of rotations of the magnetic element as decreasing based on the transient signals.
6. The encoding device of claim 5, wherein when the magnetic element rotates from a first polarity to a second polarity along the second direction, the first sensing unit generates the pulse signal having a first voltage polarity, the second sensing unit generates the trigger signal having a second level, and the processing unit generates a third transient signal based on the pulse signal of the first voltage polarity and the trigger signal of the second level.
7. The encoding device of claim 6, wherein when the magnetic element rotates from the second polarity to the first polarity along the second direction, the first sensing unit generates the pulse signal having a second voltage polarity, the second sensing unit generates the trigger signal having a first level, and the processing unit generates a fourth transient signal based on the pulse signal with the second voltage polarity and the trigger signal with the first level. The processing unit counts the number of rotations of the magnetic element as decreasing based on the third transient signal and the fourth transient signal.
8. The encoding device of claim 1, wherein the first sensing unit comprises a Wiegand sensor and the second sensing unit comprises a magnetoresistive sensor.
9. An encoding device, corresponding to a magnetic element, and comprising: One substrate; A first sensing unit is disposed on one side of the substrate; A second sensing unit is disposed on the other side of the substrate opposite to the first sensing unit, facing the magnetic element, and electrically connected to the first sensing unit; A processing unit is disposed on the substrate and electrically connected to the first sensing unit and the second sensing unit; and A storage unit is disposed on the substrate and electrically connected to the processing unit. wherein, When the magnetic element rotates along a first direction, the first sensing unit generates a pulse signal in response to the change in the magnetic field of the magnetic element, the second sensing unit generates a trigger signal in response to the change in the magnetic field of the magnetic element, the processing unit generates a complex number of transient signals based on the voltage polarity change of the pulse signal and the level change of the trigger signal, and counts the number of rotations of the magnetic element based on these transient signals.
10. The encoding device of claim 9, wherein when the magnetic element rotates from a first polarity to a second polarity along the first direction, the first sensing unit generates the pulse signal having a first voltage polarity, the second sensing unit generates the trigger signal having a first level, and the processing unit generates a first transient signal based on the pulse signal of the first voltage polarity and the trigger signal of the first bit.
11. The encoding device of claim 10, wherein when the magnetic element rotates from the second polarity to the first polarity along the first direction, the first sensing unit generates the pulse signal having a second voltage polarity, the second sensing unit generates the trigger signal having a second level, and the processing unit generates a second transient signal based on the pulse signal with the second voltage polarity and the trigger signal with the second level. The processing unit increases the number of rotations of the magnetic element based on the first transient signal and the second transient signal.
12. The encoding device of claim 10, wherein when the magnetic element rotates from the first polarity to the second polarity along a second direction opposite to the first direction, the first sensing unit generates the pulse signal having a first voltage polarity, the second sensing unit generates the trigger signal having a second level, and the processing unit generates a third transient signal based on the pulse signal of the first voltage polarity and the trigger signal of the second level.
13. The encoding device of claim 12, wherein when the magnetic element rotates from the second polarity to the first polarity along the second direction, the first sensing unit generates the pulse signal having a second voltage polarity, the second sensing unit generates the trigger signal having a first level, and the processing unit generates a fourth transient signal based on the pulse signal with the second voltage polarity and the trigger signal with the first level. The processing unit counts the number of rotations of the magnetic element as decreasing based on the third transient signal and the fourth transient signal.
14. The encoding device as claimed in claim 9, wherein after receiving the pulse signal, the second sensing unit generates the trigger signal in response to the change in the magnetic field of the magnetic element.
15. A counting method, in conjunction with an encoding device and a magnetic element, the counting method comprising: The encoding device generates a pulse signal in response to the change in the magnetic field of the magnetic element. The encoding device generates a trigger signal in response to the change in the magnetic field of the magnetic element. Based on the voltage polarity change of the pulse signal and the level change of the trigger signal, a complex transient signal is generated; Based on these transient signals, count the number of rotations of the magnetic element; and Store the number of rotations.
16. The counting method of claim 15, wherein generating the transient signals based on the voltage polarity change of the pulse signal and the level change of the trigger signal comprises: When the magnetic element rotates along a first direction, a first transient signal and a second transient signal are generated based on the voltage polarity change of the pulse signal and the level change of the trigger signal; and Based on the first transient signal and the second transient signal, the number of rotations of the magnetic element is increased.
17. The counting method of claim 16, wherein generating the pulse signal via the encoding device corresponding to the magnetic field change of the magnetic element comprises: When the magnetic element rotates along the first direction, the pulse signal changes from a first voltage polarity to a second voltage polarity; The trigger signal generated by the encoding device in response to the change in the magnetic field of the magnetic element includes: When the magnetic element rotates along the first direction, the trigger signal changes from a first level to a second level.
18. The counting method of claim 16, wherein generating the transient signals based on the voltage polarity change of the pulse signal and the level change of the trigger signal further comprises: When the magnetic element rotates in a second direction opposite to the first direction, a third transient signal and a fourth transient signal are generated based on the voltage polarity change of the pulse signal and the level change of the trigger signal; and Based on the third transient signal and the fourth transient signal, the number of rotations of the magnetic element is counted as decreasing.
19. The counting method of claim 18, wherein generating the pulse signal via the encoding device corresponding to the magnetic field change of the magnetic element comprises: When the magnetic element rotates along the second direction, the pulse signal changes from a first voltage polarity to a second voltage polarity; The trigger signal generated by the encoding device in response to the change in the magnetic field of the magnetic element includes: When the magnetic element rotates along the second direction, the trigger signal changes from a second level to a first level.
20. The counting method of claim 15, wherein generating the trigger signal via the encoding device corresponding to the magnetic field change of the magnetic element comprises: After receiving the pulse signal, the encoding device generates the trigger signal in response to the change in the magnetic field of the magnetic element.