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.34k stars 19.26k forks source link

[BUG] [Bugfix 2.0.x] Multi Extruder Z height is wrong #10459

Closed opy001 closed 5 years ago

opy001 commented 6 years ago

Before I get started, I have an Anet A8 running Marlin 1.1.8 that I've been customizing for a bit. It is running 100% perfect with no issues at all, so I am familiar with 3D printers, but not a pro. I just built a custom AM8 clone with 4 extruders using a Mega 2560, RAMPS and RAMPSXB running on a 300W power supply. X and Y both are on TMC2130s but the rest are on A4988s. The XYZ steppers are 17HS19-2004S and the extruder steppers are 42HB40F04AB. Not sure what else you need as far as hardware.

When I print from more than one extruder the Z height is way off and at a random height. I printed 4 calibration cubes with each extruder alone and, other then a little underextrusion with one extruder, they all printed the same height, give or take a few hundredths of a mm. When I print a dual extruder calibration file the sizes are different every time. Every time the print is done the LCD says it is at 11.95. Extruders 1&2 end up being 13.9-14.9 mm tall, extruders 1&3 end up 11.5-11.7 mm tall (almost what it should be) and extruders 1&4 end up 10.95 mm tall. These are all printed from the exact same file in Simplify 3D, just changing the extruder used for the second part of the file and leaving the first part as extruder 1 since I am trying to set the offsets in my firmware. All 4 nozzles are perfectly level. I spent hours making all 4 the exact same height and took my time leveling the bed and carriage. The multi extruder prints are all lined up as far as x and y and other than height, they all print good. No other axis has issues, just Z.

Here is what I've tried. I've adjusted the current going to the Z steppers. Added a driver for stepper 2 so they are both using their own (they both stay perfectly level with each other). I've changed steppers and drivers with the same results. I've changed z2 driver to another place on my RAMPSXB as well as the e3 driver, but no change. I increased the current again to both z steppers since the drivers were quite cool despite the constant z hopping and bed level adjustments printing these parts (the Z steppers can take 2 amps).

The last thing I did was downgrade from 1.1.9 bugfix to 1.1.8. The only difference I noticed, and was pointed out by someone on FB, was the steppers run much cooler on 1.1.8 than they do on newer versions. I tried Marlin 2.0, but got too many errors compiling.

I've included my config and config_adv files as well as my pins file as I've made a bit of modifications for the RAMPSXB. I also included the images of the calibration cubed and multi extruder cubes.

Configuration.zip 30724007_2079729625402982_3060512620254713663_n 30739994_2079410358768242_8412492585338014659_n

thinkyhead commented 6 years ago

Does the issue go away if you disable bed leveling?

opy001 commented 6 years ago

I disabled it in firmware and removed G29 from my startup gcode. I'm starting a print now and holding my breath... Thinking about it, I wonder if that's why my individual cubes turned out the same. They did not bed level and I would not have noticed if the first layer was not a little off.

thinkyhead commented 6 years ago

When bed leveling is enabled, the physical distance to the bed differs for each nozzle, and this is compensated-for in the tool-change function. If these calculations are done incorrectly that would explain the discrepancy.

The simplest test is to enable bed leveling with M420 S1, print out the grid with M420 V to get a sense of the bed level, and then do tool changes with T0 S, T1 S, etc., checking the current position with M114 D (requires enabling M114_DETAIL) after each tool change.

I'd be interested to see the output from that test.

opy001 commented 6 years ago

I’ll do that test in the morning and post the results. It’s printing the dual extrusion test now. I’m curious to see the results.

opy001 commented 6 years ago

The first one printed and was actually close to the correct height. Turning off bed leveling screwed up the first 2 layers, so instead of being .35 mm they were closer to .15 mm, if that. I'll do your tests first thing in the morning then try printing from 1&4 to see if that one is more accurate also.

And thanks for the help :)

bruce356 commented 6 years ago

@opy001 , sorry for the intrusion, would be interested in how you managed to fit 4 extruder hotends on your printer, would you have a photo thanks and regards - bruce

opy001 commented 6 years ago

@bruce356 I made the printer larger. I have a 325x325 mm bed and use the carriage found here https://www.thingiverse.com/thing:2766701 mounted back to back with v-wheels in between, but I modified it some. It's not done, but pretty much all I need to do is print a large enough x axis chain for all the wires and then do some cleanup. When I ordered the aluminum extrusion we tried to accommodate for the larger carriage, but didn't take fans into account. I'm only losing a few mm on each side though. Extruder 1 and 3 can print all the way to the left and extruder 2 and 4 can print all the way to the right, so even if I only have 280 mm build space, that's way more than my A8. The bed is slow to heat up though. I've insulated the bottom and it helps and I put cardboard on top and it speeds it up by a few minutes.

image

opy001 commented 6 years ago

@thinkyhead No clue if I did this correctly, but here are the results:

M420 S1 < echo:Bed Leveling On < echo:Fade Height 10.00 < X:-10.00 Y:-10.00 Z:4.64 E:0.00 Count X:-800 Y:-800 Z:2122 M420 V < Bilinear Leveling Grid: < 0 1 2 < 0 +1.240 -0.017 -1.378 < 1 +1.215 +0.015 -1.332 < 2 +1.430 +0.333 -0.857 < echo:Bed Leveling On < echo:Fade Height 10.00 T0 S < echo:Active Extruder: 0 M114 D < X:-10.00 Y:-10.00 Z:4.64 E:0.00 Count X:-800 Y:-800 Z:2122 T1 S < echo:Active Extruder: 1 M114 D < X:25.42 Y:-10.40 Z:4.64 E:0.00 Count X:2034 Y:-832 Z:2121 T2 S < echo:Active Extruder: 2 M114 D < X:-9.65 Y:54.32 Z:4.64 E:0.00 Count X:-772 Y:4346 Z:2122 T3 S < echo:Active Extruder: 3 M114 D < X:25.29 Y:54.31 Z:4.64 E:0.00 Count X:2024 Y:4345 Z:2122

