Welcome! Log In Create A New Profile

Advanced

rotary-Z axis: i need to understand the variable resolution handling

Posted by realthor 
rotary-Z axis: i need to understand the variable resolution handling
September 10, 2015 08:54AM
Hello guys, sorry if the Subject is not very explanatory.

I have a big dilemma regarding the variable resolution of any polar/rotary solution. I am contemplating a design that has an arm going on a circular trajectory not very different from the way reprap Wally lifts its bed.

My dilemma is that while lifting the platform on a half circle trajectory, from the -90 to +90 angle, the resolution is changing at every point, being best at top and bottom and worst at 0deg (when the platform is horizontally in line with the circle's center).

I did some calculations and while at top and bottom one can get mindblowing resolutions, at 0 deg the resolution is pretty bad so I decided that if I wanted to be able to print at 0.1mm per layer, my worst resolution should be at least 0.1mm per microstep. From there it only gets better.

Now the problem is that if I make the setup to be able to do 0.1mm per microstep at the worst position (0/180deg), the next layer will get a better resolution so that a microstep will move the Z with less than 0.1mm, say 0.09mm. It seems impossible to get a constant 0.1mm/layer resolution because one would need to divide a microstep in order to achieve the 0.1mm layer. This will make the solution unusable because one can't achieve accurate Z dimensions.

I am guessing this is also the case of the classic scara that moves the XY arms in a rotary fashion. You get a better resolution close to the center and a worse resolution as the end effector goes away towards the outer edge of the woerkspace.

Is my logic flawed? Is this a real issue? Should I design for a better resolution per microstep so the software can add up several microsteps to get as close as possible to the desired 0.1mm per layer?

Thanks.

Edited 1 time(s). Last edit at 09/10/2015 08:57AM by realthor.

RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: rotary-Z axis: i need to understand the variable resolution handling
September 10, 2015 08:50PM
a better way you can have a look at

google groups
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 02:03AM
Quote
ekaggrat
a better way you can have a look at

google groups

Ok, I have read the whole thread and there was no explanation on the software might tackle a variable resolution Z-motion. The only refference to my actual issue is Ryan Carlyle's post:

Quote
The big issue with most high-ratio extension mechanisms like scissor lifts [...] is that there's a non-linear relationship between actuator motion and stage motion. So you need to get the kinematics into firmware, and resolution isn't constant. So some cleverness is required...

I've seen Nic's folding concept and I like the one presented in the link but it seems to me that the Scott Russel linkage forces you to have both a linear actuator (be it alu extrusion or any other type of linear sliding system) and deal with the polar/rotary variable resolution motion in the arm that has one end fixed. Sort of the exact disadvantages from both systems. In Scott Russel linkage the arm with a hinged end is driving the longer arm in a linear fashion but with variable resolution as the driving end of the arm is following an arc trajectory.

Which brings me back to my issue. How is this variable resolution handled in any rotary/polar printers. This should be the case for RepRap Morgan too and any 3d printer that has arms rotating instead of sliding. Yet Morgan's commercial offering proves that it is not an issue, or the end result is acceptable or that the inverse kinematics solves this somehow, or something else I can't think of.

To better understand what I am talking about please see the attached image. It is a good example of how the resolution varies with rotary motion:


As far as I see it, the A angle (the resolution) depends on the gear ratio (if any) and the stepper's microstepping capability. But this is not that important for our discussion. The previous image is just to prove that, regardless the initial resolution, it is variable across the circle circumference. In the image we have the same radius and the same angle, yet each "layer" has a different height Z. This translates to a variable Z motion for each microstep.

Now in software you want each layer a constant, say 0.1mm, because a 0.1mm nozzle can only do 0.1mm . What is the "cleverness" that can have the software achieve a 0.1mm layer despite the variable resolution in polar motion printers?

I can only think of a lowest resolution -at 0deg- still high enough so the software can add up several microsteps to achieve the resolution in the example (0.1mm). But the software has to calculate forward each microstep so that when it is just below or above the 0.1mm layer it stops.

Edited 3 time(s). Last edit at 09/11/2015 02:45AM by realthor.

RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 02:45AM
the lowest resolution you have is A*R, with A in radian (formally R*cos(A)), if A is the angle for one motor micostep.

In the software, you define your Z value, then you transform your Z value in theta value : if Z=0 is the lowest, then you have theta=acos(1-Z/R)
then you transform your theta (who is in radian) in microstep : nb microstep=theta*A
you must know your absolute postition to compute, you cant directly compute for a relative position

for compute a microstep in delta, you must know the initial Z0 and the final Z1
theta0=acos(1-Z0/R)
theta1=acos(1-Z1/R)
nb_microstep=A*(theta1_theta0)
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 04:02AM
Ok, baby steps with mesmiling smiley ... my math and logic are a bit rusty since I don't exercise them too often with trigonometry/roboticssmiling smiley

Quote
penndu
the lowest resolution you have is A*R, with A in radian (formally R*cos(A)), if A is the angle for one motor micostep.

Let's take this with examples: say R=100(mm),and a 1/16 microstepped 200 steps motor has an A(ngle) of 0.1125 deg=0.00196349541 rad;

Quote
penndu
In the software, you define your Z value, then you transform your Z value in theta value : if Z=0 is the lowest, then you have theta=acos(1-Z/R)

Here I suppose theta(rad) must be a multiple of A(rad)

Z=0 => theta=acos(1)=0rad => no movement

Next layer:
Z=0.1mm => theta=acos(1-0.1/100)=0.0447250872 rad

Quote
penndu
then you transform your theta (who is in radian) in microstep : nb microstep=theta*A

I think this is a typo, if the A(rad) is the lowest a motor can turn then theta must be greater than it to be able to reach the desired Z.

#microstep=0.0447250872*0.00196349541=0.0000878175 ?!

I think you meant #microstep=theta/A, which would get me to:

#microstep=0.0447250872/0.00196349541= 22.7782998484 (microsteps).

If this is the right math then my next question is how does the software account for the 0.7782998484 microsteps considering that a 30mm part takes 300 layers. If it always rounds up to the ceiling (say 23microsteps) then the part ends up higher than expected and by a large amount. If the software takes everything at the lower number (22microsteps), the part ends up shorter. It must somehow account for all the errors and mix and match the rounded number so that the height of the part falls within the expected tolerances.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 04:20AM
Something is not right in the previous calculations... if the minimum angle of a 1/16 microstepped 200 step motor is 0.1125 deg (0.00196349541 rad) then the minimum Z achieved for a R=100mm is 0.1963mm, greater than the desired 0.1mm/layer value.

For a Z of 0.1 isn't theta=asin(0.1/100)=0.0573deg=0.00100007366 rad ?

This would make #microsteps=0.00100007366/0.00196349541=0.50933333223 (microsteps), which means that a better microstepping is needed or a gear ratio of at least 2:1 is needed.

Let's see an example with 1/32 microstepping: A=0.05625 deg=0.000981747704 rad.

#microsteps=0.00100007366/0.000981747704=1.0186666655 (microsteps) # this gets slighly over parity

But microstepping to that degree for a Z axis is no recommended as it greatly decreases the torque per microstep, so let's help the torque instead with a 4:1 gear ratio reduction via a timing belt (a 2:1 gear ratio would bring us to around parity again):

A=1.8/16/4=0.028125 deg=0.000490873852 rad;

#microsteps=0.00100007366/0.000490873852=2.03733333101 (microsteps).

Edited 4 time(s). Last edit at 09/11/2015 05:06AM by realthor.

RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 05:10AM
I don't think you make a mistake.



steps to achieve a Z = 0.1 mm!


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 06:01AM
Ok, I'm happy to not have made a full of myself from the begining smiling smiley There is time... tongue sticking out smiley

Ok, so now we have the following values: Z=0.1; R=100mm; A=0.000490873852 rad (with GR=4, 1/16 200 steps motor);

We know that the first layer above 0deg will take 2.03733333101 microsteps. That is 2 microsteps and a 0.037 of a microstep loss. This doesn't sound like much but for 1000 layers for a 10cm piece it will matter i guess.

1) Now how is the second 0.1layer calculated? By my logic it will be achieved with more than 2.03733333101 microsteps, because each microstep will cover less Z than the one before it.

