Art of 3D printer in the middle of printing a Hackaday Jolly Wrencher logo

3D Printering: Listen To Klipper

I recently wrote about using Klipper to drive my 3D printers, and one natural question is: Why use Klipper instead of Marlin? To some degree that’s like asking why write in one programming language instead of another. However, Klipper does offer some opportunities to extend the environment more easily. Klipper runs on a Linux host, so you can do all of the normal Linux things.

What if you wanted to create a custom G-code that would play a wave file on a speaker? That would let you have custom sounds for starting a print, aborting a print, or even finishing a print.

If you recall, I mentioned that the Klipper system is really two parts. Well, actually more than two parts, but two important parts at the core. Klipper is, technically, just the small software stub that runs on your 3D printer. It does almost nothing. The real work is in Klippy, which is mostly Python software that runs on a host computer like a Raspberry Pi or, in my case, an old laptop.

Because it is Python and quite modular, it is very simple to write your own extensions without having to major surgery or even fork Klipper. At least in theory. Most of the time, you wind up just writing G-code macros. That’s fine, but there are some limitations. This time, I’m going to show you how easy it can be using the sound player as an example.

Macros All the Way Down

Normally, you think of gcode as something like: G1 X50 Y50. Some of the newer codes don’t start with G, but they look similar. But with Klipper, G1, M205, and MeltdownExtruder are all legitimate tokens that could be “G-code.”

For example, suppose you wanted to implement a new command called G_PURGE to create a purge line (case doesn’t matter, by the way). That’s easy. You just need to put in your configuration file:

[gcode_macro g_purge]
gcode:
# do your purge code here

The only restriction is that numbers have to occur at the end of the name, if at all. You can create a macro called “Hackaday2024,” but you can’t create one called “Hackaday2024_Test.” At least, the documentation says so. We haven’t tried it.

There’s more to macros. You can add descriptions, for example. You can also override an existing macro and even call it from within your new macro. Suppose you want to do something special before and after a G28 homing command:

[gcode_macro g28]
description: Macro to do homing (no arguments)
rename_existing: g28_original
gcode:
M117 Homing...
g28_original
M117 Home done....

Continue reading “3D Printering: Listen To Klipper”

Tinkering With Klipper: Making The ManiPilator Robotic Arm

[Leo Goldstien]’s entry into the world of robotics has been full of stops and starts. Like many beginners, he found traditional robotics instructions overwhelming and hard to follow, bogged down with dense math that often obscured the bigger picture. So he decided to approach things differently and create something with his own hands. The result? A 3D-printed robotic arm he affectionately calls “ManiPilator.”

This article is the first in a three-part series documenting [Leo]’s hands-on approach to learning robotics from the ground up. Building ManiPilator became an opportunity to learn by doing, and the project took him on a journey of experimenting, failing, and eventually succeeding in tasks that seemed deceptively simple at first glance. Each hurdle provided him with insights that more traditional learning methods hadn’t delivered. Below is one of the videos [Leo] captured, to show one step in the process: doing a check using multiple motors.

To make his project work, [Leo] relied on open-source software like Klipper, piecing together code and hardware in a way that made sense to him. In sharing his story, he offers fellow beginners an approachable perspective on robotics, with practical insights and candid reflections on the challenges and breakthroughs.

[Leo]’s project shows that there’s more than one way to start exploring robotics, and that sometimes the best way to learn is simply to dive in and start building. Follow along with his journey as he tackles the complexities of robotics, one step at a time.

Continue reading “Tinkering With Klipper: Making The ManiPilator Robotic Arm”

Art of 3D printer in the middle of printing a Hackaday Jolly Wrencher logo

3D Printering: Switch And Klip(per)

Last time I tried to convince you that, if you haven’t already, you should try running your 3D printer with Klipper. There are several ways to actually make it work.

The first thing you need is something to run the Klipper host. Most people use a Raspberry Pi and if you already have one that runs OctoPrint, for example, you might well use it. Just tuck your SD card away in case you give up and install a fresh Linux system on a new card.

The Creality Sonic Pad has issues, but it does work.

However, a Pi isn’t your only option. You should be able to make it work on nearly anything that runs Linux. We’ve even seen it running on Windows under WSL. If you have an old laptop that can run Linux, that would work, too. We’ve even heard it works on a Chromebook.

The other option is to get a “pad.” Several vendors make touchscreens with some Linux single-board computer bundled together with Klipper preinstalled. For example, there is the Creality Sonic Pad, along with similar devices from other 3D printing companies.

If you decide to go that route, you might want to make sure it is easy to install your own software easily. Some pads, like the Creality unit, are notorious for having so much customization that they don’t lend themselves to upgrades unless they come from the manufacturer. In some cases, you can wipe out the stock firmware and install a normal operating system, but at that point, you could probably just buy a Pi and a touchscreen, right?

Continue reading “3D Printering: Switch And Klip(per)”

Art of 3D printer in the middle of printing a Hackaday Jolly Wrencher logo

3D Printering: Klipper, The Free 3D Printer Upgrade

I have several 3D printers, and I’ve always been satisfied with using either Repetier or Marlin on all of them. There are a few other firmware versions that could run on my hardware, but those two have been all I’ve needed. Sure, it was painful for a while having to juggle features to fit the firmware image onto the smaller microcontroller boards. Now that Marlin supports big 32-bit boards however, that hasn’t been a problem. But recently, I’ve been on a program to switch everything to Klipper.

In this post, I’ll tell you why I did it and give you some data about why you might consider it, too.

The Landscape

Marlin is written in C and burned into a 3D printer’s flash memory. It does a lot. It receives G-code commands, interprets them, and translates them to meaningful actions on the hardware. Modern versions handle automatic transformations to account for lumpy beds, input shaping to reduce shaking, and linear advance to produce better prints.

It might seem simple to control a 3D printer, but there are lots of little details to take into account. For example, if you are moving the head between two XY coordinates and you expect a certain flow rate, then you have to figure out how fast to turn the steppers to get the right amount of plastic out over that time. You also may have to retract before you start a move, make sure temperatures are stable, and transform the actual coordinates based on bed leveling data. There’s a lot going on.

Klipper does the exact same job, but it does it differently. On the 3D printer board is a tiny piece of software that does very little. It’s a bit like a device driver for the printer. All by itself, it does nothing. But it can handle very basic commands that describe how to move the machine.

All the rest of the processing you expect to happen now runs on some Linux computer. That is very often a Raspberry Pi, but it could be a spare laptop, your desktop computer, or anything that will run a reasonable Linux install. Several vendors even sell single-board computers with touchscreens made specifically for running this part of Klipper.

However, even though a screen is nice, you don’t really need it. I’ll talk about that more later.

Continue reading “3D Printering: Klipper, The Free 3D Printer Upgrade”

Art of 3D printer in the middle of printing a Hackaday Jolly Wrencher logo

3D Printering: Adaptive Bed Leveling

Have you ever read about something and thought, “Gee whiz! Why did I never think about that?” That was my reaction to reading about a feature commonly associated with Klipper called adaptive bed leveling or adaptive mesh leveling. Too bad I don’t typically use Klipper, but it all worked out, and I’ll show you how it might work for you.

What Is It?

Time to tram your bed!

Once a luxury, most 3D printers now come with some kind of bed level sensor. The idea is that the printer can probe the bed to determine the shape of the build plate and then adjust the build plate accordingly. So if a particular spot on the bed is 0.5 mm too high, the nozzle can rise 0.5 mm when it is in that area. There are several techniques Marlin firmware uses, including what I usually use: UBL. Some people scan the bed once and hope it won’t change much. Others will do a time-consuming scan before each print.

However, adaptive bed leveling is a bit different. The idea is that the printer only probes the area where the part is going to print. If your print bed is 235 mm x 235 mm but your part is 50 mm square, you could just probe the points under the 50 mm square.

This does several things. For a given number of points, there is less motion, so it should be faster. Also, for the same number of points, you will have a much denser mesh and, thus, a better idea of what the bed is at any given point. You could even reduce the number of points based on the size of the part you are printing.

When you think about it, it is a dead simple idea. What’s not to love? For most print jobs, you’ll have less work for the printer, faster prints, and a denser mesh. But how do you do it?

Continue reading “3D Printering: Adaptive Bed Leveling”

Art of 3D printer in the middle of printing a Hackaday Jolly Wrencher logo

3D Printering: Speed Is So Hot Right Now

Speed in 3D printing hasn’t been super important to everyone. Certainly, users value speed. But some value quality even more highly, and if gaining quality means giving up speed, then so be it. That’s more or less how things stood for a while, but all things change.

The landscape of filament-based 3D printing over the past year or so has made one thing clear: the market’s gotten a taste of speed, and what was once the domain of enthusiasts installing and configuring custom firmware is now a baseline people will increasingly expect. After all, who doesn’t want faster prints if one doesn’t have to sacrifice quality in the process?

Speed vs. Quality: No Longer a Tradeoff

Historically, any meaningful increase in printing speed risked compromising quality. Increasing print speed can introduce artifacts like ringing or ghosting, as well as other issues. Printing faster can also highlight mechanical limitations or shortcomings that may not have been a problem at lower speeds. These issues can’t all be resolved by tightening some screws or following a calibration process.

The usual way to get into higher speed printing has been to install something like Klipper, and put the necessary work into configuring and calibrating for best results. Not everyone who prints wishes to go this route. In 3D printing there are always those more interested in the end result than in pushing the limits of the machine itself. For those folks, the benefits of speedy printing have generally come at too high a cost.

That’s no longer the case. One can now buy a printer that effectively self-calibrates, offers noticeably increased printing speeds over any earlier style machines, and does it at a reasonable price.

Continue reading “3D Printering: Speed Is So Hot Right Now”

An Automated Watch Cleaner From An Older 3D Printer

The many delicate parts in a mechanical wristwatch present a tricky cleaning problem, one that for professionals there is a variety of machines to tackle. As you might expect, such specialty equipment doesn’t come cheap, so [daveburkeaus] came up with his own solution, automated using an older 3D printer.

The premise is straightforward enough: it’s a machine with a succession of stations for cleaning, rinsing, and drying, through which the watch is moved on a set cycle. The hot end and extruder is replaced with a motor and shaft, on the end of which is a basket in which the watch sits. The basket is a commercial part for simplicity of construction, though one could certainly fabricate their own if need be. The printer gets a controller upgrade and of course a motor controller, and with a software stack built upwards from the Klipper firmware seems ready to go. There is the small matter of the heater used for drying not keeping the firmware happy as a substitute for the heated bed it thinks it’s driving, but that is fixed by controlling it directly.

We’ve remarked before that superseded 3D printers are present in large numbers in our community, and particularly now a few years since that article was written we’re reaching the point at which many very capable machines are sitting idle. It’s thus particularly good to see a project that brings one of them out of retirement for a useful purpose.