MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.04k stars 19.15k forks source link

[bugfix-2.0.x] BLTouch sometimes drops pin while probing #12304

Closed manutenfruits closed 5 years ago

manutenfruits commented 5 years ago

Description

When running command G29 to level the bed, some BLTouch devices drop the pin after some probing points. This doesn't seem to affect the actual probing measurements.

It is worth noting that this started happening after a recent firmware update, when I merged up to commit 5536228. Firmware config here

I reverted back to some old firmware that I had (this branch) and G29 ran with no issues.

I'm sorry I haven't updated in forever, so the change might be harder to spot. Happy to try any fixes you guys suggest.

Steps to Reproduce

  1. Home all axes
  2. Run G29 to level the bed

Expected behavior: For each probe point BLTouch drops, probes, stays stowed and moves to the next point.

Actual behavior: For some probe points, BLTouch drops, probes, which stows the probe, and while raising Z before moving to the next stop, the probe drops.

Additional Information

Demo here: https://photos.app.goo.gl/HzvxJPnnp3VuTfNu7

THE DEMO VIDEO DOESN'T CORRESPOND TO EITHER OF THE FOLLOWING GRID TABLES Like I said, the following two tables don't seem much different from each other.

Bed Grid on the reported firmware (with bug):

Bilinear Leveling Grid:
      0      1      2      3      4      5      6
 0 -1.389 -1.226 -1.127 -1.035 -0.942 -0.930 -0.977
 1 -0.777 -0.651 -0.519 -0.396 -0.329 -0.316 -0.414
 2 -0.470 -0.337 -0.175 -0.091 -0.044 -0.111 -0.229
 3 -0.330 -0.137 +0.015 +0.118 +0.180 +0.107 -0.051
 4 +0.067 +0.196 +0.304 +0.376 +0.374 +0.276 +0.109
 5 +0.339 +0.451 +0.538 +0.580 +0.562 +0.465 +0.308
 6 +0.346 +0.429 +0.496 +0.534 +0.498 +0.380 +0.258

Bed Grid on the old firmware (no bug):

Bilinear Leveling Grid:
      0      1      2      3      4      5      6
 0 -1.362 -1.172 -1.081 -0.966 -0.881 -0.841 -0.906
 1 -0.710 -0.590 -0.465 -0.325 -0.245 -0.240 -0.315
 2 -0.400 -0.255 -0.104 -0.019 +0.026 -0.029 -0.134
 3 -0.202 -0.017 +0.118 +0.238 +0.276 +0.226 +0.051
 4 +0.178 +0.317 +0.428 +0.498 +0.499 +0.404 +0.254
 5 +0.439 +0.559 +0.664 +0.714 +0.714 +0.629 +0.454
 6 +0.459 +0.495 +0.570 +0.590 +0.535 +0.440 +0.295
p3p commented 5 years ago

I'm wondering if this is a problem with the MKS SBASE?

I updated the lpc176x framework yesterday (0.0.6) to disable hardware PWM while I investigate further, this should work around any issues with bltouch.

KiberIrbis commented 5 years ago

I met with such a problem on my MKS Sbase board in the Chinese clone BLToch. The problem was completely solved only by changing the code - probe.cpp. Adding pauses between command.

 bool set_bltouch_deployed(const bool deploy) {
    if (deploy && TEST_BLTOUCH()) {      // If BL-Touch says it's triggered
      bltouch_command(BLTOUCH_RESET);    //  try to reset it.
      safe_delay(20);
      bltouch_command(BLTOUCH_DEPLOY);   // Also needs to deploy and stow to
      safe_delay(20);
      bltouch_command(BLTOUCH_STOW);     //  clear the triggered condition.
      safe_delay(1500);                  // Wait for internal self-test to complete.
                                         //  (Measured completion time was 0.65 seconds
                                         //   after reset, deploy, and stow sequence)
      if (TEST_BLTOUCH()) {              // If it still claims to be triggered...
        SERIAL_ERROR_START();
        SERIAL_ERRORLNPGM(MSG_STOP_BLTOUCH);
        stop();                          // punt!
        return true;
      }
    }

   safe_delay(20);
   bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW);

    #if ENABLED(DEBUG_LEVELING_FEATURE)
      if (DEBUGGING(LEVELING)) {
        SERIAL_ECHOPAIR("set_bltouch_deployed(", deploy);
        SERIAL_CHAR(')');
        SERIAL_EOL();
      }
    #endif

    return false;
  }
