Quantcast
Channel: Reprap Forum - Delta Machines
Viewing all articles
Browse latest Browse all 20291

Re: LISA Simpson

$
0
0
I am just stating whats in the Marlin firmware. Since that is what most printers are mainstreaming towards, I thought it was relevant. Here is how Marlin does its calculations:



Triangle math A^2 + B^2 = C^2.
Since the shoulders and end effector of Rostock never move in the X-Y plane, they are removed from the calculation altogether.



When Marlin processes a G1 command, it already knows the current position. It just needs to send the next position to the planner. The Gcode command is in XYZ coordinate system, so Marlin first converts the XYZ destination into a destination for the real motor (being the Z direction of the column). Marlin knows what Ax and Ay are (from the command and the fixed location of the column). So the variable is the length of Ad (the arm). Now lets look at the Z aspect of the Rostock:



We know what Ad is from our X-Y coordinates from before. L is the fixed length of the rod. Ac is the desired distance we want to move our motor. So:

L^2 = Ad^2 + Ac^2

substituting and reorder we get:

Ac = sqrt(L^2 - Ad^2) = sqrt(L^2 - (X_column - X_destination)^2 - (Y_column - Y_destination)^2)

and in marlin we have:

void calculate_delta(float cartesian[3])
{
  delta[X_AXIS] = sqrt(DELTA_DIAGONAL_ROD_2
                       - sq(DELTA_TOWER1_X-cartesian[X_AXIS])
                       - sq(DELTA_TOWER1_Y-cartesian[Y_AXIS])
                       ) + cartesian[Z_AXIS];

For LISA, our vectors are not fixed and we cannot ignore our shoulder and end effector anymore:



So now in order to change the firmware, we need:

(Ad + shoulder + end effector)^2 = (X_column - X_destination)^2 + (Y_column - Y_destination)^2

which changes our Ac equation as so:

Ad = (sqrt( (X_column - X_destination)^2 + (Y_column - Y_destination)^2)) - shoulder - end effector

Ac = sqrt(L^2 - Ad^2) = sqrt(L^2 - ((sqrt( (X_column - X_destination)^2 + (Y_column - Y_destination)^2)) - shoulder - end effector)^2) and lets add tan^-1((X_column - X_destination)/(Y_column - Y_destination))*(leadscrew_mm_rev)

So now the arduino has to do 3 sqaure functions, 2 squareroots, and one tan function.

From this source:avr math cycles

this shows the impact. But I do not know if this would really do anything at all to the arduino firmware performance. I plan to see what will happen if I plug in just the modified algebra without the atan function and see if it can control 3 free-standing motors (and how fast it will go).

So the math is the same, but the actual function in the firmware is changed a bit. BTW, have I mentioned how cool the LISA design is?

Viewing all articles
Browse latest Browse all 20291

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>