1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

RoBo3D Autolevel via Mike Kelly

Discussion in 'Mods and Upgrades' started by Mike Kelly, Jun 1, 2014.

  1. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,275
    Just want to begin by saying this mod is credit by team RoBo. I decided to make my own version based on their design

    Auto Bed Levelness Compensation (ABLC)

    Switch Position.JPG


    Questions and Answers:
    What is Auto Bed Leveling?
    Auto Bed Leveling is when the bed levelness is adjusted through mechanical action to achieve a bed that is leveled against the nozzles movement. This is not the same as ABLC​

    What is Auto Bed Levelness Compensation?
    ABLC is the process of probing the bed with a measurement device to determine the level error of the bed and compensate for this by moving the Z axis up and down. There is no mechanical variation but rather software compensation.

    Why is it referred to as Auto Bed Leveling?

    Probably for simplicity sake. Hence why I titled this Autolevel. It's generally acceptable to trim words if your point is still made.



    How it works:

    The Robo3d has a safety measure put in where when the nozzle touches the bed, the nuts will unseat from their housing so as to not put force on the bed and get "thrown" out. This is what people refer to when they " throw their nuts".

    Using this principle of the nut unseating, they used a coupling nut in it's place and attached a switch to it. The switch connects to the coupling with a plastic mount. The switches then activates against the x motor carriage and the x idler respectively.

    With this switch in place, as soon as the nozzle touches the bed and the couplings begin to unseat the switch will deactivate sending a signal to the ramps board that an endstop has been hit. It's used for both the Z0 sensor and the probe sensor.


    How mine differs:

    With my design the switches are run in series to avoid a failure situation. Were the switches to be improperly seated or a failure in the wire the RoBo3d would just raise up during it's normal z operation and not throw the nuts. Click Here to see why I ran my switches in series.

    Note: If you have auto bed leveling from RoBo3D do not use my firmware without modifying your wiring



    Build it

    Parts List:

    2x 5/16"-18 Coupling (Or M8-1.25 Coupling for those on metric rods)
    2x Micro switch (1x in addition to the 1 on the Z axis)
    2x M3 - 25mm
    2x M3 Nuts
    4x M2-10mm (2x in addition to 2 securing Z switch)

    Printed Parts:

    RoBo 3D auto level switch mount
    YouMagine | GrabCad | Thingiverse
    Assembly:

    Begin by securing the switch to the mounting plastic. It's probably easiest to thread on the coupling first before securing the switch. The bracket should expand enough to go around the threaded rods.

    Coupling Assembly.avi.gif

    With the mounting bracket in place secure the M3 nut and screw and begin to tighten it down, but loose enough the plastic can still slide on the coupling.

    Adjust the mount distance from the idler until the switch is barely activated. The switch should activate easily when the idler presses down on it, but deactivate quickly once the coupling begins to unseat. This may take some fine tuning but once you secure it it should stay true.

    Wiring:

    With the switch in position it's time to do the wiring.

    Current Autolevel owners:
    If you have RoBo3D's Autolevel switches you can turn your parallel switches into series but it requires unsoldering from the NC leg and soldering to the NO leg. Then you trim one of the legs short (say on red) and then another one long enough to solder onto, then you modify your wiring to represent below.

    New to Autolevel owners:

    Follow the wiring diagram to wire your switches in position. You will most likely need to trim and solder to get the lengths needed. Color/polarity is not critical.

    Series wiring.png

    The switches plug into Z- (S and (-) pins) on the Ramps board
    [​IMG]

    Control It
    Firmware:

    With the switches wired in position it's time to change the firmware. This is the same Auto_Level firmware used by team RoBo, but modified with 1 key difference:

    const bool Z_MIN_ENDSTOP_INVERTING = true;

    modified to:

    const bool Z_MIN_ENDSTOP_INVERTING = false;

    Which is traditional.

    Download the firmware below.

    Use either MatterControl or Arduino software to flash the firmware.

    It should also be noted this firmware will work on any RoBo 3d with or without auto-level.

    Calibration:

    With the firmware installed it's time to determine the Z offset between when the nozzle touches the bed and when the switches activate.

    Begin by homing all axis, ensuring the Z homes in the center of the bed.

    Using MC or Repetier raise the nozzle up .1mm at a time until you're able to slide a piece of paper underneath it, counting how many steps it took. Once you can barely fit the paper under, remove the paper and lower the nozzle by .1mm. This is your Z offset

    Modify the G-code:

    With the firmware installed it's time to configure the Gcode to run the auto-level script and calibrate the Z height. Insert this code in the starting procedures for your slicer after the G28 codes.

    Code:
    G1 Z0.5    ;Adjust Z offset
    G92 Z0    ;Define new Z home
    G29        ;Autocalibrate bed
    

    That should be everything there is too it. I find it helps to monitor the output from the G29 sequence in the terminal. That way if you see an unusual number you'll be able to address it quicker.

    G29 output.PNG

    Please let me know if you have any questions

    Ace Hardware sells M8-1.25mm couplings for anyone that has them locally.
     

    Attached Files:

    #1 Mike Kelly, Jun 1, 2014
    Last edited: Sep 15, 2015
    33 people like this.
  2. AxisLab

    AxisLab Well-Known Member

    Joined:
    Dec 28, 2013
    Messages:
    322
    Likes Received:
    269

    This is all awesome Mike. Definitely a huge help and thank you for putting in the design time and uploading the files.

    Can you spell out how or where you insert the code? How to access the "starting procedures"?
    I imagine it is a one time thing, or does it need to be typed it in before each print?
     
  3. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,275
    That depends on your slicer but I'll do MC since that's most commonly used


    Under Advance Controls > Slice Settings check the box "Show all settings"

    With the Settings enabled click the Printer Tab > Custom G-code

    MC Settings.PNG
    Insert the code after G28 but before you raise the nozzle

    Once the custom code is inserted it will be on every print you slice.
     
    2 people like this.
  4. tompeel1

    tompeel1 New Member

    Joined:
    Apr 18, 2013
    Messages:
    78
    Likes Received:
    17
    Mike thats awesome thanks! do you have any photos of it on your printer? just finding it hard to see a few bits of how it all fits in?
     
  5. Montravont

    Montravont Active Member

    Joined:
    Mar 23, 2014
    Messages:
    140
    Likes Received:
    103
    If you use Cura, this is a great (and also the only) way to add your Z-Offset for your prints.

    Go to the G-Code Tab and within the "Starting G-Code" add this in line after the G28 command.

    Thanks again, Mike, for figuring this out.
     
    2 people like this.
  6. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,275
    Tompeel1 I only have pictures of the old arm style. Not the "knuckle" approach
    IMG_2291.JPG

    IMG_2292.JPG
     
  7. rileystewart

    rileystewart New Member

    Joined:
    Jul 26, 2013
    Messages:
    1
    Likes Received:
    0
    Would it be possible provide links for the parts? I don't want to order the wrong items.
     
  8. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,275
    http://www.amazon.com/Momentary-Lev...50402&sr=8-12&keywords=momentary+switch+micro these are the switches you could use. Doesn't have to be these specifically but this style.

    these look similar to the M8 couplings I purchase. You should ask the seller if they fit in a 13mm wrench http://www.amazon.com/The-Hillman-G...75&sr=8-1&keywords=m8+coupling#productDetails

    5/16" version, same requirement

    http://www.amazon.com/The-Hillman-G...1401750942&sr=8-2&keywords=5/16"+coupling+nut


    If you're stateside I'd try your local Ace Hardware, they might have the coupling you need. I noticed last time the 5/16" coupling was significantly smaller than the 8mm. Let me know if a 5/16" version is needed.
     
    6 people like this.
  9. Mastermind1776

    Mastermind1776 New Member

    Joined:
    Mar 30, 2013
    Messages:
    10
    Likes Received:
    5
    Thanks so much Mike! On a side note I noticed that Robo just recently added their "Auto level installation kit" on their collections page under Replacement Parts/Upgrades (http://www.robo3dprinter.com/collections/). Although I am not sure what the lead time will be for them to send those out since they are being worked to the max right now.
     
  10. David Mortlock

    David Mortlock Active Member

    Joined:
    Feb 20, 2013
    Messages:
    240
    Likes Received:
    72
    $10.00 for the parts. $58.68 for shipping. I think I will give it a miss and follow Mike's instructions.
     
    2 people like this.
  11. Jerry RoBo 3D

    Jerry RoBo 3D Administrator
    Staff Member

    Joined:
    Oct 28, 2013
    Messages:
    139
    Likes Received:
    126
    I updated the shipping rate on that part. Sorry for that not being accurate.
     
  12. David Mortlock

    David Mortlock Active Member

    Joined:
    Feb 20, 2013
    Messages:
    240
    Likes Received:
    72
    Thanks Jerry. Just ordered the set.
     
  13. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Questions re calibrating the auto levelling.

    How do you know both switches at either side on the X Axis trigger at exactly the same offset irrespective of where on the X Axis the nozzle touches the bed? I there a procedure to check this?
     
  14. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,275
    You can verify the difference by homing it on one side and checking for the offset point and then again on the other wise.

    Shouldn't be significantly different. Because the switch activation zone is only so large.
     
  15. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Isn't it true though, that if there is a difference (even as little as 0.1mm), the auto levelling will think the bed is sloped when it actually isn't?
     
  16. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,275
    You'd just have to measure how long it is from when the nozzle touches the bed to when the switch deactivates. It should be very consistent because of the activation zone for the mechanical switch isn't very large.
     
  17. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    And I presume that if there is a difference, you would have to adjust the position of the switches so there is no difference. How is that done?
     
  18. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,275
    You loosen the screw and move the it up/down slightly
     
  19. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Yes. That's what I would have expected would have to be done. Both switches would have to be aligned to much better than 0.1mm tolerance. Otherwise the auto levelling will be fooled into thinking there is a slope on the bed when there isn't any.

    Anyway I have a single, accurate Z probe which works consistently and accurately with no maintenance. No reason for me to change. But some good reasons to stay with what I've got
     
  20. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,275
    Yeah I think you're over thinking it. While I agree with you in principle I don't think that level of precision is actually necessary. I could be wrong though, but watching the G29 response codes they're all very reasonable.
     

Share This Page