A 3D printer’s control board (also known as a motherboard) is the “brain” of the printer. It controls the hardware, such as fans, stepper motors, drivers, heaters, and thermistors, using instructions interpreted from G-code by firmware. A 3D printer control board is specifically designed for that purpose and, while there are options like PandaPi to run a 3D printer with a different board, most users choose to stick with a dedicated board.

Raspberry Pis are small, inexpensive single-board computers (SBC) that can be used for many things, unlike a 3D printer control board. Some Pi uses include web servers, audio players, game console emulators, and even desktop PCs (although it would only be useful for non-demanding tasks such as web browsing).

One common use for a Raspberry Pi in 3D printing is as an additional board to run software such as OctoPrint. OctoPrint has many benefits, including being able to remotely control and monitor your printer. If you don’t already have it, the download and a setup guide can be found on the OctoPrint website.

In this article, we’ll go over the software and hardware requirements to run OctoPrint on a Raspberry Pi, and give a general overview of the setup process. But first, let’s look at the advantages of combining the utility of OctoPrint with the power of a Pi.

Back to Contents

Raspberry Pi 3D Printer Controller

Why OctoPrint

OctoPrint in action
OctoPrint in action (Source: PlastiBots)

Perhaps the best reason to use OctoPrint is the ability to monitor your print in real time; you can connect a webcam and enable live streaming of the print as it happens. By default, streaming and control are only available on the local network, but a simple plug-in enables you to view the stream and control your printer from anywhere in the world! You can also analyze the G-code and follow the approximate print head location as the part is created. (Of course, this is the part where we have to say it’s not recommended to leave your printer running unattended).

Another good reason to use OctoPrint is the ease with which files can be sent to your printer (or printers) from the computer running your slicing software. For example, Cura has an option to connect directly and print with one click. However, if you don’t have OctoPrint integration, the G-code can be loaded into OctoPrint via a web browser.

Plug-Ins

The Bed Level Visualizer plug-in in action
The Bed Level Visualizer plug-in in action (Source: Rob Davey via All3DP)

OctoPrint can add even more advantages through additional plug-ins. One of these plug-ins is The Spaghetti Detective, named for a 3D printer’s tendency to create what looks like a big pile of spaghetti if and when a print fails. This plug-in uses a camera to watch over your print, and uses AI to check if the print starts to fail. It can be configured to pause the print or simply notify the user if problems arise.

If the printer has auto bed leveling set up, the Bed Level Visualizer plug-in can be used to get the bed as close to perfectly level as possible. This plug-in probes the bed and creates a 3D representation of it, which can then be used to get the bed even flatter.

There are heaps of plug-in options that will upgrade your printing experience, so it’s worth exploring the plug-in manager in the OctoPrint settings (or go to the OctoPrint plug-in repository site) to see what else is possible.

Back to Contents

Advertisement
Advertisement
Advertisement
Raspberry Pi 3D Printer Controller

Alternatives

AstoPrint is one of several alternatives to OctoPrint
AstoPrint is one of several alternatives to OctoPrint (Source: AstroPrint)

There are several generations of Raspberry Pi, with the hardware having been upgraded with each subsequent release, culminating in the powerful Raspberry Pi 4. There are other SBCs that have similar capabilities, such as the Orange Pi Pc Plus, Banana Pi M3, Rock Pi 4, Odroid XU4, Asus Tinker Board, and Jetson Nano, to name just a few.

There’s also a range of alternatives to OctoPrint which could be worth looking into. Some of these software options can be run on a Raspberry Pi, however, some cannot, thus a double check will be required when purchasing hardware.

There are many operating system (OS) options available for a Raspberry Pi, with the default option being Raspberry Pi OS (formerly known as Raspbian). Note that the downloaded operating system is referred to as an image. OctoPrint can be run anywhere where Python 2.7 or 3.7+ (programming languages) are supported. It officially supports Linux, macOS, and Windows, although its intended use is on a small, low power device so you might run into issues using a full-blown PC or Mac.

Back to Contents

Advertisement
Advertisement
Advertisement
Raspberry Pi 3D Printer Controller

What You'll Need

You'll need a cable, power source and Micro-SD card, in addition to the Pi
You'll need a cable, power source and Micro-SD card, in addition to the Pi (Source: craigbot via Instructables)

Hardware

According to OctoPrint, you’re better off using a Raspberry Pi 3B, 3B+, or 4B. If you’re using an older model, there’s a heightened risk of print artifacts and you’ll experience longer loading times, especially if you’re planning to run additional plug-ins or a webcam.

In addition to your Pi of choice, you’ll need a USB cable to connect the board to the printer, a Micro-SD card (at least 4 GB), and a 5 V power supply or buck regulator to power the Pi. The regulator is optional and will likely require soldering, however, it’ll enable the Pi to run from the printer’s power supply.

Software

You’ll naturally need the OctoPi firmware, along with an etcher for creating the boot drive. Putty, a tool for configuring the Pi via SSH, is an optional extra. (You can just as easily use a command prompt on Windows or Terminal on Mac.)

Back to Contents

Advertisement
Advertisement
Advertisement
Raspberry Pi 3D Printer Controller

Set Up

Connecting a Pi to a printer is as simple as plugging in a USB cable
Connecting a Pi to a printer is as simple as plugging in a USB cable (Source: Crosslink via YouTube)

The basic steps to set up OctoPrint on a Raspberry Pi are below. For a more detailed guide, see our article OctoPrint Setup: How to Install OctoPi on a Raspberry Pi.

  1. Download the firmware and software tools from their respective websites.
  2. Write the firmware onto the SD card.
  3. (This step can be skipped if you’ll be using a network cable.) Complete the Wi-Fi setup. Enter the network SSID and password in the “octopi-wpa-supplicant.txt” file on the SD card. Note that Visual Studio or Notepad++ should be used instead of Notepad.
  4. Insert the Micro-SD into the Pi.
  5. Boot (apply power to) the Pi.
  6. Log in to the Pi via SSH.
  7. Set up a username and password.
  8. Connect to the printer.
  9. Log in via a web browser.
  10. Upload your model, and print!

Back to Contents

Advertisement
Advertisement
Raspberry Pi 3D Printer Controller

Final Thoughts

A Raspberry Pi 3B in a 3D printer setup
A Raspberry Pi 3B in a 3D printer setup (Source: Shade.sh)

With the addition of a Raspberry Pi, it becomes much easier to monitor your printer’s progress as well as transfer files and even create a time-lapse of a print. There are also many plug-ins that can add additional functionality, depending on your requirements. Overall, this is a worthwhile upgrade to your 3D printing setup.

Although there are other hardware and software options available, the combination of OctoPrint and a Raspberry Pi is very commonly used. This is an advantage because if you have any problems, there is likely someone out there who has already experienced and solved the same issue.

More detailed guides to getting OctoPrint configured and set up can easily be found online, and the OctoPrint online community is a very helpful resource. In addition, some helpful guides are suggested below:

  • Chris’s Basement: An easy-to-follow video guide to setting up OctoPrint on a Raspberry Pi using Putty software.
  • Raspberry Pi Blog: A comprehensive written guide on how to set up OctoPrint on a Raspberry Pi, including screenshots.
  • Teaching Tech: Another helpful video guide that explains how to set up Octolapse, a way to capture time-lapses where the print appears to rise up out of the bed.

Back to Contents

Advertisement
Advertisement

Lead image source: Lukas Pomykal

License: The text of "Raspberry Pi as a 3D Printer Controller: How to Set It Up" by All3DP is licensed under a Creative Commons Attribution 4.0 International License.

Stay informed with notifications from All3DP.

You get a notification when a new article is published.

You can’t subscribe to updates from All3DP. Learn more… Subscribe to updates

You can’t subscribe to updates from All3DP. Learn more…

Advertisement