Robot joint angle detection method and device
Through the coaxial installation of the potentiometer and the rotation axis of the robot joint, the voltage value change trend is used to characterize the joint angle, which solves the problem of difficulty in balancing the accuracy and cost of robot joint angle detection, achieves a simple and accurate detection process, and reduces maintenance time and cost.
Patent Information
- Application Number
- CN202210677529.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-06-14
- Filing Date
- 2022-06-16
- Publication Date
- 2024-10-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing technology, it is difficult to balance the accuracy and cost of robot joint angle detection. The slippage of the transmission belt causes the servo motor to be unable to be accurately controlled. Adding an absolute encoder is costly and has poor universality.
The potentiometer is installed coaxially with the rotation axis of the joint to be detected. By recording the voltage value change trend of the potentiometer at the extreme angle, linear equations are used to characterize the relationship between joint movement angle and voltage value, simplifying the calibration process and reducing the difficulty of use. and improve universality.
It realizes the rapid and accurate detection of robot joint angles without the need for professional tools and personnel, reduces equipment maintenance time, avoids greater damage caused by mechanical failure, and the cost is lower than absolute value encoders.
Smart Images

Figure CN115183666B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot technology, and in particular to a method and device for detecting robot joint angles. Background Art
[0002] At present, the most commonly used positioning method is to use a servo motor with an incremental encoder or an absolute encoder for position positioning. These two encoders are generally debugged and calibrated by engineers during commissioning. Calibration personnel generally need relatively rich professional knowledge and skills, but when the motor positioning is offset, it is difficult to detect through visual observation. At this time, it is necessary to add another encoder to the outermost transmission mechanism to verify the position.
[0003] The existing robot head can nod 0-60°, and the mechanical positioning relies on the incremental encoder behind the servo motor to independently calculate the position. Due to long-term operation, the mechanical transmission mechanism has experienced belt slippage. The belt slippage causes the calculated position to be different from the actual position. The program cannot accurately control the motor based on the calculated wrong position, causing greater damage to the transmission belt until it is completely unusable.
[0004] In order to solve the problem that the servo motor cannot detect the actual position of the head due to transmission slippage, it is necessary to add an encoder again at the movable mechanism of the robot head. Generally, there are two types of encoders: incremental encoders and absolute encoders. Incremental encoders have the advantages of high detection accuracy, low price, and convenient wiring. The disadvantages of incremental encoders are that the position value cannot be saved when the device is powered off and then powered on again, and the encoder receiving device needs to have the ability to distinguish high-speed pulse signals. Although the absolute encoder can use the battery to record the position data when the power is off, and use the power cord and network cable for power supply and data communication, the PLC needs to support the same communication protocol as the absolute encoder, and the price of the absolute encoder is several times that of the ordinary incremental encoder, and the maintenance and replacement costs are high.
[0005] Therefore, if an absolute encoder is used only for more accurate detection of the robot head, the cost is too high and is not suitable for the popularization of robots. Although there are technical solutions based on resistance value to detect the posture angle of the robot in the prior art, the universality of these technical solutions is poor and it is still difficult to solve the problem of high cost of robots. Summary of the invention
[0006] The main purpose of the present invention is to provide a robot joint angle detection method and device to solve the technical problem in the prior art that it is difficult to strike a balance between accuracy and cost in robot joint angle detection.
[0007] In order to achieve the above-mentioned purpose, according to one aspect of the present invention, a robot joint angle detection method is provided, comprising: installing the rotating end of the potentiometer coaxially with the rotating axis of the joint to be detected; moving the joint to be detected to a first limit angle to trigger the start of detection; moving the joint to be detected to a second limit angle to trigger the stop of detection; recording the detection voltage value of the potentiometer from the start of detection to the stop of detection; judging whether the overall change trend of the voltage value is increasing or decreasing; judging the size relationship between the first voltage value when starting detection and the second voltage value when stopping detection; if the change trend of the voltage value is increasing, and the first voltage value is less than the second voltage value, characterizing the relationship between the joint activity angle and the detection voltage value by a first linear equation; if the change trend of the voltage value is decreasing, and the first voltage value is greater than the second voltage value voltage value, the relationship between the joint movement angle and the detection voltage value is characterized by a second first-order linear equation; if the voltage value has an increasing trend, and the first voltage value is greater than the second voltage value, the detection voltage value less than the first voltage value is increased by a first predetermined voltage value to obtain a first detection regulating voltage value, and the detection voltage value greater than the first voltage value and the first detection regulating voltage value are characterized by a third first-order linear equation as to their relationship with the joint movement angle; if the voltage value has a decreasing trend, and the first voltage value is less than the second voltage value, the detection voltage value greater than the first voltage value is reduced by a second predetermined voltage value to obtain a second detection regulating voltage value, and the detection voltage value less than the first voltage value and the second detection regulating voltage value are characterized by a fourth first-order linear equation as to their relationship with the joint movement angle.
[0008] In one embodiment, determining whether the overall change trend of the voltage value is increasing or decreasing includes: comparing the detection voltage value of the current time period with the detection voltage value of the previous time period; if the current detection voltage value is greater than the detection voltage value of the previous time period, the increase count is increased by 1; if the current detection voltage value is less than the detection voltage value of the previous time period, the decrease count is increased by 1; if the current detection voltage value is equal to the detection voltage value of the previous time period, the increase count and the decrease count remain unchanged; if the increase count is greater than the decrease count, determining that the overall change trend of the voltage value is increasing; if the increase count is less than the decrease count, determining that the overall change trend of the voltage value is decreasing.
[0009] In order to achieve the above-mentioned purpose, according to one aspect of the present invention, a robot joint angle detection device is provided, including: a potentiometer, wherein the rotating end of the potentiometer is coaxially installed with the rotating axis of the joint to be detected; a controller, which triggers the controller to start detection when the joint to be detected moves to a first limit angle, and triggers the controller to stop detection when the joint to be detected moves to a second limit angle, the controller records the detection voltage value of the potentiometer from the start of detection to the stop of detection, the controller determines whether the overall change trend of the voltage value is increasing or decreasing, and the controller determines the size relationship between the first voltage value when the detection starts and the second voltage value when the detection stops; if the change trend of the voltage value is increasing, and the first voltage value is less than the second voltage value, the controller characterizes the relationship between the joint movement angle and the detection voltage value through a first linear equation; if the change trend of the voltage value is decreasing, and the first voltage value is less than the second voltage value, the controller characterizes the relationship between the joint movement angle and the detection voltage value through a first linear equation If one voltage value is greater than the second voltage value, the controller uses a second first-order linear equation to characterize the relationship between the joint movement angle and the detection voltage value; if the voltage value changes in an increasing trend, and the first voltage value is greater than the second voltage value, then the detection voltage value that is less than the first voltage value is increased by a first predetermined voltage value to obtain a first detection regulating voltage value, and the controller uses a third first-order linear equation to characterize the relationship between the detection voltage value greater than the first voltage value and the first detection regulating voltage value and the joint movement angle; if the voltage value changes in a decreasing trend, and the first voltage value is less than the second voltage value, then the detection voltage value greater than the first voltage value is reduced by a second predetermined voltage value to obtain a second detection regulating voltage value, and the controller uses a fourth first-order linear equation to characterize the relationship between the detection voltage value less than the first voltage value and the second detection regulating voltage value and the joint movement angle.
[0010] In one embodiment, the robot joint angle detection device also includes an up counter and a down counter, and the controller determines whether the overall change trend of the voltage value is increasing or decreasing, including: comparing the detection voltage value of the current time period with the detection voltage value of the previous time period; if the current detection voltage value is greater than the detection voltage value of the previous time period, the up count of the up counter is increased by 1; if the current detection voltage value is less than the detection voltage value of the previous time period, the down count of the down counter is increased by 1; if the current detection voltage value is equal to the detection voltage value of the previous time period, the up counter and the down counter do not count; if the up count is greater than the down count, the controller determines that the overall change trend of the voltage value is increasing; if the up count is less than the down count, the controller determines that the overall change trend of the voltage value is decreasing.
[0011] In one embodiment, the controller is a PLC.
[0012] In one embodiment, the potentiometer is a CP50 potentiometer.
[0013] In order to achieve the above object, according to one aspect of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above robot joint angle detection method when running.
[0014] To achieve the above objective, according to one aspect of the present invention, there is provided an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the above robot joint angle detection method.
[0015] By applying the technical solution of the present invention, four situations that may be involved in the use of the potentiometer are set in advance, and corresponding programs are set for each situation, thereby reducing the difficulty of using the potentiometer in robot joint angle detection and improving the universality of the potentiometer in robot joint angle detection. The method of use is also very simple. It only needs to manually adjust the robot joint to two extreme positions to trigger the start detection and stop detection respectively. The entire calibration process does not require the use of professional tools and professionals, and there is no requirement for positive and negative polarity in the welding of the two extreme endpoints of the potentiometer.
[0016] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0018] Figure 1 A schematic flow chart of an embodiment of a robot joint angle detection method according to the present invention is shown. DETAILED DESCRIPTION
[0019] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0020] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0022] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0023] What needs to be explained about the potentiometer is that the potentiometer is an adjustable variable resistor. Basically, the resistance value will change between 0 and the maximum value for each rotation. After the rotating end of the potentiometer is installed coaxially with the rotating axis of the joint to be detected, in an ideal state, the position of the potentiometer is adjusted. When the joint to be detected moves from the first limit angle to the second limit angle, the resistance value X corresponding to the first limit angle and the resistance value Y corresponding to the second limit angle can be obtained. According to the mathematical principle of a linear equation, the angle value between the first limit angle and the second limit angle calculated between X and Y can be obtained linearly. In the actual installation test, based on the different installation situations of the potentiometer, when the potentiometer rotates through the origin, the resistance value X will suddenly change to 0, then quickly become the maximum value, and then change from the maximum value to Y. This situation shows a nonlinear state, resulting in a linear equation that cannot characterize the relationship between the joint movement angle and the resistance, which reduces the universality of the potentiometer in robot joint angle detection.
[0024] In order to solve the above problems, improve the universality of potentiometers in robot joint angle detection, and achieve the effect of taking both accuracy and cost into account. In the technical solution of the present invention, a robot joint angle detection method is provided, which includes: installing the rotating end of the potentiometer coaxially with the rotating axis of the joint to be detected. The joint to be detected is moved to the first limit angle to trigger the start of detection, and the joint to be detected is moved to the second limit angle to trigger the stop of detection. Record the detection voltage value of the potentiometer from the start of detection to the stop of detection, judge whether the overall change trend of the voltage value is increasing or decreasing, and judge the size relationship between the first voltage value when the detection starts and the second voltage value when the detection stops. If the change trend of the voltage value is increasing, and the first voltage value is less than the second voltage value, the relationship between the joint activity angle and the detection voltage value is characterized by a first linear equation; if the change trend of the voltage value is decreasing, and the first voltage value is greater than the second voltage value, the relationship between the joint activity angle and the detection voltage value is characterized by a second linear equation. If the changing trend of the voltage value is increasing, and the first voltage value is greater than the second voltage value, then the first predetermined voltage value is added to the detection voltage value less than the first voltage value to obtain a first detection regulating voltage value, and the detection voltage value greater than the first voltage value and the first detection regulating voltage value are characterized by a third continuous linear equation and their relationship with the joint movement angle; if the changing trend of the voltage value is decreasing, and the first voltage value is less than the second voltage value, then the detection voltage value greater than the first voltage value is reduced by a second predetermined voltage value to obtain a second detection regulating voltage value, and the detection voltage value less than the first voltage value and the second detection regulating voltage value are characterized by a fourth continuous linear equation and their relationship with the joint movement angle.
[0025] By adopting the technical solution of the present invention, four situations that may be involved in the use of the potentiometer are set in advance, and corresponding programs are set for each situation, thereby reducing the difficulty of using the potentiometer in robot joint angle detection and improving the universality of the potentiometer in robot joint angle detection. The method of use is also very simple. It only needs to manually adjust the robot joint to two extreme positions, and trigger the start detection and stop detection respectively. The entire calibration process does not require the use of professional tools and professionals, and there is no requirement for positive and negative polarity in the welding of the two extreme endpoints of the potentiometer.
[0026] It should be noted that in this embodiment and the present invention, the voltage value is used as a limitation. Similarly, the current value or resistance value directly related to the voltage value can be used as an equivalent application, which also belongs to the protection scope of the present invention.
[0027] More preferably, the determination of whether the overall change trend of the voltage value is increasing or decreasing includes: comparing the detection voltage value of the current time period with the detection voltage value of the previous time period. If the current detection voltage value is greater than the detection voltage value of the previous time period, the up count is increased by 1; if the current detection voltage value is less than the detection voltage value of the previous time period, the down count is increased by 1; if the current detection voltage value is equal to the detection voltage value of the previous time period, the up count and the down count remain unchanged; if the up count is greater than the down count, the overall change trend of the voltage value is determined to be increasing; if the up count is less than the down count, the overall change trend of the voltage value is determined to be decreasing.
[0028] Specifically, Figure 1 As shown, in the technical solution of this embodiment, the CP50 potentiometer and PLC are used to detect the joint angle of the robot head. CP50 is an adjustable variable resistor. Every time CP50 rotates one circle, the resistance value will change between 0-2000Ω. The potentiometer is connected to the robot head rotation mechanism, and the change in the head rotation position will be converted into a change in the output resistance value of CP50. When direct current is passed through CP50, the change in resistance will change the output voltage, thus successfully converting the change in the robot head rotation position into a voltage signal fluctuation. Generally, PLC can identify and process analog signals, and has good versatility. The potentiometer only needs to connect two power supplies and one signal line, and the line connection is simpler than both incremental and absolute encoders. The price of the potentiometer is only 2 / 3 of that of the incremental encoder. After installing the rotating end of the potentiometer coaxially with the rotating axis of the joint to be tested, ideally, adjust the position of the potentiometer. When the robot head position is 0°, the potentiometer resistance value corresponds to X, and when the robot head position is 60°, the potentiometer resistance value corresponds to Y. According to the mathematical principle of two points and one line, the robot head position value calculated between X and Y can be obtained linearly. In the actual installation test, when the robot head rotates from 0-60°, the resistance value of the potentiometer will suddenly change from X to 0 and then quickly change to 2000Ω after reaching 0, and then change from 2000Ω to Y. To deal with the above technical problems, the following algorithm control can be made in the PLC:
[0029] Preset I_FirstCalibrateValueOfTargetRange=0°, which is the angle position of the robot head when looking horizontally (you can modify different values according to actual conditions).
[0030] Set I_TwiceCalibrateValueOfTargetRange = 60°, which is the angle of the robot head when looking down (you can modify different values according to actual conditions).
[0031] When I_CancelForbitDanceCalibrate=1, pressing the calibration button is invalid, and the program performs the calibration conversion according to the previously saved data.
[0032] When I_CancelForbitDanceCalibrate=0, manually adjust the robot head to the 0° position when looking horizontally.
[0033] Press the I_StartScaleBotton button, and the O_RunningCalibration output status is 1, indicating that calibration is currently in progress. The program will record the detection voltage value of the potentiometer when the robot head is at the 0° position.
[0034] Move the robot's head position from the 0° position to the 60° downward position and stop. During the movement, the program will always detect the detection voltage value of the robot's head in the current time period and compare it with the detection voltage value of the previous time period. If the current detection voltage value is greater than the detection voltage value of the previous time period, the up count is increased by 1. If the current detection voltage value is less than the detection voltage value of the previous time period, the down count is increased by 1. If the current detection voltage value is equal to the detection voltage value of the previous time period, it means that the robot's head position has not changed, and neither the up count nor the down count changes.
[0035] When the robot head reaches the 60° downward position, press the I_EndScaleBotton button, and the program records the detection voltage value of the potentiometer when the robot head is at the 60° position.
[0036] Stop calling the execution program of the increase and decrease counts and seal the values of the increase and decrease counts. The output of O_RunningCalibration is 0, and the output of O_CalibrateEnd is 1. At this time, the robot head calibration is officially completed, and the detection voltage value of the robot head at the 0° position, the detection voltage value of the robot head at the 60° position, the increase count value, and the decrease count value are permanently saved as important parameters for the robot head position calibration.
[0037] If the increase count value > the decrease count value, the overall trend of the detection voltage value when the robot head moves from the 0° position to the 60° position is increasing, set Increase1=true and Decrease1=false.
[0038] If the increase count value < the decrease count value, the overall trend of the detection voltage value when the robot head moves from the 0° position to the 60° position is decreasing, set Increase1=False and Decrease1=True.
[0039] If the detection voltage value at the 0° position is less than the detection voltage value at the 60° position, set Increase2=True and Decrease2=False.
[0040] If the detection voltage value at the 0° position is greater than the detection voltage value at the 60° position, set Increase2=False and Decrease2=True.
[0041] If the result of the robot head calibration is Increase1=true, Increase2=true, the overall trend of the detection voltage value when the robot head runs from the 0° position to the 60° position is increasing, there is no sudden change in the running detection voltage value when the robot head runs between the two extreme positions, and the data characteristics conform to the first-order linear equation, then the relationship between the joint activity angle and the detection voltage value is characterized by the first first-order linear equation.
[0042] If the result of the robot head calibration is Decrease1=true, Decrease2=true, the overall trend of the detection voltage value of the robot head running from the 0° position to the 60° position is decreasing, and the detection voltage value of the robot head extreme position is decreasing. The robot head running detection voltage value between the two extreme positions does not change suddenly, and the relationship between the joint activity angle and the detection voltage value is characterized by the second linear equation.
[0043] If the result of the robot head calibration is Increase1=true, Decrease2=true, the overall trend of the detection voltage value when the robot head moves from the 0° position to the 60° position is to increase. The detection voltage value of the robot head running between the two extreme positions undergoes a mutation, and the mutation direction is 10V→1V. All detection voltage values less than the -15° position are caused by the potentiometer rotating the pointer past the 0 position. The detection voltage value less than the first voltage value is increased by a first predetermined voltage value to obtain a first detection voltage regulation value, and the detection voltage value greater than the first voltage value and the first detection voltage regulation value are characterized by a continuous third-order linear equation and the relationship with the joint motion angle. Specifically, the first predetermined voltage value can be set to 10v, that is, the first detection voltage regulation voltage value = the detection voltage value less than the first voltage value + 10V.
[0044] If the result of the robot head calibration is Decrease1=true, Increase2=true, the overall trend of the detection voltage value when the robot head moves from the 0° position to the 60° position is to decrease. The detection voltage value of the robot head running between the two extreme positions undergoes a mutation, and the mutation direction is 0V→9V. All detection voltage values greater than the 0° position are caused by the potentiometer rotating pointer turning over the 0Ω position. The detection voltage value greater than the first voltage value is reduced by a second predetermined voltage value to obtain a second detection voltage regulation value, and the detection voltage value less than the first voltage value and the second detection voltage regulation value are characterized by a continuous fourth-order linear equation and the relationship with the joint motion angle. Specifically, the second predetermined voltage value can be set to 10v, that is, the second detection voltage regulation voltage value = the detection voltage value greater than the first voltage value - 10V.
[0045] In the above program, the meaning of each parameter is:
[0046] I_CancelForbitDanceCalibrate: This position is set to 1, indicating that the program is prohibited from calibrating and the original calibration data is used for output.
[0047] I_ActualValue: Read the real-time value of the current potentiometer voltage converted by the PLC module.
[0048] I_MinValueOfModulRange: Considering that different brands of PLC modules have different corresponding 0-10V conversion values, it is necessary to set the minimum value of the current PLC module.
[0049] I_MaxValueOfModulRange: Considering that the conversion values of 0-10V corresponding to PLC modules of different brands are different, it is necessary to set the maximum value of the current PLC module.
[0050] I_FirstCalibrateValueOfTargetRange: Sets the position value of the first calibrated limit position.
[0051] I_TwiceCalibrateValueOfTargetRange: Sets the position value of the second calibration limit position.
[0052] I_ModleToleranceZone: Module tolerance setting. There is a certain amount of interference in the analog quantity. When the fluctuation of the interference is less than this value, it is considered that the input parameter has not changed.
[0053] I_StartScaleBotton: Start calibration button to swing the robot head to the first extreme position.
[0054] I_EndScaleBotton: End calibration button, swing the robot head to the second extreme position.
[0055] O_CalibrateErr: Calibration error output bit.
[0056] O_CurrentValue: Calibrate the output current detection voltage value.
[0057] O_RunningCalibration: The output is 1 when the first limit position has been calibrated but the second limit position has not yet been calibrated.
[0058] O_CalibrateEnd: Calibrates the second limit position output to 1.
[0059] From the above description, it can be seen that the above embodiments of the present invention achieve the following technical effects:
[0060] The maximum and minimum value settings of the PLC module added by the program can meet the use of PLC modules of different brands, making the application of the program more extensive and flexible. Using the new calibration program, the potentiometer gear only needs to be meshed with the relevant gear of the rotating shaft of the joint to be detected. The method of use is also very simple. You only need to manually adjust the robot head to two extreme positions and press the corresponding calibration buttons on the computer screen to complete the calibration. The entire calibration process does not require the use of professional tools and professionals, and there is no requirement for positive and negative polarity for the welding of the two extreme endpoints of the potentiometer. Practice has proved that ordinary operators who have been trained can also easily achieve calibration within 20 seconds, greatly reducing the time for equipment downtime maintenance in the later stage. The actual position detected is compared with the position calculated by the servo for tolerance. When the tolerance of the two exceeds the set value, the program alarms, and mechanical failures can be discovered in advance to avoid further mechanical damage.
[0061] The present invention also provides a robot joint angle detection device, which includes a potentiometer and a controller. The rotating end of the potentiometer is installed coaxially with the rotating axis of the joint to be detected. The joint to be detected is moved to a first limit angle to trigger the controller to start detection. The joint to be detected is moved to a second limit angle to trigger the controller to stop detection. The controller records the detection voltage value of the potentiometer from the start of detection to the stop of detection. The controller determines whether the overall change trend of the voltage value is increasing or decreasing. The controller determines the size relationship between the first voltage value when starting detection and the second voltage value when stopping detection; if the change trend of the voltage value is increasing, and the first voltage value is less than the second voltage value, the controller characterizes the relationship between the joint activity angle and the detection voltage value through a first linear equation; if the change trend of the voltage value is decreasing, and the first voltage value is greater than the second voltage value, the controller characterizes the relationship between the joint activity angle and the detection voltage value through a first linear equation. The controller characterizes the relationship between the joint movement angle and the second voltage value through a second first-order linear equation; if the changing trend of the voltage value is increasing, and the first voltage value is greater than the second voltage value, then the detection voltage value less than the first voltage value is increased by a first predetermined voltage value to obtain a first detection regulating voltage value, and the controller characterizes the relationship between the detection voltage value greater than the first voltage value and the first detection regulating voltage value and the joint movement angle through a continuous third first-order linear equation; if the changing trend of the voltage value is decreasing, and the first voltage value is less than the second voltage value, then the detection voltage value greater than the first voltage value is reduced by a second predetermined voltage value to obtain a second detection regulating voltage value, and the controller characterizes the relationship between the detection voltage value less than the first voltage value and the second detection regulating voltage value and the joint movement angle through a continuous fourth first-order linear equation.
[0062] The robot joint angle detection device of the present invention sets four possible situations involving the use of the potentiometer in advance, and sets corresponding programs for each situation, thereby reducing the difficulty of using the potentiometer in robot joint angle detection and improving the universality of the potentiometer in robot joint angle detection. The method of use is also very simple. You only need to manually adjust the robot joint to two extreme positions, and trigger the start and stop detection respectively. The entire calibration process does not require the use of professional tools and professionals, and there is no requirement for positive and negative polarity in the welding of the two extreme endpoints of the potentiometer.
[0063] More preferably, the robot joint angle detection device also includes an up counter and a down counter, and the controller determines whether the overall change trend of the voltage value is increasing or decreasing, including: comparing the detection voltage value of the current time period with the detection voltage value of the previous time period; if the current detection voltage value is greater than the detection voltage value of the previous time period, the up count of the up counter is increased by 1; if the current detection voltage value is less than the detection voltage value of the previous time period, the down count of the down counter is increased by 1; if the current detection voltage value is equal to the detection voltage value of the previous time period, the up counter and the down counter do not count; if the up count is greater than the down count, the controller determines that the overall change trend of the voltage value is increasing; if the up count is less than the down count, the controller determines that the overall change trend of the voltage value is decreasing.
[0064] Preferably, the controller is a PLC, and the potentiometer is a CP50 potentiometer.
[0065] The present invention also provides a computer-readable storage medium in which a computer program is stored. The computer program is configured to execute the above-mentioned robot joint angle detection method when running.
[0066] The present invention also provides an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the above-mentioned robot joint angle detection method.
[0067] Unless otherwise specifically stated, the relative arrangement of the parts and steps described in these embodiments, numerical expressions and numerical values do not limit the scope of the present invention. At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the accompanying drawings are not drawn according to the actual proportional relationship. The technology, method and equipment known to ordinary technicians in the relevant field may not be discussed in detail, but in appropriate cases, the technology, method and equipment should be regarded as a part of the authorization specification. In all examples shown and discussed here, any specific value should be interpreted as being merely exemplary, rather than as a limitation. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once a certain item is defined in an accompanying drawing, it does not need to be further discussed in subsequent drawings.
[0068] For ease of description, spatially relative terms such as "above", "above", "on the upper surface of", "above", etc. may be used here to describe the spatial positional relationship between a device or feature and other devices or features as shown in the figure. It should be understood that spatially relative terms are intended to include different orientations of the device in use or operation in addition to the orientation described in the figure. For example, if the device in the accompanying drawings is inverted, the device described as "above other devices or structures" or "above other devices or structures" will be positioned as "below other devices or structures" or "below other devices or structures". Thus, the exemplary term "above" can include both "above" and "below". The device can also be positioned in other different ways (rotated 90 degrees or in other orientations), and the spatially relative descriptions used here are interpreted accordingly.
[0069] In the description of the present invention, it is necessary to understand that the directions or positional relationships indicated by directional words such as "front, back, up, down, left, right", "lateral, vertical, perpendicular, horizontal" and "top, bottom" are usually based on the directions or positional relationships shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description. Unless otherwise specified, these directional words do not indicate or imply that the devices or elements referred to must have a specific direction or be constructed and operated in a specific direction. Therefore, they cannot be understood as limiting the scope of protection of the present invention. The directional words "inside and outside" refer to the inside and outside relative to the contours of each component itself.
[0070] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A robot joint angle detection method, characterized in that: include: Install the rotating end of the potentiometer coaxially with the rotating axis of the joint to be tested; Move the joint to be tested to the first limit angle to trigger the start of testing; Move the joint to be tested to the second limit angle to trigger the stop of testing; Record the detection voltage value of the potentiometer from the start of detection to the stop of detection; Determine whether the overall trend of the voltage value is increasing or decreasing; Determine the magnitude relationship between a first voltage value when starting detection and a second voltage value when stopping detection; If the change trend of the voltage value is increasing, and the first voltage value is less than the second voltage value, the relationship between the joint activity angle and the detected voltage value is characterized by a first linear equation; If the change trend of the voltage value is decreasing, and the first voltage value is greater than the second voltage value, the relationship between the joint activity angle and the detected voltage value is characterized by a second first-order linear equation; If the change trend of the voltage value is increasing, and the first voltage value is greater than the second voltage value, then a first predetermined voltage value is added to the detection voltage value less than the first voltage value to obtain a first detection voltage-adjusting voltage value, and the detection voltage value greater than the first voltage value and the first detection voltage-adjusting voltage value are characterized by a continuous third linear equation and a relationship with the joint motion angle; If the change trend of the voltage value is decreasing, and the first voltage value is less than the second voltage value, then the detection voltage value greater than the first voltage value is reduced by a second predetermined voltage value to obtain a second detection voltage regulation value, and the detection voltage value less than the first voltage value and the second detection voltage regulation value are characterized by a continuous fourth first-order linear equation and a relationship with the joint motion angle; The determining whether the overall change trend of the voltage value is increasing or decreasing comprises: comparing the detected voltage value of the current time period with the detected voltage value of the previous time period; If the current detection voltage value is greater than the detection voltage value of the previous time period, the count is incremented by 1; If the current detection voltage value is less than the detection voltage value in the previous time period, the subtraction count is increased by 1; If the current detection voltage value is equal to the detection voltage value of the previous time period, the up count and down count remain unchanged; If the up count is greater than the down count, it is judged that the overall change trend of the voltage value is increasing; If the increase count is less than the decrease count, it is judged that the overall change trend of the voltage value is decreasing.
2. A robot joint angle detection device, characterized in that: include: Potentiometer, install the rotating end of the potentiometer coaxially with the rotating axis of the joint to be tested; The controller moves the joint to be detected to a first limit angle to trigger the controller to start detection, and moves the joint to be detected to a second limit angle to trigger the controller to stop detection. The controller records the detection voltage value of the potentiometer from the start of detection to the stop of detection. The controller determines whether the overall change trend of the voltage value is increasing or decreasing. The controller determines the magnitude relationship between the first voltage value when starting detection and the second voltage value when stopping detection. If the change trend of the voltage value is increasing, and the first voltage value is less than the second voltage value, the controller characterizes the relationship between the joint activity angle and the detection voltage value through a first linear equation; If the change trend of the voltage value is decreasing, and the first voltage value is greater than the second voltage value, the controller characterizes the relationship between the joint activity angle and the detected voltage value through a second first-order linear equation; If the change trend of the voltage value is increasing, and the first voltage value is greater than the second voltage value, then a first predetermined voltage value is added to the detection voltage value less than the first voltage value to obtain a first detection voltage-adjusting voltage value, and the controller represents the relationship between the detection voltage value greater than the first voltage value and the first detection voltage-adjusting voltage value and the joint activity angle through a continuous third linear equation; If the change trend of the voltage value is decreasing, and the first voltage value is less than the second voltage value, then the detection voltage value greater than the first voltage value is reduced by a second predetermined voltage value to obtain a second detection voltage-adjusting value, and the controller represents the relationship between the detection voltage value less than the first voltage value and the second detection voltage-adjusting value and the joint activity angle through a continuous fourth first-order linear equation; The robot joint angle detection device also includes an up counter and a down counter, and the controller determines whether the overall change trend of the voltage value is increasing or decreasing, including: comparing the detection voltage value of the current time period with the detection voltage value of the previous time period; If the current detection voltage value is greater than the detection voltage value of the previous time period, the up count of the up counter is increased by 1; If the current detection voltage value is less than the detection voltage value of the previous time period, the down count of the down counter is increased by 1; If the current detection voltage value is equal to the detection voltage value of the previous time period, the up counter and the down counter do not count; If the up count is greater than the down count, the controller determines that the overall trend of the voltage value is increasing; If the up count is less than the down count, the controller determines that the overall change trend of the voltage value is decreasing.
3. The robot joint angle detection device according to claim 2, characterized in that: The controller is a PLC.
4. The robot joint angle detection device according to claim 2, characterized in that: The potentiometer is a CP50 potentiometer.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the robot joint angle detection method described in claim 1 when running.
6. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the robot joint angle detection method described in claim 1.
