Marlin – Auto Bed Levelling

A great feature was added to the Marlin firmware last year and I’ve finally gotten round to implementing it on my printer.

There were quite a few hurdles to over-come including designing some new parts to make it work.

I wanted to re-design the whole X – axis for my Mendel-Max as the clamps for holding the X – axis rods were poor and the belt being outside of the 2 rods meant there was a considerable amount of turning force on the parts, especially if you wanted tight belts.

So with the belt now between the 2 rods I had to completely re-design the carriage not only because the belt clamps had to be moved but I wanted to move to a direct-drive extruder on top of designing the probe arm to probe the bed!

With all of the new designs complete there were plenty of adjustments to be made to the firmware.  Moving to a direct-drive extruder meant new E – step / acceleration / speed settings. Enabling the bed levelling, setting up the servo including finding out which pin to assign to the servo for my PrintrBoard.  The biggest hurdle was discovering that by enabling the bed levelling filled the RAM on the PrintrBoard! To make the firmware fit I had to remove parts of the LCD menu.

After you have everything is working you need to set the distance from the hot-end to the micro-switch on your probe arm. Spend some time getting this as accurate as possible makes for the best result and only needs to be done once.

Has it been worth it? YES!

It’s great not having to adjust the bed manually, you can fine tune the distance between the nozzle and the bed in the LCD menu which is far more stable that any screw adjustments.

Tagged , , ,

4 thoughts on “Marlin – Auto Bed Levelling

  1. Reginald Pye says:

    Yes I have done the same using a RAMPS system and I will have to do again because I have a dozen Printrboards left in stock that I will need to use up. RAMPS was quiet easy yo do because of the extra memory available, so that part was not too bad. Having to make sure that the Z axis moved slower during probing was needed, but that was only settings.
    All the printed parts I also re-designed to make improvements, especially around the servo mounting area.
    I now fit Auto Bed Leveling to all my new builds, it makes life so much easier when using the machine and is always repeatable no matter what.
    It is a great feature to add to any 3D printer, well worth the initial setup involved.

  2. Lucio says:

    Hi, I am trying to setup my printerboard with no success so far, witch pin did you use for the servo? Did you have to disable the fan? Can you post your marlin or at least the relevant alterations to make the servo work with the printrboard. There has been one week I am reading all posts I can find in this regard and trying different things myself with no success so far.


    • Bradders says:

      I should do a more in-depth post I guess 🙂

      The signal pin of your servo should be connected to the top left pin of the EXP2 header (the pin closest to the boot header and the stepper motor connectors). Ground and +5v I get from my ATX PSU. The +5v on the PrintrBoard does NOT have enough current to operate the servo.

      In the Marlin firmware, in pins.h, within the section for the PrintrBoard (81) copy & paste the following code to the bottom of that section:

      #ifdef NUM_SERVOS
      #define SERVO0_PIN 11

      In the middle section of Configuration.h make sure you’ve un-commented this line:


      At the bottom of Configuration.h make sure you have:

      #define NUM_SERVOS 1


      #define SERVO_ENDSTOPS {-1, -1, 0}
      #define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 180,0}

      Where the last 2 angles are the probe engaged angle (specific for your probe) and probe disengaged.

      Use the code “M280 P0 Sxx” (where xx = the angle) to move your servo to a specific angle to configure what your probe engaged and disengaged angles are.

      Website I used which helped me:

      This is a quick over-view and will hopefully fill any holes you had. I will do a more in-depth version in a future post.

  3. ak says:

    Hi, I am trying to run auto bed leveling, but I cannot get the grid method to work alongside the LCD. Can you guide me on how to remove LCD menus to make the program size smaller so that it fits on the printrboard ?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: