Workaround for malfunctioning z-min on miniRAMBo board?

Hi all,

After doing some self-servicing of my Mini, I experienced some issues concerning the z-min endstop. Some troubleshooting led me to believe that the root cause of the issue is a blown z-min connection on my miniRAMBo board. Since then I’ve ordered a new board and it should be here shortly. Until then I was wondering if there were any workarounds for using the printer without the z-min switch. I’ve tried manually setting the z-offset to no avail. My first thought would be do manually define the z-min but as far as I know the only way to edit those settings is to edit the Marlin firmware itself.

If anyone has any ideas or info I would appreciate it!

Did you clean your extruder with a wire brush? That’s how I blew mine. I’m having pretty much the same problem.

Didn’t use a wire brush. I’ve seen that issue before (and made sure to avoid it) but I believe the heating element wires came into contact with the rest of the printhead and shorted the connection to the board. Sucks that the only recommended fix is to buy a new board outright…

Just ran into this problem myself and came up with a workable solution.

I took a look at the limit switches and noticed that there isn’t a physical X_MAX limit switch so you can simply change the firmware and then swap the connectors. Tested with the octopus and it printed just fine.

First thing you want to do however is home the machine then run an M119 to see if Z_MIN is being triggered. If it is, then measure the voltage from the top metal casing of the tool head to any of the metal pads on the bedplate. If it is not 5v then there is something wrong.

Turn off the printer, open up the case, and disconnect the Z_MIN connector. Turn on the printer, home the printer, and run a M119 to see if Z_MIN is still triggered. If it is, then that means that pin 10 on the Atmega2560 is broken. Turn off the printer, disconnect X_MAX and plug the Z_MIN connector into the X_MAX slot. Leave the old X_MAX connector disconnected. Reattach the case.

Get the current lulzbot mini firmware here ( is current as of this post):

Download the zip file. In this case

Extract the folder and edit two files:

  1. Marlin/pins_MINIRAMBO.h line 37. This will change the broken Z_MIN pin 10 to a working X_MAX pin 30. The X_MAX pin will now always read TRIGGERED but Z_MIN will function properly.
// Limit Switches
// switching X_MAX (30) with Z_MIN (10)
#define X_MIN_PIN          12
#define X_MAX_PIN          10
#define Y_MIN_PIN          11
#define Y_MAX_PIN          24
#define Z_MIN_PIN          30
#define Z_MAX_PIN          23
  1. Marlin/Configuration.h line 536 - This will change the polarity of the X_MAX pin so that it will always read OPEN instead of TRIGGERED.
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING LULZBOT_X_MIN_ENDSTOP_INVERTING // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING LULZBOT_Y_MIN_ENDSTOP_INVERTING // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING LULZBOT_Z_MIN_ENDSTOP_INVERTING // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING LULZBOT_NORMALLY_CLOSED_ENDSTOP // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING LULZBOT_Y_MAX_ENDSTOP_INVERTING // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING LULZBOT_Z_MAX_ENDSTOP_INVERTING // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING LULZBOT_Z_MIN_PROBE_ENDSTOP_INVERTING // set to true to invert the logic of the probe.

run to get the hex files into the build folder. You can edit the build so that it only compiles for the machines/toolheads you want. Once it finishes compiling, you can turn on the printer and flash the correct machine/toolhead custom firmware using Cura. If you need to update the firmware then you need to download the newest source, make the changes, recompile, and update.

Run M119 and all endstops should read OPEN. Using M119 you can manually depress the X_MIN, Y_MIN, Y_MAX, and Z_MAX endstops to make sure they all trigger. If they do then it is safe to home the printer. Now you can bring the head down to one of the metal plates and then check to make sure Z_MIN triggers. If it does then that’s it, you have fixed the Z_MIN endstop issue.

It should be noted that this is a one time fix. All the other endstops are used therefore if the Z_MIN breaks again, then it will be time to get a new board. Other methods are possible but it will require soldering to fine pitch components to get a new working pin.

One thing that bugs me is that the X_MAX pin 30 is a normal analog pin whereas the Z_MIN pin 10 is a PCINT pin. Since the new pin is not an interrupt pin, I expected a delay in leveling the bed but in practice, there doesn’t seem to be an issue. Another thing to note is that Z_MAX is also a normal analog pin, therefore, it seems that a PCINT capable pin isn’t required for endstops.

Just another thought on how to prevent this in the future since it seems to be a common occurrence. The atmega2560 pins operates in input mode with an internal pull-up resistor. This is the same for all the endstops as seen in endstops.cpp and the fastio.h function SET_INPUT_PULLUP. The input high is connected to the toolhead while ground is connected to the bed plate. When the two touch, it forces the pin to go low which causes the TRIGGERED event. I imagine the inductance from the metal contacts is forcing the voltage to go really low causing the pin to blow. A simple fix is to place a 1k ohm resistor in series with the input pin (the outer pin on the connector) that goes from the MCU to the toolhead.

No, as far as I understand the problem, it’s the heater’s 24V on the pin that caused the atmega to blow the input. Maybe a zener diode could fix that, but not a resistor.

On a sidenote, I switched to klipper a while ago and changing the probe pin would be as easy as editing the printer.cfg file :wink:

#define Z_MIN_PROBE_PIN  10
pin: ^!PB4
# z_offset equals washer thickness ~= 1.377
z_offset: 1.377
speed: 5.0
samples: 2
sample_retract_dist: 1.0
samples_result: average
samples_tolerance: 0.200
samples_tolerance_retries: 2

I guess if you were to use a wire brush and accidentally touch the same fiber to the toolhead and the 24v extruder wire through the sheathe then you would send 24v to the input pin on the mcu. I imagine that would do more than just fry a pin but if that is the case then a diode would be a viable solution.

I am assuming that the issue is more related to ESD and a high current/voltage spike caused by the rapid switch from 5v to 0v with minimal resistance. Adding a resistor works to smooth out the spike by current limiting the instantaneous change.

This is more likely given the number of users that experience this issue randomly even without using metal brushes on the toolhead.

A 1K resistor would work as the input pin has protection diodes to Vdd and Vss but they are tiny and easy to blow with a few hundred milliamps. A series resistor would limit the current and the diodes would do the trick without melting.