I’m having a computer chip manufactured containing a small piece of Klipper’s motion logic.
This logic will be etched onto a piece of silicon with an area just 161 microns by 225 microns.
Just about 10 years ago I had a crazy idea - instead of sending elaborate 3d-printer motion commands to a micro-controller - what if one were to use a desktop class computer to pre-process the motion into simple motor timing sequences? Doing so, I thought at the time, could simplify the micro-controller logic, enable the micro-controllers to reach higher speeds, make it easier to share the code between different micro-controller architectures, and make it feasible to use multiple micro-controllers at the same time. And with that idea, “Klipper” was born. It took nearly two years to convert it into an initial implementation. But, it would seem, the idea did work!
The chip design implements the same core motor logic found in Klipper. The idea is simple, for every motor, one can calculate the time between each motor movement “step pulse” (its pulse “interval”), the number of “pulses” to send (count), and a tiny time adjustment between each of those pulses (add). Then the micro-controller (or a tiny computer chip) can rapidly generate those “step pulses” with precise timing. To account for motor acceleration and changing speeds, one can queue these motion sequences - each to be executed in rapid succession. This “queue_step interval/count/add” system was in the original Klipper code and is largely unchanged in the most recent Klipper code.
If all goes well, one will be able to communicate with the chip (using an “SPI” protocol), initialize the pin and timing logic, send it an “interval, count, add” sequence, queue subsequent sequences (just a queue size of 1 for now), and then observe the resulting “step pulses” on the output.
Getting a computer chip like this manufactured is no easy task. It would have been unimaginable 10 years ago. In the last few years, efabless (and Tiny tapeout) have done an amazing job making the tools and processes more accessible. A simple design like this would have likely been a multi-million dollar and multi-year process, but it can now be done with open-source tools and in a few weeks. I encourage you to checkout the efabless and Tiny tapeout websites. Consider submitting a design of your own!
The chip I designed will be combined with many other designs as part of a “tiny tapeout” run. This will then be combined again with yet more designs as part of a “MPW shuttle”. From there, the fab (Skywater Technology) will have lithographic masks created. Silicon wafers will be exposed, etched, baked, ionized, and more. This will be repeated a dozen or so times. Finally the chips will be diced, packaged, and shipped. This process takes months. However, if all goes well, I’ll have the chip in my hands around the end of the year.
I’d like to thank everyone that has contributed to Klipper over the years! The motion planning system is just one tiny part of what has made Klipper successful. I thought it would be fun to commemorate all those massively large contributions with a tiny piece of silicon!
-Kevin