Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backlash Compensation and M425 #11061

Conversation

marcio-ao
Copy link
Contributor

@marcio-ao marcio-ao commented Jun 19, 2018

This implements backlash compensation on X, Y and Z. This version implements a more advanced algorithm than proposed in #7579 and is a result of months of internal testing as we led up to the release of our Mini 2.

The original implementation proposed in #7579 worked by inserting a new planner block that would cause the motors to rapidly take up any backlash immediately following a motor direction change. Our testing indicated that while this got rid of the backlash, it caused a significant seam on the print due to the momentary pause and vibrations caused by the discontinuity in velocity and acceleration. The new algorithm presented here is less aggressive and has two modes:

  1. The backlash correction steps are added to the planner block in which the direction change takes place. This reduces the appearance of seam by spreading the correction over one segment, but may still show a seam if the segments are very short.
  2. When BACKLASH_SMOOTHING is enabled, the backlash correction is applied over one or more segments, reducing the appearance of a seam even for short segments. However, BACKLASH_SMOOTHING requires more storage and CPU overhead, so this is optional.

This PR also adds a new "M425" command. When enabled, it makes backlash compensation tunable at run-time:

   M425: Enable and tune backlash correction.
   
      F[fraction]     Enable/disable/fade-out backlash correction (0.0 to 1.0)
      S[smoothing_mm] Distance over which backlash correction is spread
      X[distance_mm]  Sets the backlash distance on X (0 to disable)
      Y[distance_mm]                         ... on Y
      Z[distance_mm]                         ... on Z

  Type M425 without any arguments to show active values.

Additionally, MEASURE_BACKLASH_WHEN_PROBING allows the backlash to be measured while probing during G29. If the G29 is followed by "M425 F1 Z" it enables backlash compensation with the measured value of backlash on Z.

There is the possibility of a similar feature called MEASURE_BACKLASH_WHEN_HOMING that could work on X, Y and Z but this PR does not implement it yet.

There is also a MEASURE_BACKLASH_WHEN_HOMING that reads hysteresis when homing using G28. If the G28 is followed by "M425 F1 X Y Z" it enables backlash compensation with the measured value of backlash on X, Y and Z. Although this measurement method also ends up measuring any hysteresis of the switch, so it may not be sufficiently accurate to be measure backlash. Manual tuning may be required.

UPDATE: I removed MEASURE_BACKLASH_WHEN_PROBING and MEASURE_BACKLASH_WHEN_HOMING since I think the better way to do this is to implement a separate GCODE G425 that runs an auto-calibration routine.

-- Marcio

@marcio-ao
Copy link
Contributor Author

marcio-ao commented Jun 19, 2018

@thinkhead: In "probe.cpp", I added some code to measure the backlash, however, I am not happy with the crazy #ifdefs. It seems like there should be a better way to read the probe and/or endstop pins. Looking for suggestions on how to make this code better:

#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
  #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
      #if defined(Z_MIN_ENDSTOP_INVERTING)
          #define TEST_PROBE_PIN !READ(Z_MIN_PIN)
      #else
          #define TEST_PROBE_PIN  READ(Z_MIN_PIN)
      #endif
  #else
      #if defined(Z_MIN_PROBE_ENDSTOP_INVERTING)
          #define TEST_PROBE_PIN !READ(Z_MIN_PROBE)
      #else
          #define TEST_PROBE_PIN  READ(Z_MIN_PROBE)
      #endif
  #endif

  extern float   backlash_measured_mm[];
  extern uint8_t backlash_measured_num[];

  /* Measure Z backlash by raising nozzle in increments until probe deactivates */
  static void measure_backlash_with_probe() {
    if(backlash_measured_num[Z_AXIS] == 255) return;

    float start_height = current_position[Z_AXIS];
    while(current_position[Z_AXIS] < (start_height + BACKLASH_MEASUREMENT_LIMIT) && TEST_PROBE_PIN) {
        do_blocking_move_to_z(current_position[Z_AXIS] + BACKLASH_MEASUREMENT_RESOLUTION, MMM_TO_MMS(Z_PROBE_SPEED_SLOW));
    }

    /* We average the backlash from all probe points, so keep track of number of measurements */
    backlash_measured_mm[Z_AXIS] += current_position[Z_AXIS] - start_height;
    backlash_measured_num[Z_AXIS]++;
  }
#endif

