CN114583898B - Device and method for detecting absolute angle of motor reducer based on ring magnet - Google Patents

Device and method for detecting absolute angle of motor reducer based on ring magnet Download PDF

Info

Publication number
CN114583898B
CN114583898B CN202210240756.8A CN202210240756A CN114583898B CN 114583898 B CN114583898 B CN 114583898B CN 202210240756 A CN202210240756 A CN 202210240756A CN 114583898 B CN114583898 B CN 114583898B
Authority
CN
China
Prior art keywords
hall
hall element
microprocessor
capacitor
absolute angle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210240756.8A
Other languages
Chinese (zh)
Other versions
CN114583898A (en
Inventor
雷宏发
刘双晴
陈永添
郭臻
吴元清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202210240756.8A priority Critical patent/CN114583898B/en
Publication of CN114583898A publication Critical patent/CN114583898A/en
Application granted granted Critical
Publication of CN114583898B publication Critical patent/CN114583898B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02KDYNAMO-ELECTRIC MACHINES
    • H02K11/00Structural association of dynamo-electric machines with electric components or with devices for shielding, monitoring or protection
    • H02K11/20Structural association of dynamo-electric machines with electric components or with devices for shielding, monitoring or protection for measuring, monitoring, testing, protecting or switching
    • H02K11/21Devices for sensing speed or position, or actuated thereby
    • H02K11/215Magnetic effect devices, e.g. Hall-effect or magneto-resistive elements
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02KDYNAMO-ELECTRIC MACHINES
    • H02K11/00Structural association of dynamo-electric machines with electric components or with devices for shielding, monitoring or protection
    • H02K11/30Structural association with control circuits or drive circuits
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02KDYNAMO-ELECTRIC MACHINES
    • H02K7/00Arrangements for handling mechanical energy structurally associated with dynamo-electric machines, e.g. structural association with mechanical driving motors or auxiliary dynamo-electric machines
    • H02K7/10Structural association with clutches, brakes, gears, pulleys or mechanical starters

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

The invention discloses a device and a method for detecting absolute angles of a motor reducer based on a ring magnet, and relates to the field of motor sensors, wherein the device comprises the ring magnet, a first Hall element, a second Hall element, a microprocessor and a power supply; the annular magnet is arranged on a rotating piece of the speed reducer, and the motor rotor drives the annular magnet on the speed reducer to rotate so as to generate a rotating magnetic field; the first Hall element and the second Hall element are arranged on the reducer fixing piece, the distance from the center of the reducer is equal, and the centers of the two Hall elements are mutually perpendicular to the connecting line of the center of the reducer; the two Hall elements detect the magnetic field intensity components of the rotating magnetic field in the direction of the rotating magnetic field, generate a first Hall output value and a second Hall output value, transmit the first Hall output value and the second Hall output value to the microprocessor, and calculate the final absolute angle of the speed reducer; the invention can obtain accurate absolute angle of the speed reducer by using the ring magnet and the two Hall elements, has simple structure, low design and application cost, high detection efficiency and accurate result.

Description

Device and method for detecting absolute angle of motor reducer based on ring magnet
Technical Field
The invention relates to the field of motor sensors, in particular to a device and a method for detecting an absolute angle of a motor reducer based on a ring magnet.
Background
In recent years, research and application of four-legged robots are obviously increased in society, and the four-legged robots are realized without motors. The moment generated when the rotor of the brushless motor rotates is small, and the torque is insufficient to control equipment with a large load or the running symptom easily occurs during control, so that the motor is usually matched with a speed reducer for use. However, the magnetic encoder of the motor can only detect the rotation angle of the outer rotor, thereby causing a problem that the magnetic encoder cannot detect the absolute angle of the outside after the reduction by the reduction gear. So that the absolute angle of the motor reducer can not be known when the four-legged robot is started again after sudden power failure in the operation process, and the four-legged robot needs to be manually restored to the starting position and then electrified for operation, thereby being time-consuming, labor-consuming and inconvenient.
The prior art discloses a Hall type angle sensor based on radial magnetization, which comprises a frame body, wherein a rotating shaft vertically stretches into the frame body; the end of the rotating shaft extending into the frame body is set as the bottom end, and the bottom end is fixedly provided with a magnet; at least 2 Hall elements are arranged at positions corresponding to the magnets in the frame body, and the Hall elements are positioned on the same plane; the center point of the bottom end is led to the plane to form a vertical line, and the intersection point is set as an origin point; all the Hall elements and the origin point do not exist on the same straight line at the same time; when the rotating shaft rotates, the Hall element detects the magnetic field change, and the main control unit calculates a corresponding rotating angle according to the detected magnetic field change. According to the method, the rotating shaft is required to vertically extend into the frame body, the magnet is arranged at the bottom end of the rotating shaft, the structure cannot be suitable for carrying installation of the motor rotor after the motor rotor is decelerated by the speed reducer, and the absolute angle of the speed reducer of the motor cannot be accurately obtained.
Disclosure of Invention
The invention provides a device and a method for detecting the absolute angle of a motor reducer based on ring magnets, which can be directly applied to the existing motor to obtain the accurate absolute angle of the motor reducer by using one ring magnet and two Hall elements, and have the advantages of simple structure, low design and application cost, high detection efficiency and accurate detection result.
In order to solve the technical problems, the technical scheme of the invention is as follows:
The invention provides a motor reducer absolute angle detection device based on a ring magnet, which comprises the ring magnet, a first Hall element, a second Hall element, a microprocessor and a power supply;
the annular magnet is arranged on a rotating piece of the speed reducer, and the center of the annular magnet coincides with the axis of the speed reducer; starting a motor, wherein a motor rotor drives a speed reducer to rotate, and the speed reducer drives an annular magnet to rotate to generate a rotating magnetic field;
the first Hall element and the second Hall element are arranged on a fixing piece of the speed reducer, the distance between the center of the first Hall element and the center of the second Hall element and the axis of the speed reducer is equal, and the connecting line of the center of the first Hall element and the axis of the speed reducer is perpendicular to the connecting line of the center of the second Hall element and the axis of the speed reducer; the two Hall elements respectively detect the magnetic field intensity components of the rotating magnetic field in the direction of the two Hall elements, and different voltages are generated to serve as a first Hall output value and a second Hall output value; the output ends of the two Hall elements are connected with the input end of the microprocessor, and the first Hall output value and the second Hall output value are transmitted to the microprocessor;
the microprocessor calculates the final absolute angle of the motor reducer according to the first Hall output value and the second Hall output value;
the power supply supplies power to the first Hall element, the second Hall element and the microprocessor.
The invention sets a ring magnet on the motor reducer, and sets two Hall elements on the reducer fixing piece; the first Hall element and the second Hall element are equal in distance from the axis of the speed reducer, and the connecting line of the first Hall element and the axis of the speed reducer is perpendicular to the connecting line of the second Hall element and the axis of the speed reducer; after the motor is started, the motor rotor drives the speed reducer to rotate, the speed reducer drives the annular magnet arranged on the speed reducer to rotate, the generated rotating magnetic field rotates nearby the axis of the motor rotor with constant magnetic field intensity, the two Hall elements detect the magnetic field intensity components of the rotating magnetic field in the direction of the rotating magnetic field, and the generated voltage is used as a first Hall output value and a second Hall output value; the microprocessor calculates the final absolute angle of the motor reducer according to the first Hall output value and the second Hall output value, namely, calculates the absolute angle of the motor rotor after the motor rotor is reduced by the reducer by utilizing the output voltages of the two Hall elements which are vertically arranged.
Preferably, the ring magnet is a radial magnetized ring magnet equally divided by N poles and S poles.
Preferably, the first hall element is disposed in a horizontal direction of a fixing member of the decelerator, and the second hall element is disposed in a vertical direction of the fixing member of the decelerator; the first Hall element detects a magnetic field intensity component in the X-axis direction of the rotating magnetic field, and the generated voltage is used as a first Hall output value; the second hall element detects a magnetic field intensity component in the Y-axis direction of the rotating magnetic field, and the generated voltage is used as a second hall output value.
The first Hall element and the second Hall element are respectively arranged in the horizontal direction and the vertical direction of the fixing piece of the speed reducer, so that the programming of the microprocessor for calculating the final absolute angle of the motor speed reducer can be effectively simplified, and the detection efficiency is greatly improved.
Preferably, a power supply filter module is respectively connected between the power supply and the first Hall element, between the power supply and between the power supply and the second Hall element are respectively connected between the power supply and the microprocessor; a Hall output filter module is respectively connected between the microprocessor and the first Hall element and between the microprocessor and the second Hall element;
the power supply filtering module comprises a capacitor C1, a capacitor C2, a capacitor C5, a capacitor C6 and a capacitor C7; the Hall output filter module comprises a resistor R1, a resistor R2, a capacitor C3 and a capacitor C4;
One end of the capacitor C1 is grounded, the other end of the capacitor C1 is connected with the pin a of the first Hall element, and the pin a of the first Hall element is also connected with a power supply; the pin b of the first Hall element is connected with one end of a resistor R1, the other end of the resistor R1 is connected with the pin a of the microprocessor, the other end of the resistor R1 is also connected with one end of a capacitor C4, and the other end of the capacitor C4 is grounded; the c pin of the first Hall element is grounded;
one end of the capacitor C2 is grounded, the other end of the capacitor C2 is connected with the pin a of the second Hall element, and the pin a of the second Hall element is also connected with a power supply; the pin b of the second Hall element is connected with one end of a resistor R2, the other end of the resistor R2 is connected with the pin C of the microprocessor, the other end of the resistor R2 is also connected with one end of a capacitor C3, and the other end of the capacitor C3 is grounded; the c pin of the second Hall element is grounded;
The capacitor C5, the capacitor C6 and the capacitor C7 are connected in parallel and then connected between the pin b and the pin d of the microprocessor, the pin b of the microprocessor is connected with a power supply, and the pin d of the microprocessor is grounded.
The capacitor C1, the capacitor C2, the capacitor C5, the capacitor C6 and the capacitor C7 are used for filtering harmonic waves in the power supply voltage provided by the power supply; the resistor R1, the capacitor C4, the resistor R2 and the capacitor C3 respectively form a passive low-pass filter, and harmonic waves in voltages output by the first Hall element and the second Hall element are filtered respectively.
The power supply provides 3.3V voltage to the first hall element, the second hall element and the microprocessor.
The capacities of the capacitors C1, C2, C3 and C4 are all 100 nano-meters; the capacitance of the capacitor C5 was 10 microfarads, the capacitance of the capacitor C6 was 0.1 microfarads, and the capacitance of the capacitor C7 was 10 microfarads.
Preferably, the microprocessor is STC8G1K08A.
Preferably, the first hall element and the second hall element are patch-packaged or in-line-packaged hall elements, and the model numbers of the first hall element and the second hall element are WSH136.
The invention also provides a motor reducer absolute angle detection method based on the ring magnet, which is based on the detection device and comprises the following steps:
S1: starting a motor;
S2: the first Hall element acquires a first Hall output value and transmits the first Hall output value to the microprocessor; the second Hall element obtains a second Hall output value and transmits the second Hall output value to the microprocessor;
S3: and the microprocessor calculates the final absolute angle of the motor reducer according to the first Hall output value and the second Hall output value.
Preferably, the specific method of step S3 is as follows:
S3.1: the microprocessor converts the first Hall output value and the second Hall output value into digital signals to obtain a first Hall output digital value Bx and a second Hall output digital value By;
s3.2: processing the first Hall output digital value Bx;
S3.3: calculating an initial absolute angle of the motor reducer By using a trigonometric function formula according to the processed first Hall output digital value Bx and the processed second Hall output digital value By;
S3.4: judging whether the processed first Hall output digital value Bx is smaller than 0; if yes, adding 180 degrees to the initial absolute angle to serve as a final absolute angle; if not, taking the initial absolute angle as a final absolute angle;
s3.5: and outputting the final absolute angle of the motor reducer.
Preferably, in the step S3.2, the specific method for processing the first hall output digital value Bx is as follows:
s3.2.1: judging whether the first Hall output digital value Bx is in a section (-0.01 degrees, 0.01 degrees); if yes, go to step S3.2.2; if not, executing the step S3.3;
S3.2.2: judging whether the first Hall output digital value Bx is larger than 0; if yes, let bx=0.01 °; if not, let bx= -0.01 °.
Preferably, in the step S3.3, the trigonometric function formula is:
where θ represents the initial absolute angle of the motor reducer.
The initial absolute angle of the motor reducer is calculated by an arc tangent trigonometric function, but the tangent trigonometric function value is overlapped in a first quadrant and a third quadrant, and is overlapped in a second quadrant and a fourth quadrant in the same way; however, obviously, in the first three-quadrant and the second four-quadrant, the angle values corresponding to the same function value are 180 degrees different, and the final absolute angle of the motor reducer can be calculated through judging the quadrants. The initial absolute angle is calculated by an arc tangent trigonometric function, and the situation that the output digital value of the first Hall is equal to 0 degree needs to be avoided, namely whether the first Hall is within the range of-0.01 degree is judged, if the first Hall is larger than 0 degree, the first Hall is set to be 0.01 degree, otherwise, the first Hall is set to be-0.01 degree; since the range of the arc tangent trigonometric function is-90 DEG to 90 DEG, the offset value of 90 DEG needs to be added, and the range is adjusted to 0 to 180 DEG to obtain the absolute angle range of half a rotation circle of the ring magnet; and according to the trigonometric function property, when Bx is less than 0, adding 180 degrees to the initial absolute angle to serve as a final absolute angle, and expanding the output range to 0-360 degrees to obtain the final absolute angle of one rotation of the ring magnet, namely one rotation of the speed reducer.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that:
The invention sets a ring magnet on the motor reducer, and sets two Hall elements on the reducer fixing piece; the first Hall element and the second Hall element are equal in distance from the axis of the speed reducer, and the connecting line of the first Hall element and the axis of the speed reducer is perpendicular to the connecting line of the second Hall element and the axis of the speed reducer; after the motor is started, the motor rotor drives the speed reducer to rotate, then the speed reducer drives the annular magnet arranged on the speed reducer to rotate, the magnetic field intensity of the rotating magnetic field generated at the moment is constant, the axis of the motor rotor is taken as a rotating shaft and rotates nearby the rotating shaft, the two Hall elements detect the magnetic field intensity components of the rotating magnetic field in the direction, and the generated voltage is used as a first Hall output value and a second Hall output value and is transmitted to the microprocessor to calculate the final absolute angle of the motor speed reducer. The invention can obtain accurate absolute angle of the motor reducer by using one ring magnet and two Hall elements, and has the advantages of simple structure, low design and application cost, high detection efficiency and accurate detection result.
Drawings
Fig. 1 is a schematic structural diagram of a motor reducer absolute angle detection device based on a ring magnet according to embodiment 1.
Fig. 2 is a schematic structural view of the ring magnet according to embodiment 2.
Fig. 3 is a schematic structural diagram of a motor reducer absolute angle detecting device based on a ring magnet according to embodiment 2.
Fig. 4 is a schematic structural diagram of a PCB board according to embodiment 2.
Fig. 5 is a schematic diagram of the relative positions of the PCB board and the ring magnet according to embodiment 2.
Fig. 6 is a schematic diagram of detection of the rotating magnetic field generated by the ring magnet by the first hall element and the second hall element described in embodiment 2.
Fig. 7 is a schematic diagram of a circuit of a PCB board according to embodiment 2.
Fig. 8 is a flowchart of a method for detecting absolute angle of a motor reducer based on a ring magnet according to embodiment 3.
Fig. 9 is a schematic diagram showing changes in horizontal and vertical components of magnetic induction intensity detected by the first and second hall elements described in example 3.
Fig. 10 is a diagram of the horizontal and vertical components of the magnetic induction of the embodiment 3.
In the figure, a 1-ring magnet, a 2-first Hall element, a 3-second Hall element, a 4-microprocessor, a 5-power supply and a 6-PCB board.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the present patent;
for the purpose of better illustrating the embodiments, certain elements of the drawings may be omitted, enlarged or reduced and do not represent the actual product dimensions;
it will be appreciated by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The technical scheme of the invention is further described below with reference to the accompanying drawings and examples.
Example 1
The embodiment provides a motor reducer absolute angle detection device based on a ring magnet, which comprises the ring magnet 1, a first Hall element 2, a second Hall element 3, a microprocessor 4 and a power supply 5, as shown in fig. 1;
The ring magnet 1 is arranged on a rotating piece of the speed reducer, and the circle center of the ring magnet 1 coincides with the axis of the speed reducer; starting a motor, wherein a motor rotor drives a speed reducer to rotate, and the speed reducer drives the annular magnet 1 to rotate to generate a rotating magnetic field;
The first Hall element 2 and the second Hall element 3 are arranged on a fixing piece of the speed reducer, the distance between the center of the first Hall element 2 and the center of the second Hall element 3 and the axis of the speed reducer is equal, and the connecting line of the center of the first Hall element 2 and the axis of the speed reducer is perpendicular to the connecting line of the center of the second Hall element 3 and the axis of the speed reducer; the two Hall elements respectively detect the magnetic field intensity components of the rotating magnetic field in the direction of the two Hall elements, and different voltages are generated to serve as a first Hall output value and a second Hall output value; the output ends of the two Hall elements are connected with the input end of the microprocessor 4, and the first Hall output value and the second Hall output value are transmitted to the microprocessor 4;
the microprocessor 4 calculates the final absolute angle of the motor reducer according to the first Hall output value and the second Hall output value;
the power supply 5 supplies power to the first hall element 2, the second hall element 3 and the microprocessor 4.
In the specific implementation process, in the embodiment, a ring magnet 1 is arranged on a rotating member of a motor reducer, and two Hall elements are arranged on a reducer fixing member; the center of the ring magnet 1 coincides with the axis of the speed reducer, the center of the first Hall element 2 and the center of the second Hall element 3 are equal in distance from the axis of the speed reducer, and the connecting line of the center of the first Hall element 2 and the axis of the speed reducer is perpendicular to the connecting line of the center of the second Hall element 3 and the axis of the speed reducer; after the motor is started, the motor rotor drives the speed reducer to rotate, the speed reducer drives the ring magnet 1 arranged on the speed reducer to rotate, the magnetic field intensity of the rotating magnetic field generated at the moment is constant, the axis of the motor rotor is taken as a rotating shaft to rotate nearby, the two Hall elements detect the magnetic field intensity components of the rotating magnetic field in the direction, and the generated voltage is used as a first Hall output value and a second Hall output value and is transmitted to the microprocessor 4 to calculate the final absolute angle of the motor speed reducer. The embodiment can obtain the accurate absolute angle of the motor reducer by using one ring magnet and two Hall elements, and has the advantages of simple structure, low design and application cost, high detection efficiency and accurate detection result.
Example 2
The embodiment provides a motor reducer absolute angle detection device based on a ring magnet, which comprises the ring magnet 1, a first Hall element 2, a second Hall element 3, a microprocessor 4 and a power supply 5;
The ring magnet 1 is arranged on a rotating piece of the speed reducer, and the circle center of the ring magnet 1 coincides with the axis of the speed reducer; starting a motor, wherein a motor rotor drives a speed reducer to rotate, and the speed reducer drives the annular magnet 1 to rotate to generate a rotating magnetic field;
The first Hall element 2 and the second Hall element 3 are arranged on a fixing piece of the speed reducer, the distance between the center of the first Hall element 2 and the center of the second Hall element 3 and the axis of the speed reducer is equal, and the connecting line of the center of the first Hall element 2 and the axis of the speed reducer is perpendicular to the connecting line of the center of the second Hall element 3 and the axis of the speed reducer; the two Hall elements respectively detect the magnetic field intensity components of the rotating magnetic field in the direction of the two Hall elements, and different voltages are generated to serve as a first Hall output value and a second Hall output value; the output ends of the two Hall elements are connected with the input end of the microprocessor 4, and the first Hall output value and the second Hall output value are transmitted to the microprocessor 4;
the microprocessor 4 calculates the final absolute angle of the motor reducer according to the first Hall output value and the second Hall output value;
the power supply 5 supplies power to the first hall element 2, the second hall element 3 and the microprocessor 4.
As shown in fig. 2, the ring magnets are radial magnetized ring magnets with equally divided N poles and S poles.
In this embodiment, as shown in fig. 3, an annular groove is formed in a rotating member of a motor reducer, the center of the annular groove coincides with the axis of the reducer, and an annular magnet 1 is arranged in the annular groove; the first Hall element 2, the second Hall element 3, the microprocessor 4 and the power supply 5 are integrated on a PCB 6; the PCB 6 is arranged on a fixing piece of the speed reducer, connection with the fixing piece is realized through two through holes on the PCB 6, as shown in fig. 4, the circle center of the PCB 6 coincides with the axis of the speed reducer, the distance between the first Hall element 2 and the second Hall element 3 and the axis of the speed reducer is equal, and the connecting line of the first Hall element 2 and the axis of the speed reducer is perpendicular to the connecting line of the second Hall element 3 and the axis of the speed reducer; the receiving surfaces of the two hall elements are opposite to the ring magnet 1, and a distance of two millimeters is maintained.
As shown in fig. 5, the PCB board is mounted such that the first hall element 2 is in the horizontal direction and the second hall element 3 is in the vertical direction; as shown in fig. 6, the arrow indicates the magnetic induction direction, the horizontal direction square represents the first hall element 2, the magnetic field intensity component in the X-axis direction of the rotating magnetic field is detected, and the generated voltage is used as the first hall output value; the vertical square represents the second hall element 3, detects the magnetic field intensity component in the Y-axis direction of the rotating magnetic field, and the generated voltage is used as the second hall output value.
The first Hall element and the second Hall element are respectively arranged in the horizontal direction and the vertical direction, so that the programming of the microprocessor for calculating the final absolute angle of the motor reducer can be effectively simplified, and the detection efficiency is greatly improved.
As shown in fig. 7, a power supply filter module is respectively connected between the power supply and the first hall element, between the power supply and between the power supply and the second hall element, and between the power supply and the microprocessor; a Hall output filter module is respectively connected between the microprocessor and the first Hall element and between the microprocessor and the second Hall element; the power supply filtering module comprises a capacitor C1, a capacitor C2, a capacitor C5, a capacitor C6 and a capacitor C7; the Hall output filter module comprises a resistor R1, a resistor R2, a capacitor C3 and a capacitor C4;
One end of the capacitor C1 is grounded, the other end of the capacitor C1 is connected with the pin a of the first Hall element, and the pin a of the first Hall element is also connected with a power supply; the pin b of the first Hall element is connected with one end of a resistor R1, the other end of the resistor R1 is connected with the pin a of the microprocessor, the other end of the resistor R1 is also connected with one end of a capacitor C4, and the other end of the capacitor C4 is grounded; the c pin of the first Hall element is grounded;
one end of the capacitor C2 is grounded, the other end of the capacitor C2 is connected with the pin a of the second Hall element, and the pin a of the second Hall element is also connected with a power supply; the pin b of the second Hall element is connected with one end of a resistor R2, the other end of the resistor R2 is connected with the pin C of the microprocessor, the other end of the resistor R2 is also connected with one end of a capacitor C3, and the other end of the capacitor C3 is grounded; the c pin of the second Hall element is grounded;
The capacitor C5, the capacitor C6 and the capacitor C7 are connected in parallel and then connected between the pin b and the pin d of the microprocessor, the pin b of the microprocessor is connected with a power supply, and the pin d of the microprocessor is grounded.
The capacitor C1, the capacitor C2, the capacitor C5, the capacitor C6 and the capacitor C7 are used for filtering harmonic waves in the power supply voltage provided by the power supply; the resistor R1, the capacitor C4, the resistor R2 and the capacitor C3 respectively form a passive low-pass filter, and harmonic waves in voltages output by the first Hall element and the second Hall element are filtered respectively.
The power supply provides 3.3V voltage to the first hall element, the second hall element and the microprocessor.
The capacities of the capacitors C1, C2, C3 and C4 are all 100 nano-meters; the capacitance of the capacitor C5 was 10 microfarads, the capacitance of the capacitor C6 was 0.1 microfarads, and the capacitance of the capacitor C7 was 10 microfarads.
The model of the microprocessor 4 is STC8G1K08A.
The first Hall element 2 and the second Hall element 3 are Hall elements packaged by a patch or packaged by direct insertion, and the models are WSH136.
Example 3
The present embodiment provides a method for detecting an absolute angle of a motor reducer based on a ring magnet, which is based on the detecting device described in embodiment 1 or 2, as shown in fig. 8, and includes:
S1: starting a motor;
S2: the first Hall element acquires a first Hall output value and transmits the first Hall output value to the microprocessor; the second Hall element obtains a second Hall output value and transmits the second Hall output value to the microprocessor;
S3: the microprocessor calculates the final absolute angle of the motor reducer according to the first Hall output value and the second Hall output value; specific:
S3.1: the microprocessor converts the first Hall output value and the second Hall output value into digital signals to obtain a first Hall output digital value Bx and a second Hall output digital value By;
s3.2: processing the first Hall output digital value Bx;
s3.2.1: judging whether the first Hall output digital value Bx is in a section (-0.01 degrees, 0.01 degrees); if yes, go to step S3.2.2; if not, executing the step S3.3;
S3.2.2: judging whether the first Hall output digital value Bx is larger than 0; if yes, let bx=0.01 °; if not, let bx= -0.01 °;
S3.3: calculating an initial absolute angle of the motor reducer By using a trigonometric function formula according to the processed first Hall output digital value Bx and the processed second Hall output digital value By;
the trigonometric function formula is:
wherein θ represents an initial absolute angle of the motor reducer;
S3.4: judging whether the processed first Hall output digital value Bx is smaller than 0; if yes, adding 180 degrees to the initial absolute angle to serve as a final absolute angle; if not, taking the initial absolute angle as a final absolute angle;
s3.5: and outputting the final absolute angle of the motor reducer.
The first hall element and the second hall element are respectively arranged in the horizontal direction and the vertical direction, the ring magnet rotates for one circle, the change schematic diagram of the horizontal component and the vertical component of the magnetic induction intensity detected by the first hall element and the second hall element is shown in fig. 9, and as can be seen from the figure, the square sum of the first hall output digital value Bx and the second hall output digital value is a constant value; drawing the three-dimensional curve into a Lissajous diagram, wherein as shown in fig. 10, the initial absolute angle is calculated by , and as can be seen in fig. 10, the tangent trigonometric function value is overlapped in the first quadrant and the third quadrant, and is overlapped in the second quadrant and the fourth quadrant; however, obviously, in the first three-quadrant and the second four-quadrant, the angle values corresponding to the same function value are 180 degrees different, and the final absolute angle of the motor reducer can be calculated through judging the quadrants. Since the range of the arc tangent trigonometric function is-90 DEG to 90 DEG, the offset value of 90 DEG needs to be added, and the range is adjusted to 0 to 180 DEG, so that the absolute angle range of half a circle of rotation of the ring magnet is obtained; and according to the trigonometric function property, when Bx is less than 0, adding 180 degrees to the initial absolute angle to serve as a final absolute angle, and expanding the output range to 0-360 degrees to obtain the final absolute angle of one rotation of the ring magnet, namely one rotation of the speed reducer. It should be noted that, the initial absolute angle is calculated by the arctangent trigonometric function, and the situation that the first hall output digital value is equal to 0 ° needs to be avoided, and the processing method of this embodiment is to determine whether it is within the range of-0.01 ° to 0.01 °, if it is greater than 0, it is made to be 0.01 °, otherwise it is made to be-0.01 °.
The same or similar reference numerals correspond to the same or similar components;
The terms describing the positional relationship in the drawings are merely illustrative, and are not to be construed as limiting the present patent;
It is to be understood that the above examples of the present invention are provided by way of illustration only and not by way of limitation of the embodiments of the present invention. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the invention are desired to be protected by the following claims.

Claims (5)

1. An absolute angle detection device of a motor reducer based on a ring magnet is characterized by comprising the ring magnet, a first Hall element, a second Hall element, a microprocessor and a power supply;
the annular magnet is a radial magnetized annular magnet with equally divided N pole and S pole, the annular magnet is arranged on a rotating piece of the speed reducer, and the circle center of the annular magnet is coincident with the axle center of the speed reducer; starting a motor, wherein a motor rotor drives a speed reducer to rotate, and the speed reducer drives an annular magnet to rotate to generate a rotating magnetic field;
the first Hall element and the second Hall element are arranged on a fixing piece of the speed reducer, the distance between the center of the first Hall element and the center of the second Hall element and the axis of the speed reducer is equal, and the connecting line of the center of the first Hall element and the axis of the speed reducer is perpendicular to the connecting line of the center of the second Hall element and the axis of the speed reducer; the two Hall elements respectively detect the magnetic field intensity components of the rotating magnetic field in the direction of the two Hall elements, and different voltages are generated to serve as a first Hall output value and a second Hall output value; the output ends of the two Hall elements are connected with the input end of the microprocessor, and the first Hall output value and the second Hall output value are transmitted to the microprocessor;
the microprocessor calculates the final absolute angle of the motor reducer according to the first Hall output value and the second Hall output value;
The power supply supplies power to the first Hall element, the second Hall element and the microprocessor;
the specific method for calculating the final absolute angle of the motor reducer comprises the following steps:
S1: starting a motor;
S2: the first Hall element acquires a first Hall output value and transmits the first Hall output value to the microprocessor; the second Hall element obtains a second Hall output value and transmits the second Hall output value to the microprocessor;
S3: the microprocessor calculates the final absolute angle of the motor reducer according to the first Hall output value and the second Hall output value;
S3.1, converting the first Hall output value and the second Hall output value into digital signals By the microprocessor to obtain a first Hall output digital value Bx and a second Hall output digital value By;
s3.2: processing the first Hall output digital value Bx;
s3.2.1: judging whether the first Hall output digital value Bx is in a section (-0.01 °,0.01°); if yes, go to step S3.2.2; if not, executing the step S3.3;
S3.2.2: judging whether the first Hall output digital value Bx is larger than 0; if yes, let bx=0.01 °; if not, let bx= -0.01 °;
s3.3: calculating an initial absolute angle of the motor reducer By using a trigonometric function formula according to the processed first Hall output digital value Bx and the processed second Hall output digital value By; the trigonometric function formula is:
wherein θ represents an initial absolute angle of the motor reducer;
S3.4: judging whether the processed first Hall output digital value Bx is smaller than 0; if yes, adding 180 ° to the initial absolute angle to be used as a final absolute angle; if not, taking the initial absolute angle as a final absolute angle;
s3.5: and outputting the final absolute angle of the motor reducer.
2. The ring magnet-based motor reducer absolute angle detection apparatus according to claim 1, wherein the first hall element is disposed in a horizontal direction of a fixing member of the reducer, and the second hall element is disposed in a vertical direction of the fixing member of the reducer; the first Hall element detects a magnetic field intensity component in the X-axis direction of the rotating magnetic field, and the generated voltage is used as a first Hall output value; the second hall element detects a magnetic field intensity component in the Y-axis direction of the rotating magnetic field, and the generated voltage is used as a second hall output value.
3. The device for detecting the absolute angle of the motor reducer based on the ring magnet according to claim 2, wherein a power supply filter module is respectively connected between the power supply and the first hall element, the second hall element and the microprocessor; a Hall output filter module is respectively connected between the microprocessor and the first Hall element and between the microprocessor and the second Hall element;
the power supply filtering module comprises a capacitor C1, a capacitor C2, a capacitor C5, a capacitor C6 and a capacitor C7; the Hall output filter module comprises a resistor R1, a resistor R2, a capacitor C3 and a capacitor C4;
One end of the capacitor C1 is grounded, the other end of the capacitor C1 is connected with the pin a of the first Hall element, and the pin a of the first Hall element is also connected with a power supply; the pin b of the first Hall element is connected with one end of a resistor R1, the other end of the resistor R1 is connected with the pin a of the microprocessor, the other end of the resistor R1 is also connected with one end of a capacitor C4, and the other end of the capacitor C4 is grounded; the c pin of the first Hall element is grounded;
one end of the capacitor C2 is grounded, the other end of the capacitor C2 is connected with the pin a of the second Hall element, and the pin a of the second Hall element is also connected with a power supply; the pin b of the second Hall element is connected with one end of a resistor R2, the other end of the resistor R2 is connected with the pin C of the microprocessor, the other end of the resistor R2 is also connected with one end of a capacitor C3, and the other end of the capacitor C3 is grounded; the c pin of the second Hall element is grounded;
The capacitor C5, the capacitor C6 and the capacitor C7 are connected in parallel and then connected between the pin b and the pin d of the microprocessor, the pin b of the microprocessor is connected with a power supply, and the pin d of the microprocessor is grounded.
4. A ring magnet based motor reducer absolute angle sensing apparatus according to claim 3 wherein said microprocessor is of the type STC8G1K08A.
5. The device for detecting absolute angle of motor reducer based on ring magnet according to claim 3, wherein the first hall element and the second hall element are hall elements of a patch package or a direct insertion package, and are of WSH136 type.
CN202210240756.8A 2022-03-10 2022-03-10 Device and method for detecting absolute angle of motor reducer based on ring magnet Active CN114583898B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210240756.8A CN114583898B (en) 2022-03-10 2022-03-10 Device and method for detecting absolute angle of motor reducer based on ring magnet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210240756.8A CN114583898B (en) 2022-03-10 2022-03-10 Device and method for detecting absolute angle of motor reducer based on ring magnet

Publications (2)

Publication Number Publication Date
CN114583898A CN114583898A (en) 2022-06-03
CN114583898B true CN114583898B (en) 2024-04-16

Family

ID=81779998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210240756.8A Active CN114583898B (en) 2022-03-10 2022-03-10 Device and method for detecting absolute angle of motor reducer based on ring magnet

Country Status (1)

Country Link
CN (1) CN114583898B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115452444B (en) * 2022-11-14 2023-04-07 极限人工智能有限公司 Medical surgical robot angle performance detection device and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010060478A (en) * 2008-09-05 2010-03-18 Yaskawa Electric Corp Position detection device of linear/rotary motor and linear/rotary motor
CN108199539A (en) * 2018-01-17 2018-06-22 北京小米移动软件有限公司 Holder
CN110895316A (en) * 2018-08-24 2020-03-20 英飞凌科技奥地利有限公司 Hall sensor circuit, motor control system and Hall element sensing method
CN113890429A (en) * 2021-10-29 2022-01-04 广东工业大学 Hall element-based motor reducer absolute angle fitting system and fitting method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4756475B2 (en) * 2006-10-20 2011-08-24 株式会社デンソー Magnetic rotor and rotation angle detection device
US10495701B2 (en) * 2017-03-02 2019-12-03 Allegro Microsystems, Llc Circular vertical hall (CVH) sensing element with DC offset removal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010060478A (en) * 2008-09-05 2010-03-18 Yaskawa Electric Corp Position detection device of linear/rotary motor and linear/rotary motor
CN108199539A (en) * 2018-01-17 2018-06-22 北京小米移动软件有限公司 Holder
CN110895316A (en) * 2018-08-24 2020-03-20 英飞凌科技奥地利有限公司 Hall sensor circuit, motor control system and Hall element sensing method
CN113890429A (en) * 2021-10-29 2022-01-04 广东工业大学 Hall element-based motor reducer absolute angle fitting system and fitting method

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
于树海 ; 程汉湘 ; 罗其锋 ; .霍尔电流传感器在并联型有源电力滤波器(SAPF)中的应用.电子元器件应用.2008,(第03期),16-20. *
刘文宇 ; 闫晓鹏 ; 董维杰 ; .基于径向磁铁的非接触角度传感器.电子世界.2016,(第24期),43-44. *
基于径向磁铁的非接触角度传感器;刘文宇;闫晓鹏;董维杰;;电子世界(第24期);43-44 *
康朝晖 ; 江华 ; 魏端正 ; .浅析霍尔车速传感器可靠性的应用(2).摩托车技术.2013,(第10期),57-60. *
浅析霍尔车速传感器可靠性的应用(2);康朝晖;江华;魏端正;;摩托车技术(第10期);57-60 *
霍尔电流传感器在并联型有源电力滤波器(SAPF)中的应用;于树海;程汉湘;罗其锋;;电子元器件应用(第03期);16-20 *

Also Published As

Publication number Publication date
CN114583898A (en) 2022-06-03

Similar Documents

Publication Publication Date Title
US9080896B2 (en) Method for analyzing signals from an angle sensor
US20200041308A1 (en) Rotation angle detection device and rotation angle detection method
CA2928944C (en) Constant torque control method for ecm motor
CN114583898B (en) Device and method for detecting absolute angle of motor reducer based on ring magnet
CN107127786B (en) A kind of dicode disk encoder and joint of robot servo-drive system
CN109546808B (en) Steering engine and method for reducing virtual position of steering engine
CN104813580B (en) Motor driven systems and motor control assembly
CN107070102A (en) The motor control method of motor, miniature head and miniature head
EP2824825B1 (en) Method and apparatus for determining position for a permanent magnet elevator motor
WO2013099400A1 (en) Permanent magnet motor controller
CN112117872A (en) Special motor, electrical equipment and vehicle
CN109696187A (en) Rotary encoder eccentric correction device
WO2007055135A1 (en) Magnetic encoder device
WO2013127604A1 (en) Rotary position sensor device
CN103944344A (en) Four-pole brushless direct current position motor and detection method thereof
CN107529384B (en) Micro- flywheel speed-measuring method and device based on linear hall element
CN104494690A (en) Car EPS (electric power storage) motor controller
JP6006069B2 (en) Encoder and encoder error detection method
CN202019274U (en) Magnetic encoder for elevator door system
JP6791013B2 (en) Two-axis integrated motor
JP2017118708A (en) Rotation angle sensor fitting angle measurement device, and rotation angle sensor fitting angle measurement method
CN210898834U (en) Motor positioning device, motor, wheel and mobile device
CN108111062A (en) Double three-phase permanent-magnetic synchronous motor coaxial drive system
CN103956878A (en) Two-pole brushless direct-current motor position sensor and detection method thereof
CN210007566U (en) Motor and motor control system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant