Automated 3D prints can run non-stop

Start your own mini factory with autoprints

  • Written by Coen de Boer
    Aug 4, 2014
  • Category:
    / Guides

Ever wanted to print an object several times? More than can fit on one buildplate? If you’ve ever seen Ultimaker at an exhibition, you might have seen us printing stretchy bracelets to give away, or stretchlets as we call them.

We print these stretchlets with autoprint files, which print the object, push it off and automatically print a new one when finished. This way we only need to start the print once and we get a lot of prints to give away. If you just want to try out one of these autoprint files, here they are:

Ultimaker Original Gcode

Ultimaker 2 Gcode

Requirements and Tips

To print these files you need 3M 3434 Scotch tape (supplied with the Ultimaker Original). Before you start one of these prints, make sure your bed is leveled and has a clean layer of tape. Also check the height of your top Z-endstop when on an Ultimaker Original. If it’s too low you can get in trouble when the Z-table is going back up to start the second print. When the print is starting, make sure the first layer is not too tight on the bed. Remember, your printhead needs to push the object off, you don’t want to damage it with a print that won’t let go of the bed. The stretchlet autoprint files can be printed at very high speeds depending on the calibration of your machine, so play around with the speed settings (raising the temperature at high speeds is recommended). Strive for perfection on the first layer, and these prints can run for days!

How to Create an Autoprint Gcode Yourself

In this blog I will explain how you can make one of these autoprint files yourself. To make an autoprint file you will need Cura, Pronterface (part of Printrun) and an editor for the Gcode like Notepad. I assume you know how to use Cura, but some of you might not know Pronterface. Pronterface is a tool to control your printer from your computer. A basic version comes with Cura, but the full version has some advantages that come in handy here. It’s very easy to use, even without a manual, but if you need some guidance, here’s a getting started guide.

Printrun (containing Pronterface) can be found here.

To make an autoprint file, we need to create three separate Gcode files, which we combine in one big autoprint file. To understand the how and why of this, you first need to understand the basic structure of a Gcode file.

We can divide a Gcode file in three parts

  1. Start-Gcode
  2. Main-Gcode
  3. End-Gcode

If you have full settings enabled in Cura (Menu > Expert > Switch to full settings) you can see and edit the Start- and End-Gcode in the corresponding tab. It is a good idea to look at the Start- and End-Gcode and the corresponding comments to understand how it works.

In this blog I will use the wavy stretchlet as an example. If you make your own, enabling the skirt option in Cura is convenient for adjusting the first layer. It is recommended to remove the skirt while it is printing, so your prints don’t get stuck on it when they are pushed off.

To make and autoprint file, we basically need a file with Start-Gode, Main-Gcode which repeats an X number of times, and End-Gcode to turn of the heaters and such for safety after printing. After each print we need to add some code which pushes the print off the platform.

First Gcode file

The best way to figure out how to push off your object is to print the object once, then connect your printer to your computer and push it off by using Pronterface. First find the last location of the printhead in your Gcode, so you know where to start. Open your Gcode file and go to the end of the file. In the screenshot below the last print location is highlighted in blue. You may have to scroll up a bit in the file to find the last Z-location (In my case it was 15.1).

In Pronterface first home your machine (the button with the little house). Then in the console if you type G1 X74.945 Y77.156 Z15.1 (We don’t need E at the moment) and press send, your printhead should move to the last position where it printed something. From here, write down every location the printhead has to move to to push the object off (you can see the location of the printhead in the Printrun console). To avoid creating a trail of plastic which can form over time while a new print is starting I now also move X to 0, so we always start a new print from the front left of the machine (keep the glass retainer clips in mind when working on an Ultimaker 2, it might be better to make it X0 Y20, so the nozzle doesn’t touch them).

This will be the last code in every one of the three files except the last one, which will also turn the heaters and such off.

So now we have everything we need to make the first file, which starts like a normal print, but at the end pushes the print off, and keeps the heaters and motors turned on. Name this file “first.gcode”.

Second Gcode file

For the next file, we want to skip the whole Start-Gcode procedure and the skirt, so we are going to cut those parts from the file and go almost straight to the Main-Gcode. The tricky thing here is how much material to extrude before the print starts again. Too little, and the first layer might fail (and with the first the rest of the print as well), too much and the first layer becomes too thick and might not let go. There is not really a golden rule here, it comes down to trial and error.

Extrusion should start at line four and five, but then the E-value is set to 11 with G92. This command sets an axis to a certain value, in this case the extruder to 11. If we would not include this line there, too much material would be extruded. Also take into account that the value of E did not start at 0 (if you want it to start at 0, use G92 E0), but at the last E-value, which was 3.0471. It might be better to start it at 0 before starting a new print, but this happened to work fine, so I left it. Make sure to leave all the other axes alone at the beginning of the second print. Homing and zero-ing all the main axes was done in the first file. No need to mess with it here, this could only cause problems.

So now we know how we are going to start the second file, and the end will be exactly the same as the first file. Name this file “middle.gcode”.

Third and final Gcode file

The last file starts exactly the same as the second. The end is the same, except for turning off all the motors and heaters and such. Here is an example:

Name this file “last.gcode”.

Putting it all together into an autoprint Gcode file

Now you should have three files: first, middle and last. If you paste these files together into one file, it would print and push off three objects in a row. To print more, just paste the “middle.gcode” file more than once. The first and last files are always only used once.

Congratulations!

You created your own autoprint file! Don’t be bummed out if it doesn’t work the first time around, creating these files is a lot of trial and error, but also a lot of fun and a nice way to learn how Gcode works.

Tips & Tricks on Autoprinting 3D Objects

  1. Want to learn more Gcode? Here is a list with all the gcode commands
  2. Always end a Gcode file with an empty line. If you don’t, the last command won’t be executed.
  3. Don’t use your heated bed for autoprint files, unless you want to experiment with autoprinting really big files on an Ultimaker 2, by printing on the glass plate (make sure it’s completely clean, no glue or anything), heat it up the bed for printing (the higher the temperature difference, the easier the object will let go), and let it cool down completely after printing before pushing it off. I tried this with a big cube, and it works. Haven’t made an autoprint file with it yet, but if you do, let me know!
  4. Always make sure the first layer is printed slowly for good adhesion to the bed.
  5. It is recommended to set Gcode Flavor to "RepRap (Marlin/Sprinter)" in File -- Machine settings in Cura so you can make use of all the options in the generated Gcode.
  6. For prints with larger bottom surface areas 3M 3434 Scotch tape is recommended. This tape let’s go of your print more easily. We use this to autoprint Ultibots (they won’t always let go with the 2090 scotch).
  7. If you’re willing to dive into the Marlin firmware for a small change, it’s possible to call another Gcode file from the file you just printed. This means you can start first.g (you have to rename you .gcode files to .g), let it call middle.g, and let it call itself, and itself, and itself, or even let only one file call itself over and over again. If you open Marlin_main.cpp, look for case 23, as shown in the screenshot below and comment out the break you’re all set to go! Just add something like M23 nextfile.g as the last line in your file.

auto print full of robots
The Result of an Autoprinting Mini Factory
Support