Introduction
The kinematics is part of the newest RepRapFirmware 3 dev branch.
For a general guide to configuring RepRapFirmware, see Configuring RepRapFirmware for a Cartesian printer. Only the differences for 5 Bar SCARA printers are described here.
A 5 Bar SCARA has 5 bars: one between the actuators (mostly implicit by the frame), and two arms on each side left and right.


The names of the image are used in this documentation and in the firmware.

The red dot is the hotend position, the yellow dots represent the actuators/steppers.

At top are optional cantilevered arms with hotend positions at the end.

The positions of the actuators are defined by M669 X and Y parameters.

proximalL, distalL are the left arms in mm, proximalR and distalR the right ones. theta and psi left (L) and right (R) are degrees measured from the x axis. The optional cantilevered arm of distalL is of length cantL, for distalR it is cantR.

constr is a constraint angle: if the angle is too flat, the SCARA cannot be moved (singularity). If it is too small, the x0,y0 position becomes undefined.

x0,y0 is the hotend point, xL,yL and xR,yR the left and right hinges.



A point x0, y0 can be accessed with up to 4 different constellations for the proximal and distal arms. Every arm pair proximal + distal can be bent "inside" and "outside".

Default is mode 1. It has a bigger rectangular print region than mode 2 and doesn't need a distance to the actuators.

Modes 2 and 4 are supported and tested also.

In a later revision an implementation is possible to change working modes to print a huge area.

Care must be taken to avoid areas called singularity, which are unprintable areas because arm angles are too flat or small and the movement is undefined.



The print area depends on the arms lengths, the distance between the Actuators and the constraints.

Approximately, the print area of Working Mode 1 is an area like shown in the image. The exact area is calculated in the method IsReachable.

Mode 2 the printable area is farther away from the proximal arms.

Mode 3 is under the actuators and difficult to be used with the hotend above the end point.

Mode 4 is symmetrical to mode 1 at the Y axis.

The exact print areas have more complex shapes. In a later revision the areas could be defined better to allow e. g. bigger curved print objects.

The actuator distance and arm lengths have influence on print area, speed and precision.

See Alan's comment below for size of print area: his inverstigation is that the modes have comparable print area sizes.



Forward kinematics is the calculation of x0/y0 from the two proximal angles thetaL and thetaR. The code is defined in the method MotorStepsToCartesian.

Inverse kinematics is the calculation of the two proximal angles thetaL and thetaR from a given x0/y0. There are 0 to 4 possible solutions. The algorithm will get the solution for the given working mode. The code is defined in the method CartesianToMotorSteps.

To calculate the printable area, specific constraints must match. The constraints and valid print area are defined in the IsReachable method.



Geometry settings are defined with M669, analoguous to the Scara setup. Z axis and stepper properties are defined like a Cartesian printer. K9 is the printer type mode.

Xnnn:mmm and Ynnn:mmm X and Y coordinates of the left and right proximal actuator axes. E.g. X0:100.5 Y0:0 means 100.5 apart and both on the y axis.

Lnnn working mode: 0, 1, 2, 3 or 4, see image above. 0 is using all modes and switch if necessary, default is L1. Supported modes so far are modes 1, 2 and 4.

Pnnn:mmm proximal arm lengths: nnn is left and mmm is right proximal in mm. Can be fractions of mm, e.g. P300.5:299.8. The lengths are from the middle of one joint to the other one.

Dnnn:mmm[:ppp:qqq] distal arm lengths: nnn is left distal arm, mmm the right distal arm in mm, fractions are possible. E. g. D200:230.5. Lengths is measured from middle of joints. The optional parameters p and q see below for cantilevered arm. Currently, all 4 parameters must be set, so with uncantilevered hotends set :0:0 as parameters 3 and 4.

Bnnn:mmm defines the degrees of the homing end positions homingAngleL and R in respect to the x axis. The setting must be valid in respect to print area and other constraints. The values can be fractions of degrees. For workmode 1, default is B20:10, for workmode 2 it is B110:20, for workmode 4 it is B110:100

Annn:mmm:ppp:qqq:rrr:sss nnn is the minimum angle between the distal arms (constr in the first image) in degrees, mmm the maximum. ppp:qqq is the minimum and maximum angle between proximal and distal arms on the left. rrr:sss between proximl and distal on right. The mechanical construction might set limits. Default is A15:165:0:360:0:360

