This guide describes how to configure RepRapFirmware 2 to drive two Z motors from separate drivers, with each motor having its own endstop switch.

Note that in RRF3 you do not need to create new axes in order to use multiple endstops on an axis. You simply need to list the pins used for endstops in your M574 command. See Bed levelling using multiple independent Z motors

See: Gcode Wiki M574

  1. Don't forget to put back the 2 jumpers on the ZB socket if you had the second Z motor plugged into it it before.
    • Don't forget to put back the 2 jumpers on the ZB socket if you had the second Z motor plugged into it it before.

    • Don't do any connection with the power on, these are current drivers.

    • Connect the endstops to their connectors. Make sure the endstop connected to Z is the one closest to the Z motor, and the one connected to E0 is closer to the E0 motor.

    • edit it first to avoid forgetting.

    • The M584 line is critical, it's combining the axes. The P3 parameter only shows 3 axes to hide the U axis.

    • Because we'll split the axes during the homing we have to configure everything for U: acceleration, endstops, etc.

    • Don't forget to configure the new motor too.

    • The first M584 splits the axes into independent Z and U. It also displays U (P4) because otherwise the controller doesn't move it.

    • After splitting, we move Z and U simultaneously and at the same speed towards their respective home switch.

    • The second M584 re-combines the axes as Z and hides U (P3)

Finish Line

4 other people completed this guide.

Nicolas Raynaud

Member since: 06/14/2018

319 Reputation

1 Guide authored


Thanks for this guide! I was struggling with using M584 P3 in config.g and not having the the U (and V in my case) leadscrews moving. Updating the P parameter in homez.g did the trick.

George Joseph - Reply

This is a good guide,

I solved the problem this way.

I mechanically limited the the two lead screws, wired the 2 limit switches in series and made the homez.g go up once to limit, advance 1-2 mm (trip trip trip), rehome. Works perfect every time.

When the table is way off, one side bumps up against the stop until both limit switches close.

I could see this working with 3 and 4 screws too. Just need a limit switch for each one.

All motors need to connect to the Z output. (Series) I think?

James Harrison (Jimbo) - Reply

James, can you provide some more information on how you achieved your approach? How did you mechanically limit the 2 lead screws, wire in series for the end stops, and gcode you needed to add? Your way sounds a bit more direct. Thanks in advanced!

Bill McDaniel -

I used this guide - really well done! Thanks!

Bill McDaniel - Reply

Note that the line:

G1 Z2 F6000 ; Lift Z relatively to current position

Needs S2 added to it, so should read:

G1 Z2 S2 F6000 ; Lift Z relatively to current position

Its a FW requirement for current versions.

Bill McDaniel - Reply

Add Comment

View Statistics:

Past 24 Hours: 4

Past 7 Days: 16

Past 30 Days: 74

All Time: 13,978