Wanhao D12 printers

(Almost) everything I know about Wanhao D12 printers

DISCLAIMER

I am not affiliated, associated, authorized, endorsed by, or in any way officially connected with Wanhao, or any of its subsidiaries or its affiliates.

USE THESE INFORMATION AT YOUR OWN RISK. I am not responsible for any damage done to your printer when using these information. I hope you find them useful, I try to make them as accurate as possible but they may contain mistakes.

Become a Sponsor of the ADVd12 project

Patreon

I have created ADVd12++, an alternative, better and open source firmware for Wanhao D12-230 printers. Thanks to supporters of this project on Patreon, I am able to continue the development of this firmware and write articles such as this one. More information about ADVd12++ on GitHub: https://github.com/andrivet/advd12. More information about supporting the project on Patreon: https://www.patreon.com/andrivet.

Introduction

The Wanhao Duplicator 12 printers are manufactured by Wanhao, a Chinese company in the town of Jinhua. They are mainly sold by Wanhao France (also known as Wanhao Europe). Apparently, they were also sold by Wanhao China, but it is no more the case (since May 2026).

Models

There are various models of the printer:

  • Duplicator 12 / 230
  • Duplicator 12 / 230 PRO MKS3,1 USB
  • Duplicator 12 / 230 M2 PRO
  • Duplicator 12 / 300 PRO MAX
  • Duplicator 12 / 300 M2 PRO MAX
  • Duplicator 12 / 400
  • Duplicator 12 / 500 PRO MAX
  • Duplicator 12 / 500 M2 PRO MAX

Some of these models may be in fact the exact same printer, with different names.

Printers have two variants:

  • Mono extruder, Direct Drive
  • Dual extruder, Bowden

There are different combination of drivers possible:

  • D12-230, D12-500: TMC2209 for X and Y axis, A4988 on the other axis
  • D12-300: TMC2209 for X, Y and Z axis, A4988 on the other axis
  • TMC2209 on all axis

Printers can optionally have an auto-leveling probe (BLTouch or a clone such as 3DTouch).

Hardware

MKS Robin Nano Mainboards

These printers are based on mainboards manufactured by Makerbase and called MKS Robin Nano. These versions of the MKS Robin Nano boards are used in D12 printers:

  • MKS Robin Nano V1.2
  • MKS Robin Nano V1.3
  • MKS Robin Nano V3.0
  • MKS Robin Nano V3.1
  • MKS Robin Nano V3.2

Some points worth noting:

  • MKS Robin Nano V1.3 is compatible with V1.2 from a hardware point of view (connectors) but needs another firmware because it uses a different MCU.

  • MKS Robin Nano V3.x boards are not compatible with V1.2 or V1.3 boards. They have a USB port near the microSD card slot to plug a USB thumb drive. Probably for this reason, D12-230 printers using these boards are called "M2" (for Mark 2?) and have a slightly different metal case. All other D12 printers (D12-300, 400, 500) use a MKS Robin Nano V3.x board.

  • MKS Robin Nano V3.1 is fully compatible with V3.0 (both hardware and software) except it has less memory (512 Kbytes versus 1024 Kbytes)

  • MKS Robin Nano V3.2 boards have several differences compared to V3.0 or V3.1 boards

    • The microcontroller (MCU) is from another manufacturer.
    • The USB communication is handled by a dedicated CH340C chip.
    • There is no jumper to allow powering the board from the USB port.

Microcontrollers (MCU)

Version MCU Cortex Clock SRAM Flash
V1.2 STM32F103VET6 M3 72 MHz 64 K 512 K
V1.3 STM32F407VET6 M4 168 MHz 192 K 512 K
V3.0 STM32F407VGT6 M4 168 MHz 192 K 1024 K
V3.1 STM32F407VET6 M4 168 MHz 192 K 512 K
V3.2 GD32F407VET6 M4 168 MHz 192 K 512 K

Some points worth noting:

  • MKS Robin Nano V1.2 is powered by a STM32F103VET6 MCU. This is an ARM Cortex-M3 MCU clocked at 72 MHz with only 64 Kbytes of SRAM. It is far less powerful than the others boards.

  • MKS Robin Nano V1.3 is powered by a STM32F407VET6 MCU. This is an ARM Cortex-M4 MCU clocked at 168 MHz (vs 72 MHz for V1.2) and with 192 Kbytes of SRAM (vs 64 Kbytes for V1.2). This is thus a huge upgrade when compared to the V1.2 board.

  • MKS Robin Nano V3.0 has a STM32F407VGT6 MCU similar to the V1.3 board MCU but with 1024 Kbytes of Flash.

  • MKS Robin Nano V3.1 is compatible with V3.0 but has the same MCU than the V1.3 and has thus less flash memory than V3.0.

  • MKS Robin Nano V3.2 uses a different MCU. Instead of using a STM (STMicroelectronics) chip, it uses a GD32F407VET6 MCU from GigaDevice. It is mostly compatible with a STM32F407VET6 MCU but there are some subtle differences between the two.

USB

USB is either handled by the MCU or a dedicated chip:

  • MKS Robin Nano V1.2 and V1.3: CH340G
  • MKS Robin Nano V3.0, V3.1: Use the MCU support for USB
  • MKS Robin Nano V3.2: CH340C

CH340G and CH340C are almost identical but CH340C has an internal 12 MHz oscillator whereas CH340G requires an external one.

EEPROM

This EEPROM memory is used to store the settings of the printer:

  • MKS Robin Nano V1.2 and V1.3: AT24C16N, capacity of 2028 bytes
  • MKS Robin Nano V3.0, V3.1 and V3.2: AT24C32D, capacity of 4096 bytes.

It is connected to the MCU by I2C.

Flash memory

This flash memory is used to store assets such as images, the logo and fonts:

  • W25Q64JVSSIQ 8 Mbytes, connected to the MCU by SPI.

Pictures

Touch Screens

There are two different models of touch screen depending of the model of the board:

  • V1.2, V1.3: MKS Robin TFT35 V1.0, connected by a single flat cable.
  • V3.0, V3.1, V3.2: MKS TS35-R V2.0, connected by two ribbon cables.

Note: There is also a device called MKS TFT35 V1.0. It is not the same device than the "Robin" one. There is also a MKS TS35 V2.0 device that has a rotary encoder. None of these devices are used with D12 printers.

Power Supply (PSU)

  • 24V - 10A - 240W PSU

Stepper Motors

Microstepping Drivers

There are different combination of drivers possible:

  • TMC2209 on all axis
  • TMC2209 for X and Y axis, A4988 on the other axis

They are all configured in STEP/DIR mode (standalone).

Software

  • The original firmwares were developed by Makerbase using either Keil (V1.2) or IAR Embedded Workbench IDE (V1.3). Later firmwares were based on Marlin firmware using PlatformIO, a free and open-source software.

  • The firmware is spit into two parts:

    • A bootloader that starts at address 0x08000000. This bootloader is run when the board is powered on.
    • An application that starts at address 0x08007000 (V1.2), 0x08008000 (V1.3) or 0x0800C000 (V3.x) depending of the MCU.

Bootloaders

The booloader is executed when the the MKS Robin Nano board is powered on. The bootloader is able to flash the application part but not itself. The bootloader is thus not easily updatable. For boards V1.2 and V1.3, the bootloader is also able to load and write assets (such as images and fonts) from the microSD card into an external flash memory (W25QXX) when these assets are in Keil toolchain format. For more recent versions of the firmware, the loading and writing of the assets is handled by the application, not the bootloader. The application part for V1.2 is obfuscated using XOR and a hard-coded key. It is the same scheme used by Marlin's MKS encrypt script for Robin boards.

Each version of the board has a different bootloader:

Version MCU Toolchain App base
V1.2 STM32F103VET6 Keil MDK, StdPeriph + ALIENTEK 0x08007000
V1.3 STM32F407VET6 IAR EWARM, CubeF4 HAL + Cube FatFs 0x08008000
V3.0 STM32F407VGT6 IAR EWARM, CubeF4 HAL + FatFs + USB Host MSC 0x0800C000
V3.1 STM32F407VET6 IAR EWARM, CubeF4 HAL + FatFs + USB Host MSC 0x0800C000
V3.2 GD32F407VET6 IAR EWARM, CubeF4 HAL + FatFs + USB Host MSC 0x0800C000

All bootloaders perform the following:

  • Init clocks, LCD and SPI flash.
  • Mount the storage(s).
  • If a firmware file exists, flash it and rename it *.CUR.
  • Optionally update the external SPI flash.
  • Set VTOR to the application base, load MSP from the app's vector table and jump.

Some remarks:

  • The LCD, W25Qxx SPI-flash and STMFLASH_* drivers all come from ALIENTEK sample code. On the F4 boards, STMFLASH_Write is still the F1 version with 2 KB "pages".
  • An LCD-configuration byte is read from SPI flash, where 0xEE selects the alternate scan direction/orientation.
  • Erase/program routines don't wait for BSY and don't check error flags. They work because the CPU stalls on flash access during the operation.
  • The bootloader never rewrites itself: all writes start at or above the application base. In other terms, it is not easy to update the bootloader itself.

File names

The expected file names are different depending of the version of the board. V1.2 detects which LCD controller is used and select a different name. Later versions do not detect the LCD and use a fixed name. For D12 printers (ILI9488 LCD controller), it means that the following names are used:

  • V1.2, V1.3: Robin_nano35.bin
  • V3.0, V3.1, V3.2: Robin_nano_v3.bin

Encryption (encoding)

For boards V1.2, the firmware is encoded:

  • The first 320 bytes (vector table) are plain
  • File offsets [320, 31040) are XORed with a 32-byte key:
0xA3 0xBD 0xAD 0x0D 0x41 0x11 0xBB 0x8D 0xDC 0x80 0x2D 0xD0 0xD2 0xC4 0x9B 0x1E
0x26 0xEB 0xE3 0x33 0x4A 0x15 0xE4 0x0A 0xB3 0xB1 0x3C 0x93 0xBB 0xAF 0xF7 0x3E

Startup Beeps

The bootloader beeps at different time depending of the version of the board:

  • V1.2, V1.3: at boot
  • V3.0, V3.1: before jumping
  • V3.2: only after an update

Assets

Assets such as fonts, icons and images are stored in an external W25Q64JVSSIQ flash memory of 8 Mbytes. In order to save space, icons are not directly stored but are encoded with a simple RLE compression algorithm. For the MKS fork, assets have the following layout:

header
line 0 offset (4 bytes)
line 1 offset (4 bytes)
...
line n offset (4 bytes)
line 0 RLE data (variable length)
line 1 RLE data (variable length)
...
line h RLE data (variable length)

The header has the following format:

RLE0 (4 bytes)
width in little endian (2 bytes)
height un little endian (2 bytes)
offset to line 0 offset (2 bytes), i.e. the size of the header
offset to line 0 RLE data (2 bytes)

Each RLE data is encoded as:

run length (1 byte)
pixel value in RGB565 little-endian (2 bytes)

Forks

  • ADVd12 fork. My own fork based on Marlin 2.1.3 with a complete reimplementation of the UI (using LVGL 8) with new features and screens. It is actively developed. It supports all versions of the MakerBase Robin Nano board, including V3.2.

  • MKS fork. Created by MakerBase, the manufacturer of the mainboard. It is a fork of Marlin 2.0.9.2. It is no more updated and does not include the support for the latest version of the board (V3.2).

  • neoprodFX fork based on MKS fork with some tweaks in the configuration. It is no more active.

  • ORelio fork. Based on neoprodFX fork. Like neoprodFX, it is no more active. There are very few differences between neoprodFX and this firmware:

    • The boot screen is different
    • Some colors for the UI are different
    • Allow the use of TMC2209 for all axis (D12_230_FULL_TMC)
    • Different maximum accelerations (DEFAULT_MAX_ACCELERATION) for all printers except the D12-500 (500 mm/s instead of 300 mm/s)
    • Slower 2nd (slow) probing (Z_PROBE_FEEDRATE_SLOW) when using a 3DTouch or BLTouch (probably to avoid inconsistencies with the low-quality 3DTouch).
    • Probe 3 times (MULTIPLE_PROBING) instead of 2.
    • Use Marlin Color UI (TFT_COLOR_UI) instead of the LVGL UI made by MKS (TFT_LVGL_UI)
    • A faster boot screen (BOOTSCREEN_TIMEOUT) (1 second instead of 4)
    • A custom "Maintenance" menu (Autoleveling, Filament Load, Filament Unload)
  • Firmware-Molise-Wanhao fork. The project is archived and no more active. It is based on Marlin 2.1.2 with some additional commits (from July 2023).