hamster65 commented 5 years ago

My bltouch clone just dropped its pin and went into alarm state during print. This happend when I saved the configuration to eeprom (using the graphical reprap discount lcd) after I finetuned the z probe offset during the first layer of the print.

stefan85 commented 5 years ago

I changed the code as you described and I can confirm this is working. Before I couldn't get my whole bed probed. Sometimes it wouldn't deploy. Now I probed the whole bed 4 times and no issues so far.

BTopbas commented 5 years ago

I have same issue. I have BLTouch Clone (Trianglelab store in aliexpress). I just updated my CR-10 with marlin 1.1.9 bugfix and problem happening.

Here is video: https://www.youtube.com/watch?v=14cpm1zyswc

If you watch video sometimes pin dropping. But g29 works for me. I don't know probing true or wrong. And i have another problem too. When i control machine with control box. When i push menu button on lcd sometimes bltouch deploy and strow quickly. Not a every press. surfing lcd menu and sometimes deploy when i press whell button. I used same bltouch without problem with 1.1.7. I changed only firmware.

Update: Now i tried with 2.0 bugfix same problem. No changes. Update2: Adding pauses between command. "safe_delay(20);" in probe.cpp. Now everytime pin drops. Not a fix for me.

manutenfruits commented 5 years ago

I'm not sure there's been any changes added to fix this issue, but as of 95223cb the issue seems resolved. No more dropping, solid bed leveling in one go. Can anyone else of the affected people confirm?

My current config, for those interested.

boelle commented 5 years ago

@manutenfruits problem solved?

manutenfruits commented 5 years ago

@boelle it is for me, but I didn't close the issue. I'm waiting for other people that were affected by it to confirm.

boelle commented 5 years ago

close it anyway, if others had the problem they would have confirmed long time ago

manutenfruits commented 5 years ago

Okay, thanks everyone, for the next person looking for the solution: Update marlin :)

boelle commented 5 years ago

always use the latest bugfix 2.0

Raymo99 commented 4 years ago

Folks, sorry to raise this again, but I have this issue, very repeatable. I'm using a clone BLtouch. And using latest Bugfix too, any advice for things to change in the code?

Aurawin commented 4 years ago

Folks, sorry to raise this again, but I have this issue, very repeatable. I'm using a clone BLtouch. And using latest Bugfix too, any advice for things to change in the code?

Today for me too. Just used existing wire harness and replaced my V3 Authentic to e-Bay clone. Z-Axis Align, Bilinear Probing works flawslessly. Somewhere during print the pin lowers... ARRRG. I've lost two pins now using 2.0 -(((((

Raymo99 commented 4 years ago

I suspect your issue is a bit different to the one in this thread. If your pin 'falls' during a print it may be related to the mechanics of the Bltouch itself, where there isn't enough magnetic force to hold it up. If you remove the grubscrew you can extract the probe for inspection. The probe consists of an aluminium rod & a small magnet with heatshrink covering both. The small magnet is attracted to the grubscrew, this 'holds the probe up' during printing. You can re-magnetize the grub screw with a strong permanent magnet, this should cure your problem.

The issue in this thread is a firmware commanded deployment of the probe when it shouldn't, it only happens during a probing homing session. Otherwise it remains up for the duration of the print.

Aurawin commented 4 years ago

Nope. I have that problem. But the pin lowers between each probe as the XY moves to the next spot. I'm going to increase my distance between probes value to compensate.

EDIT: Let me clarify. The lowering of the PIN occurring was indeed due to a loosening grub screw due to vibration. Teflon tape around the grub screw worked just fine.

That said, during normal Authentic V3 BLT via ABL BILINEAR: 1) pin drops/bed raises 2) pin triggers end stop and pin raises and stays raised 3.) bed lowers for the next probe point.

During clone BLT: 1) pin drops/bed raises 2) pin triggers end stop and pin raises and falls with the lowering of the bed 3.) bed lowers for the next probe point.

If I back off the Z probe distance between probe there is no danger of the pin hitting the bed. As it stands now, the pin drags on the bed during ABL. I did not anticipate this problem. I just swapped Authentic BLT with Clone.

I am just reporting the unexpected observed behavior as of yesterday.

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.