Setting up OctoPrint on a Raspberry Pi for 3D Printers is probably one of the best upgrades you can do. This will allow you to print wirelessly or wired to your printer without having to deal with transferring files to microSD cards. There are also plenty of other extensions that can be installed as well, such as adding a camera to view your print remotely, creating time lapse videos, and auto shutoff the printer when the print is complete to name a few. Check out the instructions below to get started.
In the beginning I didn’t mind manually moving files to a micro SD card between my computer and printer, but when I started designing some of my own prints this quickly became tedious. Fortunately there is an easy solution and it’s called OctoPrint. When installed on a Raspberry Pi it acts as a server and you are then able to connect your printer to your wired/wireless network and print remotely. You can even access your printer over the internet if you wish, but that is not covered here. This will just cover the basics of getting OctoPrint set up so you can be free of having to deal with micro SD cards when printing.
What you’ll need
Raspberry Pi 3 or above
micro SD card for the Raspberry Pi, 8GB+
USB-C Power Adapter
USB A to micro USB cable
Network cable for wired connection
Etcher Download – Used to load OctoPrint on the micro SD card
Now that we have all the components and files let’s get started.
- Connect microSD card to your computer
- Unzip the OctoPrint download
- Launch Etcher
- Select ‘Flash from file’ and select the OctoPrint .img
- Select your micro SD card as a the target
- Click Flash!
- Configure your Wi-Fi settings within octopi-wpa-supplicant.txt file
- Uncomment the network lines by deleting the ‘#’ (Avoid using WordPad (Windows) or TextEdit(Mac), use notepad or a text editor like notepad++)
- Inside the quotes add your network name and password
- Save the file.
- Insert the micro SD card into your Raspberry Pi and power it on. (Monitor, keyboard, and mouse is not required as we’ll access the Pi remotely).
- Login to your Pi via SSH using an application like Putty. The host name is octopi.local or the IP address which can be found in your routers connected devices. Default username is “pi” and the password is “raspberry”.
- Once connected run:
- sudo raspi-config
- You’ll want to change the password.
- Change the password via “Change User Password”
- Optionally: Change the configured timezone via “Localization Options” > “Timezone”.
- Optionally: Change the hostname via “Network Options” > “Hostname”. Your OctoPi instance will then no longer be reachable under
octopi.localbut rather the hostname you chose postfixed with
.local, so keep that in mind.
- Now in a browser you can access OctoPrint by either going to http://octopi.local or http://<Pi’s IP Address>.
- Go through the OctoPrint set up guide and adjust the settings as necessary.
Connecting the Pi to your 3D printer
Now that you have successfully got OctoPrint up and running the next part is to connect your Pi to your 3D printer which is pretty simple, but there are some caveats. So you’ll want to use the USB cable to connect it to micro USB port on the front of your 3D printer. The short the cable the better as longer cables have been known to cause some connection issues. You’ll also not want to use a USB cable with a ferrite core. If you don’t know what that is check out the photo below.
Once the Pi is connected to the 3D printer, in your browser you can navigate to the OctoPrint server. Under Connection > Serial Port there should be an option to choose a USB port.
You don’t have to worry about Baudrate and the Printer Profile is the one you set up. Once you select the Serial Port you should be able to press the Connect button. If everything is working you’ll be able to start uploading files and printing them from within the browser.
Hopefully you are now free of microSD cards. I would definitely continue checking out all that OctoPrint has to offer with their extensions. I would also recommend updating the firmware of the Pi to improve performance and reduce throttling issues. You can find the instructions below.
Updating your Raspberry Pi 4 bootloader and firmware
While this is not necessary I would highly recommend doing it before you start printing. Raspberry Pi’s are known to be able to run fanless and while the 4 is capable of doing so out of the box, it may throttle if it’s on older firmware. Updating the firmware can reduce temps by as much as 10 degrees!!! Before I updated the firmware I was seeing temperatures around 68 degrees and after updating it now hovers around 58 degrees. Here are the steps to update your firmware:
- If you want to check the current temperature before and after appling the firmware update you can run the following command:
- cat /sys/class/thermal/thermal_zone0/temp
- Note: Just take the first 2 digits to determine the temperature.
- Update the bootloader:
- sudo apt update
- sudo apt full-upgrade
- sudo reboot
- Then update the firmware:
- sudo rpi-eeprom-update to check to see if there is an update
- sudo rpi-eeprom-update -a to install the update
- sudo reboot
After rebooting you should be good to go. If you still want to add a fan or heatsinks you can do so, but I’ve been running without either for a couple of months now without any issues. The temperature is currently hovering around 54 degrees.