Notifications
Clear all

Enabling Auto Leveling in Firmware  

Page 5 / 5
  RSS
Severeon
(@severeon)
New Member
Re: Enabling Auto Leveling in Firmware

I went back to look at 2.2.4 with auto leveling enabled. I found that simply editing a single line in Marlin_main.cpp fixes the issue.

Marlin_main.cpp Line: 2101

SERIAL_PROTOCOLPGM(MSG_BED);

If you change it to "BED" (or your language's word for bed) it works!

SERIAL_PROTOCOLPGM("BED");

Now, I'm a programmer for a living. I know this isn't a great solution. I'll actually dig into it tonight and see about putting together a proper fix.

(edited to correct version)

Posted : 07/04/2016 6:40 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Enabling Auto Leveling in Firmware

Thomas

That makes little sense as MSG_BED is defined in the language header.

Your suggestion implies that the define in that header is either being included after its use in the code or it is not being included.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Posted : 07/04/2016 7:40 pm
bill.b
(@bill-b)
Active Member
Re: Enabling Auto Leveling in Firmware

so, i was following this thread ever since i got my 3d printer. about a month or so ago. last night i finally decided to attach my probe and get everything all set up. well, its now over 24 hours later and i finally have a perfect print.

enabling it in the firmware is easy as pie. getting the offsets correct and getting the printer to do what you want is another story.

upon initial print after bed leveling, my z axis was well above the print surface. just caused a blob of mess. even tho, my offsets were correct and everything. off to google i went!

i dug up a bunch of stuff flashed the firmware 8000 times. but finally, i got it. i want to share my experience so maybe someone else doesnt have to go through the crap i did to get it working.

im just going to go through the z probe offset. everything else is pretty self explanatory. when you enable auto bed leveling, the firmware assumes the point of 0 is the surface of the bed. with the prusa firmware, this is not the case. if you load the firmware into the arduino software, and look at configuration_prusa.h, youll see on line 34 "#define MANUAL_Z_HOME_POS 0.23" when the axis is homed, this tells the firmware the nozzle is .23mm ABOVE the print surface. but, when you attach a probe, its going to be nearly impossible to replicate that. youll most likely end up with a different value.

a lot of places ive looked said to home the z axis with the probe, once its done, enter a G92 command to tell the firmware the axis is 10mm above the print surface so you can lower the axis onto a piece of paper to find the offset. cool, i did that, put it in the offset under bed leveling, and the prints were terrible.

i got a better way. paper doesnt stay true and i think its the most terrible way to calibrate these things. do yourself a favor and get some feeler guages. i spet $6 and got an entire set from my local auto parts place. (DONT FORGET TO CLEAN THE MACHINE OIL OFF OF THEM WITH ALCOHOL FIRST)

my way:

after you home all axis, get your feeler guages and start stacking them up until they hit the nozzle. add up the values, theres your offset. my nozzle was 0.369mm above the print surface. (i did this cold btw. i know, i know, heat expansion. i just wanted to get a print)

now, you put this under bed leveling offset on line 354 "#define Z_PROBE_OFFSET_FROM_EXTRUDER -0.369" its a negative number cuz the firmware thinks youre at 0 which would have the nozzle touching the bed, but, the bed is BELOW the nozzle that amount of distance. basically, you want to compensate for the open space. fine and dandy right? nope. shitty prints galore. until i just sat and thought about it. that "#define MANUAL_Z_HOME_POS 0.23" from above was the killer. so i changed the 0.23 to 0.369. this is a POSITIVE number cuz the firmware reads the probe offset first. so, itll read that -.369 is now 0 but the home position is .369 above the bed. (i hope that makes sense) did it print perfect? NO! WTF is going on?!

i dug a little deeper. found this on line 291 of configuration.h "#define min_software_endstops false // If true, axis won't move to coordinates less than HOME_POS."
the default is true. no matter what you do, the axis will not go beyond the set point. since we dont have a mechanical endstop for the z, we CAN go below the home point. so, i set this to true. FINALLY! i got a perfect print right off the bat. now, this holds true for all axis, but, the min endstops (mechanical on x and y) will prevent the x and y to travel further. ive tested it haha. however, you need this enabled to get the z axis to go below "0" or ".369" in my case. there is another way you could avoid changing this line. on line 42 of configuration_prusa.h "#define Z_MIN_POS 0". you can change that to "-0.369" (or whatever your offset is. i havent tested this but in theory, it should work the same way)

and depending on what kind of probe you got, NPN or PNP you have to change line 29 of configuration_prusa.h from false to true for NPN
"const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop."

now, your print may not be exactly perfect. you can tweak your offset number to get your perfect print. but remember to change BOTH values in bed leveling AND configuration_prusa.h. when you load your gcode into your printer, and your layer height is set to .2, its going to be .2mm from the print surface of "0"

i hope you guys can understand my ramble here haha, if not, i can easily write a tutorial for anyone. i just cant believe this stuff isnt one of the first things youd find on google. i actually spent a few hours reading and researching. possibly because with the prusa original firmware, the configuration_prusa.h overrides certain values in the base firmware. which, i get it, ease of use and very user friendly. ive attached some screenshots.

Posted : 25/04/2016 12:33 am
Page 5 / 5
Share: