CN114583898A - Motor reducer absolute angle detection device and method based on annular magnet - Google Patents

Motor reducer absolute angle detection device and method based on annular magnet Download PDF

Info

Publication number
CN114583898A
CN114583898A CN202210240756.8A CN202210240756A CN114583898A CN 114583898 A CN114583898 A CN 114583898A CN 202210240756 A CN202210240756 A CN 202210240756A CN 114583898 A CN114583898 A CN 114583898A
Authority
CN
China
Prior art keywords
hall
hall element
absolute angle
microprocessor
capacitor
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.)
Granted
Application number
CN202210240756.8A
Other languages
Chinese (zh)
Other versions
CN114583898B (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

Images

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

Abstract

The invention discloses a motor reducer absolute angle detection device and method based on a ring magnet, relating to the field of motor sensors and comprising a 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 to generate a rotating magnetic field; the first Hall element and the second Hall element are arranged on the speed reducer fixing piece, the distances from the first Hall element and the second Hall element to the axis of the speed reducer are equal, and the centers of the two Hall elements are perpendicular to the connecting line of the axis of the speed reducer; the two Hall elements detect the magnetic field intensity component of the rotating magnetic field in the direction, 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 the accurate absolute angle of the speed reducer by utilizing the annular magnet and the two Hall elements, and has the advantages of simple structure, low design and application cost, high detection efficiency and accurate result.

Description

Motor reducer absolute angle detection device and method based on annular magnet
Technical Field
The invention relates to the field of motor sensors, in particular to a motor reducer absolute angle detection device and method based on a ring magnet.
Background
In recent years, research and application of quadruped robots in society are remarkably increased, and the implementation of quadruped robots cannot be separated from application of motors. The torque generated by the rotor of the brushless motor is small, which is not enough to control a device with a large load or easily causes a running-away symptom during control, so the motor is usually used with a speed reducer. However, the magnetic encoder of the motor can detect only the rotation angle of the outer rotor, thereby causing a problem that the magnetic encoder cannot detect the absolute angle of the outer part after being decelerated by the decelerator. Cause four-footed robot at the operation in-process, if after the proruption outage, can't learn the absolute angle of motor reducer this moment when opening once more, need be by artifical recovery to initial position electricity operation again, it is not convenient to waste time and energy.
The prior art discloses a Hall type angle sensor based on radial magnetization, which comprises a frame body, wherein a rotating shaft vertically extends into the frame body; one end of the rotating shaft extending into the frame body is a bottom end, and a magnet is fixedly arranged at the bottom end; at least 2 Hall elements are arranged in the position corresponding to the magnet in the frame body, and the Hall elements are positioned on the same plane; a vertical line is drawn from the central point of the bottom end to the plane, and the intersection point of the vertical line and the plane is set as the origin; all Hall elements and the origin point do not exist on the same straight line simultaneously; when the rotating shaft rotates, the Hall element detects the change of the magnetic field, and the main control unit calculates the corresponding rotating angle according to the detected change of the magnetic field. According to the method, the rotating shaft needs 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 the installation of the motor rotor with load after the motor rotor is decelerated by the reducer, and the absolute angle of the motor reducer cannot be accurately obtained.
Disclosure of Invention
The invention aims to overcome the defects of complex structure, more detection elements and inaccurate detection result when the absolute angle of the motor reducer is obtained in the prior art, and provides the motor reducer absolute angle detection device and method based on the annular magnet.
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 an annular magnet, which comprises the annular magnet, a first Hall element, a second Hall element, a microprocessor and a power supply, wherein the annular magnet is arranged on the motor reducer;
arranging the annular magnet on a rotating piece of the speed reducer, wherein the circle center of the annular magnet is superposed with the axis of the speed reducer; starting the motor, driving the speed reducer to rotate by the motor rotor, and driving the annular magnet to rotate by the speed reducer to generate a rotating magnetic field;
the first Hall element and the second Hall element are arranged on the 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 vertical 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, and generate different voltages 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 up a ring magnet on the motor decelerator, set up two Hall components on the decelerator stationary part; the distance between the first Hall element and the axis of the speed reducer is equal to that between the second Hall element and the axis of the speed reducer, and the connecting line of the first Hall element and the axis of the speed reducer is vertical 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 near the axis of the motor rotor with constant magnetic field intensity, the two Hall elements detect the magnetic field intensity component 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 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, the absolute angle of the motor rotor after the speed reduction of the motor reducer is calculated by using the output voltages of the two vertically arranged Hall elements.
Preferably, the annular magnet is a radially magnetized annular magnet with N poles and S poles equally distributed.
Preferably, the first hall element is disposed in a horizontal direction of a fixing member of the speed reducer, and the second hall element is disposed in a vertical direction of the fixing member of the speed reducer; the first Hall element detects the 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 program design 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 filtering module is respectively connected between the power supply and the first hall element, between the power supply and the second hall element, between the power supply and the microprocessor; hall output filtering modules are 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 filtering 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 a 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 a resistor R1 is connected with the pin a of the microprocessor, the other end of a resistor R1 is also connected with one end of a capacitor C4, and the other end of a capacitor C4 is grounded; the pin c 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 a pin a of the second Hall element, and the pin a of the second Hall element is also connected with a power supply; a 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 a 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 pin c 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 a pin b and a 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 power supply voltage provided by a 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 the voltage output by the first Hall element and the voltage output by the second Hall element are filtered out respectively.
The power supply provides 3.3V voltage for the first Hall element, the second Hall element and the microprocessor.
The capacities of the capacitors C1, C2, C3 and C4 are all 100 nanofarads; 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 of the type STC8G1K 08A.
Preferably, the first hall element and the second hall element are hall elements packaged in a patch mode or a direct-insert mode, and the types of the hall elements are WSH 136.
The invention also provides a motor reducer absolute angle detection method based on the annular magnet, and the detection device comprises the following steps:
s1: starting the 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 acquires 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:
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 the initial absolute angle of the motor reducer By utilizing 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 so, adding 180 degrees 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.
Preferably, in step S3.2, a 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 an interval (-0.01 degrees, 0.01 degrees); if yes, go to step S3.2.2; if not, executing step S3.3;
s3.2.2: judging whether the first Hall output digital value Bx is larger than 0; if yes, making Bx equal to 0.01 degree; if not, let Bx be-0.01 °.
Preferably, in step S3.3, the trigonometric function formula is:
Figure BDA0003541181720000041
in the formula, θ represents an 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 similarly, the initial absolute angle is also overlapped in a second quadrant and a fourth quadrant; obviously, in the first three-quadrant and the second four-quadrant, the angle values corresponding to the same function value have a difference of 180 degrees, and the final absolute angle of the motor reducer can be calculated through judgment of the quadrants. The initial absolute angle is calculated by an arctangent trigonometric function, the situation that the first Hall output digital value is equal to 0 degree needs to be avoided, namely whether the first Hall output digital value is in the range of-0.01 degrees is judged, if the first Hall output digital value is larger than 0 degree, the first Hall output digital value is 0.01 degrees, otherwise, the first Hall output digital value is-0.01 degrees; the range of the value range of the arc tangent trigonometric function is-90 degrees to 90 degrees, so that the offset value of 90 degrees needs to be added, the range is adjusted to be 0 to 180 degrees, and the absolute angle range of the annular magnet rotating for half a circle is obtained; and according to the property of trigonometric function, when Bx is less than 0, adding 180 degrees to the initial absolute angle to be used as a final absolute angle, and expanding the output range to 0-360 degrees to obtain the final absolute angle of one circle of rotation of the annular magnet, namely one circle of rotation of the speed reducer.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that:
the invention sets up a ring magnet on the motor decelerator, set up two Hall components on the decelerator stationary part; the distance between the first Hall element and the axis of the speed reducer is equal to that between the second Hall element and the axis of the speed reducer, and the connecting line of the first Hall element and the axis of the speed reducer is vertical 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 annular magnet arranged on the speed reducer is driven to rotate by the speed reducer, the magnetic field intensity of the generated rotating magnetic field is constant, the rotating magnetic field rotates nearby by taking the axis of the motor rotor as a rotating shaft, the two Hall elements detect the magnetic field intensity component 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 the accurate absolute angle of the motor reducer by utilizing the annular magnet and the 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 an absolute angle detection device of a motor reducer based on a ring magnet according to embodiment 1.
Fig. 2 is a schematic structural view of a ring magnet according to embodiment 2.
Fig. 3 is a schematic structural diagram of an absolute angle detection device of a motor reducer based on a ring magnet according to embodiment 2.
Fig. 4 is a schematic structural diagram of the PCB described in embodiment 2.
Fig. 5 is a schematic diagram of the relative positions of the PCB and the ring magnet according to embodiment 2.
Fig. 6 is a schematic diagram illustrating detection of the rotating magnetic field generated by the ring magnet by the first hall element and the second hall element according to embodiment 2.
Fig. 7 is a schematic circuit diagram of the PCB board according to embodiment 2.
Fig. 8 is a flowchart of a method for detecting an 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 detected by the first hall element and the second hall element according to embodiment 3.
FIG. 10 is a Lissajous plot of the horizontal and vertical components of magnetic induction as described in example 3.
In the figure, 1-a ring magnet, 2-a first Hall element, 3-a second Hall element, 4-a microprocessor, 5-a power supply and 6-a PCB.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
for the purpose of better illustrating the embodiments, certain features of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product;
it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The technical solution of the present invention is further described below with reference to the accompanying drawings and examples.
Example 1
The embodiment provides a ring magnet-based absolute angle detection device of a motor reducer, which comprises a 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;
arranging the annular magnet 1 on a rotating piece of the speed reducer, wherein the circle center of the annular magnet 1 is superposed with the axis of the speed reducer; starting a motor, driving a speed reducer to rotate by a motor rotor, and driving the annular magnet 1 to rotate by the speed reducer 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 is equal to the distance between the center of the speed reducer and 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 vertical 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, and generate different voltages 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, the annular magnet 1 is arranged on a rotating part of the motor speed reducer, and two Hall elements are arranged on a fixed part of the speed reducer; the center of the annular magnet 1 is superposed with the axle center of the speed reducer, the distance between the center of the first Hall element 2 and the center of the second Hall element 3 is equal to the axle center of the speed reducer, and the connecting line of the center of the first Hall element 2 and the axle center of the speed reducer is vertical to the connecting line of the center of the second Hall element 3 and the axle center of the speed reducer; after the motor is started, the motor rotor drives the speed reducer to rotate, the annular magnet 1 arranged on the speed reducer is driven to rotate by the speed reducer, the magnetic field intensity of the generated rotating magnetic field is constant, the rotating magnetic field rotates nearby by taking the axis of the motor rotor as a rotating shaft, the two Hall elements detect the magnetic field intensity component 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 motor reducer absolute angle acquisition device can acquire an accurate motor reducer absolute angle by utilizing the annular magnet and the two Hall elements, and is simple in structure, low in design and application cost, high in detection efficiency and accurate in detection result.
Example 2
The embodiment provides a motor reducer absolute angle detection device based on a ring magnet, which comprises a ring magnet 1, a first Hall element 2, a second Hall element 3, a microprocessor 4 and a power supply 5;
arranging the annular magnet 1 on a rotating piece of the speed reducer, wherein the circle center of the annular magnet 1 is superposed with the axle center of the speed reducer; starting a motor, driving a speed reducer to rotate by a motor rotor, and driving the annular magnet 1 to rotate by the speed reducer 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 is equal to the distance between the center of the speed reducer and 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 vertical 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, and generate different voltages 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 magnet is a radially magnetized ring magnet with N-pole and S-pole equally divided.
In the embodiment, as shown in fig. 3, an annular groove is formed on a rotating member of the motor reducer, the center of the annular groove coincides with the axis of the reducer, and the annular magnet 1 is arranged in the annular groove; integrating a first Hall element 2, a second Hall element 3, a microprocessor 4 and a power supply 5 on a PCB 6; arranging a PCB 6 on a fixing piece of a speed reducer, and realizing connection with the fixing piece through two through holes on the PCB 6, wherein as shown in figure 4, the circle center of the PCB 6 is superposed with the axis of the speed reducer, the distances from a first Hall element 2 and a second Hall element 3 to the axis of the speed reducer are equal, and the connecting line of the first Hall element 2 and the axis of the speed reducer is vertical 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 facing the ring magnet 1, maintaining a two millimeter spacing.
As shown in fig. 5, the PCB 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 a second hall element 3, and 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, so that the program design 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 filtering module is respectively connected between the power supply and the first hall element, the second hall element, and the microprocessor; hall output filtering modules are respectively connected between the microprocessor and the first Hall element as well as 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 filtering 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 a 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 a resistor R1 is connected with the pin a of the microprocessor, the other end of a resistor R1 is also connected with one end of a capacitor C4, and the other end of a capacitor C4 is grounded; the pin c 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 a pin a of the second Hall element, and the pin a of the second Hall element is also connected with a power supply; a pin b of the second Hall element is connected with one end of a resistor R2, the other end of a resistor R2 is connected with a pin C of the microprocessor, the other end of a resistor R2 is also connected with one end of a capacitor C3, and the other end of a capacitor C3 is grounded; the pin c 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 a pin b and a 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 power supply voltage provided by a 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 the voltage output by the first Hall element and the voltage output by the second Hall element are filtered out respectively.
The power supply provides 3.3V voltage for the first Hall element, the second Hall element and the microprocessor.
The capacities of the capacitors C1, C2, C3 and C4 are all 100 nanofarads; 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 microprocessor 4 is of the type STC8G1K 08A.
The first Hall element 2 and the second Hall element 3 are Hall elements packaged in a surface mount package or a direct-insert package, and are all WSH136 in model.
Example 3
The present embodiment provides a method for detecting an absolute angle of a motor reducer based on a ring magnet, and based on the detection device described in embodiment 1 or 2, as shown in fig. 8, the method includes:
s1: starting the 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 acquires 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; specifically, the method comprises the following steps:
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 an interval (-0.01 degrees and 0.01 degrees); if yes, go to step S3.2.2; if not, executing step S3.3;
s3.2.2: judging whether the first Hall output digital value Bx is larger than 0; if yes, making Bx equal to 0.01 degree; if not, making Bx equal to-0.01 degree;
s3.3: calculating the initial absolute angle of the motor reducer By utilizing 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:
Figure BDA0003541181720000091
in the formula, θ 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 so, adding 180 degrees 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.
The schematic diagram of the variation 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 it can be seen from the diagram that the sum of the squares of the first hall output digital value Bx and the second hall output digital value is a constant value; it was plotted as a plum sand chart as shown in FIG. 10 with an initial absolute angle of
Figure BDA0003541181720000092
The calculated values are obtained, and it can be seen in fig. 10 that the tangent trigonometric function values are overlapped in the first quadrant and the third quadrant, and similarly, the tangent trigonometric function values are also overlapped in the second quadrant and the fourth quadrant; obviously, in the first three-quadrant and the second four-quadrant, the angle values corresponding to the same function value have a difference of 180 degrees, and the final absolute angle of the motor reducer can be calculated through judgment of the quadrants. The range of the value range of the arc tangent trigonometric function is-90 degrees to 90 degrees, so that the offset value of 90 degrees needs to be added, the range is adjusted to be 0 to 180 degrees, and the absolute angle range of the annular magnet rotating for half circle is obtained; then according to the properties of trigonometric function, when Bx<And when the absolute angle is 0, adding 180 degrees to the initial absolute angle to be used as a final absolute angle, and expanding the output range to 0-360 degrees to obtain the final absolute angle of one circle of rotation of the annular magnet, namely one circle of rotation of the speed reducer. It should be noted that the initial absolute angle is calculated by an arctangent trigonometric function, and it is necessary to avoid the situation that the first hall output digital value is equal to 0 °, the processing method of the present embodiment is to determine whether it is in the range of-0.01 ° to 0.01 °, if it is greater than 0, it is 0.01 °, otherwise it is-0.01 °.
The same or similar reference numerals correspond to the same or similar parts;
the terms describing positional relationships in the drawings are for illustrative purposes only and are not to be construed as limiting the patent;
it should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.

Claims (10)

1. The device is characterized by comprising an annular magnet, a first Hall element, a second Hall element, a microprocessor and a power supply;
arranging the annular magnet on a rotating piece of the speed reducer, wherein the circle center of the annular magnet is superposed with the axis of the speed reducer; starting the motor, driving the speed reducer to rotate by the motor rotor, and driving the annular magnet to rotate by the speed reducer to generate a rotating magnetic field;
the first Hall element and the second Hall element are arranged on the 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 vertical 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, and generate different voltages 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.
2. The ring magnet based motor reducer absolute angle detecting device of claim 1, wherein the ring magnet is a radially magnetized ring magnet with N-pole and S-pole equally divided.
3. The ring magnet-based motor reducer absolute angle detecting device according to claim 2, 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 the 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.
4. The ring magnet based motor reducer absolute angle detection device according to claim 3, wherein a power supply filtering module is connected between the power supply and the first Hall element, the second Hall element and the microprocessor respectively; hall output filtering modules are 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 filtering 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 a 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 a resistor R1 is connected with the pin a of the microprocessor, the other end of a resistor R1 is also connected with one end of a capacitor C4, and the other end of a capacitor C4 is grounded; the pin c 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 a pin a of the second Hall element, and the pin a of the second Hall element is also connected with a power supply; a pin b of the second Hall element is connected with one end of a resistor R2, the other end of a resistor R2 is connected with a pin C of the microprocessor, the other end of a resistor R2 is also connected with one end of a capacitor C3, and the other end of a capacitor C3 is grounded; the pin c 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 a pin b and a 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.
5. The ring magnet based motor reducer absolute angle sensing device of claim 4, wherein the microprocessor is of type STC8G1K 08A.
6. The ring magnet-based motor reducer absolute angle detection device according to claim 4, wherein the first Hall element and the second Hall element are Hall elements packaged in a patch package or a direct-insert package, and are all WSH136 type.
7. A method for detecting the absolute angle of a motor reducer based on a ring magnet, which is based on the detection device of any one of claims 1 to 6, is characterized by comprising the following steps:
s1: starting the 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 acquires 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.
8. The method for detecting the absolute angle of the ring magnet based motor reducer according to claim 7, wherein the 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 the initial absolute angle of the motor reducer By utilizing 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 so, adding 180 degrees 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.
9. The method for detecting the absolute angle of the ring magnet based motor reducer according to claim 8, wherein in 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 an interval (-0.01 degrees and 0.01 degrees); if yes, go to step S3.2.2; if not, executing step S3.3;
s3.2.2: judging whether the first Hall output digital value Bx is larger than 0; if yes, making Bx equal to 0.01 degree; if not, let Bx be-0.01 °.
10. The ring magnet based motor reducer absolute angle detecting method according to claim 8, wherein in the step S3.3, the trigonometric function formula is:
Figure FDA0003541181710000031
in the formula, θ represents an initial absolute angle of the motor reducer.
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 true CN114583898A (en) 2022-06-03
CN114583898B 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)

