Control Theory Spellcasting Banishes The 3D Printing Ghosts

It seems as though we still can’t hit the ceiling on better control schemes for 3D Printers. Input Shaping is the latest technique to land on our radar, a form of resonance compensation that all but eliminates the ghosting (aka: vertical ringing) artifacts we see on the walls of printed parts. While the technique has been around for decades, only recently did [Dmitry Butyugin] both apply it to 3D printer control and merge their hard work into the open source firmware package Klipper. Once tuned, the results are simply astonishing–especially since this scheme can augment the print quality of even the most budget printer.

A Split A/B Test with and without Klipper’s Input Shaping feature courtesy of [@LukesLaboratory]
Assuming your 3D printer isn’t infinitely stiff, when your nozzle moves from point to point or changes direction, it vibrates in response to having its speed altered. The result is that the nozzle wobbles along the ideal path it’s trying to track. The result is ghosting, an aesthetic blemish that looks like vertical waves on the sides of your printed part.

Input Shaping is a feed-forward controls technique for cancelling the mechanical vibrations that create ghosting. The idea is that, if we wanted to move the machine from point to point, we send it two impulses. The first impulse kicks the machine into moving and the second impulse follows up at a precise time to cancel the vibrations we would see when the machine comes to a stop. Albeit, moving any machine by sending it two impulses is pretty crude, so we take these impulses, adjust their amplitudes so that they sum to 1, and convolve them with a control input signal that we’d actually like to send it. The result is that the resonance cancellation part of the signal seamlessly “mixes” into the control input signal, and the machine moves from point to point with significantly less vibration at the end of the travel move. For more info on the maths behind this process, have a look at the first four pages of this paper from [Singh and Singhose].

The only hiccup is that you need to do some up-front system characterization of your 3D Printer running Klipper before you can take advantage of this technique. Thankfully the Klipper update comes with a set of step-by-step instructions for characterizing your machine up-front. After a couple test prints to measure the periodicity of your ringing, you can simply apply your measurement results to your config file, and you’re set.

Input Shaping is a prime example of “just wrap a computer around it!“–fixing hardware by characterizing and cancelling unwanted behaviors with software. If you’re hungry for more clever, characterized hardware control schemes, look no further than this Anti-Cogging algorithm for BLDC Motors. And for a video walkthrough of the Klipper implementation, have a look at [eddietheengineer]’s breakdown after the break.

Does your 3D Printer run Klipper? We’d love to see some of your Input Shaping results in the comments.

Continue reading “Control Theory Spellcasting Banishes The 3D Printing Ghosts”

A Case For Project Part Numbers

Even when we share the design files for open source hardware, the step between digital files and a real-world mechatronics widget is still a big one. That’s why I set off on a personal vendetta to find ways to make that transfer step easier for newcomers to an open source mechantronics project.

Today, I want to spill the beans on one of these finds: part numbers, and showcase how they can help you share your project in a way that helps other reproduce it. Think of part numbers as being like version numbers for software, but on real objects.

I’ll showcase an example of putting part numbers to work on one of my projects, and then I’ll finish off by showing just how part numbers offer some powerful community-building aspects to your project.

A Tale Told with Jubilee

To give this idea some teeth, I put it to work on Jubilee, my open source toolchanging machine. Between October 2019 to November 2020, we’ve slowly grown the number of folks building Jubilees in the world from 1 to more than 50 chatting it up on the Discord server. Continue reading “A Case For Project Part Numbers”

A Featherweight Direct Drive Extruder In A Class Of Its Own

Even a decade later, homebrew 3D printing still doesn’t stop when it comes to mechanical improvements. These last few months have been especially kind to lightweight direct-drive extruders, and [lorinczroby’s] Orbiter Extruder might just set a paradigm for a new kind of direct drive extruder that’s especially lightweight.

Weighing in at a mere 140 grams, this setup features a 7.5:1 gear reduction that’s capable of pushing filament at speeds up to 200 mm/sec. What’s more, the gear reduction style and Nema 14 motor end up giving it an overall package size that’s smaller than any Nema 17 based extruder. And the resulting prints on the project’s Thingiverse page are clean enough to speak for themselves. Finally, the project is released as open source under a Creative Commons Non-Commercial Share-Alike license for all that (license-respecting!) mischief you’d like to add to it.

This little extruder has only been around since March, but it seems to be getting a good amount of love from a few 3D printer communities. The Voron community has recently reimagined it as the Galileo. Meanwhile, folks with E3D Toolchangers have been also experimenting with an independent Orbiter-based tool head. And the Annex-Engineering crew has just finished a few new extruder designs like the Sherpa and Sherpa-Mini, successors to the Ascender, all of which derive from a Nema 14 motor like the one in the Orbiter. Admittedly, with some similarity between the Annex and Orbiter designs, it’s hard to say who inspired who. Nevertheless, the result may be that we’re getting an early peek into what modern extruders are starting to shape into: smaller steppers and more compact gear reduction for an overall lighter package.

Possibly just as interesting as the design itself is [lorinczroby’s] means of sharing it. The license terms are such you can faithfully replicate the design for yourself, provided that you don’t profit off of it, as well as remix it, provided that you share your remix with the same license. But [lorinczroby] also negotiated an agreement with the AliExpress vendor Blurolls Store where Blurolls sells manufactured versions of the design with some proceeds going back to [lorinczroby].

This is a clever way of sharing a nifty piece of open source hardware. With this sharing model, users don’t need to fuss with fabricating mechanically complex parts themselves; they can just buy them. And buying them acts as a tip to the designer for their hard design work. On top of that, the design is still open, subject to remixing as long as remixers respect the license terms. In a world where mechanical designers in industry might worry about having their IP cloned, this sharing model is a nice alternative way for others to both consume and build off of the original designer’s work while sending a tip back their way.

Continue reading “A Featherweight Direct Drive Extruder In A Class Of Its Own”

This GCode Post-Processor Squeezes Lines Into Arcs

When the slicer software for a 3D printer model files into GCode, it’s essentially creating a sequential list of connected line segments, organized by layer. But when the features of the original model are dense, or when the model is representing small curves, slicers end up creating a proliferation of teeny segments to represent this information.

This is just the nature of the beast; lots of detail translates into lots of teeny segments. Unfortunately, some printers actually struggle to print these models at the desired speeds, not because of some mechanical limitation, but because the processor cannot recalculate the velocities of these segments fast enough. The result is that some printers simply stutter or slow down the print, resulting in print times that are much higher than they should be.

Enter Arc Welder, a GCode compression tool written by [FormerLurker] that scrutinizes GCode files, hunts for these tiny segments, and attempts to replace contiguous clusters of them with a smaller number of arcs. The result is that the number of GCode commands needed to represent the model drop dramatically as connected clusters of segment commands become single arc commands.

“Now wait”, you might say, “isn’t an arc an approximation of these line segments?” And yes–you’re right! But here lies the magic behind Arc Welder. The program is written such that arcs only replace segments if (1) an arc can completely intersect all the segment-to-segment intersections and (2) the error in distance between segment and arc representation is within a certain threshold. These constraints act such that the resulting post-processing is true to the original to a very high degree of detail.

A concise description of Arc Welder’s main algorithm as pulled from the docs

This whole program operates under the assumption that your 3D printer’s onboard motion controller accepts arc commands, specifically G2 and G3. A few years ago, this would’ve been uncommon since, technically, 3D printing and STL file only requires moving in straight line segments. But with more folks jumping on the bandwagon to use these motion control boards for other non-printing applications, we’re starting to see arc implementations on boards running Marlin, Smoothieware, and the Duet flavor of RepRap Firmware.

For the curious, this program is kindly both well documented on operating principles and open source. And if [FormerLurker] seems like a familiar name before–you’d be right–as they’re also the mind behind Octolapse, the 3D printing timelapse tool that’s a hobbyist crowd favorite. Finally, if you give Arc Welder a spin, why not show us what you get in the comments?

Thanks for the tip [ImpC]!

Linkage Inferring Software Handwaves Away The Hard Stuff

Jokes aside, manually designing linkages that move along specific paths is no easy task. Whether we’re doodling paper sketches or constraining lines in a CAD program, we still need to do the work of actually “imagining” the linkage design. If only there were some sort of tool that would do all that hard imagining work for us! Thankfully, we’re in luck! That’s exactly what researchers [Gen Nishida], [Adrien Bousseau2], and [Daniel G. Aliaga1] at Purdue have done. They’ve designed a software tool that lets us position important bodies in space in particular “key” frames, and then the software simply fills in the linkage for you!

To start the design process, the user inputs a few candidate locations that their solid bodies need to reach in the final linkage path.  From here, these locations get fed to a particle filter. This particle filter seeds thousands of semi-random linkage configurations at small timesteps, selects some of the best-matching ones that most closely approximate the required body locations, removes the lesser-scoring results, re-creates a new set of possible joint configurations based on the best matching ones, and repeats until the tool converges on a linkage that respects our input key frames.

Like a brute force search, this solution takes lots and lots of samples to find a solution, but unlike a brute force search, trials iteratively improve, enabling the software to converge closer and closer to a final solution. Under the hood, the software needs to actually simulate these candidate linkage in order to grade them. It’s in this step that the team wrote in additional checks to remove impossible linkages like self-intersecting joints from this linkage “gene pool” before reseeding them. The result is a tool that does all that trial-and-error scratchwork for you–no brain cycles. For more details, have a peek at their (open access!) paper.

Design software that augments our mechanical design capabilities is a rare gem on these pages, and this one is no exception. If your curious to play with other useful linkages simulating tools, have a go at Linkage Designer. And if you’re in the mood for other tools that fill in the blanks, check out this machine learning algorithm that literally fills in footage between frames in a video feed.

Continue reading “Linkage Inferring Software Handwaves Away The Hard Stuff”

Budget-Friendly Bend Sensor Deforms With Precision

We’re pretty familiar with budget resistor-based bend sensors at this point, but this sensor is in a totally different class. Instead of relying on resistive elements, [Useok Jeong] and [Kyu-Jin Cho] devised a bend sensor that relies on geometric properties of the sensor itself. The result is a higher-fidelity measuring device made from a pretty widely available collection of stock parts.

We’ll admit, calling this device a bend sensor might be a bit of a stretch, so let’s dig into some of the operating principles. What we’re actually measuring is the accumulated angle, the sum of all the curvature deformations along the length of the sensing element. The sensor is made of 3 main pieces: an outer extension spring-based wire sheath; a flexible, tensioned inner wire core that’s fixed at one end; and a small displacement sensor that measures the length changes in the wire’s free end. The secret ingredient to making this setup work is a special property of the outer wire sheath or spring guide. Here, the spring guide actually resists being compressed while being bent.  Because the inner radius of the bend remains a constant length, the center wire core is forced to elongate. With the excess wire spooled up at the sensor base, we simply measure how much we collected, apply some math, and get a resulting angle! What’s more, the folks behind this trick also demonstrate that the length and angle relationship is linear with an R-square of 0.9969.

One of the best parts about this sensor is how reproducible it seems from from a modest collection of stock parts. Spring guide (aka: extension spring) is available from McMaster-Carr and DR Templeman, and that flexible core might be readily substituted with some wire rope.

It’s not everyday that new topologies for bend sensors pop into the world, let alone linear ones. To learn more, the folks behind the project have kindly made their research paper open access for your afternoon reading enjoyment. (Bring scratch paper!) Finally, if you’re looking for other bend-related sensors, have a look at this multi-bend measurement setup.

Continue reading “Budget-Friendly Bend Sensor Deforms With Precision”

The B-Sides: Curious Uses Of Off-the-Shelf Parts

I admit: a few years of prototyping without easy machine shop access really whets my tastebuds for turning metal chips. But all that time spent away from proper machine tools has also pushed me to re-imagine part catalogs, something I see almost every day. Without any precision metalworking tools handy, stock mechanical parts have become my supplement for complexity. And so a former dogma to machine-everything-thyself has been transformed into a hunt for that already-made-part-that-does-it-for-you.

But with part catalogs featuring tens of thousands of purpose-built parts, I started reimagining some of them for other misdeeds. And after a few years spent reinventing use cases for some of these parts, I’m about ready to tell you how to misuse them properly. So today I’d like to show you some of my favorite mechanical part B-sides, so to speak. These are ordinary parts in unorthodox places–something you surely won’t find in the datasheet! Now let’s have a look. Continue reading “The B-Sides: Curious Uses Of Off-the-Shelf Parts”