Backlash Compensation: Test and gcode Compensation Program
thingiverse
TL;DR: I created a backlash test and a program to eliminate it when slicer, firmware, and printer won't do the job. Use at your own risk! Uneven circles, crappy infill, and gaps between walls - that's what I dealt with. After some time, I realized my printer suffered from Backlash (when an axis changes direction, the movement of the stepper isn't transferred to the nozzle directly and it loses some movement). This caused uneven diameters in circles and airgaps between walls. There are already good backlash tests available (I first used thing:2256550), but when tightening belts, pulleys, and steppers won't help anymore, there has to be another option. Cura and Marlin don't have the answer, so I looked for another solution - altering the G-code itself. Thing:979377 already tried this, but it displays the G-code, takes forever (>1h to load a normal-sized print), and has problems with long straight extrusions. I created my own code after testing it extensively, and it works like a charm. I built in some safety options so I can share it. But still, be careful and visualize the new .gcode files before uploading them to your printer (I use www.gcode.ws). How to use it: Your start code needs to contain G90 for Absolute Positioning, otherwise nothing will be altered. Put the .exe in the same folder as your .gcode file, copy its name, and start the .exe. Enter the desired backlash compensation for X and Y, paste the name of the .gcode, and watch it convert (takes a few seconds). You'll get a new file, so it won't alter the original one. Antibacklash analyzes the G-code and adjusts the coordinates with the selected backlash-value whenever X or Y makes a positive movement. When the nozzle makes a turn, it adds an additional empty travel move to add/remove the backlash before performing the actual move. The nozzle won't move in reality; it just compensates the backlash. The program will alert you if you have any G91 (Relative Positioning) moves in your code until it switches back to G90. These parts won't get touched, but since they're usual in the end-gcode for moving the nozzle away from the bed and retracting after printing finished, this won't affect us at all. After that, you should be good to go. To check the G-code, I simply use gcode.ws to visualize and Notepad++ to compare the old with the new version of the files. Try it first with any backlash test to get the right values. My workflow is displayed in the pictures - the first two are without and with too much backlash compensation to see if it works. After that, I trimmed the settings until I got to the right values. How to print my test and interpret the results is explained later on. I didn't have any problems with Antibacklash so far, and I don't expect any issues. If you come across any unexpected issues, feel free to share them. But keep in mind, Antibacklash is a free program and comes without any warranty. Use at your own risk!
With this file you will be able to print Backlash Compensation: Test and gcode Compensation Program with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Backlash Compensation: Test and gcode Compensation Program.