For his entry into the 2019 Hackaday Prize, [Tobius Daichi] is working on adding some motion control capabilities to everyone’s favorite Linux SBC. His 3+Pi board attaches to the Raspberry Pi’s GPIO header and gives you a convenient way to control four individual stepper motors. Perfect for a 3D printer, laser cutter, CNC, or anything else you can think of that needs to move in a few dimensions.
But such a simplistic description of the 3+Pi might be underselling it a bit. While [Tobius] says he was inspired by the classic Arduino CNC Shield that powers countless DIY 3D printers, he’s managed to improve on the concept. Rather than having the host Pi communicate directly with the stepper drivers, the 3+Pi features an onboard STM32F302CBT6 that handles the actual motor control. The Pi just needs to tell it what to do over UART.
If you’re looking to do things in real-time, having an onboard microcontroller handle the low-level aspects of talking to the stepper drivers can be a big help. A natural extension for this board could be support for the Klipper firmware, which leverages the fact that the Raspberry Pi is many times more powerful than your average 3D printer control board. With the Pi handling the math and providing the microcontroller instructions, Klipper allows for faster and more accurate printing than the microcontroller alone could accomplish.
As for the stepper drivers themselves, [Tobius] has decided to go with the Trinamic TMC2041-LA-T. This chip is notable as it puts dual drivers in one 48-QFN package, which is great if you’re looking to save space on your board. Some might complain that the 3+Pi doesn’t allow for easily swapping out the stepper drivers if you manage to cook one like on the Arduino CNC shield, but realistically you could say the same about many purpose-built stepper control boards.
[Tobius] is tackling this project by himself currently, but does mention that he’s open to teaming up with anyone who’s got an interest in this sort of thing. There have been previous attempts at creating Linux-powered 3D printer controllers in the past, but we think this approach holds particular promise if for no other reason than the Raspberry Pi’s popularity.
Not unlike what I did with a Beagblebone Black where I had the PRU unit handle the steppers.
Both PRU’s ? Last time I checked Machinekit had problems with that.
Would be good if can work with nanodlp
Looks a lot like printHAT, except that one so supports the other typical peripherals like heater, temp sensor etc: https://phat.wrecklab.com/
Nice idea, but too expensive.
I’m not sure I understand the need for this (appart of a very well designed card and congrat for that because I’m not able to do that), in the end, it seems pretty much the same as setup that would use a raspi throwing data to atmega running GRBL by UART over a USB cable, except here it’s a STM32 that is a bit faster.
Nice work Tobius! Keep the cool stuff coming!
You miss the point, the usual method 3D printers use have the ATMega doing a lot of the maths. The RPI just streaming G code. Go look at the marlin firmware. Here the micro controller is just doing the realtime part. RPi is not streaming G code to the hat but low level instructions that are the result of the RPi processing the G code.
I, for one, can’t wait until you can pass your slicer a STEP file and it sends the printer a full SVG for each layer instead of just connected lines.