Z Endstops Ignored - Megatronics 3.0 - Homing Dual Endstop LowRider2

@jeffeb3

  • Implementing NC endstops
  • Set Z+
  • Used a mid-2020 ‘Dual LR_T8_32step’ firmware release as a reference (I can’t get the newest firmware from V1 to compile in PlatformIO IDE; missing library and possibly other error/s)
  • Will build a probe once homing is sorted.
  • Endstops are all aligned and calibrated (adjustable for squaring).

@Britboard
Cheers for your efforts and taking a peek in my firmware files. I will definitely implement as much of your code changes/comments above moving forward.

I’m in Ohio, USA. Swiss American, ancestors stopped in London, so a touch of British. I went to university in Melbourne, Australia and work in international research. Culturally flexible, collaborative, and easily entertained. My machine is in the basement, snow on the ground here, so it’s a bit cold; I escaped to bench test in the warmth!

Implemented:

  • Not playing with the wires, to avoid frying the mega.
  • Bed size set to 1270,1270, 150 (conservatively set Z at 130-150, 178 max)

I messed around with the endstop switches a bit more today using my multi-meter to find that they can ONLY be wired NO; they will absolutely not function as NC switches. I have bare switches like Ryan sells on hand, so I tested them on the bench (Signal as COM and GROUND as NC) and they check out using multimeter and M119 results with the appropriate logic set to false in firmware. For anyone confused with NO/NC wiring this is an excellent video.

I need to manufacture mounting plates and install them on my machine before moving ahead.

I have SD/LCD support disabled. I’ll be directly interfacing the LowRider with a old laptop/Raspberrypi via pronterface/Fusion360/CAM software. Wiring an LCD to the Megatronics V3 board sucks; some non-standardized pin out.

@Britboard will implementing some/all of your code without an LCD create significant issues?


GOOD NEWS
Late last night, I discovered/realized that Z1 failing to home had something to do with the ‘Z Probe Options’ and a Megatronics 3.0 use specific conflict. I also found this thread on GitHub, which seems to follow the or some of the issues presented by my machine.

Disabling the probe entirely, caused ZMAX to finally work as the endstop for Z1.
//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN

I read the probe settings and found that the default pin for ZMIN is set to PIN32, which is for RAMPS, NOT Megatronics 3.0. I re-enabled the probe (above) and defined the line in the section below to reflect PIN19, which is ZMIN on Megatronics 3.0 according to the pins file (located under mega) in the Marlin library.

/**

  • Z_MIN_PROBE_PIN
  • Define this pin if the probe is not connected to Z_MIN_PIN. // Maybe bad advice * **If not defined the default pin for the selected MOTHERBOARD
  • will be used.** Most of the time the default is what you want. // NOT TODAY…
    • The simplest option is to use a free endstop connector.
    • Use 5V for powered (usually inductive) sensors.
    • RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
    • For simple switches connect…
    • normally-closed switches to GND and D32.
    • normally-open switches to 5V and D32.

*/

#define Z_MIN_PROBE_PIN 19 // Pin 32 is the RAMPS default; Pin 19 is Megatronics 3.0

Upon testing, this fixed my Z homing issue on the bench. ZMAX now functions as a homing endstop, YMAX functions as a homing endstop, and triggering XMIN while homing Z causes the motor shaft to move a small distance (half a turn maybe, pretty sure it’s related to whatever the probe touch/retract distance is set at).

This is something @jeffeb3 might be specifically interested in as I found this topic to be helpful in troubleshooting the issue/s.

I will implement new NC endstops, manufacture a probe (sounds like I might need one anyway), flash my bench tested firmware, and carefully test homing on all three axes with the machine, and report back!

Probably wise to report back before attempting to go probing things…