A little over a year ago, I decided to dive into the 3D printing arena. I love the idea of being able to design and print in 3D plastic, giving me another tool in my maker arsenal.
My initial idea was to build a simple stepper driver board and heater controller board and connect it to my CNC as a new axis that would allow me to print from my CNC machine as well. I went so far as to build both of these boards and managed to get them working, but after some difficulties and a couple blown driver chips (due to incorrectly hooking them up to my CNC controller board) I decided to try and build an actual 3D printer.
There are several main difference between a 3D printer and a traditional CNC. First, each axis of the CNC machine is driven by a relatively high gear ratio leadscrew, whereas most 3D printers are belt driven. This means that the CNC can be much more precise with its motion, but it is typically much slower than a 3D printer. Second, most 3D printers have their own controller which interprets G-code commands and generates the necessary step signals for the motor drivers. In my CNC setup, this is all handled by the computer running either Mach3 or LinuxCNC which interprets the G-code and is programmed with the acceleration/velocity profiles of each axis. The disadvantage here is that it requires a parallel port output and a reasonably high speed machine to be able to send out the step signals fast enough.
I bought a used Prusa Mendel kit (the original i1), which came with suitable stepper motors, a power supply, and an almost fully assembled prusa mendel mechanical kit.
There are many electronics options available for controlling a hobby 3D printer. Arguably the most popular electronics is an Arduino Mega and a special shield called RAMPS which allows you to connect Pololu stepper driver modules as well as heaters, thermistors, and fans. From here, you can program the Arduino with one of several flavours of firmwares that have been written and developed by the community.
Me, being a bit of a masochist, decided that I would like to build all my own electronics. Having recently acquired a pair of cheap Stellaris Launchpads from Texas Instruments as part of a promotion, I decided to try my hand at using the Stellaris as the brains of my controller and designing my own shield with stepper drivers, heater switches, thermistor inputs, and limit switches. Note that the Stellaris chip has since been renamed as part of the Texas instruments Tiva series, and is now available TM4C123G. This chip is really a pleasure to work with, it is an Arm Cortex-M4 that runs at up to 100MHz with an on-board PLL, and features a floating point unit (FPU), memory management unit (MMU), USB, any a host of other features. The beauty of using an ARM processor is that you can make use of the open-source toolchains available such as the GCC Arm Embedded toolchain. The board also has a built in programmer/debugger that allows you to run and debug programs using GDB.
After testing with a simple stepper driver board, I designed a new stellaris boosterpack (pictured above) that does everything I need. The board has four A4982 stepper driver chips, a pair of power MOSFETs for driving the heaters, three limit switch inputs, and a pair of thermistor analog inputs. I milled the board using my CNC router and assembled it by hand.
The schematic of the driver board can be seen here: stepper_schematic.pdf
That’s it for this post, in the next little while I’ll try and post an update showing the board as it is connected to my printer and I’ll discuss in more detail the custom firmware that I’ve written for it.