2) Let's say that the next 0.1mm will require 2.2microsteps, then the next 0.1 2.5microsteps and so on.
How are those fractions of a microstep accounted for in the grand scheme of a 1000 layers print? Whould a rounding to the closest integer even it out after 1000 layers?

3) If I know how is the second, third, etc layers calculated in number of microsteps than it wouldn't be difficult to have an excel formula extended across 1000 rows (or a script for the better gifted guys) so we can see what the errors would be. And maybe have a second results row with the rounded to the closest integer values that we can add up and compare with the desired 10cm height.

Edited 2 time(s). Last edit at 09/11/2015 06:10AM by realthor.

RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 06:42AM
assume for Z=0, theta=0

you are at Z1, you want to move to Z2

1) theta1=acos(1-Z1/R)
theta2=acos(1-Z2/R)
2) delta_theta=(theta2 - theta1) you get nnn.mm microsteps
3) you round the number of microsteps at the nearest integer value
4) you move this value
5) you memorise the value of the difference between microstep_rounded and microstep

when computing the next move, you add a step
2.5) microstep = microstep + memorised _difference_of_prior_step
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 06:55AM
Can u pls explain why u use
Quote
theta1=acos(1-Z1/R)
cause it's confusing me. As far as I know
Quote
angle=arcsin(opposing leg/hypotenuse)
.

