# Filament Thickness Sensors, What Are They and What Are They Good For?

I keep up with the trends in 3D printing reasonably well. The other day my friend mentioned that filament thickness sensing had been added to the latest version of the Marlin firmware. I had no idea what it was, but it certainly sounded cool. I had to find out more.

In industrial settings, filament is made by pulling extruding molten plastic at a certain speed into a cooling bath. The nozzle for 2.85mm filament and 1.75 mm filament is actually the same size, but the filament is stretched more or less as it leaves the nozzle. By balancing these three variables the extrusion machine can produce any size filament desired. Like any mechanical system, it needs constant adjustment to maintain that balance. This is usually done by measuring the filament with a laser after it has cooled, and then feeding this information back into the system. The better filament manufacturers have multiple lasers and very fast feedback loops. Some of the best offer +-0.04mm or less variation in thickness between any two points on the filament. Some of the worst have larger errors such as +-.10mm. Because the plastic is fed into the extruder at a fixed linear speed, this makes a variation in the volume of the plastic coming out of the nozzle per second. With the best we see a 4.41% variation in the volume of plastic extruded. With the worst we start to see 10.51% or more.

A printer is dumb. It works under the assumption that it is getting absolutely perfect filament. So when it gets 10.51% more plastic, it simply pushes it out and continues with its life. However, if the filament is off enough, this can actually show up as a visible defect on the print. Or in worse cases, cause the print to fail by over or under extrusion of plastic.

So, what does a filament thickness sensor do to correct this issue? To start to understand, we need to look at how the filament is dealt with by the software. When the slicer is compiling the G-code for a 3D print, it calculates the volume of plastic it needs in order to deposit a bead of plastic of a certain width and of a certain height per mm of movement. That was a mouthful. For example, when a printer printing 0.2mm layers moves 1mm it wants to put down a volume that’s 1.0mm long x 0.4mm wide x 0.2mm high. The filament being pushed into the nozzle has a volume per mm determined by the diameter of the filament.

$(\pi (radius_{filament})^{2}*length_{filament extruded})=volume$

The volume out per mm of filament in.

$(layer_{height}*layer_{width}*length_{move}) = volume$

The equation we are trying to balance.

Our goal is to integrate the thickness sensor into these functions to see what the thickness sensor is doing. This is a linear equation, so there’s nothing fancy here. Now, the layer height, layer width, and length of the move are determined by settings and model geometry respectively. These are fixed numbers so we don’t care about them. That leaves us the diameter of the filament and the length of filament extruded. As we mentioned before, typically the filament is assumed to be a fixed diameter. So all the software has to calculate is the length of filament that needs to be extruded per mm of combined movement in the x and y so that our volumes match.

But, we know that one of these variables is actually changing per millimeter as well. The filament diameter! So now we have a problem. If the filament diameter is changing all the time, our equation will never balance! In order to fix this we can add a multiplier to our equation. Since we have no control over the width of the filament we can’t modify that value. However, if we know the width of the filament, and we know the value its supposed to be, we can change the length of the filament extruded. This is because unlike the filament, we have control over the stepper motor that drives the extruder. This value is called the extrusion multiplier, and its determination is what the thickness sensor is all about.

So all the filament sensor does is measure the filament’s current diameter. It takes expected diameter and divides it by the value it just measured to get a simple percentage. It feeds that number back into our system as the extruder multiplier and slows or speeds up the stepper motor as needed. Pretty simple.

There are a few thickness sensors being toyed with right now. The first, as far as I can tell; let me know if I am wrong in the comments, was by [flipper] on thingiverse. He is in his third version now. The sensor works by casting a shadow of the filament as it passes by onto an optical sensor. The firmware then counts the pixels and works backwards to get the diameter. This value is sent to the Marlin firmware on the printer which does the rest. As is usual and wonderful in the open source community, it wasn’t long before others started working on the problem too. [inoranate] improved on the idea by casting more shadows on the sensor. The technique is still brand new, but it will be interesting to see what benefits it reaps.

Now comes the next question,”Is it worth upgrading my printer with a thickness sensor?” If you typically run poor filament, or if you extrude your own, yes. The current sensors can only measure +- .02mm. So for the best filament, you won’t really see a difference, but for worse stuff, you might. The latest firmware of the Lyman filament extruder, for making your own filament, also supports these sensors, letting you feed back into your production system like the industrial machines. All in all a very interesting development in the world of 3D printers.

# Fully Printed CNC On an IKEA Table

It seems that many 3D printer owners just aren’t getting the same buzz they used to off their 3D printers, and are taking steps to procure heavier machines. And making them in their home laboratories with, you guessed it, their 3D printers.

Following the pattern, [Michael Reitter], designed a 3D printable CNC around a IKEA MALM table. In order to span the length of the table for his X axis, he came up with a very cool looking truss assembly. The linear rails rest on top of the truss, and a carriage with the Z axis rides on the assembly. The truss has enough space in the center of it to neatly house some of the wiring. The Y-xis mounts on the side of the table.

Overall the mechanical design looks pretty solid for what it is, with all the rails taking their moments in the right orientation. We also like the work-piece hold downs that slide along the edge of the table. It even has a vacuum attachment that comes in right at the milling bit.

We’re not certain how much plastic this build takes, but it looks to be a lot. Monetarily, it will probably weigh in at a bit more than some other options. As many in the 3D printing world are discovering, sometimes there’s no reason not to leverage more mature industrial processes for lower cost large gains in accuracy and strength. Though, it’s pretty clear that one of the design goals of this project was to see how much one can get away with just a 3D printer, and we certainly can’t deny the appealing aesthetic of this CNC.

Video of it in action after the break.

# Tribed 3D Printer Configuration Doesn’t Ever Need To Be Leveled

[Jeremie Francois] has been thinking about ways to improve tool height adjustment and bed leveling in his 3D printer for a long time. His dream was to never ever think about Z height again. A dream that’s shared by many. These days, a lot of 3D printers have a mechanism for auto leveling in the software of the 3D printer. This works pretty well, but for various mechanical reasons, it’s better to have the bed itself be level.

[Jeremie]’s approach is pretty clever. Since you can define any plane mathematically with three points, he has three Z-axis lead screws. This lets him tilt the bed at any angle he likes. Once he had the mechanics in place, he added some force sensitive resistors, an Arduino, and wrote an extension for the popular Marlin firmware. That’s when the problems started.

It turns out that solidly mounting the bed to the resistors transmitted way too many vibrations. The solution was a layer of neoprene rubber. The neoprene also acts as a cushion, so the nozzle won’t break the glass bed during the leveling procedure.

The video after the break is a bit wavy, due to YouTube’s terrible auto-stabilizing software, but if you watch closely, you can see the system at work.

Despite tuning my extruder steps perfectly, and getting good results instantly on larger prints. I was still having a ton of trouble with smaller parts. PLA is the favored printing material for its low odor, low warping, and decent material properties. It also has many downside, but it’s biggest, for the end user, lies in its large glass transition temperature range. Like all thermoplastics, it shrinks when it cools, but because of this large range, it stays expanded and, getting deep into my reserve of technical terms, bendy for a long time. If you don’t cool it, the plastic will pile up in its expanded state and deform.

I am working on a project that needs a tiny part, pictured above. The part on the left is what I was getting with my current cooling set-up and temperature settings. It had very little semblance with the CAD file that brought it into this world.

The bond between layers in a 3d print occurs when the plastic has freshly left the nozzle at its melting point. Almost immediately after that, the plastic crosses from the liquid state into a glass state, and like pressing two pieces of glass together, no further bonding occurs. This means that in order to get a strong bond between the print layers, the plastic has to have enough thermal mass to melt the plastic below it. Allowing the polymer chains to get cozy and hold hands. Nozzle geometry can help some, by providing a heat source to press and melt the two layer together, but for the most part, the fusing is done by the liquid plastic. This is why large diameter nozzles produce stronger parts.

What I’m getting at is that I like to run my nozzle temperature a little hotter than is exactly needed or even sensible. This tends to produce a better bond and sometimes helps prevent jamming (with a good extruder design). It also reduces accuracy and adds gloopiness. So, my first attempt to fix the problem was to perhaps consider the possibility that I was not 100% right in running my nozzle so hot, and I dropped the temperature as low as I could push it. This produced a more dimensionally accurate part, but a extraordinarily weak one. I experimented with a range of temperatures, but found that all but the lowest produced goopy parts.

After confirming that I could not get a significant return on quality by fine tuning my temperature, I reduced the speed of the nozzle by a large percentage. By reducing the speed I was able to produce the middle of the three printed parts shown in the opening image. Moving the nozzle very slowly gave the ambient air and my old cooling fan plenty of time to cool the part. However, what was previously a five minute part now took twenty minutes to print. A larger part would be a nightmare.

So, if I can’t adjust the temperature to get what I want, and I can adjust the speed; this tells me I just need to cool the part better. The glass state of the plastic is useless to me for two reasons. One, as stated before, no bonding occurs. Two, while the plastic remains expanded and bendy, the new layer being put down is being put down in the wrong place. When the plastic shrinks to its final dimension is when I want to place the next layer. Time to solve this the traditional way: overkill.

A while back my friend gifted me a little squirrel cage fan he had used with success on his 3d printer. Inspired by this, I had also scrounged a 12v, 1.7A fan from a broken Power Mac G5 power supply. When it spins up I have to be careful that it doesn’t throw itself off the table.

I printed out mounts for the fans. The big one got attached to the Z axis, and the little one rides behind the extruder. I fired up the gcode from before and started to print, only to find that my nozzle stopped extruding mid way. What? I soon discovered I had so much cooling that my nozzle was dropping below the 160C cold extrusion cut-off point and the firmware was stopping it from damaging itself. My heated bed also could no longer maintain a temperature higher than 59C. At this point I felt I was onto something.

I wrapped my extruder in fiberglass insulation and kapton tape, confidently turned the nozzle temperature up, set the speed to full, and clicked print. With the addition of the overkill cooling I was able to get the part shown to the right in my three example prints. This was full speed and achieved full bond. Not bad! Thus concludes this chapter in my adventures with cooling. I was really impressed by the results. Next I want to try cooling ABS as it prints. Some have reported horrible results, others pretty good ones, I’m interested. I also wonder about cooling the plastic with a liquid at a temperature just below the glass state as it is deposited. Thoughts?

# Sub $300 CNC, If You Have a 3d Printer [Allted] has designed a CNC machine that you can print yourself; adding conduit, bearings, and the standard vitamins to bring it to life. The CNC machine uses a mechanical design similar to an etch-a-sketch, though instead of the maze of pulleys and cable it uses four stepper motors to do the X and Y translation. The machine looks to be about as accurate as a Shapeoko, and is able to handle light cutting in aluminum. The coolest part is the extensibility of the printer. For example, [Allted] needed to print a lot of parts to make orders of the kit. So, he built a 4 headed 3D printer by copying blocks of the design, and tying them all to the same belt. The design also seems to be a little more resistant to dust and debris than some homemade rigs. The CNC won the Boca Bearings design competition. If you’d like to build one yourself, [Allted] has all the instructions with print setting recommendations on his website. # Hacking Chipped 3D Printer Filament On The Da Vinci Printer XYZ Printing has been selling 3D printers for years now with one very special feature not found in more mainstream printers. They’re using a chipped filament cartridge with a small chip inside each of their proprietary filament cartridges, meaning you can only use their filament. It’s the Gillette and ink jet model – sell the printer cheap, and make their money back on filament cartridges. Last week at CES, XYZ Printing introduced their cheapest printer yet. It’s called the da Vinci Mini, a printer with a 15x15x15 cm build volume that costs only$269. Needless to say, a lot of these will be sold. A lot of people will also be disappointed with chipped filament cartridges in the coming months, so here’s how you defeat the latest version of chipped filament.

A little bit of research showed [WB6CQA] the latest versions of XYZ Printing’s filament uses an NFC chip. Just like the earlier EEPROM version, the latest spools of filament just store a value in memory without any encryption. [WB6CQA] pulled a board from the printer, connected it up to a logic analyzer, and checked out the data sheet for the NFC chip, giving him access to the data on the filament chip.

After running a few prints and comparing the data before and after, [WB6CQA] found a few values that changed. These values could be written back to their previous values, effectively resetting the chip in the filament and allowing third party filament to be used in this printer. It’s a kludge, but it works. More effort will be needed to remove the need to capture data with logic analyzers, but we’re well on our way to chipless filament on da Vinci printers.

# Baby Saved by Doctors Using Google Cardboard after 3D Printer Fails

It’s a parent’s worst nightmare. Doctors tell you that your baby is sick and there’s nothing they can do. Luckily though, a combination of hacks led to a happy ending for [Teegan Lexcen] and her family.

When [Cassidy and Chad Lexcen]’s twin daughters were born in August, smaller twin [Teegan] was clearly in trouble. Diagnostics at the Minnesota hospital confirmed that she had been born with only one lung and half a heart. [Teegan]’s parents went home and prepared for the inevitable, but after two months, she was still alive. [Cassidy and Chad] started looking for second opinions, and after a few false starts, [Teegan]’s scans ended up at Miami’s Nicklaus Children’s Hospital, where the cardiac team looked them over. They ordered a 3D print of the scans to help visualize possible surgical fixes, but the 3D printer broke.

Not giving up, they threw [Teegan]’s scans into Sketchfab, slapped an iPhone into a Google Cardboard that one of the docs had been playing with in his office, and were able to see a surgical solution to [Teegan]’s problem. Not only was Cardboard able to make up for the wonky 3D printer, it was able to surpass it – the 3D print would only have been the of the heart, while the VR images showed the heart in the context of the rest of the thoracic cavity.[Dr. Redmond Burke] and his team were able to fix [Teegan]’s heart in early December, and she should be able to go home in a few weeks to join her sister [Riley] and make a complete recovery.

We love the effect that creative use of technology can have on our lives. We’ve already seen a husband using the same Sketchfab tool to find a neurologist that remove his wife’s brain tumor. Now this is a great example of doctors doing what it takes to better leverage the data at their disposal to make important decisions.