This is also the reason I did not implement MEASURE_BACKLASH_WHEN_HOMING yet ... the #ifdefs would have to account for homing direction as well as bit inversion and it would be pretty hairy.

@TheSFReader
Copy link
Contributor

TheSFReader commented Jun 20, 2018

Great Feature ! Thanks ! I wanted (once again) to use Marlin as firmware for a "not so 3Dprinter" drawing machine with crappy BYJ stepper motors which have massive backlash, and didn't know how to compensate for that. This feature seems to fill my need beautifully ! Thanks !

(Edit : Urghhh,I see how this comment coud be seen as comparing your hardware to crappy motors, but that's clearly not the case !!!!)

@marcio-ao
Copy link
Contributor Author

@TheSFReader : No problem! Glad this feature is useful to you!

@hectori4502
Copy link

hectori4502 commented Jun 20, 2018

hello marcio-ao Thank you very much
(Rostock Max V2 MKSv1.4 TMC2208)
in my first test the gcode 425 works fine, but when I turn off the printer the values are reset.
Another thing that happens is when I use 3 decimals the backlash is reset to zero.

@marcio-ao
Copy link
Contributor Author

@hectori4502: Yes, the values are not stored to EEPROM. This would need to be implemented. It's not probably something I will implement since our printers will probe for the backlash. As for the three decimal place limitation, I don't know about that either. Possibly some limitation on parser.value_float. Perhaps @thinkyhead can comment on this.

@hectori4502
Copy link

Hello, I want to share these tests. I am very happy with the results
#define BACKLASH_SMOOTHING 3 // mm (the steps changed from 100mm to 98mm and duplicates the backlash. Can it be for my 8bits board?)
p1010002
p1010006

@marcio-ao
Copy link
Contributor Author

the steps changed from 100mm to 98mm and duplicates the backlash. Can it be for my 8bits board?

@hectori4502 : I don't understand what you mean by this. The backlash compensation should not change the steps/mm. Earlier I had encountered an issue in which Marlin was discarding certain segments due to the check against MIN_STEPS_PER_SEGMENT, and if this happens on segments to which the backlash compensation was applied, it will cause an accumulation of errors and the print will be shortened in Z. However, this was fixed by putting the call to add_backlash_correction_steps after it has already been determined that at least one of the axis steps is greater than MIN_STEPS_PER_SEGMENT.

I have not tested my code in delta printers, so it is possible there it is not working correctly with deltas.

@hectori4502
Copy link

marcio-ao
the steps changed from 100mm to 98mm and duplicates the backlash. Can it be for my 8bits board?
only when I set // #define BACKLASH_SMOOTHING 3 // mm.

@thinkyhead
Copy link
Member

thinkyhead commented Jun 22, 2018

I am not happy with the crazy #ifdefs.

Z_MIN_ENDSTOP_INVERTING is a true or false value, so this should be used:

#if ENABLED(Z_MIN_PROBE_ENDSTOP)
  #define TEST_PROBE_PIN (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING)
#else
  #define TEST_PROBE_PIN (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING)
#endif

(Same as _TRIGGERED_WHEN_STOWED_TEST.)

@thinkyhead thinkyhead force-pushed the pr-M425-backlash-compensation branch from 8f8f9ea to 19057d8 Compare June 22, 2018 03:23
@thinkyhead
Copy link
Member

thinkyhead commented Jun 22, 2018

Rebased and added a commit with some optimizations, bugfixes, and stylistic adjustments.

@thinkyhead thinkyhead force-pushed the pr-M425-backlash-compensation branch 8 times, most recently from bf4b159 to a213f2e Compare June 22, 2018 03:50
@MasterPIC
Copy link
Contributor

Do you think a "systematic" backlash should be expected on cheap 3D printers?

@GMagician
Copy link
Contributor

@MasterPIC backlash exists pratically in every machine. No backlash means machine stuck, the difference is only "entity".

@MasterPIC
Copy link
Contributor

@GMagician I was referring to the characterization of backlash.
If its variance is huge then I don't know if compensation is worth it. This is the reason why I asked about what we should expect from a cheap 3D printer...

@GMagician
Copy link
Contributor

@MasterPIC sorry, I think I bad translated your post. English is not my language

@MasterPIC
Copy link
Contributor

@GMagician No need to say sorry... ;-)

@forkoz
Copy link
Contributor

forkoz commented Jun 25, 2018

I look forward to trying this w/ a 32 bit board. You can auto measure Z backlash with the probe but how can it measure X/Y?

@thinkyhead thinkyhead force-pushed the pr-M425-backlash-compensation branch from 1f2e1f2 to 573933b Compare June 27, 2018 04:39
@marcio-ao
Copy link
Contributor Author

I look forward to trying this w/ a 32 bit board. You can auto measure Z backlash with the probe but how can it measure X/Y?

@forkoz: If you have endstops, you could use them to measure backlash in X and Y. If you're using Trinamics and sensorless homing, then it would not be possible, alas.

@marcio-ao
Copy link
Contributor Author

I added an implementation of MEASURE_BACKLASH_WHEN_HOMING, but have not tested it because our printers no longer have endstops. If anyone is willing to give it a go, I'd appreciate it.

@thinkyhead
Copy link
Member

There was a commit labeled "Keep this planner change?" which I guess should have been removed.

@marcio-ao
Copy link
Contributor Author

@thinkyhead: Ah. It looks correct now. If anything got missed, I can submit a patch on Monday.

I'm taking off now, so you can have it without us stepping on each other toes ;)

@thinkyhead
Copy link
Member

Have a fab weekend, and I'll try not to break anything too badly! Thanks for being patient on this PR and others that have hung around for a long time. I have more time to play catch-up now, so these should go a lot quicker.

@thinkyhead thinkyhead merged commit b22716e into MarlinFirmware:bugfix-2.0.x Dec 8, 2018
@VanessaE
Copy link
Contributor

VanessaE commented Dec 8, 2018

I've been watching this one for a while, glad to see it's been merged. Has anyone come up with a test pattern (along the lines of the linear advance test) to help tune this feature?

EDIT: This model does the job beautifully: https://www.thingiverse.com/thing:2256550

@MasterPIC
Copy link
Contributor

MasterPIC commented Dec 8, 2018

