Guest Blog: Designing My Own 3D Printer Mainboard

By Jan Kotarski, Engineer

When I bought my 3D printer, a Prusa-like construction, I started upgrading it the same day it arrived. Aside from the mechanical parts (which are completely replaced at this point), the obvious and much needed upgrade was the mainboard, or to be precise – stepper motor drivers. The A4982s are powerful, but noisy – and making my printer as quiet as possible was my main goal.

After a quick research, it was clear that the Trinamic integrated circuits are the best drivers for a 3D printer – the only thing left to do was to choose between TMC2130 or TMC2208. I chose the latter, because of the newer version of the StealthChop mode.

The easy thing to do would be buying popular stepsticks and a suitable mainboard… but I really dislike the concept of these small modules. Why? Well, being an engineer, I just saw all the compromises and limitations of that system. So, the not-easy-but-fun thing to do was designing my own PCB.

What issues do I see in the stepstick module actually?

  • Heat dissipation – PCB so little simply cannot dissipate enough heat.
  • Decoupling – not enough space for good decoupling.
  • Routing – again, board is too tiny to properly route all the signals and VIAs.
  • Goldpins – they are usually rated for 1A, so they are working at their limit, not to mention unnecessary resistance and inductance.

Having these flaws does not make the stepsticks really that bad, but there is plenty of room for improvements and this is what I tried to do.


So, here it is – 5 axis, independent stepper motor driver module

Large, low ESR capacitors, linear regulator for logic supply with step down pre-regulator, buffered inputs/outputs, optional buck module for fans supply, LEDs for diagnostics… and an integrated heatsink.

The Layer Stackup

The layer stackup goes as follows: signal layer + ground plane; main ground plane; power plane; logic power plane + ground plane. The internal layers are untouchable for me, no traces are routed on them, so the supply/return current is not obstructed in any way.

Picture below shows one driver section: EAGLE screenshot with ground polygon turned off, ground highlighted, photo of the bare PCB and finally, fully assembled board.

Each supply pin is decoupled with 100nF + 10uF ceramic capacitors, which are known for their low series resistance. Thermal relief is turned off, so there is more copper, meaning smaller thermal and electrical resistance. VIAs are placed directly in the pads and there is a lot of them, again for lower resistance and inductance. The ground return for the sense resistors is separated, as the datasheet suggests.

One unusual thing is a very big VIA under the die attach pad. It is 2.9mm in diameter and is completely filled with solder during assembly, which essentially forms a big chunk of metal, taking up the heat from the chips and spreading it over the ground planes. Usually, there is a grid of small VIAs under the pad, but as this board was intended for manual assembly anyway, I wanted to try something different.

Heatsink

Getting back to the “heatsink” – as the PCB price does not change with dimensions up to 100x100mm, I thought… why not? So – four ground planes with plenty of VIAs and exposed copper on top/bottom layers. How does it perform? We need a thermal camera to find out. In this case, FLIR ONE, a smartphone attached camera was used and the result can be seen below.

When taking measurements with a thermal camera, one must take into account emissivity of the object. The heatsink area on the picture above seems to be much colder than the middle part of the board expect for the two small squares – that is where Kapton tape is glued. Bare metal is highly reflective, which throws off the IR camera. Solder under the die attach pad is covered with thermal conductive tape too, in order to make the readout true. It is clear that the areas directly beneath the drivers are the hottest and the heat is spread over the entire board.

The tests were performed with five motors running at 1A RMS each and the board was powered from a laboratory power supply with output set to 24V. Small, aluminium heatsinks were glued to the Trinamic ICs and a low RPM, 80mm fan was blowing over the board, which was mounted vertically on a (obviously) 3D printed bracket. Finally, square wave from a simple signal generator connected to the Step input did put the motors in motion.

Final conclusions:

  • Stepper motors really DO operate much more silent with Trinamic drivers. Previously, frame made from 3mm steel sheets was resonating horribly, now, I can sleep in the same room as the printer.
  • Even a smallest airflow dramatically decreases temperature of the drivers, up to 20 degrees!
  • The “heatsink” actually works, but its effect is moderate – temperature with aluminum heatsinks removed/exposed copper area covered with a piece of plastic is comparable.
  • And last, but not least – the drivers are stable at 1.5A RMS. That is 25% over the datasheet limit!

I can definitely say that this project was successful and the TMC2208s are happily making my printer quiet, yet very alive. But that is not the end of the story – since their premiere, the TCM2209s have quickly become very popular (if not the most) motor drivers in the 3D printing community. I was no exception and wanted to test them too, but more on that in the next part.