What's New in 3D Printing, Part IV: OctoPrint
This is the last article in a four-part series on the current state of 3D printing. In the first part, I gave an overall introduction to differences in 3D printing since I wrote my original articles on 3D printing three years ago. The second piece focused on advances in 3D printing hardware, and the third column covered 3D printing software. In that last article, I mentioned one particular piece of 3D printing software, OctoPrint, that I felt warranted its own article, so I am devoting this final article to how to set up and use OctoPrint.
In the past, the process to print a 3D object involved creating or downloading a 3D model in STL format, using slicing software to convert that STL file to the GCODE language your printer understood, and then using other host software that knew how to communicate to the printer (like Pronterface) to load that GCODE and send it to the printer. More recently, there has been software that combines the slicing and host software into one interface (like Cura), and while that's certainly convenient, it also means that the computer you have connected to the 3D printer to control it must stay connected throughout the entire print.
Although many printers these days support loading GCODE onto an SD card for "headless" printing, in my opinion, OctoPrint is an even better approach. OctoPrint combines 3D printer control software with a Web interface so you can control your printer and monitor its progress over the network. Even better, although OctoPrint can run on any Linux machine, the OctoPi distribution is a customized SD card image designed to run OctoPrint off a Raspberry Pi. Since most geeks tend to have a Raspberry Pi lying around (and if you don't, it's relatively inexpensive compared to a full-fledged computer), this makes for an easy way to control your 3D printer from anywhere in the house.
To get started with the installation, you need to download OctoPrint. The official downloads page is at http://octoprint.org/download, and you can find links to the source package and the GitHub repository there. I'm going to assume that the majority of the people who want to set up OctoPrint will do so on a Raspberry Pi though, so my instructions are geared to installing OctoPi. On the download page, you will find links to a few OctoPi mirrors, so choose one and download the most recent OctoPi image in compressed zip form.
OctoPi is based on Raspbian, so once you have the .zip file,
installation works like most other Raspberry Pi images you may have worked
with in the past. Unzip the file, insert an SD card in your computer,
and then use
dd to write the image to your SD card device:
$ sudo dd if=2015-07-02_2015-05-05-octopi-wheezy-0.12.0.img ↪of=/dev/mmcblk0 bs=1M
After you write the image to the SD card, check to see if it automatically mounted the drive. If not, eject and re-insert it, and mount it. If you plan to network the Raspberry Pi via Wi-Fi, OctoPi has added a new mechanism as of version 0.12. Edit the octopi-network.txt file on the root of the SD card with your wireless network settings. Save your changes and unmount the SD card. Now you are ready to insert the SD card in your Raspberry Pi and boot it.
When the Raspberry Pi boots and is on the network, you will be able to
log in to it over SSH with the same default credentials that Raspbian uses
(login "pi", password "raspberry"), but of course, you'll want to use the
command to change that to something else. As with Raspbian, you can type
sudo raspi-config to change system settings, and OctoPrint recommends that
you use this tool to expand the SD card's filesystem to fill the device.
Once your Raspberry Pi is on the network, you can access the OctoPrint Web
interface through http://octopi.local (if your system supports bonjour),
or otherwise, just type the host's IP address in your Web browser. You
should see an interface like the one shown in Figure 1. If you haven't yet connected
your 3D printer to the Raspberry Pi, this is a good time. On the left
side of the Web page is a Connection section that should list reasonable
default serial devices it can use to connect to your printer, so you
should be able to press the Connect button successfully. If for some
reason that doesn't work, you may have to log in to your Raspberry Pi
and check the output of
dmesg to see what sort of device your 3D printer
showed up as when you plugged it in.
Figure 1. Default OctoPrint Interface
The default OctoPrint screen shows a graph of your printer's extruder temperature and (if it has one) the heated bed temperature, and it will allow you to set the temperature of either one manually. On the left-hand side of that main page, you can upload GCODE files you have created on Cura or some other slicing tool, and then you can click the printer icon to start printing. This main page also lets you pause and cancel jobs. The pause feature is useful if you need to swap filament in the middle of a print, either because you ran out or because you want to blend multiple colors.
Figure 2. OctoPrint Control Interface
The second tab on OctoPrint provides a Web-based control panel that you can use for manual control of the X, Y and Z axes of your printer as well as extrude plastic. If OctoPrint detects a USB Webcam or the Raspberry Pi camera, it automatically will start MJPG-streamer, and you should be able to see live video from your Webcam (Figure 2). This is pretty useful when you want to start a print from some other room of the house or if you want to monitor a print in progress. If you do have a camera aimed at your printer, you also can click on the Timelapse tab and configure OctoPrint to create a time-lapse video of your print. It can either take a snapshot every few seconds or it can take a shot every time the Z axis changes (that is, when the printer moves to the next layer).
The GCode Viewer tab lets you view the current GCODE being sent to the printer in a 2D representation of the print. You either can watch it command by command, or you can use a slider on this screen to inspect the tool path on each layer of your print. I've used this feature in the past when I wanted to create a multi-color print of a topographic map in order to identify the specific layer where the GCODE changed from sea level to ground level, so I could pause it and swap blue plastic to another color.
Finally, the Terminal tab is handy, as most 3D printers use GCODE commands to tweak calibration settings. For instance, my Printrbot has a Z axis probe it uses to level the print bed automatically in software; however, you still need to fine-tune the Z axis via a GCODE command. The terminal tab lets you type in those raw GCODE commands and see their output.
All in all, even though Cura is great for 3D printer control, I find I typically use OctoPrint for all of my 3D printing. It's just too nice to be able to start a long print and check up on it from the couch. Plus, the ability to generate time-lapse videos of your prints is hard to beat.
As you can see, an awful lot has changed in 3D printing since my first series of columns three years ago. Although in many cases the changes are negative (like the shift toward proprietary software and hardware), there still are quite a few positive changes from advances in the remaining 3D printers that have open hardware, advances in 3D printing software and more focus on ease of use. I hope you've enjoyed this series on the current state of 3D printing from a Linux perspective. If not, the good news is that next month I'll move on to more traditional topics for Hack and /.
Kyle Rankin is a VP of engineering operations at Final, Inc., the author of a number of books including DevOps Troubleshooting and The Official Ubuntu Server Book, and is a columnist for Linux Journal. Follow him @kylerankin.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SuperTuxKart 0.9.2 Released
- Google's SwiftShader Released
- Parsing an RSS News Feed with a Bash Script
- SourceClear Open
- Doing for User Space What We Did for Kernel Space
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide