PROCESS AND DEVICE FOR ADJUSTING ROTARY ENCODER
20170131124 ยท 2017-05-11
Assignee
Inventors
Cpc classification
G01D5/2033
PHYSICS
International classification
Abstract
The invention relates to the process and device for adjusting a rotary encoder, i.e. the absolute magnetic rotary encoder with Hall effect sensors which, when positioned in the form of a circle, detect the magnetic field of a diametrically polarised permanent magnet. The rotary encoder adjustment process features the following: the actuator magnet turns once or several times over the sensor circuit, whereby the time-dependant rotation angle is recorded/stored; time-dependant presupposed values of the rotation angle are calculated; these are then subtracted from the measured actual rotation angle values; by analysing the obtained difference, the electric parameter values for the sensor circuit are determined in such a manner as to make the newly measured difference based on new electric parameter values smaller than before the change; the electric parameter values for the sensor circuit are written into the sensor circuit.
Claims
1. A process for adjusting a rotary encoder that includes an actuator magnet and a sensor circuit, the process including the steps of: rotating the actuator magnet once or several times over the sensor circuit and detecting measured rotation angles with the sensor circuit; recording the measured rotation angles together with the time of detection; calculating time dependent presupposed values of the rotation angles; subtracting the time-dependent presupposed values from the measured actual rotation angle values to obtain a first difference; determining electric parameter values for the sensor circuit based on the first difference, wherein the electric parameter values are selected so that a newly measured difference between the presupposed values and the measured actual rotation values using the electric parameter values is smaller than the first difference; and writing the electric parameter values into the sensor circuit.
2. A process according to claim 1 wherein, in a case in which the rotation speed of the actuator magnet does not change during the adjustment process, the presupposed values are calculated in such a way that with each recorded rotation angle the rotation angle value is calculated as if returned by the sensor circuit at gradually increasing or decreasing rotation angle values.
3. A process according to claim 1 wherein, in a case in which the rotation speed of the actual magnet changes during the adjustment process, the measured rotation angles are recorded in time intervals that are short enough to cover most of the positions of the encoder; a period for each recorded measured rotation angle value is determined from the time difference between successive revolutions with the same rotation angle value; an angular velocity as a function of time is calculated from the periods; and the time-dependent presupposed rotation angles are calculated by integrating products of the angular velocity and the time interval between two measured values.
4. A device for adjusting the rotary encoder that executes the process according to claim 1, wherein the device is connected to the encoder with the sensor circuit after the encoder and the actuator magnet have been installed; and the device is configured to (i) record the measured rotation angles together with the time of detection, (ii) calculate error and calculate the electric parameters for the sensor circuit, (iii) write the electric parameters into the sensor circuit.
5. A device according to claim 4, wherein the device is integrated inside an encoder housing.
6. A device that executes the process according to claim 2, wherein the device is connected to the encoder with the sensor circuit after the encoder and the actuator magnet have been installed; and the device is configured to (i) record the measured rotation angles together with the time of detection; (ii) calculate error and calculate the electric parameters for the sensor circuit; and iii) write the electric parameters into the sensor circuit.
7. A device that executes the process according to claim 3, wherein the device is connected to the encoder with the sensor circuit after the encoder and the actuator magnet have been installed; and the device is configured to (i) record the measured rotation angles together with the time of detection; (ii) calculate error and calculate the electric parameters for the sensor circuit; and iii) write the electric parameters into the sensor circuit.
8. A device according to claim 6, wherein the device is integrated inside an encoder housing.
9. A device according to claim 7, wherein the device is integrated inside an encoder housing.
Description
PROCESS DESCRIPTION
[0012] The invention will be described by means of a preferred embodiment and a FIGURE which shows:
[0013]
[0014] After having inserted the actuator magnet into the rotation shaft and after having installed the printed circuit board at the user's facility, we trigger the magnet to make one or several revolutions over the sensor circuit, whereby we record the rotation angle returned by the rotary encoder, depending on time. After having finished the recording, we calculate a presupposed rotation angle in the time domain.
[0015] If the actuator magnet rotates fast enough, we can presuppose in case that the moment of inertia of the body the magnet is attached to is big enough that the rotation speed during the adjustment procedure does not change. Therefore, let us presuppose that the actual rotation angle of the magnet within one revolution gradually increases or decreases, depending on the rotation direction. For each measured rotation angle value we calculate the rotation angle value which within one revolution is a linear function of time. From the difference between the measured and calculated presupposed rotation angle values (i.e. from the error) and by analysing the error within one revolution we then establish such electric parameter values for the sensor circuit that the error after the change of the electric parameters is smaller than before the change.
[0016] A similar method is applied when the magnet rotation speed changes during the adjustment procedure. Likewise, we record the rotation angle returned by the encoder, depending on time, within several revolutions of the magnet. Time intervals between two measured values should be as short as to enable the recording of nearly all positions of the encoder. From time difference values between consecutive revolutions with the same rotation angle value we then determine the period for each recorded rotation angle value. From periods we first calculate the angular velocity in relation to the rotation angle value and afterwards also the angular velocity as the function of time. By integrating the products of the angular velocity as the function of time and the time interval between two measured values, we calculate the presupposed rotation angle, depending on time. The calculated presupposed rotation angle is then subtracted from the measured actual rotation angle values and thus we obtain the error information within several revolutions. By analysing the error, we determine the electric parameter values for the sensor circuit anew, so that after the new electric parameters have been written into the sensor circuit, the newly measured difference is smaller than that before the change. By analysing the error calculated during several revolutions, the right electric parameter values are determined even more reliably.
[0017] Device Description:
[0018] In the preferred embodiment the device for rotary encoder adjustment consists of a circuit with a microcontroller. After having attached the magnet to the shaft the rotation of which is being measured and after having installed the encoder sensor circuit, we connect the adjustment device to the sensor circuit. The shaft the magnet is attached to is at the same time the rotation shaft of the servo-motor. We let the servo-motor rotate under power-supply for a while, and when it reaches the planned rotational speed, we turn off the power-supply and let the servo-motor become idle. The microcontroller is programmed so as to read and save the rotation angle values, i.e. the shaft position. The interval between two readings is fixed or variable. The interval is selected so as to enable the microcontroller to record most of the encoder positions during one revolution of the shaft. The microcontroller stores rotation angle data along with the time data (time-related request for rotation angle value) into memory. The storing ends after one or more revolutions. Afterwards the measured values are assessed according to the above described method: the microcontroller calculates the period values of the shaft for each stored rotation angle value by means of an algorithm. The periods are calculated as a difference between the time values of two rotation angles which differ by one revolution. For each period the programme calculates the corresponding angular velocity, first as the rotation angle function and then as the function of time. The theoretical rotation angle, depending on time, is calculated according to algorithm by integrating products of the angular velocity as the function of time and the time interval between two measured values. The theoretical rotation angle is one measured in a situation where the two sinusoidal signals have the same amplitude, no offset and when they are phase-shifted for exactly a quarter of the period. The microcontroller then subtracts as programmed the calculated presupposed rotation angle from the measured actual rotation angles, and gets the error within one or more revolutions. By applying the error analysis, the electric parameter values for the sensor circuit are defined anew. After new electric parameter values have been written into the sensor circuit, which is likewise done by the microcontroller, the newly measured difference between the actual rotation angle and the calculated one is smaller than that before the change. By analysing the error calculated during several revolutions, the electric parameter values are determined more reliably.
[0019] Instead of a microcontroller some other technical solution could be applied for this adjustment device, such as a FPGA circuit or even a personal computer programme with an additional input-output card providing for communication with the encoder.
[0020] It is also possible to attach an adjustment device realised by a microcomputer or a FPGA circuit to the sensor circuit inside the encoder housing, thus having it fully integrated into the encoder.
[0021] The above adjustment process and device can likewise be applied also in case when the sensor circuit and Hall elements are not integrated on the same solid-state circuit, but consist of discrete Hall elements and a separate electronic circuit for processing signals. Also, other magnetic field sensors can be used instead of Hall elements, for instance magneto-resistive sensors of the AMR type (Anisotropic Magneto resistance), GMR type (Giant Magneto Resistance) or TMR type (Tunneling Magneto Resistance).