Let's say it is your way:

theta1=acos(1-0.1/100)=0.0447250872 rad
theta2=acos(1-0.2/100)=0.0632560989 rad

Also you say
Quote
number of microsteps=theta*A
.

Again:
#1microsteps=0.0447250872*0.000490873852=0.00002195437; What is 0.00002195437?

Isn't theta=arcsin(Z/R) the right way and #microsteps=Theta/A ?

Regards.

Edited 1 time(s). Last edit at 09/11/2015 07:11AM by realthor.

RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 07:08AM
ok, I was assuming your sketch was turned from 90° to the right and the angle is from 0 to 180°:
lowest point : Z=0, theta=0
middle point : Z=R, theta=90°
higntest point : Z=2*R, theta=180°

so lowest resolution around theta=90° and Z=R
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 07:25AM
In my sketch horizontal is 0-180-360 and vertical is -90/+90. I only started calculating for a quarter of a circle, just to understand how it's done, haven't thought beyond that.

In real life it would be Z=0 when the bed is at top, then lower towards the bottom.




RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 07:32AM
Quote
realthor

Isn't theta=arcsin(Z/R) the right way and #microsteps=Theta/A ?

Regards.

for the #microsteps=Theta/A , you are right
for the theta=arcsin(Z/R) , it depend where is your origin
I assume that the origin of theta is the vertical down direction, it give theta=acos(1 - Z/R)
if you assume that te origin of theta is right horizontal, the formula is theta=arcsin(Z/R)

I'm a french speaker, and I can't make a shema, the explanation might be a bit confuse
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 08:14AM
I think I understand now (got confused about the 1-Z/R) in real life it should be the way you say.

Ok let's take it from the begining, I am following your logic:

Z=0 at the top; R=100mm; A=0.000490873852 rad

I want to lower the bed with 0.1mm:

Theta1=acos( (R-Z1)/R ) =acos(1-Z1/R)=acos(1-0.1/100)=0.0447250872 rad
delta_theta=0.0447250872-0=0.0447250872 rad;
#microsteps=0.0447250872/0.000490873852= 91.1131994865 microsteps

Let's go another 0.1 downwards:

Theta2=acos(1-0.2/100)=0.0632559681 rad
delta_theta=0.0632559681-0.0447250872=0.0185308809 rad;
#microsteps=0.0185308809/0.000490873852=37.7508005865 microsteps

Let's see for a 1000 layer part, the last layers would be:

ThetaX=acos(1-Z1/R)=acos(1-99.9/100)=89.9427deg=1.56979625 rad
Theta(X+0.1)=acos(0)=1.57079633 rad
delta_theta=1.57079633-1.56979625=0.00100008 rad
#microsteps=0.00100008/0.000490873852=2.03734624675 microsteps.

These numbers look right. Please tell me if I am mistaking anywhere.

Edited 4 time(s). Last edit at 09/11/2015 09:19AM by realthor.

RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 01:02PM
you made no mistake
Re: rotary-Z axis: i need to understand the variable resolution handling
September 11, 2015 01:15PM
Quote
penndu
1) theta1=acos(1-Z1/R)
theta2=acos(1-Z2/R)
2) delta_theta=(theta2 - theta1) you get nnn.mm microsteps
3) you round the number of microsteps at the nearest integer value
4) you move this value
5) you memorise the value of the difference between microstep_rounded and microstep

when computing the next move, you add a step
2.5) microstep = microstep + memorised _difference_of_prior_step

Ok, you say that this logic is already implemented for Deltas or would I have to write the code for a rotary-Z? If yes, maybe I can get any hints on where to modify and what? I didn't touch so far any code in Marlin.

I don't need it right away as I am still working on a design that would possible allow such a concept to function as advertised but I am sure there are many others out there trying to get a non-liniar Z of some sort. My current design is quite complicated but when I think of folks that are doing 3 or 4 leadscrews Z actuation I think I personally would give this a go.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: rotary-Z axis: i need to understand the variable resolution handling
September 12, 2015 02:03AM
Quote
realthor
Ok, you say that this logic is already implemented for Deltas or would I have to write the code for a rotary-Z? If yes, maybe I can get any hints on where to modify and what? I didn't touch so far any code in Marlin.
you must modify the code for the calculate_SCARA_forward_Transform function and for the calculate_delta function who is just after in the marlin-main.cpp
Re: rotary-Z axis: i need to understand the variable resolution handling
September 12, 2015 09:07AM
Ok, I'll look into it, for now, that I know it is doable with reasonable tolerance -which I still have to simulate with some sort of script-, I will continue working on the design so I can build a prototype to test the code onto.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: rotary-Z axis: i need to understand the variable resolution handling
September 26, 2015 01:52PM
I am trying to avoid to spam the forum with yet another somehow-related question that's why I will post it here, hoping that someone is still following this thread.

I am trying to improve on the previous discussion of a rotary lifting solution by suggesting the following:



The point of my post is how to deal with the movement through the singularity when the two arms become parallel and the Z goes into negative space? That is a weak position that adds to the lowest resolution per microstep a mechanical weak position when the tendency of the upper arm is to fall more than the desired movement.

As a side topic, but one that continues the previous discussion, I would assume that for equal length arms the resolution will be half of the resolution achieved if the platform bed would be attached to the green dot, as per our previous discussion. This time, to avoid any linear components in the design, I have added a rotary arm as you can see in the sketch above.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: rotary-Z axis: i need to understand the variable resolution handling
September 26, 2015 04:31PM
Perhaps bias it to one side with a spring


[scara3dprinter.wordpress.com]
Re: rotary-Z axis: i need to understand the variable resolution handling
September 27, 2015 01:54AM
Would the strength of the spring depend on the print platform weight? I can see that if the platform would raise, the gravity would do the work of the spring, otherwise the spring would have to always push upward, which means it has to overcome the weight of the build platform, which can be substantial.

I don't think that the bias would work if it was set to push downward, because at the singularity position the weight of the platfrm would still try to drop the Z more than the motors are programmed to. I can't really imagine this all the way through but it would be great if the above diagram movement would be achievable.

Meanwhile i can only try to avoid the singularity in the following way:



This would achieve about 80% of the Diameter of the driving wheel though, while the diagram above would do a full 2xDiameter for the Z distance.

Edited 2 time(s). Last edit at 09/27/2015 04:56AM by realthor.

RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: rotary-Z axis: i need to understand the variable resolution handling
September 27, 2015 08:37AM
You can always use CAD (cardboard aided design) if it gets too hard to visualize smiling smiley


[scara3dprinter.wordpress.com]
Sorry, only registered users may post in this forum.

Click here to login