Marlin + RAMPS 1.4 + BL Touch is seemingly impossible to bed leveling

For 3 days I have been trying to get my MPCNC build working using Marlin + RAMPS 1.4 and now I am about ready to light this thing on fire and push it into the driveway.

I can not get this thing to home the z-axis properly, much less complete G29 for autobed leveling. This build is a suppose to be a dedicated, large format 3D printer. Given how big the bed is, auto leveling and a filament run out sensor are a must on the build. I have a BL Touch clone mounted to a Mk8 extruder with a 0.8mm nozzle all being controlled via RAMPS 1.4 + Marlin 2.X Dual endstop firmware from Ryan’s links.

Current Issues:
Running a G28 or G29 from the Serial Monitior in the Arudino IDE fails. Previously, when I tried to run either G28:
1). Printer homes X
2). Printer homes Y
3). Printer does nothing as it processes…
4). Printhead takes off to the center of the bed, raises the Zaxis, deploys BL Touch (it will only home Z at the center of the bed for some reason)
5). Printer then drives the Z-axis into the bed ignoring the BL Touch.

Running a G29 would get the same results or I would get an out of bounds error when autobedlevling was done.

After battling this for a bit, I managed to get determine the Z-SAFE_HOMING sending to the center of the bed and setting coordinates to 0,0 there. I changed Z-SAFE_HOMING to:

#define Z_SAFE_HOMING_X_POINT (10)
#define Z_SAFE_HOMING_Y_POINT (10)

Now it tries to home Z at least at 0,0 now and G29 attempts to work, BUT I get a “Z Probe past bed” error now. Can someone please tell what is jacked up with my config??? I just want to get to printing some big parts here from Prusa Slicer. (62.1 KB)

Not sure what “Printer does nothing as it processes…” means, but the rest seems normal to me. Except that the bltouch isn’t triggering a stop.

It sounds like thr trouble is the wiring to the Z enstop s pin. Or something wrong witg the BL.

If you home x and y and move the Z way up, then home Z, you should have time to stop it before it smashes you bltouch into the bed.

If you do that, as soon as it starts homing Z just lightly touch the tip of the bltouch and it should suck back up, and that should be stop the movement (although it might home a second time after a bump).

If the tip doesn’t get sucked back up, then there’s something wrong with the bltouch.

You can also put the bltouch into a self test mode through the LCD. There is probably a gcode for it, but I dont know it.

If it works, but just not at the bed, then it’s probably not at the right height. You can’t adjust the screw inside of it. That’s set at the factory.

If it sucks up, and doesn’t stop homing then either the wiring is bad, or the logic involved with the Zmin pin is bad. That sucks, because it’s tough to debug when the bltouch only does it’s thing for a moment.

FWIW, I personally like the bilinear version of autohoming and I use it on my two printers with BLtouches.

Don’t destroy it. It’s going to be awesome.


There are also 3 versions of the real BL touch that are wired differently, at least two of them are for sure and require different firmware settings. Then there are the clones. I had a very hard time getting mine going I spent a whole evening on it, I finally got it working and unplugged it to clean up the wiring mess and plugged it back in backwards and fried it. Have not touched one since. Just trying to let you know I don’t think it is very obvious or easy, but once you do get it, you should be okay if you don’t unplug it without clearly marking it!

1 Like

I believe on some of the BLtouch clones have the endstop wires backwards. But before you switch it few things to check.

  1. Bltouch lights up red and goes through self test from power up. Good move to next. No then your 3 pin wires are not right.
  2. Can you do a self test from the menu? Does the probe deploy and retract? Should if 1 was working.
  3. Home or G28. X and Y should home and as the probe deploys tap it so it retracts. Does it go up? If not the end stop wires are backwards. Before you switch it around it could be another issue as. Try these first. You may need to uncomment #define BLTOUCH_SET_5V_MODE and or #define BLTOUCH_FORCE_SW_MODE. On some of the SKR boards you also need to enable #define FAN_SOFT_PWM.
You will have to change the offset value of the Bltouch as well. You can't have decimal numbers or you'll get outbounds errors. So it will be 38, 19, 2. Z safe homing should be changed back, when uncommented it should always go to the center of the bed. This is how you set the z negative offset to the nozzle. You will need to comment out //#define MIN_SOFTWARE_ENDSTOP_Z, so you can set the negative offset bed to nozzle.

Final option you might want to try is change the speed value, #define XY_PROBE_SPEED 10000.


Thanks Jeff, Ryan and Mike! I haven’t lit it on fire yet, but took a break from firmware for a day to finish some other things.

