If you’ve been hanging around 3D printing communities, or reading the various 3D printing posts that have popped up here on Hackaday, you’ve almost certainly heard of OctoPrint. Created and maintained by Gina Häußge, OctoPrint allows you to turn an old computer (or more commonly a small ARM board like the Raspberry Pi or BeagleBone) into a network-accessible control panel for your 3D printer. Thanks to a thriving collection of community developed plugins, it can even control other hardware such as lights, enclosure heaters, smart plugs, or anything else you can think to hook onto the GPIO pins of your chosen ARM board. The project has become so popular that the new Prusa i3 MK3 has a header on the control board specifically for connecting a Pi Zero W running OctoPrint.
Even still, I never personally “got” OctoPrint. I was happy enough with my single printer connected to my computer and controlled directly from my slicer over USB. The majority of the things I print are of my own design, so when setting up the printer it only seemed logical that I would have it connected to the machine I’d be doing my designing on. If I’m sitting at my computer, I just need to rotate my chair to the right and I’m at my printer. What do I need to control the thing over WiFi for?
But things got tricky when I wanted to set up a second printer to help with speeding up larger projects. I couldn’t control them both from the same machine, and while I could print from SD on the second printer if I really had to, the idea seemed painfully antiquated. It would be like when Scotty tried talking into the computer’s mouse in “Voyage Home”. Whether I “got it” or not, I was about to dive headfirst into the world of OctoPrint.
Raspberry Filled PrintrBot
I picked up a used PrintrBot Play online because it had a small footprint (I could put it up on a shelf when not needed), all metal construction, and automatic bed tramming so I wouldn’t have to fiddle with re-leveling the bed after moving it around. Perhaps most importantly, I knew there was plenty of room available in the base of the machine so I wouldn’t have a problem fitting additional hardware in there.
While OctoPrint can run on pretty much anything, the Raspberry Pi appears to be the platform of choice for most people. At $10 it’s pretty hard to turn down the Pi Zero W as an OctoPrint host, so that’s what I decided to go with. My research told me that the Pi Zero wouldn’t have the zip of the Pi 3 when it comes to slicing STLs, but that didn’t seem like too bad of a trade-off given the small size and reduced power consumption.
I was specifically interested in low current draw, as I wanted to run the Pi directly off of the expansion port of the Printrboard, which I knew had a 5V regulator that’s only rated for 300 mA. Everything I read online told me this wouldn’t be a problem for the Pi Zero, especially since I could turn off the HDMI port as it would be running headless. But as I was about to find out, reality doesn’t always agree with the documentation.
An Early Setback
I wanted to power the Pi off of the printer’s controller board like in the Prusa i3 MK3, so I needed to make sure it wasn’t drawing more power than the board could handle. Before I tried putting the Pi into the printer, I set it up on my desk with a USB current monitor and fed it an SD card with OctoPrint installed.
This first test was very promising, it showed that the Pi Zero seemed to top out at about 180 mA when performing resource intensive tasks such as slicing or updating packages. I did need to disable HDMI output to get the power consumption this low, but as the Pi would be installed inside of the printer and never needed to get connected to a display, this really wasn’t a problem.
Feeling confident, I soldered some headers to the Printrboard’s expansion port and the Pi’s power pins, and connected them with a couple of jumpers. I powered up the board and waited patiently for the Pi to hop on the network and allow me to connect to OctoPrint. But…nothing.
Upon close inspection, the Pi’s power indicator light seemed to be showing it shutting down during the booting process. After renabling HDMI and hooking it up to a display, sure enough it would get to a certain stage and then restart. Using my multimeter inline between the Pi and the Printrboard I was able to see that for a brief moment the current jumped up into the neighborhood of 280 mA right before it restarted; obviously just a bit more than the Printrboard could handle.
Since powering it from the main board looked like a dead end, I picked up a small BEC (Battery Eliminator Circuit) module which is generally used in RC vehicles to convert the main battery down to 5V for the radio receiver. With micro-sized quadcopters all the rage anymore, it was easy to find one for a few bucks that’s only a little bit larger than a peanut.
While I had hoped to do this project without permanently attaching anything to the Printrboard, I had to suck it up and solder the BEC module’s leads to the underside of the PCB where the main power connects. The other side of the BEC module has a standard servo connector, which I was able to plug directly into the Pi’s GPIO header. So at least I can still take the Pi out of the printer if needed.
This image shows the final hardware layout inside the base of the PrintrBot Play.
The BEC module can be seen between the Printrboard and the center stepper motor. The Pi itself is screwed into a 3D printed mount I designed. The keen-eyed reader may notice that the Pi mount has nut traps on the flanges; originally I planned on drilling holes in the case and screwing the mount down from the other side. But right before I popped the holes through the steel, I realized the screw heads would interfere with the movement of the bed so I had to settle for double-sided tape.
Getting Started with Octoprint
If you’re using the Raspberry Pi, there is a pre-made SD image called “OctoPi” maintained by Guy Sheffer that contains the latest OctoPrint and all ancillary packages to give you a turn-key experience as soon as you pop the card in. Really, it’s just that simple. Even if you’ve never touched a Raspberry Pi or Linux before, you’ll have no problems getting the software up and running.
The first time you connect to the OctoPrint web interface, you’re presented with a very slick setup wizard that walks you though the basics of getting your printer setup. OctoPrint assumes you’ve already been using your printer with Cura on the computer, and will ask you to import configuration information from it. It will also ask you how you want to handle security: you can either leave OctoPrint completely open for anyone to connect to, or setup user authentication so only trusted individuals can use the printer. This is important if you plan on making your printer accessible remotely.
After the basic setup completed, there’s a decent chance it will prompt you to update either OctoPrint or one of its components. This is completely handled within the web user interface. Here again, even if you aren’t a Linux master, you’ll have no problems making sure you’ve got the latest and greatest version installed.
Once everything is updated and OctoPrint has rebooted, you’ll be presented with the main interface which should look very familiar to anyone who’s used a 3D printer before. There’s manual controls for moving the printer around, an area to enter in desired temperature for the hotend (and heated bed, if you have one), and even a basic file manager to allow you to organize and load the STL and G-Code files stored on the Pi.
Speaking of which, as of the current versions of OctoPrint you can slice an STL file right on the Pi. But you’re almost always going to be better off doing it in Cura on your desktop and sending the sliced file over. This is due to the processing capability of the Pi and the limited slicing options within OctoPrint. But the option is there, and if the STL isn’t too complex it works well enough.
Should You Upgrade?
I’ve only used OctoPrint on this printer for a couple of weeks now, but I have to admit, I’m extremely impressed. In my particular case I’ll still keep my primary printer hooked up to the computer, but it’s extremely handy to have on a secondary printer that I don’t want to tether to a computer. Even if you use it for nothing else, the ability to monitor your print progress remotely (say, from your smartphone) is a huge convenience.
The capability of OctoPrint, especially with the community plugins, is vast. There’s no way to do it justice with a single post like this, so I won’t even try. More advanced topics like adding a camera for print monitoring or controlling enclosure lighting from within the web interface will have to wait for future posts. There’s so much potential here it’s hard not to get overwhelmed.
But the short answer, the answer I was looking for when I started this project is clear. Yes, it’s absolutely worth upgrading your printer to OctoPrint. It’s not a perfect experience, but it’s very close, and honestly the handful of glitches or annoyances I’ve seen are hardly worth mentioning in the grand scheme of things.
The bottom line is: for as cheap as a Pi Zero W is, this is an upgrade that simply can’t be beat in terms of return on investment. Whether you go through the trouble of integrating the Pi into the printer like I did, or simply tape it to the side, just do it.