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.11k stars 19.2k forks source link

auto leveling issue? #6399

Closed d2crafty closed 6 years ago

d2crafty commented 7 years ago

I already set up the autoleveling and had successful prints.. however now after it levels and starts printing.. one side of my brim is showing up as "too squished down" and the other side as though it is "normal" -- seems as though the sensor is not working as intended? I am doing a 9 pt probe. is there something I can do other than adjusting the bed screws to accommodate the leveling? this is for a prusa i3 clone thank you

Tannoo commented 7 years ago

Dual Z steppers? Possible one got out of sync at some point causing the X carriage to be out of kilter? The Z axis rods should be lubed...if not, they will bind and cause this issue. To help with this, I have changed these 5mm nuts to brass nuts.

Is it possible that one or more of the bed adjustments worked loose(r)?

You are not "autoleveling" before every print, are you? If so, you are not taking advantage of the EEPROM features to store the matrix for multiple uses.

benlye commented 7 years ago

Check that your Z-probe X and Y offsets are correct - you need to set the offset from the center of the nozzle to the center of the probe (what kind of probe, out of interest?) - having this out by 1-2mm can cause the behaviour you are seeing (I had the same problem).

You might find the troubleshooting steps here helpful (it's written for the A8, which is another i3 clone): https://3dprint.wiki/reprap/anet/a8/improvement/autobedleveling#troubleshooting

Bob-the-Kuhn commented 7 years ago

If you continue to have problems with the two Z steppers getting out of synch then consider going to Z_DUAL_ENDSTOPS.

If you're using Bilinear leveling then take a look at this. Bilinear Auto Bed Leveling Details 0.4.zip

sarf2k4 commented 7 years ago

I am also wondering about the configuration since I am using original bltouch classic and here are my configs for it

these are the offset especially x and y, I got them from measuring the model file in the 3d modeling software

#define X_PROBE_OFFSET_FROM_EXTRUDER 30  // X offset: -left  +right  [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 11 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER -0.95   // Z offset: -below +above  [the nozzle]

while this one is the probe boundary

// Set the boundaries for probing (where the probe can reach).
    #define LEFT_PROBE_BED_POSITION ((X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
    #define RIGHT_PROBE_BED_POSITION 195
    #define FRONT_PROBE_BED_POSITION 11
    #define BACK_PROBE_BED_POSITION 192
// Travel limits after homing (units are in mm)
#define X_MIN_POS -10
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS 210
#define Y_MAX_POS 200
#define Z_MAX_POS 180

on left side, it is squished down

d2crafty commented 7 years ago

sorry I havn't been on here a bit.. #define X_PROBE_OFFSET_FROM_EXTRUDER 20 // X offset: -left +right [of the nozzle]

define Y_PROBE_OFFSET_FROM_EXTRUDER -15 // Y offset: -front +behind [the nozzle]

define Z_PROBE_OFFSET_FROM_EXTRUDER -0.70 // Z offset: -below +above [the nozzle]

// X and Y axis travel speed (mm/m) between probes

define XY_PROBE_SPEED 3000

// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)

define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z

// Speed for the "accurate" probe of each point

define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)

// Use double touch for probing

define PROBE_DOUBLE_TOUCH

--

I caliper checked my x axis for height discrepancies and now I'm manually rechecking my bed for it being set off.

d2crafty commented 7 years ago

using http://www.ebay.com/itm/New-3d-printer-Auto-Leveling-Sensor-limit-switch-for-Prusa-I3-3D-printer-/302251659470?hash=item465f9a50ce:g:z18AAOSw4A5Yx2bf --- as a bed leveling sensor

d2crafty commented 7 years ago

well.. i spent 6 hours trying to get this damn printer to print correctly again. I still have to "manually" adjust the bed to the print head on one of the points for the print to stick to the bed correctly. I almost feel like I'm better off going back to the manual end stops :( - what is weird is, everytime I adjust it to the "correct" point, and start the print over, it seems the problem would reoccur

Roxy-3D commented 7 years ago

well.. i spent 6 hours trying to get this damn printer to print correctly again. I still have to "manually" adjust the bed to the print head on one of the points for the print to stick to the bed correctly. I almost feel like I'm better off going back to the manual end stops :(

Turn on the UBL Bed Leveling... You will get good adhesion across 100% of your bed every time. If you do choose to do that... I'll help you get it set up. Do these things and report back...

d2crafty commented 7 years ago

i'll get back tonight. I've been up from 11pm to now 645am.. thanks for the help!

sarf2k4 commented 7 years ago

@Roxy-3D , i need a bit of help here as well for my configuration above. Was it okay especially for the probe area bounding?

Roxy-3D commented 7 years ago

Was it okay especially for the probe area bounding?

I don't understand the question. But if you have a bizarre setup, we can address it with the Configuration_adv.h settings. (bizarre like your X-Min is -50 and X-Max is 200). UBL knows about the probe offset and that is the reason I asked for the topology map as the last step up above. Depending on what we see... We may want to do address the un-probed areas differently.

Go ahead and see far you can get with the list up above...

sarf2k4 commented 7 years ago

well, according to bob, give a bit of edge margin so the probed point value are much better

Roxy-3D commented 7 years ago

well, according to bob, give a bit of edge margin so the probed point value are much better

There is truth in that.... But really, it is up to you. Do you want every last mili-meter of printable bed space? Because if you do, it will be harder (meaning an extra iteration of G26 & G29 P4) to clean up the inaccurate numbers along the edge. If you want to get setup with minimal problems... Yeah... define a 5mm or 10mm inset in your configuration.h file. And that issue will be automatically addressed.

sarf2k4 commented 7 years ago

okay, i will try with 5-10mm inset, that would mean at about the following right?

// Set the boundaries for probing (where the probe can reach).
    #define LEFT_PROBE_BED_POSITION 25
    #define RIGHT_PROBE_BED_POSITION 190
    #define FRONT_PROBE_BED_POSITION 20
    #define BACK_PROBE_BED_POSITION 185

the above setting are after the margin inset

Roxy-3D commented 7 years ago

Those numbers are not used in UBL. Please ignore them. Just set UBL_MESH_INSET 10 and we will know as soon as we do a G26 whether you want to shift numbers before you fine tune your mesh.

If we have to throw out the first set of numbers because the mesh is too small on your bed or not positioned how you want it... It isn't a tragic loss. You just change the numbers and get a cup of coffee while it recovers back to where you decide to pull the rip cord.

sarf2k4 commented 7 years ago

I'm unable to find the specified variable, the closest is this #define MIN_PROBE_EDGE 10 on line 817

Roxy-3D commented 7 years ago

You should be using the current RCBugFix, right??? This is the section to fill in your UBL numbers:


#elif ENABLED(AUTO_BED_LEVELING_UBL)

  //===========================================================================
  //========================= Unified Bed Leveling ============================
  //===========================================================================

  #define UBL_MESH_INSET 45         // Mesh inset margin on print area
  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
  #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
  #define UBL_PROBE_PT_1_X 39       // These set the probe locations for when UBL does a 3-Point leveling
  #define UBL_PROBE_PT_1_Y 325      // of the mesh.
  #define UBL_PROBE_PT_2_X 39
  #define UBL_PROBE_PT_2_Y 20
  #define UBL_PROBE_PT_3_X 325
  #define UBL_PROBE_PT_3_Y 200
  #define UBL_G26_MESH_EDITING      // Enable G26 mesh editing

Those are my numbers for my gMax 1.5+ printer. It is big.... You probably want to set UBL_MESH_INSET to 10 and change the 3-point probe numbers so they fit on your bed.

sarf2k4 commented 7 years ago

aahhhh.... i see, I am using the initial rc8 release since rcbugfix kind of always updated and i might lose track of which is which to be honest. i will give it a try.

so if I used the previous setting that i currently use, not the one with margin applied, the ubl inset will apply the margin automatically right?

Roxy-3D commented 7 years ago

Yes. BUT please pull up the configuration.h files in a visual diff program and move your settings to the new file. Do not just try to drop your old file in place. That will not work. And probably, you should do that for both Configuration.h and Configuration_adv.h.

sarf2k4 commented 7 years ago

is it possible if i add #include <customconfig.h> at the top of the original configuration.h file in hoping to override the original file? sorry a bit of out of topic

Roxy-3D commented 7 years ago

I don't know... It is safest if you don't add any variables. It would be best to just get your settings into Configuration.h

sarf2k4 commented 7 years ago

I'm porting the previous config.h to the rcbugfix's config and reached to the bed leveling section. which do i have to pick?

Roxy-3D commented 7 years ago
//#define AUTO_BED_LEVELING_3POINT
//#define AUTO_BED_LEVELING_LINEAR
//#define AUTO_BED_LEVELING_BILINEAR
#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING
sarf2k4 commented 7 years ago

okay. I will try with the bilinear first then moving to ubl if problem still persist

d2crafty commented 7 years ago

tried configuring the new marlin. seems my printer doesn't like the new ver. no UBL leveling in my ver. :/ I'm using 1.1.0. RC8

Bob-the-Kuhn commented 7 years ago

It's only in RCBugFix.

You'll have to manually transfer your machine specific items over to the new config files.

jasoncross commented 7 years ago

I have a very similar issue. Migrated my config and am now on the latest RCBugFix. Would like to try using UBL, but haven't figured it out yet - any guide out there for setup and testing?

Roxy-3D commented 7 years ago

Would like to try using UBL, but haven't figured it out yet - any guide out there for setup and testing?

We need a guide written for it. But do these steps and report back... I'll help you.

jasoncross commented 7 years ago

Ok! Will give it a go in the morning and report back!

fiveangle commented 7 years ago

Turn on BABYSTEPPING

So UBL requires LCD ?

Roxy-3D commented 7 years ago

So UBL requires LCD ?

Right now... Yes. But once we get Delta's up and running that constraint can be relaxed.

jasoncross commented 7 years ago

Do you recommend turning on BABYSTEP_ZPROBE_OFFSET?

Map:

Recv: Bed Topography Report: Recv: Recv: (0,9) (9,9) Recv: (20,20) (280,280) Recv: 0.625 0.715 0.555 0.408 0.750 0.963 0.912 1.112 1.100 . Recv: Recv: 0.345 0.283 0.393 0.628 0.787 0.765 0.807 1.082 1.098 . Recv: Recv: 0.130 0.010 0.423 0.413 0.420 0.918 0.795 0.767 0.985 . Recv: Recv: -0.048 0.120 0.082 0.462 0.582 0.355 0.435 0.680 0.925 . Recv: Recv: -0.450 -0.245 -0.077 0.160 0.125 0.357 0.505 0.538 0.818 . Recv: Recv: -0.620 -0.460 -0.102 -0.187 0.158 [ 0.010] 0.320 0.490 0.548 . Recv: Recv: -0.780 -0.442 -0.072 -0.293 -0.067 -0.050 0.120 0.340 0.477 . Recv: Recv: -0.970 -0.638 -0.650 -0.330 -0.232 -0.092 0.187 0.192 0.452 . Recv: Recv: -0.965 -0.950 -0.795 -0.405 -0.288 -0.170 0.025 0.255 0.305 . Recv: Recv: . . . . . . . . . . Recv: (20,20) (280,20) Recv: (0,0) (9,0)

Roxy-3D commented 7 years ago

@jasoncross I had to pull your Topology Map into a text editor so I could get the columns to line up. Your probe has a negative X & Y OFFSET_FROM_EXTRUDER. Which means it can't probe all the way to the right side or the front (if your origin is left front) of the bed.

We need to fill in the unprobed areas with 'reasonable' numbers. Please do the following:

I have a 'Smart Fill' routine written and debugged... But it will be a few days until I get it uploaded. With that... All of those G29 P3 commands would have been automated.

jasoncross commented 7 years ago

I have those commands done. What's next? Nothing happened when I ran the G26 P C O3.0

Roxy-3D commented 7 years ago

I have those commands done. What's next? Nothing happened when I ran the G26 P C O3.0

That doesn't sound right... Do you have #define UBL_G26_MESH_EDITING enabled? If not, you need to enable it and re-flash the firmware. Then continue on...

jasoncross commented 7 years ago

That doesn't sound right... Do you have #define UBL_G26_MESH_EDITING enabled? If not, you need to enable it and re-flash the firmware. Then continue on...

That was commented out. I uncommented, reflashed, then ran G28 followed by G26 P C O3.0

A pattern printed. Most (but not all) of the grid looked to be extruded from further away from the heat bed than I would expect. Should I adjust my offset with M851 and run again? Any way to test a smaller portion of the grid to see if that helps without waiting for the full 10x10?

