Perhaps this information should be located under a different thread, but I don’t know how to do that…
Adding dual Z endstops on a miniRambo on a Lowrider2:
My motivation for adding dual Z endstops was that I found myself battling with my Z axis starting out level. This was likely due to the issue referred to as “Y plate sag” in another thread. I do plan to address this issue, but it started me down the path of adding dual Z endstops. I made the following changes in order to enable dual Z motors and dual Z endstops for my mini Rambo running my Lowrider2.
Beginning with a V1 Engineering pre-configured version of Marlin, “MPCNC_MRambo_T8_16T_LCD” (https://github.com/Allted/Marlin/tree/MPCNC_MRambo_T8_16T_LCD)
Configuration_adv.h:
#define Z_DUAL_STEPPER_DRIVERS // uncomment line 443
#define Z_DUAL_ENDSTOPS // uncomment line 445
#define Z2_USE_ENDSTOP YMIN // assign the Ymin pin to be used as Z2min
// you can use any unused pin, I used this because I
// don’t plan to use Ymin and I may add Zmax later
Configuration.h:
#define ENDSTOPPULLUP_YMIN // uncomment line 620
#define ENDSTOPPULLUP_YMIN // uncomment line 621
#define X_MIN_ENDSTOP_INVERTING false // line 640, this allows use of NC limit switch
#define Z_MIN_ENDSTOP_INVERTING false // line 641, this allows use of NC limit switch
pins_MINIRAMBO.h:
// lines 70 - 72
#define E1_STEP_PIN 34 // reassign the E0 pin definitions to be E1 to allow
#define E1_DIR_PIN 43 // control of the second Z motor
#define E1_ENABLE_PIN 26
#define E0_STEP_PIN 70 // set E0 pins to a valid dummy value
#define E0_DIR_PIN 70
#define E0_ENABLE_PIN 70
// lines 81 - 82
#define E1_MS1_PIN 65
#define E1_MS2_PIN 66
#define E0_MS1_PIN 70
#define E0_MS2_PIN 70
I added limit switches (set up for NC) and tested the triggering using a M119 command. Once proper behavior of the limit switches is confirmed, the homing command can be tested (Custom Commands > Home Z Axis).
Thanks for all the help offered by others to make this work.
I created limit switch brackets that clamp onto the ends of the X axis rails (I left mine a little long in case I ever wanted to grow my machine).
.
I hope this helps.