opy001 commented 6 years ago

The dual cube from 1&3 just finished and if I had not screwed up the first 2 layers of the cube from 1&2 (z offset was set for the bed leveling but I had to raise it a lot without bed leveling), they'd be just about identical. I'm starting 1&4 now. then I'll post results and a pic of the 3 of them.

opy001 commented 6 years ago

so extruder 1&2 print was 11.85 mm, 1&3 was 12.2 mm and 1&4 was 11.99 mm. That's the closest they've all been to each other. The LCD said 11.95 mm. Some of that is warping from pealing up off the blue tape that should've been changed, but I now have my buildtak on, so no more changing tape.

Now that we mostly narrowed this down to bed leveling, what is the solution to this issue? I need bed leveling as my 12"x12" bed is definitely not flat.

opy001 commented 6 years ago

ok I'm not sure if that was the whole problem. I printed from 2 and 3 and 3 was at least .5 mm lower when it was almost done and ended up popping the print off the bed. It could be that since my carriage seems to be slightly uneven and the right side has to be lowered via the z screw, that extruder 3 pulled down into the print, but it should definitely not have been over .5 mm lower than the other extruder. But that is why I need bed leveling :(

opy001 commented 6 years ago

Any ideas or suggestions on how to fix this?

opy001 commented 6 years ago

Now this thing is getting crazy. I was having extrusion issues with my grey filament on #3 so I moved it to #1 and printed a 15 hour job with no issues (mainly to see if the printer would even print something larger at all). The print looked great for a first "real" print on this printer. Hot end #3 is about 65 mm behind #1. I now want to do a quick little print with #3 but when it tried to auto level the bed goes 65 mm too far back and out from under the sensor. If I get it to auto level then the bed goes too far back, hits the endstop and vibrates trying to go back 65 mm more. If I power down and back on then it might work right once, until I power down again. Why is this thing not acting right? Surely it knows to still bed level at Y50 like I said to, but it thinks it needs to bed level 65 mm further back then it tries to move the bed 65 mm too far back before starting to print. It's like it doesn't know that just because I was it to print with the extruder 65 mm behind #1 that it still has to obey the X/Y home positions.

This is exactly what I'm doing. Preheating extr 3 and bed, hitting print from SD card, it homes, does G29, then tries to move the bed 65 mm too far back hitting the endstop and buzzing then it starts to print, but I have to end it because the Z offset is wrong. If I try again instantly the G29 is 65 mm too far back, but if I power off first then it does exactly like the first time and the y axis is off anyway.

This does not happen when printing from extruder 1.

Are other people having issues with 3 or more extruders? Or am I one of the few that has their extruders in a square formation?

thinkyhead commented 6 years ago

It's a more complicated setup than we usually see. Part of the issue is going to be that the print area is different depending on which nozzle is active. The best I can suggest is to set up a live troubleshooting session with me and then we can try and solve the issue in real-time. What is your time zone and when would you have a few hours free to get into the process?

opy001 commented 6 years ago

I am in central time. I think I can get a couple of hours free this afternoon around 2:30 central time.

opy001 commented 6 years ago

Worst case, I work from home and can be available most of tomorrow during the day.

opy001 commented 6 years ago

Finally got 2.0 to compile and upload. It's worse than 1.1.9. I stopped printing when the LCD said it was at 7.35 mm but it was actually at 14 mm and the layers were .4 mm thick but it only spit out enough filament for .2 mm layers.

Let me know when you are available. I really appreciate it.

thinkyhead commented 6 years ago

I'm in your timezone (Austin, TX) and am generally free in the evenings. I'm not sure about tonight, but would tomorrow, Wednesday (April 25) work for you?

opy001 commented 6 years ago

I have church on Wednesday nights and Thursday we have tickets for infinity war for my wife’s birthday. Do you have any time this weekend? Would it help if I sent you my phone number so we could work this out off-line?

Also, I'm in Ft Worth 😁

boelle commented 5 years ago

@opy001 status on this one?

opy001 commented 5 years ago

Nobody could figure it out. Repetier did not have this issue so I switched.

boelle commented 5 years ago

@thinkyhead should we keep this one open? it sounds a bit odd to me

opy001 commented 5 years ago

Doesn’t matter to me. I never could get more than 2 extruders working on Marlin. Using 2 colors worked, but were still a bit shorter then if I printed it single color. My dad also tried and using 2 colors I did notice a height variation between 2 of the same prints. Repetier had no issue with that at all.

That being said, I had 4 E3D hotends on a quad carriage and Repetier had issues switching nozzles. It would lift the carriage then move nozzle 2 where nozzle 1 was but took forever to move it. My speed was set to 80 mm/s but it was moving maybe 5 mm/s. Finally switched to a diamond full color.

So either firmware had issues, but Marlin never got my z height right using the quad carriage.

boelle commented 5 years ago

@opy001 still having issues?

boelle commented 5 years ago

Lack of Activity This issue is being closed due to lack of activity. If you have solved the issue, please let us know how you solved it. If you haven't, please tell us what else you've tried in the meantime, and possibly this issue will be reopened.

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.