Roxy-3D commented 7 years ago

A pattern printed. Most (but not all) of the grid looked to be extruded from further away from the heat bed than I would expect. Should I adjust my offset with M851 and run again? Any way to test a smaller portion of the grid to see if that helps without waiting for the full 10x10?

Step one was:

In theory, it doesn't matter because the mesh can adjust for what ever error is present. But things do go much better if this is accurately set. And it helps to set the Z-Homing to happen in the center of the bed. If you want... It might be good to make sure the Z Probe offset is very accurately set. (along with homing in the center of the bed)

But... The way the system works is you can now move the nozzle over an area of the bed that is not 'perfect' and issue a G29 P4 R. You can dial up or down each mesh point. As a rule of thumb... If the line is too squished down and too thin... Bring the mesh point up. Don't go crazy... but depending on what you see, bring it up .1 or .2 mm. If the line is just barely adhering to the bed, bring the mesh point down .1mm. If the line is not adhearing at all, bring it down .25mm.

And then run another G26 command. Things will be better. You will see improvement. But there still will be flaws. So, you move the nozzle to each bad area, and do another G29 P4 R.

After a few iterations... You will have 100% adhesion across 100% of your bed 100% of the time.

But seriously... It really does help to have your Z-Probe-Offset dialed in very accurately.

One you get your mesh accurately dialed in... It should be very stable for many months. If you move your printer to a friends house or you change the linear bearings on your bed... You will have to redial it in. But short of that... It just works. It powers up and it is correct. So it is worth spending an hour to get it accurately defined.

jasoncross commented 7 years ago

Here is how I tested my offset:

G28 Put a piece of paper under the nozzle on the bed Set Z to 0 Paper had that tiny bit of pull between build surface and nozzle that one likes

Not sure how to get more exact than that. Plus it's the same offset I've been using with bilinear with good results at least in the middle of my bed.

Will tweak the grid tomorrow and report back.

Roxy-3D commented 7 years ago

Yeah... It is always difficult to get that number right. But here is another way to do it. You have a G26 pattern printed on your bed. Is it pretty much too high? Or is it pretty much too low? Is half of it perfect? And half of it not adhering at all?

The Z_PROBE_OFFSET_FROM_EXTRUDER should be ---PERFECT--- in the area where the nozzle is when the Z-Axis is homed. (And homing in the center of the bed helps for a number of reasons!!!!). It is worth taking a quick detour and getting that number set right such that the mesh has very small correction numbers around the place where the nozzle homes the Z-Axis.