Cited By (1)

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

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080094058A1 (en) * 2006-10-20 2008-04-24 Denso Corporation Magnetic rotor and rotational angle sensing apparatus having the same
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
US20180252779A1 (en) * 2017-03-02 2018-09-06 Allegro Microsystems, Llc Circular vertical hall (cvh) sensing element with dc offset removal
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080094058A1 (en) * 2006-10-20 2008-04-24 Denso Corporation Magnetic rotor and rotational angle sensing apparatus having the same
JP2010060478A (en) * 2008-09-05 2010-03-18 Yaskawa Electric Corp Position detection device of linear/rotary motor and linear/rotary motor
US20180252779A1 (en) * 2017-03-02 2018-09-06 Allegro Microsystems, Llc Circular vertical hall (cvh) sensing element with dc offset removal
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 (3)

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

Cited By (1)

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

Also Published As

Publication number Publication date
CN114583898B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
CN101802557B (en) Non-contact multi-turn absolute position magnetic sensor comprising a through-shaft
CN106643470B (en) A kind of absolute type capacitor angle displacement measurement sensor
CN103528605B (en) A kind of capacitive absolute rotary encoder
CN103944317B (en) The arbitrarily angled detection method in brushless DC motor rotor position
CN107127786B (en) A kind of dicode disk encoder and joint of robot servo-drive system
CN103856138B (en) For the system of collecting energy and for the system for the Angle Position for controlling its counterweight
CN112117872B (en) Special motor, electrical equipment and vehicle
CN107863913B (en) A kind of coding/decoding method and system of rotary transformer
CN114583898A (en) Motor reducer absolute angle detection device and method based on annular magnet
EP2815211A1 (en) Rotary position sensor device
CN103944344A (en) Four-pole brushless direct current position motor and detection method thereof
CN110932514A (en) Brushless motor and detection method for motor rotor position
CN104796053B (en) DC motor controller and control method based on rotary transformer
CN107529384B (en) Micro- flywheel speed-measuring method and device based on linear hall element
CN110004607A (en) A method of it is looked for for industrial sewing machine booting and stops needle position
CN206640471U (en) Motor and miniature head
CN105953721B (en) A kind of bias capacitive angular sensor structure and its application method
CN209659097U (en) The detecting apparatus for rotor position of magneto
CN117097083A (en) Motor and method for detecting absolute position of output shaft
CN104316085B (en) Absolute value rotary encoder based on double-speed induction synchronous machine
Kimura et al. Resolver compatible capacitive rotary position sensor
CN209256990U (en) Intelligent robot joint assembly
CN202550953U (en) Automotive PMSM (Permanent Magnet Synchronous Motor) control system based on GMR (Giant Magneto Resistive) sensor
CN112344970A (en) Off-axis single-ring single-antipode absolute magnetic encoder
CN113949224B (en) Rotating speed detection device and method for magnetic suspension high-speed motor

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