Introduction

This project aims to solve two issues I have experienced working with 3D printers: controlling the filament consumption while the 3D printer is working. After exploring several possible approaches I decided that the most reliable solution should be based on the weight control.

The ability to dynamically measure the plastic material (filament) in use by a 3D printer includes some interesting non-obvious aspects helpful in many phases of the 3D printing process.

 

Updates

On June, 30 this project has been featured on Tindie Blog | 3D Printer Filament Weight/Length Monitor

November, 11. You can find the new version of this project with Bearings and some reviewed components for better working on Shopify: 3D Printer Filament Monitor for Arduino

 

Weight vs length and vice-versa

3D printers filament is sold in weight; the most common packages are 1 or 2 Kg filament rolls. The reason is that the product format, i.e. the filament in our case is the most important aspect for the end-user but meaningless for producers. Producers just sell kilograms of plastic material (PLA or ABS); the filament is the form factor provided on the market for a specific usage. I suppose that the same company that provides PLA filament it is not excluded will also provide the same material in other formats (e.g. plates, powder, pipes, film etc. for other applications). But for a similar reason 3D printers users needs to measure their filament in length. Slicer algorithms calculate the meter of filament needed for a certain 3D printed object so it is important to know how much meters remain in the roll before starting a new object printing and how many meters are used during a print job.

We know the specific weight of the materials used for 3D printing: PLA and ABS have different specific weight and this is a constant value. We also know the filament diameter; this means that 1 Kg 1.7 mm diameter filament will be longer than 3 mm diameter filament, same weight.

Calculating the conversion between weight and length it not so difficult knowing these parameters. You can just play with an algorithm with this nice online filament calculator.

 

Finding and testing the load sensor (scale sensor)

The first step was to find the right weight sensor and test its sensitivity. I should thank to michaelkellett that addressed me in the right direction; I bought a first series of four scale sensors in the weight range of 0-5 Kg and about half gram sensitivity for 3$/piece including the HX711 based amplifier circuit (the IC datasheet is in attach to the bottom of this post)

IMG_20170602_151947.jpg

IMG_20170602_181610.jpgIMG_20170602_181559.jpg

Using a 3 mm MDF sheet I have created a simple test sample to see the kind of data I should expect; after writing a few lines of code to show the readings on the serial terminal from an Arduino UNO I got a satisfying result and I definitely adopted this hardware solution.

 

The filament roll scale design

IMG_20170603_164430.jpg

Recycling the idea of my 3D printer filament spool holder design I have made the design of a compact scale supporting a rotating filament roll as shown in the images below. As shown in the 3D representation the filament roll lies on the four wheels that rotates free and the support is connected to the base through the scale sensor.

Scale only 01.jpgScale only 02.jpg

One support can be entirely built 3D printing 22 pieces with some M3 and M4 Allen screws and nuts at a very low price

Scale parts NoMotion.jpg

 

Assembling the parts

After all the 22 pieces has been printed can be easily assembled together. The top and bottom surfaces will be the filament spool support and the weight material scale at the same time. The filament is tensioned by the extruder so the roll should be free to rotate lying on the four free wheels (the orange ones). As shown in the assembly steps in the image gallery below top and bottom sides of the support are joined through the load sensor. It should be in the range 5-10 Kg max to support the filament roll that weight between 1,5 Kg and 2,5Kg (2Kg plastic rolls).

 

{gallery} Scale roll support parts and assembly

IMG_20170604_083158.jpg

3D printed base

IMG_20170604_083249.jpg

3D printed top

IMG_20170604_110124.jpg

The free wheels supports

IMG_20170604_110206.jpg

The free wheel supports

IMG_20170604_111634.jpg

The free wheel supports mounted on the top part

IMG_20170604_113020.jpg

The top part with the free wheels assembled

IMG_20170604_113048.jpg

Free wheel detail (top support)

IMG_20170604_113735.jpg

The base with the four calibration screws, top view

IMG_20170604_113742.jpg

The base with the four calibration screws, bottom view

IMG_20170604_113808.jpg

Calibration screw with spring of the base

IMG_20170604_114430.jpg

The base with the load sensor mounted, bottom view

IMG_20170604_114438.jpg

The base with the load sensor mounted, top view

IMG_20170604_114500.jpg

Base and load sensor assembled

IMG_20170604_115110.jpg

The top support mounted on the base through the load sensor

IMG_20170604_115135.jpg

The final assembly side view

 

IMG_20170609_092458.jpg

Testing the support 3D printing

IMG_20170609_092507.jpg

Testing the support 3D printing

 

Some structure improvements

Testing the first version of the 3D printed scale I saw that filament rolls can have different spool dimensions, also if the same weight. To manage the different widths between spools (may depends on different providers or different production batches) the top base design has been update; now it is possible to set the position of the four free wheels supports as shown in the images below.

IMG_20170612_091713.jpg IMG_20170612_091718.jpg

IMG_20170612_092704.jpg IMG_20170612_092712.jpg

IMG_20170612_093404.jpg IMG_20170612_093411.jpg

The wires coming from the load sensor are very thin and delicate so I decided that it was too risky to add a connector do I decided to include in the scale building also the HX711 filter adding two holes to the bottom part to fix the small IC board.

IMG_20170612_094140.jpg IMG_20170612_094150.jpg IMG_20170612_094826.jpg

IMG_20170612_091731.jpg IMG_20170612_100247.jpg IMG_20170612_100254.jpg

IMG_20170612_100721.jpg IMG_20170613_142926.jpg IMG_20170615_193450.jpg

 

Circuit and wiring

The image below shows the functional design of the circuit and the interface

Screen Shot 2017-06-24 at 21.18.49.png

As the filament is usually available in two different dimensions, 1.75 and 3 mm diameter, the rolls are available in different weights and we should consider using at least two kinds of materials it was necessary to provide a three dip switch to select these three settings before starting the system. Making the first experiments I saw tat it was impossible to distinguish automatically the three phases when a 3D print job starts:

 

1. Power the system and initialise it (calculating the empty tare without the filament)

IMG_20170615_193117 (1).jpg

2. Place the filament roll and wait the weight stabilises

IMG_20170615_193146 (1).jpg

3. Start reading the usage (material load)

(consumption can be expressed in grams or centimeters)

IMG_20170615_193403 (1).jpg IMG_20170615_193450.jpg

I have added two push buttons; an action button to manually set the three phases and a measure unit switch to select the visualisation on the display: filament units in grams or in centimeters/meters.

To have a complete status of the hardware a 3mm orange LED blink during every weight reading cycle while for the display I have used a shift register display (the full documented project is in these two articles: Enrico Miglino on ElectroSchematics.com  and Arduino 16x2 LCD Shift Register Library - Part 2 ) based on 74HC595 shift-in register I have built in past to reduce the usage of Arduino pins.

As the MC711 already generates a digital signal only two pins are needed to connect it to the Arduino board.

 

The project in action

The video below shows the first prototype and the final building in action after software filtering calculations have been included in the building.

The initial part of the video shows how connecting the sensor only without controls, due to unpredictable weight fluctuations it is almost impossible to control the three phases mentioned above while the second part shows the final version accordingly with the wiring scheme.

 

The software

The Arduino sketch is built in two parts for better readability: an header file defining all the constants used by the calculations as well as the pin settings and the source functions in the .ino file. All the project is distributed under the LGPL 3.0 license and is available on GitHub: https://github.com/alicemirror/3DPrinterFilamentMonitor-LCD

Additional libraries added to the sketch are the bodge MX711 library fo manage the scale IC and the updated library for the shift-LCD fixed compatible with the last versions of Arduino IDE, available in attach to this post.