But that is the whole purpose of the G26 Mesh Validation Pattern. It lets you see what is happening with regard to your nozzle and how it prints on the bed. Dial in your Z_PROBE_OFFSET_FROM_EXTRUDER number based on where the nozzle is when your home the Z-Axis. (Do this with no correction. You want to see how things look without any correction. Either do a G29 D or do a G29 P0) Make sure that part of the G26 pattern looks nice with no correction. Adjust the Z-Probe Offset up or down so that looks perfect. (And you don't even have to let the whole pattern finish. You can stop it as soon as you know which way (and how much) to move the offset.

And... Once that is set... It probably makes sense to grab a cup of coffee and just start over with a fresh G28 / G29 P1.

PS. Please don't feel like you are in over your head or that this is hopeless. The fact you got much of the G26 to print in a reasonable fashion means you are almost certainly guaranteed of getting across the finish line. Worst case... Because you have no experience dialing up or down the mesh points... It will take 3 iterations of printing a G26 pattern, and then editing the bad spots. The process converges very quickly. And pretty soon, you won't even have to look at the LCD panel as you dial a mesh point up or down. You will just be looking at where the nozzle is and making a decision of "should I raise that spot just a little bit, or maybe a lot?" It gets better very quickly!

jasoncross commented 7 years ago

What's the best way to stop the G26 pattern? Anything short of the kill switch?

I used m851 to move the z offset .1 and re-ran G26. The center looks correct, the right has the nozzle too close, as does the top center, and the bottom left is too far.

Can you clarify how I go about making corrections at each point?

Don't worry, it doesnt feel hopeless. I'm excited to get it all figured out. i do have a question though - once the mesh is established, does the whole process need to be retuned from scratch every time the bed gets slightly off level left-to right or my glass shifts slightly?

Roxy-3D commented 7 years ago

What's the best way to stop the G26 pattern? Anything short of the kill switch?

Press and hold the Encoder Wheel. There is some latency. It is only checked once during each circle (and connecting line) cycle. It might take 2 or 3 seconds to be noticed. Just keep the encoder wheel pressed... and it will stop 'eventually'.

I used m851 to move the z offset .1 and re-ran G26. The center looks correct, the right has the nozzle too close, as does the top center, and the bottom left is too far.

Ok! good on the 'center' part! Probably, you should start clean with a new G29 P1. But if you choose not to... You can just edit each and every mesh point. But if you adjust the Z probe offset... You really should start clean with a fresh G29 P1.

Can you clarify how I go about making corrections at each point?

After you do a G26 command, the mesh validation pattern will be on the bed. Different areas may be less than 'perfect'. Move the nozzle to the center of the area that is flawed. Do a G29 P4 R command. The nozzle will go to the closest mesh point that has not been edited yet. You can turn the encoder wheel to adjust what should happen at that mesh point. If you have bad adheasion at the mesh point, bring the nozzle down a little bit. If the filament is squished too thin at the mesh point, bring it up 'the right' amount.

When you done editing that area... Press and Hold the encoder wheel. This is typically done over a mesh point you don't want to edit.

Don't worry, it doesnt feel hopeless. I'm excited to get it all figured out. i do have a question though - once the mesh is established, does the whole process need to be retuned from scratch every time the bed gets slightly off level left-to right or my glass shifts slightly?

No... If an area or edge starts not being perfect... You can just edit that one area and everything is good for a while. Typically... A perfectly tuned mesh lasts at least a month (and I print a lot). But as the linear bearings wear and different things happen... Your mesh does need to be 'refreshed'. But it usually is small areas that are less than perfect and it takes longer to do the G26 command than to actually do the editing. What can really screw things up is if you drive the nozzle into the bed and one Z stepper motor keeps going down but the other side freezes. Doing something like that causes you to lose everything and may have to start over.

d2crafty commented 7 years ago

ok, heres the issue.
Marlin_REVISED_NEW.zip marlin_OLD.zip

The OLD marlin works. The NEW marlin refuses to work. I could swear I'm putting all the right things in, maybe I missed something. Can somebody review it and tell me please? thank you. img_20170424_152432

Roxy-3D commented 7 years ago

@d2crafty A visual diff program is very useful. Try bringing up Notepad++ and turning on the visual comparison plug in. Then bring in both files and make sure your settings are all crossed over. This really is something you need to learn how to do.

d2crafty commented 7 years ago

I know there are differences, however I don't know what is needed and unneeded. E.g. in the new version a LED color system is enabled which I disabled. Maybe something I have needs to be enabled that was added to the new system I don't know of that is crashing the system?

Roxy-3D commented 7 years ago

E.g. in the new version a(n) LED color system is enabled which I disabled.

It is not enabled by default, right? No way can that be the way it is when this gets promoted to Golden.

d2crafty commented 7 years ago

Well, I decided to uninstall repetier and reinstall to try for the prints since I have been trying to level this bed over and over with no avail. Funny, first print that comes out is 95% perfect. The offset is about .02 too close to the bed. But everything seems to be coming put straight. All this and maybe it was just a software issue on repetier alone?

Roxy-3D commented 7 years ago

first print that comes out is 95% perfect. T

The first print with UBL turned on (and the mesh not even edited....)? Or do you mean with no bed leveling turned on... You can now get a 95% perfect print?

d2crafty commented 7 years ago

ok, I fixed it, its coming out 99.9% there. In my book, its "perfect" enough compared to what I was getting 17 hours ago. The bed leveling is turned on, I have no clue why nothing was registering. But whatever. I'm still curious about the UBL, but right now, I just need to get some prints out. Roxy-3D commented 12 minutes ago "You can now get a 95% perfect print?" -- give me crap

Roxy-3D commented 7 years ago

Yeah... This stuff is more complicated than it needs to be!

d2crafty commented 7 years ago

well, I spent alittle over a week on this, 7-8hours a day, not including my weekends which went even longer. like today is technically my Sunday. To say it was something simple as, uninstall and reinstall sort of pisses me off