I'm testing it on my cheap printer (Anet A8) by a dial indicator.
Sending the same G1 command - after G91 - (e.g. G1 X1 F20 several times) I found the position error affected by high variance (obviously it's not related to the firmware).
Anyway it seems that backlash compensation makes better precision achievable when trying to move the nozzle to the previous positions. Without backlash compensation frankly I was not able to figure out what was happening...
So I like the feature; but it made me realize my printer is not as good as expected: I had never tested my printer by a dial gauge, except for leveling purposes...

@hectori4502
Copy link

I tested, works fine.
but M425 M500 do not save yet.
Compiling give this warning:
backlash warning

@marcio-ao
Copy link
Contributor Author

@hectori4502: Yup. It won't save to EEPROM. This is a project for someone who understands the EEPROM stuff better than I do.

I can probably make a patch for the warning. non-zero is only used when BACKLASH_SMOOTHING_MM is enabled.

@hectori4502
Copy link

Hi marcio-ao,
I uncomment:
#define BACKLASH_SMOOTHING_MM 3 // (mm)

the warning was gone.
Thank you so much for everything.

marcio-ao added a commit to marcio-ao/Marlin that referenced this pull request Dec 18, 2018
non_zero array is only used when BACKLASH_SMOOTHING_MM is enabled.
thinkyhead pushed a commit that referenced this pull request Dec 20, 2018
jacyro added a commit to jacyro/Marlin that referenced this pull request Dec 27, 2018
* Synchronize on M204, M205 (MarlinFirmware#12302)

* Add parser.seen for multiple parameters
* Fix M666, use !seen for report
* Synchronize on M204, M205

* Ignore ARM-based Teensy library on ATUSB90-based Teensy (MarlinFirmware#12311)

Works around PIO src_filter behavior (see platformio/platformio-core#1905)

* Tweak / reduce menu items

* IS_DELTA => ENABLED(DELTA)

* Clear up HAS_WORKSPACE_OFFSET meaning

* Revive SCARA's home offset (unimplemented)

* Use first_page flag in place of page.page == 0

* Apply #pragma once, misc cleanup (MarlinFirmware#12322)

* Apply #pragma once in headers
* Adjust some thermistors formatting
* Misc cleanup and formatting

* Fix broken LPC176x build (MarlinFirmware#12317)

* Fix broken LPC176x build
* Add UBL+HD44780 test for LPC1768

* Return to status to show manual deploy/stow messages (MarlinFirmware#12324)

* Add servos to pins_FYSTEC_F6_13.h

* Remove dead comment

* Fix VMAX editing

Fix MarlinFirmware#12326

* Use board-specific or platform SPI pins in HAL_STM32 (MarlinFirmware#12323)

* Suppress some compile warnings

* Fix EEPROM servo angles init, section grouping

* Drop 'register' storage specifier

* Provide DOGLCD SPI pins for MKS SBASE + VIKI

* Update Italian language (MarlinFirmware#12327)

* Allow disable of LCD_TIMEOUT_TO_STATUS (when 0)

* Clean up some U8G files

* Clean up file endings

* Turn PlatformIO LDF off for LPC176x builds (MarlinFirmware#12334)

* Update, correct sanity-checks for up to 6 extruders (MarlinFirmware#12333)

* Extend error messages for E factors sanity-checks

* ENABLED(NEWPANEL) => HAS_LCD_MENU

* MSG_UBL_EDIT_MESH_MENU => MSG_EDIT_MESH

* Add a mesh edit menu for MBL / ABL-Bilinear

* Add MESH_EDIT_MENU to example configs

* Cleanups for leveling-related code

* M420 support in MARLIN_DEV_MODE

* Fix endstops enable behavior during probing

Fix a bug introduced in MarlinFirmware#9582

* Recommend keeping endstops off

* Fix 'M43 T' to use 'L' as last pin

- The documentation is correct. The code was wrong.

* Provide a default for Z_PROBE_LOW_POINT

* Use multiplier edit item for mesh point editing

* Update and fix CHDK

* Clean up ENCODER_RATE_MULTIPLIER config

* G28 O respects HOME_AFTER_DEACTIVATE

Addressing MarlinFirmware#11271

* Prevent current step-down going negative

Addressing MarlinFirmware#11348

* Fix "circle"

* Fix MBL XY parameter error messages

Fix MarlinFirmware#11522

* Updated slovak translation (MarlinFirmware#12338)

* Update German language (MarlinFirmware#12336)

* Hide mesh editing until a valid mesh exists

* Restore LPC1768_PIN_INTERRUPT_M, apply to Z3

- In reference to MarlinFirmware#12166

* Clean up bq Zum Mega 3D pins

* Remove trailing whitespace

* Add Geeetech Rostock 301 config, update GTM32 Pro VB pins (MarlinFirmware#12345)

* Update Italian language (MarlinFirmware#12344)

* Change Marlin debug flag names to fix conflicts (MarlinFirmware#12340)

In reference to MarlinFirmware#11000

* LCD menu code refactoring and cleanup (MarlinFirmware#12308)

* Show the appropriate pause message (MarlinFirmware#12348)

* Fixed advanced pause messages (MarlinFirmware#12353)

* Apply some tool-change cleanup

* More advanced pause tweaks (MarlinFirmware#12356)

* Followup to LCD_TIMEOUT_TO_STATUS=0
* Make continuous purge screen fit 20x4
* Unify purge message modes
* Preserve last-set pause header mode

* Update German translation (MarlinFirmware#12355)

* Update Slovak translation (MarlinFirmware#12354)

* Update Italian language (MarlinFirmware#12352)

* Fix const pointer assignment compile error (MarlinFirmware#12350)

* Use IS_SD_PRINTING() more

* Use card.stopSDPrint() for completeness

* Fix Resume from SD Pause

In reference to MarlinFirmware#12098 (comment)

* Restore GTM32_PRO_VB temp and heater pins

Undo MarlinFirmware#12345

* Set CUSTOM_MACHINE_NAME for some configs

* Combine more tool-change variables (MarlinFirmware#12137)

* Fix up xdiff, ydiff, zdiff in tool change

Followup to MarlinFirmware#12137

* Clean trailing whitespace

* Apply HAS_LCD_MENU in EEPROM code

* Remove obsolete comments

* Extend pins errors to include the processor

* More comprehensive NO_LCD_MENUS (MarlinFirmware#12367)

* No error on T0 with single-extruder and fix MIXING_EXTRUDER virtual tools (MarlinFirmware#12375)

* Update Slovak translation (MarlinFirmware#12376)

* Update Italian language (MarlinFirmware#12368)

* [2.0.x] Macro G-codes (MarlinFirmware#9365)

* Fix M91x sanity-check to permit TMC2660

Fix MarlinFirmware#12362

* Solve endstops issues (MarlinFirmware#12382)

- Partially reverts MarlinFirmware#11900 and tries to solve MarlinFirmware#12336

* Update German language (MarlinFirmware#12379)

* Have 'mfdoc' open the local site when it's ready

* Add reference comments to MeshLevelingState

* Break out of 'mfpub' if 'gh-pages' checkout fails

* Use 'serial_spaces' in 'print_2d_array'

* Tweak 'echo_not_entered' used by MBL's G29

* Tevo Little Monster example configuration (MarlinFirmware#12370)

* Allow G26 to use the active extruder (MarlinFirmware#12387)

* Make lcd_quick_feedback argument optional
* Add click_to_cancel option to wait_for_hotend/bed
* Have G26 use the active nozzle and wait_for_hotend/bed
* Use wait_for_release in UBL G29
* Add 'T' parameter to G26 for an initial tool-change

* Update Raptor config

* Update HAL and libs formatting

* Reduce code size with plain inlines

* Apply extra condition to LCD_PROGRESS_BAR

* Adjust some comment spacing

* Encapsulate common display code in a singleton (MarlinFirmware#12395)

* Encapsulate common LCD code in a singleton
* Depend more UBL code on UBL_DEVEL_DEBUGGING
  - Since most users don't need the debugging on at all times, this helps reduce the default build size for UBL by over 2K, a little closer to fitting on 128K boards.

* Clean up LCD width/height determination

* For now (!) don't synchronize in M204 and M205

See if this has any deleterious effect on motion planning by slicers that inser their own jerk and acceleration controls. The problem I see is that these settings can take effect on blocks already in the planner, and the only way around this would be to shadow these settings in planner blocks and use the shadowed settings in the planner.

* Update UBL comments for debug change

* Differentiate translated On/Off from Serial ON/OFF

* Fix BABYSTEP_ZPROBE_OFFSET (MarlinFirmware#12408)

Fix MarlinFirmware#12399

Did not compile without  `WATCH_HOTENDS || WATCH_THE_BED`.
Add condition to include "../../module/temperature.h".

* Clear old _site contents on regeneration

* Followup to 50af1d1

* Add M412 to enable/disable filament runout detection (MarlinFirmware#12406)

* Clean TLM trailing whitespace

* Group status methods, share reset_status with Extensible UI (MarlinFirmware#12414)

* Group status methods, share reset_status with Extensible UI
* Move common DOGM code to headers

* Refine endstops fixes (MarlinFirmware#12413)

When endstops/probe are enabled `ENDSTOP_NOISE_THRESHOLD` calls to `update` are required to properly re-sync endstops/probe status.

* Fix tool-change for MIXING_EXTRUDER with < 2 virtual tools (MarlinFirmware#12417)

Fix MarlinFirmware#12416

Better handling of `ENABLED(MIXING_EXTRUDER) && !MIXING_VIRTUAL_TOOLS > 1` -  to not fall through to the general case. Fix compiler warnings for `#elif EXTRUDERS < 2`.

* Debug of G2-G3 for UBL (MarlinFirmware#12386)

Changes only affect UBL.  Everything else is left alone.

* Updates to Formbot T-Rex 2+ configuration files (MarlinFirmware#12422)

Updates to Formbot T-Rex 2+ configuration files

* Endstops fix followup (MarlinFirmware#12423)

Followup to MarlinFirmware#12413

* Add required "cardreader.h" include (MarlinFirmware#12419)

* Update Portuguese-Brazilian translation (MarlinFirmware#12402)

* Fix Formbot Trex-2+ configs

Followup to MarlinFirmware#12422

* Clean up pins files

* UltiMachine Archim 1 support (MarlinFirmware#12404)

* Fix an old sanity check

* hasstatus => has_status

* Move RRW keypad code to a common method (MarlinFirmware#12429)

* Rejigger Filament Runout class (MarlinFirmware#12428)

* Miscellaneous LCD code renaming, reordering (MarlinFirmware#12430)

* Move special characters to language.h
* Apply some naming standards
* Clean up menu item draw functions
* Rename some Temperature methods
* UI => ExtUI

* Fix to runout sensor code. (MarlinFirmware#12431)

- "old_state" is no longer a class static variable.

* Optimize target_extruder, ignore T with mixing (MarlinFirmware#12432)

* Optimize target_extruder, ignore T with mixing
* Give G-code Tn parity with tool_change

* Fix GcodeSuite::T active_extruder reference

* Tweak extruder errors

* No need for Cap:PAREN_COMMENTS

* Support two MAX6675 thermocouples (MarlinFirmware#8686)

* Optimize Power-Loss Recovery (MarlinFirmware#12440)

* Consolidate, optimize some LCD menu code (MarlinFirmware#12450)

* Make CardReader class static (MarlinFirmware#12451)

* Make CardReader a static class
* Make CardReader flags into bitfields

* Use 'target_extruder' in M104 as with M109 (MarlinFirmware#12448)

* Enable SD Card on RepRap Display and RADDS (MarlinFirmware#12446)

* Enable SD Card on RepRap Display and RADDS

Define the necessary pins in `pins_RADDS.h` (copied from the `RADDS_DISPLAY` section) for the use of the SD card slot on RRD.

* Fix a compile warning (MarlinFirmware#12452)

* Allow float XY probe offsets

Responding to MarlinFirmware#12383

XY probe offsets should be integers because adding decimal points makes the code larger. But if decimals are very much wanted, this commit removes the old restriction.

* Followup to static CardReader

* Change temperature pin order for RemRam V1 (MarlinFirmware#12458)

Beta testers suggested to adopt the RAMPS order of temperature probe connectors. This commit fixes the order to the RAMPS order.

* Fix compile error with SD_FIRMWARE_UPDATE (MarlinFirmware#12462)

* Fix compile error with ZONESTAR_LCD+NO_LCD_MENUS (MarlinFirmware#12466)

* Don't start watching heaters when target is 0 (MarlinFirmware#12453)

* Various fixes for MarlinUI and ExtUI (MarlinFirmware#12439)

* Remove extra include

* Fix MAX_MESSAGE_LENGTH

* Fix access to the DWT peripheral for STM32 HAL (MarlinFirmware#12434)

Access to the DWT peripheral for the `CYCCNT` register needs to happen before `main()`. The code needs to be called after the setup of the system clocks, so the right place is between the `premain()` and `main()` function of the STM32 Arduino core.

This patch moves the DWT access code to a new function, which is then placed between `premain()` and `main()`.

* Fix "no effect" and "unused variable" compile warnings (MarlinFirmware#12473)

* Update M303.cpp (MarlinFirmware#12471)

* Fixed displaying of kill MSG_OUTAGE_RECOVERY string. (MarlinFirmware#12470)

* GTM32 Pro VB changes from Markku Sinisalo

* Combine Travis CI option-setting commands (MarlinFirmware#12474)

* Fix LCD compile error, etc. (MarlinFirmware#12472)

* Clean up some u8g code (MarlinFirmware#12476)

* Get u8g reference for lcdprint

* Modify MBL to use IJ instead of XY (MarlinFirmware#12478)

* Corrected unused var, default switch, Travis tests (MarlinFirmware#12477)

* Fix compilation errors. Followup to MarlinFirmware#12439 (MarlinFirmware#12481)

* Fix for MarlinFirmware#12482 (MarlinFirmware#12483)

Fix Z-move to uninitialized position in SWITCHING_EXTRUDERS tool_change (no_move=true)

* Revert MarlinFirmware#12311 PIO LDF work-around (MarlinFirmware#12484)

* Followup to MarlinFirmware#12451

* Apply/unapply const here and there

* Shift YZ on graphical display to fit Z+123.45

* Don't show updir with no card present

* Expanded options for _Statusscreen.h (MarlinFirmware#12455)

See the PR for full details. The updated system will be documented on the website in the near future.

* Revert some const changes (for now)

* Fix ADC_KEYPAD middle button (MarlinFirmware#12493)

* Invert hotend bitmaps, by default

* General cleanup of Re-ARM pins

* Fix problems with LPC1768 EEPROM flash emulation (MarlinFirmware#12503)

* Remove duplicate calls to PrepareSector

Some flash memory API calls require that a call to `PrepareSector` is done before use. However this call is already made by the LPC1768 framework so the calls in this code are not required.

* Ensure correct alignment of RAM buffer

The LPC176X flash API requires that the RAM buffer used for write operations must be word-aligned. This change ensures that this is the case.

* Additional pin definitions for Archim 2 (MarlinFirmware#12500)

- Added GPIO pins to Archim 2
- Added new 108 pin to `fastio_Due.h`

* Use superscript 3 in language_en.h (MarlinFirmware#12504)

* Fix a minor compile warning

* Revert ADC_KEYPAD direction behavior (MarlinFirmware#12508)

* Remove extra declarations in cardreader.cpp (MarlinFirmware#12520)

* Fast PWM for controller fan (MarlinFirmware#12485)

* Bring superscripts slightly lower in BDF fonts

* Clean up font data generation script

* Don't show superscript ³ with NOT_EXTENDED_ISO10646_1_5X7 (MarlinFirmware#12513)

* Fix backslash in language_test.h

* Use wait_for_bed with WAIT_FOR_BED_HEATER

Addressing MarlinFirmware#12517

* Allow Serial Overrun Protection to be disabled

* Hide some compile warnings

* Put status screen options in Configuration_adv.h

* Update Italian language (MarlinFirmware#12512)

* NUM_ARRAY => COUNT

* Update Turkish language (MarlinFirmware#12524)

* Correct FANMUX2_PIN (MarlinFirmware#12538)

* Update Slovak translation (MarlinFirmware#12523)

* Fix wait_for_bed compile error

* Add support for FYSETC F6 V1.3 board (MarlinFirmware#12527)

* Fix English special symbols (MarlinFirmware#12529)

* Adjust Formbot Raptor pins

* Add missing boards to Makefile

* Add Formbot Raptor2 and Raise3D pins (MarlinFirmware#12532)

* Add Formbot Raptor2 board
* Add Raise3D Rumba board

* Add sample config for Delta with MKS SBASE (MarlinFirmware#10819)

* Hide M217 compile warning

* Improve runout sensor, fix LIGHTWEIGHT_UI screen size (MarlinFirmware#12544)

* Save recovery info on SD pause

* Space out multiple edit lines a bit

* Fix runout debug output

Followup to MarlinFirmware#12544

* Add poll_runout_states, which returns 1 for runouts (MarlinFirmware#12547)

* Add heating progress bars (MarlinFirmware#12543)

* Followup to heating progress

* Fans loop macro

* Fix "paused" message and M125 called by M25 (MarlinFirmware#12551)

* Fix Skew factors (MarlinFirmware#12555)

- Ensure Skew factors are calculated from test square measurements

* Fix "No SD Card" indicator

* Tweak FR icon. Update font data.

* A single SERIAL_ECHO macro type (MarlinFirmware#12557)

* Fix angles for disabled EDITABLE_SERVO_ANGLES (MarlinFirmware#12559)

* Move stepper enable/disable to stepper_indirection.h (MarlinFirmware#12562)

* Tweaks to endstops code

* Remove AVR-only MARLIN_DEV_MODE code

* Fix pause/resume SD print

Followup to MarlinFirmware#12551, addressing MarlinFirmware#12566

* Alternative fan image option (MarlinFirmware#12579)

* Alternative fan bitmap
* Move bed over by 3px

* Print a space after scrolling status

* Don't include STM32 Core code when compiling STM32 Generic (MarlinFirmware#12575)

* Build and CI fixes and optimizations (MarlinFirmware#12584)

-Disable LDF "deep+" mode on AT90USB platforms. Appears not needed any longer (likely due to fix platformio/platformio-core@7322df2). Results in identical binary output and cuts compile time in half
-Disable Cartesio config from CircleCI (compile failure)
-Disable Geetech I3 Pro X GT2560 from CircleCI (compile failure)
-Enable EEPROM on Micromake example config (fix compile failure)
-Move FolgerTech/i3-2020 to AVR platform in CircleCI (fix CirculeCI build failure)
-Disable various examples failing to build in CircleCI
-Enable various examples no longer failing to build in CircleCI

* Fix up some delta settings

* Update mfpub

* Trinamic: Split stealthChop, improve driver monitoring, etc. (MarlinFirmware#12582)

* Signal an invalid mesh for M420 enable / load

* Tweak config formatting

* Link to font docs in ultralcd_DOGM.cpp

* Sanity-check for negative steps, feedrate, accel

* M425 Backlash Correction (MarlinFirmware#11061)

* Add Z_MIN_PROBE_PIN to MKS SBASE pins

* Refresh screen on SD Init

* Followup to servo angles patch

Fix MarlinFirmware#12594

* Simpler AVR + Trinamic + Soft Serial sanity-check (MarlinFirmware#12606)

* Fix some serial echos of pin states

* Center ABL grid on bed with H parameter. (MarlinFirmware#12610)

* Align classic bed icon consistently

* Improve some config comments readability (MarlinFirmware#12615)

* Fix broken pins file include (MarlinFirmware#12617)

* TMC connection test, spreadCycle parameters, improved debugging (MarlinFirmware#12616)

* Sanity-check LIGHTWEIGHT_UI, move comment up (MarlinFirmware#12630)

* Allow ExtUI to use LCD_SET_PROGRESS_MANUALLY (MarlinFirmware#12628)

* Add spreadCycle parameter sets (MarlinFirmware#12645)

* [2.0.x] G33 clean up (MarlinFirmware#12648)

Remove obsolete workarounds in G33 for the now fixed zprobe_zoffset bug

* [2.0.x] Enable PIDTEMPBED in Anet A8 example config (MarlinFirmware#12655)

* [2.0.x] Set DEFAULT_NOMINAL_FILAMENT_DIA to 1.75 in Anet A6 config (MarlinFirmware#12664)

* [2.0.x] Update Czech translation (MarlinFirmware#12683)

* Squelch warning mentioned in MarlinFirmware#11061 (MarlinFirmware#12676)

* [2.0.x] Limit PID autotune target to maxtemp-15 (MarlinFirmware#12691)

* Limit set hotend temperature to maxtemp. (MarlinFirmware#12690)

* Added MKS MINI 12864 support to FYSETC F6 V1.3 (MarlinFirmware#12656)

* FYSETC F6 13 - E2_SERIAL_TX_PIN correction (MarlinFirmware#12667)

* Followup to MarlinFirmware#12691 (typo)

* GTM32 Pro VB FAN-PIN correction (MarlinFirmware#12666)

* Add Formbot 350c Thermistor (MarlinFirmware#12661)

* Add support for MKS Robin board (MarlinFirmware#12650)

Implement initial support for MKS Robin (STM32F103ZET6) board.
Custom build script is used to generate encrypted firmware compatible with original MSK Robin bootloader (i.e. safe firmware update from SD card and possibility to go back to original close-source firmware).

*  Wanhao Duplicator i3 Plus pins create (MarlinFirmware#12701)

* Update Formbot T-Rex 3 pins (MarlinFirmware#12662)
Weruminger pushed a commit to Weruminger/Marlin that referenced this pull request Jan 6, 2019
Weruminger pushed a commit to Weruminger/Marlin that referenced this pull request Jan 6, 2019
@marcio-ao marcio-ao deleted the pr-M425-backlash-compensation branch February 5, 2019 15:09
@ManuGithubSteam
Copy link

Is this still in Marlin 1.09 ? I cant find the command in the config.h
I need it for my snappy printer as it is all self printed and has massice x backslash.

@thinkyhead
Copy link
Member

@ManuGithubSteam — Marlin 2.0 is required.

@marcin-ose
Copy link

This is great work. It seems that backlash correction would make 3D-printed stepper motors (such as this amazing split-ring planetary stepper motor that runs on RAMPS - https://www.thingiverse.com/thing:1362555 ) practical for accurate drive applications. This opens up the possibility of DIY at the level of precision drive - yet one more step in making 3D printers more accessible in resource-scarce scenarios. Thoughts?

@marcio-ao
Copy link
Contributor Author

@marcin-ose: It may help, but I don't know whether it will help enough. If you ever get a chance to try, please share your experiences!

@marcin-ose
Copy link

@marcio-ao Will do. What is the version of Marlin to use for a fresh start with backlash correction? I'm on Ubuntu 16.04, still using Marlin 1.0.

@marcio-ao
Copy link
Contributor Author

We haven't tested or released Marlin 2.0 in any of our older printers, but if you want to try it, the FW files are here:

http://devel.lulzbot.com/software/Marlin/2.0.0.110

Use at your own risk!

@InsanityAutomation
Copy link
Contributor

FWIW ive moved a few Taz 6 machines to various 2.0 snapshots from the repo above and most dates work fine. A few have extra menu items or things not meant for the machine, or other oddities but overall nothing major.

@VanessaE
Copy link
Contributor

VanessaE commented Feb 6, 2020

This has worked nicely on my i3 since its inception. Now I have a CoreXY as well -- any chance of getting backlash compensation for it as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet