Robotic kinematics
-
@tony73 I constantly change this one. I am currently redesigning axis 1 and 2 and making the axis pulleys bigger. Then I will be able to install the extruder and print.
The most work are the constant iterations, especially assembling and disassembling. I wished I have a robot who assembles it for me.... I could spare some effort with a good design program, but to understand some of the principles, I have to experiment.
Currently important aspects to build the robot are:
- hinges and arms without play and wobble
- maximizing possible angles
- find optimal gear ratio and avoid belt slippage
- balancing the arms, avoiding counterweights by replacing the steppers (the steppers function as counterweights)
- a procedure to protect against power off and arms falling down
-
from the photos it seems to me that you have steppers with planetary gear motor 1:27 primary pulley how many teeth? secondary 60 teeth, the steppers are cut to what, full pitch, 1/2, 1/4, 1/8, 1/16, 1/32, etc .... the gearmotor how much size at birth? I would like to understand how much reduction is needed! since you would like to put 200 tooth pulleys instead of 60 tooth ones.
-
@tony73 the gears were only for testing (and at axis 2 I had space problems), I want to avoid them because they have backlash. I will use a two or three step belt gear or a self constructed harmonic drive (axis 5). A 20/60 and 20:200 will result in 1:30.
-
@JoergS5
60 ÷ 20 × 200 ÷ 20 = 30 reduction 1: 30 right? do you want to eliminate cycloidal motor reducers, are they the ones that have play? have you already solved the problems of movement on x coordinates? -
@tony73 yes this is my calculation, I hope 1:10 at the last stage is enough, I will have to test it*). I had to stop firmware test, but the X values of M114 were ok, they were the world coordinates (mixing: xyz = world coordinates and UV = angles). There may be the bug: comparing X world coordinates with M208 angle of X.
*) I calculated the Nm of the stepper, this was enough torque for a 60 tooth. But the belt slipped and I had to use a lot of tension to avoid it. It has an effect on wobble also, depending on acceleration/speed, weight and gear ratios.
I am currently working on Axis 1 and will publish images when finished. I like cross roller bearings, but they are very expensive at the 300 mm size (hundreds of bucks), so I am building a DIY-able substitute.
-
@JoergS5
can you tell me in the config.g in M350 which microstepping you put? -
@tony73 I use 16 I1 in most cases, because for Duet 2 it was the only mode to support 256 microsteps by the controller. Duet 3 supports more modes for I1, but I stayed with 16.
You have to correct M92 accordingly: as example, a 200 step stepper, 16 microsteps and gear ratio 1:30:
200*16 steps/360 degree * 30 = 266.66667
In documentation it's called steps/mm, but in case of robots it is steps/degree. -
@JoergS5
M92 200 * 16/360 * 30 the result and 266,6666666667 this would be steps / mm! and how would the result be for robots? same ? but with the difference that they are steps / degree, and not steps / mm? or does the result change? -
@tony73 the M92 means steps/degree in case of robot kinematics. There is no mm movement of the actuators, because they rotate
(with the exception of the rail, which is in mm) .This is also true in the firmware, where the parameters stepsPerMm in functions CartesianToMotorSteps and MotorStepsToCartesian are correctly stepsPerDegree.
-
@JoergS5
Hello! I have never understood the difference between interpolated and non-interpolated stepper motors! I don't understand the concept well, could you explain me with simple words, or if you have a link where they explain the function? -
@tony73 I don't have a general link, but to explain for what microstepping is good, this https://hackaday.com/2016/08/29/how-accurate-is-microstepping-really/ is a good article. Microstepping is for smooth and quiet movement of the steppers, not for precision.
Interpolation means, like in mathematics, dedicating the position from known positions. The known positions are the full and half steps, the microsteps are the interpolated positions.
Separate explanation of interpolation: a stepper has a number of magnets and coils, those produce the full steps (not 1:1, but the result are 200 full steps), and through current manipulation, the steps between can be set, called interpolation. But both are not exact locations, steps have 5% position error and microsteps even more.
And when you power on, the stepper can have +- 2 steps difference from the position when you powered off. One of the reasons why one needs homing and not simply storing the last position when powering off.
To understand 16 I1, it is important to know that the firmware sends 16 microsteps, and the trinamic driver interpolates to 256 steps inside the driver. If you set 256 I0 e.g. the firmware has to generate all 256 steps, which is too much in most cases, resulting in lost steps and movement errors (M122 reports hiccups then).
-
Interpolation gives you a smoother wave-form, but you don't need to generate the extra steps (you'll have to imagine a 1/256th wave that is really smooth!)
Its mostly a benefit for noise, although for some applications you might actually be able to see that the motion is more smooth.
-
I reintroduced the A parameter to define min and max angles for the 5 axis and don't use M208 in the future. The reason is, M208 is based on the assumption that world coordinates are used and the area is rectangle. At robots this is not true, the allowed area differs with the Z value (looks a bit like a donut), so the limits are better and exact controlled by the angles instead.
Using M208 to define angles like I did may conflict with existing firmware code where M208 is used, so I better use the separate parameter A to define the angles. This is also more similar to the other scara kinematics.I introduced a new parameter D to define the outline of the arms and axis, based on a research article how to avoid collisions when two robots are working in the same working area. To allow easier calculation, the arms are outlined by a cylinder and the actuator by a sphere. This will also allow to control that arm 5's extruder is not in the way of arm 3 if arm 3 is near horizontal position.
The necessary firmware changes for A and M208 will be done next weekend, D will take a while. I've implemented it and check it in and it compiles, but it is not tested yet.
-
@tony73 I found a reason for your problems.
The G92 and M114 use X, Y and Z as cartesian coordinates, other letters like U and V as the firmware defines it, in this case angles.
So the endstop position of axis 1 to 3 cannot be set with G92.
M114 behaves the same, i.e. X, Y, Z are coordinates, not angles. U and V are angles.
I introduced additional values to the A parameter now, to specify the endstop positions. I removed limits of M208, M208 is not used.
The changes are checked in and compile ok, but not tested.
-
@JoergS5
thanks for the explanation of the interpolated microstepping! I saw that you were eliminating M208 and putting back parameter A to limit the angles, if I have not misunderstood now there is a minimum angle, a maximum angle and a point always in degrees where the limit switch for each actuator would be! -
@tony73 yes, I think this is the easiest way to specify the properties and avoiding confusion between angles and coordinates.
The limit switch is the endstop, but it can be everywhere, not necessary at an end. For axis 1, it will often be at 0 degree.
A problem is that the reporting output maximum length is limited and will abbreviate the output of the parameters. I'll search where it' s handled and will make it larger for Duet3, but this would be a request for David. I could program that with M669 A are only reported the A values as an alternative.
-
i went to fiveaxisrobot kinematic.h end stop angles and axis limit min and max to understand how to set the angles in m669, tomorrow i will try on duet 3 (only motors and limit switches connected) to see what they do .you managed to try yours robot with these changes? with end stop angles that you added to parameter A, is it now possible to make the robot assume any position in the homing phase, and he will know that he is at a certain degree from his min and max limits of each actuator?
-
@JoergS5 said in Robotic kinematics:
A problem is that the reporting output maximum length is limited and will abbreviate the output of the parameters. I'll search where it' s handled and will make it larger for Duet3, but this would be a request for David.
It's likely that I will change the output mechanism to remove the limitation on output length in 3.2beta3. I have already done the preparatory work.
-
@dc42 thank you, then I don't need to change it and use the workaround.
-
@tony73 said in Robotic kinematics:
is it now possible to make the robot assume any position in the homing phase, and he will know that he is at a certain degree from his min and max limits of each actuator
I am not sure whether we have a common understanding.
When the printer powers up, the following procedure is made for each axis:
- he doesn't know where the position of the stepper and hence the angle is
- he needs to rotate the stepper/angle to find the endstop
- when he found the endstop, he now knows through the A endstop position at which angle it is. The firmware stores the stepper position as liveCoordinates/motorPos and can calculate the cartesian coordinates when all home angles are set by homing all axes.
- through the A angle limits he knows how much he is allowed to rotate to min and max
Step 2 is difficult because the angle could be anywhere, so the printer doesn't know whether he should rotate left or right. One strategy would be to rotate left a bit, then right a bit more etc. until found. This could be a strategy for axis 1. Another strategy is to have the arm in a defined position when power off, so the printer can find the endstop by rotating in a specific direction. This could be a good strategy for axis 2 and 3. A third strategy could be that an external solution like a camera can tell the firmware where the arms are roughly and in which direction the printer can find the endstops. (I'll make a proposal in the homing document when I have a good solution. Maybe strategy 2 is best, because when power off, the arms could fall down. It is good to have a secure "parking position" anyway).
The endstops can be defined at high or low end, it doesn't matter for the M669 setting (but in config you must use one). For finding the angle, it would be good to approach the endstop always from the same direction, most endstops will differ with direction.
I have to test whether when using G1 H1 while homing needs a dummy M208, it may produce an error message when there is no M208.