Znnn:mmm:ppp:qqq optional to define the print area as rectangle. Z0:0:500:200 means from 0,0 to 500,200. The user is responsible to define a reachable area.



comment on Z: *) Meant: if the printer moves from A to B, it may not move through an area where the movement is not possible in the given working mode.

Snnn Maximum segments per second (optional).

Tnnn Minimum segment length (optional).

With exception of K and L, all parameter values can include decimal parts.

Cnnn:mmm:ppp:qqq is the minimal and maximal angle left and right of the actuators. C10:100:15:200 means the left stepper can have angle between 10 and 100 degree, the right one between 15 and 200. Default is C10:170:10:170. The variables are called actuatorAngleLMin etc.



For precision, it is preferable to use a gear at the actuator, between stepper and first hinge of the proximal arm. The higher the gear ratio, the better the precision (but slower maximum speed). A ratio between 1:5 and 1:30 is a good starting value.

The properties are set by the values of microstepping in M320 and setting the X and Y properties in M92:

M92 = microsteps / motordeg * bigpulleyteeth / stepperpulleyteeth

E.g. 128 microsteps, 1.8 degree steppers, 90 teeth at hinges, 20 teeth at steppers: M350 X128 Y128 ... and M92 should be 128/1.8*90/20=320, results in M92 X320 Y320 ...

Example 2: M350 X128 Y128 , 1.8 Stepper, 16 Stepper teeth, 300 mm diameter wheel: 128/1.8*471/16=2093, results in M92 X2093 Y2093...



M569 P0 S1 ; Drive 0 (X) goes forwards M569 P1 S1 ; Drive 1 (Y) goes forwards M569 P2 S1 ; Drive 2 (Z) goes forwards M569 P3 S1 ; Drive 3 (E0) goes forwards

M574 X1 Y1 Z0 S1 ; proximal L and R homing switches trigger when the arm is at M669 B positions and are active high

M669 K9 X0:100 Y0:0 P300:300 D300:300:0:0 ; arms are 300 mm long, actuators are 100 mm apart, other parameters take defaults. (Be aware, that D always needs 4 Parameters)

M203 X10000 Y10000 Z300 E3600 ; maximum speeds mm/minute M906 X800 Y800 Z800 E800 ; set motor currents (mA)



The endstops are activated when the proximal arms are at a specific angle. The endstops can be activated from both sides of movement. The homing strategy decides which side defines the angle precisely.

When starting the printer, the axes shall be roughly near the endstops.

The steppers turn some degree left and right until the end stop is reached.

The endstops and M669 B parameter define the theta angles. With e.g. M669 B90:90, when reaching both endstops, both steppers are at position 90 degree each for thetaL and thetaR.




todo: description how to define the properties of steppers and arms and how to calibrate the arms. The placement of the print object will be important specifically for this printer type.



If the top joint shall not contain the hotend, a cantilevered construction can be used.

cantL is the prolongation of the left distal arm. Length is from middle joint to middle hotend.

M669 D is changed to Dnnn:mmm:ppp:0. ppp is set to cantL, qqq must be 0. Example: D300:300:100:0



In the second cantilevered configuration, the right distal is prolongued by cantR.

Syntax of M669 is Dnnn:mmm:0:qqq, where qqq is the cantR length.



While printing, the normal and two cantilevered properties can be switched by applying the M669 command. This allows multiple hotends, if they are located on the left or right cantilever.

Placing hotends inside the distal arm maybe possible (by setting a negative cantilever value). It will be tested.



A Scara can be built setting proximalDistance to 0.

The two actuator axes are at the same x,y position. This can be achieved by stepper bottomup and topdown, or by harmonic drives (using the hole in one drive to put through the other axis), or other means.

If the arms lengths are same, calculation is easy: the arms form a rhombus. The kinematics can be calculated by the middle angle and radius, see image.

Instead of two turning steppers, the Scara could be built with a turning stepper and a linear actuator which changes the radius. (todo: how can M669 be defined?)

This build allows exact G2/G3 circles.

Cancel: I did not complete this guide.
One other person completed this guide.