@jeff, I ran through your trouble shooting steps. XY homing works just fine. On a G28 Z command (after raising the Z axis way up) the BL Touch doesn’t deploy the probe which is why it is crashing the nozzle into the bed. Self tests from the LCD menu works fine - probe deploys, stows, and completes its self test. The BL Touch does a self test when the printer reboots as well deploying and stowing the probe. I get all the proper LED lighting on the probe itself. So I don’t think it is the wiring or the probe.

@Mike A. thanks for your reply. I made the firmware changes you suggested, and the BL Touch probe deploys now on G28 Z, but the nozzle still plows into the bed. It is now only doing Z homing in the center of the bed again.

@Ryan, I totally agree - these BL Touch probes are a major pain to get working. I started to go with an induction probe like my Prusa printer but I don’t have any metal on the bed yet. I wanted to see if I could get a large format printing working first (proof of concept) before I dropped $200 in parts on a really large heated bed build (thinking of 6 silicon heaters on a aluminum plate running on their own PSU switched via relay from the RAMPS board). I could totally use induction sensors on that. Hopefully the massive printer enclosure will help with warping IF I ever get this thing printing. (62.1 KB)

OK. Ran some more testing this morning after making all of the firmware suggested changes (thanks again @Mike A.).

G28 homes X and Y fine. Z homing moves to the print head to the center of the bed and deploys the BL Touch probe. Then just buries the nozzle in the bed ignoring the triggered probe (Probe status light goes from Blue to Blue + Red when the probe makes contact with the bed).

@jeff - I did your suggested test of rising the Z axis up 50mm then doing a G28 Z command and touching the probe with my finger to close it. The probe registers the touch but the Z axis continues downward anyway until I hit the kill button on the printer.

I reversed my Z endstop connection on the RAMPS board and did the finger test again. The probe doesn’t register a touch when my endstop is reversed but the printer halts not accepting any commands. The serial monitor reports the following error:

echo:endstops hit: Z:10.00 Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)
Any other ideas on what is going on here guys??? I attached a movie of the G28 Z command running if that helps. (1.45 MB)

It’s been a while since I had to mess with the BLTouch settings… Sorry.

So now the self tests pass, and when you deploy the probe, it does go down, and when you home, it deploys it, when you tap it, it goes up, but it doesn’t stop homing?

Maybe you have a pullup on the Zmin pin and it shouldn’t? Or you don’t have a pullup and you should?

The movie isn’t working for me. I’m sure it’s on my end (.mov is apple stuff, right?). But Just so you know, I haven’t seen it.

1 Like

No worries, I appreciate the help @jeffeb3.

Yes it is a .mov because I am all on Apple gear here (I am a designer). I made a new video with the “finger test” added and attached it as a .mp4 if that helps. Being on Apple gear does make the CNC workflow suck since there are few software options outside of 3D printing for the Mac.

Yes, the probe passes the self test and responds to all commands from the serial monitor or LCD menu.

Running G28 just crashes the nozzle into the bed.

Running the G28 “finger test”, the probe registers the contact (status light turns red) but the printer doesn’t stop the z axis.

Reversing the end stop connections on the RAMPS board just results in the error I posted previously.

final2.mp4 (4.6 MB)

Invert the Z endstop logic? Just a random guess

Thanks @Ryan.

I tried flipping the Z_MIN_ENDSTOP_INVERTING and the Z_MIN_PROBE_ENDSTOP_INVERTING, but still get the same results - nozzle driving into the bed without caring what the probe is saying.

Configurations tested that still have the same behavior:




When I run M119 on the printer I get the following with the nozzle 50 mm above the bed no matter if the inverting is set to TRUE or FALSE:

Reporting endstop status x_min: open x2_min: open y_min: open y2_min: open z_min: TRIGGERED filament: open ok
What's interesting is I run the "Deploy" command from the LCD menu for the BL Touch then do a M119 I see z_min: open and when I do a "stow" command on the BL Touch then do a M119 I see z_min: TRIGGERED

I am at a complete loss here on this. (62.1 KB)


Should do it.

Well, maybe not… If it’s opem when homing and triggered when not, then that might be right…

Yeah. I had it set to “false” previously and still get it drilling into the bed. Ryan suggested inverting it, so I tried that plus a few combos for good measure all with the same result.

Have you disabled the pullup?

Not with the current config. In previous configs I have enabled and disabled the Pullups / Pulldowns in various combination with no success. I will try that out again with this config in a little while.

No dice. I have no idea what is going on with this thing.

What if you disable the pullup and swap the endstop pins?

I just checked my bltouch (I know there are many types) and it is “open” when it isn’t deployed.

Interesting the M119 shows my BL Touch is running the opposite - TRIGGERED when not deployed - and inverting the logic didn’t work.

PULLUP is disabled now and it isn’t working. I can try flipping the endstop pin on the RAMPS board again to see what happens with PULLUP disabled. When I did that earlier this morning I just got a printer error.



You get it working yet?