Setting Up a 3D Print Server for the Printrbot Simple Metal Using Octopi

By Will Smith

This week, Will tackled setting up a Raspberry Pi-based print server,

Last week, I shared my experiences getting started with the Printrbot Simple Metal. Once I was happy with the quality of my prints I was getting, I wanted to try something a little different. I set up a print server for the printer, which would allow me to control and monitor it remotely, anywhere that I have power and a Wi-Fi network.

OctoPrint provides a web interface for the printer that replaces Repetier. It lets me send gcode to the printer, adjust settings like temperature, zero the axes, heat up the print head, and change filament. It's free, open-source software, to boot. Instead of dedicating a PC or laptop to the print server, I wanted to use a Raspberry Pi. The Raspberry Pi is a $30, credit-card sized PC that uses a SD card for storage and has an Ethernet port and a couple of USB ports. Rather than set up Linux and then configure Octoprint myself, I was able to use a pre-configured version of Linux designed to run on the Raspberry Pi that includes Octoprint called OctoPi. Clever, right?

I also picked up a few accessories for the Raspberry Pi, including a USB Wi-Fi dongle (so my print server will work where I don't have Ethernet), and a Raspberry Pi Camera Module (so I can watch the prints when I'm far away). After looking at the power available from the printer's motherboard and deciding that it probably wouldn't be sufficient to run the Raspberry Pi, I scrounged up an old USB power brick to power the Pi and found an unused SDcard in the same drawer. I already had an older Raspberry Pi revA around, but even if I'd bought a newer Raspberry Pi revB, along with the camera, a longer cable for the camera, and the Wi-Fi dongle, it would have cost less than $70.

While I installed Octoprint on my Mac using instructions from a messageboard, Adafruit has guides for Windows and OS X that use a utility to skip the fiddly command line bits of the process. Once I installed OctoPi on my SD card, plugged the Pi into Ethernet, and plugged the Pi's microUSB cord into a power source, the machine booted and connected to my network. To finish the configuration and enable Wi-Fi, I needed to connect to it using ssh. On a Mac, that meant opening a Terminal window and typing "ssh octopi.local -l pi" and using the password raspberry. On Windows, you'll likely need to install Bonjour Print Services for Windows (or you'll need to use your router's control panel to figure out which IP address the Pi was assigned), and you'll need a SSH client, like PuTTY.

Once you've connected to the Pi using SSH, I ran the initial Raspberry Pi configuration by typing "raspi-config" and selecting the option to enable the camera. If you have a large SD card, you can use the option to Expand Filesystem to fill the available space, but it probably won't be necessary for most people and it will take a while to run.

Connecting the Pi to my Wi-Fi network was the only tricky part of the configuration. I found that most of the guides to configuring Wi-Fi on OctoPi were overly complicated. At the end of the day, all I had to do to get Wi-Fi working was open the /etc/network/interfaces file with nano using the following command "sudo nano /etc/network/interfaces" and then add the following lines on a new line under "iface wlan0 inet dhcp"

wpa-ssid "SSID NAME HERE"


After that I rebooted the machine using the command "sudo shutdown now -r", and unplugged the Ethernet cable. After the Pi rebooted, I was able to connect to it using the same address, https://octopi-local/. The only difference is that I was connected over Wi-Fi instead of a cable.

To do the final configuration, I fired up my web browser and pointed it to https://octopi-local/, created a user account, selected the proper serial port and baudrate settings (/dev/ttyACM0 and 250000, respectively), and pressed the big Connect button so the printer could talk to the Raspberry Pi.

I used the Control tab to home the X and Y, then did the same for the Z axis, and brought the printer to temperature before I tried a test print.

The process for printing using OctoPrint is slightly different than Repetier. I found the best results by just plating and slicing using Slic3r (it's installed on your PC alongside Repetier). While Slic3r lacks the pretty 3D visualization of your plated parts, it will let you arrange multiple items for big prints, rotate and turn items, and scale them up or down. Once you've generated a gcode file, just drag it into the Octoprint window and drop it on the "Upload locally" side of the window. Once the file is saved, click the little printer icon next to its name in the Files list, and your print will begin.

Once printing is working properly, you'll likely want to print a camera mount that fits on your Printrbot Simple Metal. I'm partial to the one that Jeremy Williams made out of a few different pieces on Thingiverse, mainly because it's entirely printable, it didn't require a trip to the hardware store. Assuming you configured the camera properly, you'll be able to enable timelapses by checking the appropriate box in the Timelapse tab.

If you want to get fancy, you can access your OctoPi installation from anywhere. To do that, you'll need to set up a dynamic DNS service, which configures a domain of your choosing to point to the dynamic IP address your ISP provides. On your internal network, you'll need to set up a static IP address for your OctoPi machine, and then forward external connections on a port of your choosing to port 80 on the OctoPi machines internal IP.

That's it for this week.

Wait. I have a few notes about settings tweaks. Since last week, I noticed that layers that were supposed to be 100% filled weren't getting quite enough plastic. I suspected that Slic3r was overestimating the thickness of my filament, which turned out to be correct. Using calipers, I measured the filament in multiple places and found it closer to 1.75mm than 1.8mm. I adjusted the filament diameter setting in Slic3r to 1.75, which solved the infill problem and let me print objects with 100% infill. I also disabled the "Complete individual objects" option in Slic3r's Output options panel, so I can use more of the available print space.