Using a 3D printer with Raspberry Pi

By Russell Barnes. Posted

The rise of 3D printing has seen numerous inexpensive models becoming available in the £100-£150 bracket, but what is the best way to interface with a 3D printer?

A Raspberry Pi, of course! This tutorial will cover the things you need in order to control your already working 3D printer with a Raspberry Pi, allowing you to have remote access and monitoring capabilities for your printer from anywhere in the world; as well as the ability to start printing, cancel, and tweak the settings mid-print, thanks to our favourite little credit-card-sized computer.

You’ll Need

  • 3D printer with updated firmware and USB connection
  • Spare microSD card
  • WiFi connectivity (USB WiFi dongle if needed)
  • Official touchscreen
  • Repetier Pro subscription (optional)
  • USB webcam (optional)

Choosing your 3D printer

If you are not already lucky enough to be the proud owner of a 3D printer, then the first step is to choose one to buy. There are many options on the market, ranging from £100 to upwards of £1,000, with reliability and quality a considerable factor in these price differences. In an attempt to keep the cost of this project low, we opted for a £150 Prusa i3 clone new from eBay. The printer came as a kit and required a few adjustments, along with some Googling due to difficult-to-translate instructions.

Even so, this should be easy enough for a complete 3D printing novice.

There are many of these clones available at a similar price online. If you would prefer a branded budget printer, you can buy a Startt printer for £99 from imakr.com. However, it still requires building and adjusting, and has a smaller build volume than the Prusa. For larger amounts of money, the official Prusa 3D printers can be purchased, as well as many others. As this market has grown so rapidly, there are countless options. When buying a 3D printer for use with a Raspberry Pi, ensure that the printer has a USB interface and that the firmware is recent.

Setting up the software

Dashboard

Once you have built your printer by following the specific instructions, you should be able to print normally, if directly connected to a computer. You’ll soon realise that this is a solution with very limited functionality, as you have to be directly connected to the printer in order to make any changes to it.

To set up the software on your Raspberry Pi, head to magpi.cc/2vBupZw and download the OS image specified for the Raspberry Pi. Once you have done this, unzip the file and write the image to your microSD card.

If you are using an official touchscreen, connect this to your Pi, as well as a method to connect to a WiFi network if needed. Once the Raspberry Pi is powered on, the touchscreen will display the option to connect to a wireless network, which is vital.

Follow the on-screen instructions. If you are not using a touchscreen, you can follow a step-by-step guide to setting up WiFi here. Troubleshooting for any problems that may arise while setting up the internet connection and installing the OS can also be found here.

You will then need to set up your printer on the system by inputting the type of printer, as well as its size, shape, and manufacturer. The process is fairly foolproof, and you will be guided through it step-by-step.

Using Repetier software

Screen

The majority of the following information will mainly apply to those using the official touchscreen to interface with their printer.

Once the internet connection is set up, you will see a menu similar to the one shown in Figure 1. Navigating these menus will allow you to directly control the printer’s motors, as well as viewing network settings and sending emergency stop commands. One of the best features of the software is the fact that you can access the printer remotely via the local network by navigating to the Pi’s IP address on any device connected to the same LAN. This allows you to upload files to the server to be printed, as well as allowing you to view the progress of prints and cancel them. You can also view a live picture feed of the printer if you connect a USB webcam to the Pi.

For a better experience, installing Repetier-Host on a PC will offer a more streamlined process that allows you to slice STL files and upload them directly for printing, as well as offering built-in direct control of your printer without the latency introduced by using a web browser.

3D printing with Raspberry Pi

As a beginner, it’s easy to feel intimidated by all the different file types and methods for printing a predesigned object, but there are several industry-standard methods that are almost always used.

Most 3D designs from online sites such as thingiverse.com will be in the form of an STL file that contains the actual shape data of the object. In order to print this design, the file will need to be ‘sliced’, which converts the shape into exact instructions for the printer’s movements. Slicers such as Cura can be found online; however, the Repetier-Host software for PC contains a built-in slicer. By slicing the file, the software will generate instructions for printing based on your printer’s exact parameters, including its size and shape. Once the STL file has been sliced, a G-code file will be created, which can be uploaded directly to the printer and run in order to print the object.

Lighting your 3D Printer

If your printer is in an enclosed space, consider adding some lighting, such as LED strips. This will provide illumination for the webcam, and clearer images for you.

Internet connection for your 3D printer

A strong and stable internet connection is required in order to run the printer successfully. If the connection is weak, consider connecting the Pi via Ethernet.

From The MagPi store

Subscribe

Subscribe to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.