Wanhao D9 – Bed leveling -do this to make it work!

Add M420 S1 after G28


Someone on facebook suggested that the stock wanhao Firmware doesn’t handle leveling propertly. They’re right

Check out……..



given the 1000’s of people having issues getting the D9 to print properly, there does seem to be something fundamentally wrong with the printer….


In your Cura / startup script, find G28

now make it look like this


M420 S1


Now your printer should reliably print first time every time



G28 in the 1.14 version that Wanhao uses DELETES the leveling mesh from Memory!

or, in other words, every time you ‘home’, you un-level the bed!

Adding M420 S1 restores the mesh to memory

Stupid Wanhao 😦


I can confirm after doing this, my printer for the first time in memory has printed an OK first layer three times in a row without me having to do anything!




Author: bleughbleugh

Early Fourties, Wife, two kids in primary school. Both of us work full time...3 years now Back in Blighty after a decade away...It's a new country for everyone! Still finding time to tinker!

10 thoughts on “Wanhao D9 – Bed leveling -do this to make it work!”

  1. Hi, you seem to be the go to guy on the Wanhao D9 🙂

    Is it possible to increase the number or mesh points that a G29 will do?
    If so, do you have a procedure or walk through?

    I have a glass bed, and even after changing the base plate to a 4.5mm aluminium sheet, the bed is still not level in “bed visualizer” .
    I’d like it to do more points to see more or less where the differences are.
    Really struggling with 1st layer adhesion.
    Even a simple circle is near impossible to right.



    1. yes you can increase the number of mesh points.
      Firstly ensure you’re comfortable with the Arduino IDE and compiling the source for your version of the printer.

      find the Configuration.h file and then search for these two lines…
      #define GRID_MAX_POINTS_X 8
      #define GRID_MAX_POINTS_Y 5

      They set the stock ‘mesh’ to be 8 points along X (side to side) and 5 points along Y (front to back) – giving 40 points total

      Change the 5 and 8 to something else

      I don’t know what the upper limits are but being an 8 bit processor, it’ll probably have issues if you go more than 256 points (16×16)

      compile your arduino sketch and you’re good to go!


  2. Thanks, would you then suggest that the latest version of Marlin would work fine with the D9 400/MK2.
    Obviously, the wanhao firmware is not available, only in hex format.


  3. Manolo from Wanhao sent me the raw firmware for 1.1.2. But the file was called 1.1.2-400, but the folder inside was 1.1.2-500.
    Other than the MAX_POS for X Y & Z in the configuration.h file, is there any other settings? other wise i must wait again for the file.


    1. No idea, I own the 300 but highly unlikely there’s no other official change, wanhao seems a bit relaxed with their firmware. You can’t do anything with the hex file, you need the source code.


  4. I hope this will help with my bed problems.
    Right now I am having an issue where the right motor only goes up no matter which way it is supposed to go.
    Any suggestions?


  5. Hey Bleugh, thanks so much for posting everything you have about this printer!
    Is this change needed if you added a g29 after the g28 in cura?


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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