A description of how to upgrade the Nophead’s Dibond Mendel90 to have a new 32bit control board, Trinamic TMC 2130 stepper drivers, automatic bed leveling using the BLTouch probe and the latest Marlin 2 firmware.
In 2014 I have bought Chris ‘Nophead’ Palmer’s Dibond Mendel90 kit and the machine has served me quite well since, without major problems. I have made a few minor mods over the years (Y axis idler/tensioner, different spool holder, replaced front bed pillars with screws/springs, etc.) and replaced a few broken parts (cracked extruder block, broken top side Y axis clamps) but the machine is otherwise mostly stock. Compared to the more recent printers, such as Prusa I3 Mk3 or the many Chinese machines (Anet, Creality, …) available today, it is clear that it is getting considerably long in the tooth.
The original impetus for performing the upgrade described in this article has been the desire to add an automatic Z probing capability. Both for the bed leveling but mainly to ensure automatic Z offset setting.
Mendel90 in the original Nophead’s configuration homes the Z-axis upwards, with a fixed limit switch at the end of the Z-axis. That’s different from the original RepRaps and the various Prusa I3 clones – these home downwards, towards the bed and the Z-offset is adjusted by turning a screw moving the homing switch up/down.
The consequence is that the Z-offset on the Mendel90 is hardwired in the firmware and cannot be adjusted (newer Marlin versions can do this but not the ancient version used by the Nophead’s kit) without messing with the generated G-code. This becomes a major pain when different printing surfaces with different thicknesses are being used – e.g. I am using glass for most PLA and ABS printing but I sometimes use also steel sheets covered with PEI.
Having to re-measure and re-adjust the Z-offset every time gets old fast and, worse, if one forgets it, one risks either a failed print (first layer won’t stick due to the nozzle being too far) or crashing the nozzle into the bed. The ability to automatically probe the bed and set the correct offset would be an enormous boon.
The same story for bed leveling – Nophead’s design is very robust and doesn’t need leveling frequently but when it does, it requires that the extruder is removed, dial indicator is installed in its place (I have never had much success using a sheet of paper) and then fiddling with both the Z axis screws and the front pillars/screws of the bed. What takes a few minutes tops on other machines is a much longer exercise on the Mendel. Again, having the ability to automatically compensate for minor leveling issues or uneven bed surface by probing would be extremely helpful here.
Unfortunately, the Marlin firmware running on the original Melzi controller shipped with the kit is ancient (pre 1.0!), heavily customized by Nophead (so upgrade isn’t straightforward) and the controller uses the ATMega1284 MCU, which has only 128kB of flash. Newer Marlin that would be needed for the bed leveling support and probing won’t fit. The board also lacks any means to actually connect the probe – there is an expansion connector, but it would require some nasty hacking to get anything more complicated than a basic microswitch (e.g. a BLTouch/3DTouch which behave like a servo and a switch) to work.
There are also some other niceties that modern controllers have – such as support for touch screen controllers, replaceable stepper motor drivers (Melzi has them soldered into the board), support for more extruders/axes/fans/heaters, more powerful CPUs allow better speed control reducing vibrations at high speeds, 24V compatibility (nice for faster bed heating), and many other things.
Thus, time to upgrade.
For the upgrade I have selected the Chinese Big Tree Tech SKR Pro V1.1 control board:
- Split power rails – separate power for the board, motors and heated bed, fused with common automotive style fuses
- ARM Cortex M4 CPU (32bit, with hardware floating point)
- 6 stepper drivers, supports dual drive for the Z axis on a single driver or can use two drivers, up to 3 extruders
- Wide range of stepper drivers are supported (Allegro, Trinamic, TI)
- 3 heaters (bed + 2 extruders)
- 4 thermistors (bed + 3 extruders or heated chamber, etc.)
- 3 fans
- Up to 6 limit switches (each axis both ends)
- USB device & host (supports printing from an USB stick)
- Wifi (via a cheap ESP8266 module)
- SD card interface
- Common LCD support, including touchscreens and encoders
- Dedicated connector for the BLTouch probe
- Expansion connectors with a lot of pins available
- Complete schematic available, runs open source Marlin firmware
This controller has a lot of features that I won’t use immediately but it is good to have the options to add things later, such as 24V power supply and bed (the original 12V PCB bed from the Nophead’s kit takes very long time to heat up), touch screen or an extra fan/extruder.
I have also opted for 6 Trinamic TMC2130 drivers in SPI mode – silent and smooth running motors are nice, as is the StallGuard feature. It can be used for homing but it is mainly good as an extra safety feature.
For the Z probing I have bought the original BLTouch 3.0 probe – it is expensive compared to the clones sold under the “3DTouch” name but I wanted repeatability and something that I knew will work. Also, apparently some of the clones are made out of thermoplastic that can soften/melt when around a heated bed – oops! The original is made out of polycarbonate which should be safe at temperatures that the heated bed can normally reach.
The installation has been a 3 part affair – mechanical installation in the electronics bay of the Mendel90, replacing the original Melzi board, basic electrical wiring and finally the installation of the BLTouch probe. The probe requires a 3D printed spacer, so it is important to have the rest of the machine working beforehand.
The controller is installed horizontally where the original Melzi has been. Four mounting holes were drilled into the side panel.
A heavy duty 25A terminal block has been added for power distribution. The wiring is not ideal, I regret not having bought a 6 position one. The original plan has been to install two of these side by side, one for the +12V rail and one for the ground, however the stiff power wiring would make that very difficult in the cramped space available. The consequence is that two cables for the board and motor power are both on the same screw terminal, the same at the bottom for the bus bars and wires from the ATX supply.
Unlike the Melzi which uses screw terminals for everything, the SKR Pro controller uses mostly JST XH shrouded connectors (motors, end stops, thermistors), some naked pin headers (e.g. for the BLTouch probe) and heavy duty screw terminals (power, extruder & bed heaters, fans). So connectors need to be crimped.
I am not 100% sure about the JST XH connectors, the documentation says “Dupont”, but the JSTs fit and lock into the shrouds perfectly, so I have used them. Dupont (aka “Mini-PV”) would likely work too, even though JST XH has 2.5mm metric pin pitch and Mini-PV has 2.54mm (0.1″) imperial pin pitch. However, the connectors wouldn’t be locking and polarized, which is a downside.
Some wires will likely need to be extended (e.g. the Z axis motors) – I have soldered on some wires with matching colors and covered the splices with heatshrink to avoid shorts.
- Power – I have used the pre-crimped wires provided with the board. Bed heater and the power supply use crimped spade fork terminals. These need to be crimped really well and properly insulated, otherwise there could be a lot of power lost causing problems (heat, melting connectors, even a fire!).
- Motors – 4pin JST XH connectors, I have used red-blue-green-black wire order on all the motors. Z axis motors are separated (original wiring has them in series), each to its own connector. That permits to either use the dual Z-axis connector provided on the board or to use separate drivers for each motor.
- Endstops – 3pin JST XH connectors. Mendel90 endstops are normally connected, active low (switch against ground). So only the GND (central pin) and the signal (pin closer to the USB connector) are populated. Positions “X-“, “Y-” and “E2” are used because Mendel90 homes to min X, min Y and max Z (no idea why the positive endstop connectors are labeled “E0”, “E1” and “E2”).
- Thermistors – 2 pin JST connectors, bed thermistor goes in “T0”.
- Fans – I have only the extruder fan connected, goes into the screw terminal for “FAN0”. There is only a single wire, so if the fan doesn’t spin, you have it in the wrong “hole” – it needs to be on the contact labeled “-“.
- Heaters – The bed is connected to the large screw terminal on the side, labeled “HOT BED”, spade fork terminals were crimped onto the original bed wires. The bed cable has been moved from behind the power supply in order to have sufficient length available. Hot end power is from the “HEAT0” screw terminal.
The wiring is generally fairly obvious, the downloadable manual for this board documents all the connectors well, Most information is available directly on the silkscreen of the board as well.
For connector crimping I am using the Engineer PA-09 for the JST and Dupont connectors, together with the YTH-202B for crimping the insulation of the Dupont pins and for the spade forks. (see here for the explanation of why two separate tools are required for the Dupont/Min-PV terminals).
The BLTouch probe is a bit tricky to fit on the original Mendel90 X carriage. The Wade’s block motor bracket is in the way on the top side, the X axis linear bearings are in the way on the bottom side. The probe just fits when rotated diagonally so that the mounting screws clear the diagonal edge of the extruder motor bracket.
This is not ideal because the probe is offset quite far from the nozzle (49mm on the X axis!), so it is unable to probe towards the X min edge of the bed. However, without redesigning the X carriage there aren’t many other options available.
The probe requires a ~6mm thick spacer. I have modelled this to copy the shape of the mounting surface of the BLTouch and printed it in ABS in order to not have problems with it deforming from the extruder or bed heat. The probe is fixed using the supplied M2.8 screws, with a normal and locking washer on each side. Probably a drop of threadlocker would not be a bad idea neither, given the amount of vibration present here.
While the original Mendel90 wiring provides an unused 2 pin connector meant for a Z probe, the BLTouch uses 5 wires – it has a 3 pin control connector that carries both 5V power and a standard RC servo PWM signal for deploying and stowing the probe (+ some more advanced configuration) and a 2 pin connector that works as a regular switch/endstop.
I have installed a 5 wire ribbon cable, parallel with the existing X axis/extruder cable. This cable is tied to the plastic strip reinforcing the original ribbon using a few strips of tape and has Dupont connectors crimped on both sides – female ones on the controller side, male ones on the extruder side.
The BLTouch connector on the controller board is only 4 pins, though. Fortunately the missing pin is only ground, which is present on the connector already – just insert the 5 pin connector with the pin closest to the power screw terminal block “hanging in the air”. Exactly as it is shown in the board documentation as well.
Big Tree Tech is providing their own fork of Marlin which supports this board. This has been merged into the official Marlin repository, however Big Tree Tech is still doing development on their code to add support for the missing features. So my Mendel90 configuration is based off the Big Tree Tech’s code for now, even though even the official Marlin 2.x branch works.
The configuration is available here (“mendel90” branch): https://github.com/janoc/BIGTREETECH-SKR-PRO-V1.1/tree/mendel90
The original configuration from Nophead’s Marlin was kept where possible (PID coefficients, bed configuration, homing directions, thermistors, etc.).
Basic configuration in
- STM32 UARTs are numbered from 1 not 0. SERIAL_PORT_2 is for the Wifi module. Do keep it set to -1 if the module is not present! – otherwise the board will hang on boot.
#define SERIAL_PORT 1
#define SERIAL_PORT_2 6
- Bed thermistor – Marlin lacks the Epcos B57861S104F 100k thermistor used in the original PCB bed from Nophead’s kit. I have added it using the data from the original Nophead’s firmware.
#define TEMP_SENSOR_BED 900
- Endstops – USE_ZMIN_PLUG and USES_Z_MIN_PROBE_ENDSTOP is enabled because of the BLTouch, may not be actually needed given that the probe uses its own dedicated port and not an endstop connector.
- The NOZZLE_TO_PROBE_OFFSET offsets need to be adapted to your configuration, obviously.
- Probing is done with heaters and fans off – less dimensionally accurate but less chance of melting the plastic probe tip.
- Axis inversions (INVERT_[XYZ]_DIR) – if the motor is running in the wrong direction, either change the wiring or you can flip the movement direction here.
- Homing direction – min X, min Y, max Z, standard Nophead’s Mendel90 homing
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
//#define Z_HOME_DIR -1
#define Z_HOME_DIR 1
- Bed size is set to 200×200, with the origin in the center
- Bilinear bed leveling – UBL is not possible without a working EEPROM!
- One servo is enabled (BLTouch behaves like a servo)
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command
Advanced configuration in
- Marlin has very eager thermal protection defaults, especially for the slow PCB bed it is possible to get “thermal runaway” errors that kill the print. The default had to be significantly relaxed.
#define THERMAL_PROTECTION_BED_PERIOD 90 // Seconds
#define THERMAL_PROTECTION_BED_HYSTERESIS 40 // Degrees Celsius
* As described above, except for the bed (M140/M190/M303).
#define WATCH_BED_TEMP_PERIOD 90 // Seconds
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
- The TMC2130 drivers are in SPI configuration, for this to work the SPI has to be done in software (bit-banged) because the MCU doesn’t have a third SPI bus (one is used by the SD card reader and the other by the LCD expansion connectors).
- StealthChop mode is disabled (see the “Gotchas” section)
// #define STEALTHCHOP_XY
// #define STEALTHCHOP_Z
// #define STEALTHCHOP_E
There are quite a few! Most of the issues are not really due to the SKR Pro controller board itself but limitations of Marlin. Also, this board is fairly new (September 2019) so not all features are supported yet.
SKR Pro issues
What does not work:
- SD card reader – this is a biggie. Marlin doesn’t work with the built-in card reader, because it uses a different SPI bus than what the Marlin assumes. Only card readers present on an external LCD controller are supported (which is on the “right” SPI bus). The built-in card reader can be used only for upgrading the firmware (place firmware on the card and reset the board).
This may be fixable in the future by a patch to Marlin but right now it is only possible to print using the USB connection from a host if you don’t have a display with an SD slot connected. I am running my printer using Octoprint, so it is not too limiting for me.
Sadly this seems to be thanks to Marlin’s 8bit legacy where having multiple SPI buses was rare (most 8bit ATMegas have only 1).
- USB host doesn’t work as of now (no support in Marlin for STM32 yet) and is mutually exclusive with the printing over USB cable (USB device).
- Persistent configuration (offsets, PID coefficients, UBL bed leveling data, etc.) – the board has no EEPROM (most STM32 MCUs lack a built-in EEPROM, unlike the 8bit ATMegas and Big Tree Tech didn’t include an external one). The only way to get persistence is to either write the configuration into the flash memory of the MCU (not great for longevity of the chip) or by emulating EEPROM using a file on the SD card. However, with the card reader not supported this doesn’t work neither.
- Wifi works but not really very usable without the SD card support. Octoprint is better and more flexible.
- Be prepared to kill the power or hit the RESET button immediately when bringing the board up. A motor turning in the wrong direction or non-functioning endstop could seriously ruin your day …
Trinamic TMC2130 issues
I have bought these drivers because I wanted silent steppers (the classic A4988 has the motors “sing”) and few other features, such as the automatic step interpolation and StallGuard. However, after spending quite a bit of time with these drivers I am not sure whether they are worth it, at least on the Mendel90.
- These drivers do get HOT! A heatsink is pretty much mandatory, otherwise the driver could start limiting motor current due to the built-in over-temperature protection kicking in. Even a fan may be required in some setups.
- The silent “StealthChop” mode does not really work. Well, it kinda does for the X and Y axis, however, for the Z axis I had one motor spin and the other stalled, skipping steps, producing horrible noise. Of course, that made the machine go totally out of whack. I guess the driver is attempting to do something “smart” with driving the motors and when two were connected in series (thus higher impedance) it got very confused … The only way to make this work was to connect each Z axis motor to a separate driver (the controller supports this).
- When the Z axis motors were on separate drivers, they started to diverge extremely quickly – the Z axis pointers were significantly out of sync after homing the Z axis twice already. I suspect that was due to the automatic step interpolation the TMC2130 does and which may not have been identical for both motors. So this was a no-go.
- Even on the other axes the motors visibly lacked torque in the “StealthChop” mode. Not quite to the point of stalling but the machine seemed to occasionally struggle.
- There is also this article that analyses the problems with the “StealthChop” mode of these drivers.
Conclusion – I have disabled “StealthChop” and I am using the default “spreadCycle” mode. The machine doesn’t quite “sing” as before but the motors generate different noises – hissing, huffing …
That leaves the StallGuard feature – it does work but especially on the Z axis it is easy to crash into the bed or the Z axis top clamps and cause damage before this kicks in due to the torque advantage of the screws. So the benefit is not all that great.
If someone has some input how to correctly configure these drivers to avoid the issues above, I am very interested. Otherwise it may be better to either use the newer TMC5160 (which didn’t have Marlin support until recently and are more expensive) or stay with the venerable Allegro A4988.
Overall, I am pretty happy with this upgrade. Most of the goals were fulfilled, the bed probing works and allows me to not have to mess with the Z offsets or bed leveling as often as before.
Furthermore, the new controller board opens the possibilities for future upgrades – mainly switching to 24V power supply and a new heated bed. The current one is very slow to heat up and flexes a bit too much. Also the mounting to the Y carriage is very flimsy.
Another future upgrade would be a new extruder. The Wade’s extruder and the old J-head are both obsolete. Once I finish my stock of the 3mm filament I may start to look for doing this change – 1.75mm is more commonly available and would need a new hotend anyway.
Also the Z axis screws need to be replaced with proper (and mainly straight!) lead screws – that would certainly help to make the Z axis run smoother than it does now.