Remote Control Your 3D Printer! Making an OctoPrint from a Raspberry Pi

How to Build an OctoPrint from a Raspberry Pi 4 & Install it on Your Creality Ender 3 Pro to Remote Control Your 3D Printer!

A Step-by-Step Guide (with pictures) to 1) Making an OctoPrint for your 3D printer from a Raspberry Pi 4, 2) Connecting the OctoPrint to your WiFi network & 3) Connecting the OctoPrint to your Creality Ender 3 series printer so you can remotely control your 3D printer and take time-lapse videos or pictures of printing your 3D models.

Cost to Build OctoPrint
Parts Needed to Build an OctoPrint
Step-by-Step Instructions
Using Your OctoPrint

Introduction

The Benefits of an OctoPrint:

  1. Remote Control & Monitoring: The OctoPi / OctoPrint allows you to remotely control & monitor your 3D printer from a web browser or an app (OctoRemote) on your smartphone.
  2. Load Models to Print Wirelessly From Your Computer: No longer do you need to load your models on a microSD card and insert that into the 3D printer. Instead – you are able to load the 3D model directly onto the Ender 3 Pro through a web browser from your PC!
  3. Better User Experience: The OctoPrint interface is attractive, well laid out and very intuitive to use. We think it makes the user experience for our 3D printer better & more enjoyable.
  4. Time Lapse Videos: The OctoPrint also allows you to make time-lapse videos of your 3D models being printed – even moving the printer head out of the way for each photo!

I had some health & safety concerns regarding my children breathing the fumes from our 3D printer (see my post: Is 3D printing Safe for My Children?) So I had done some research to find out what I could do to make 3D printing as safe of a hobby as possible for my kids.

I was excited after doing some research to find there is an open source solution to remotely controlling your 3D printer so you you don’t have to be in the same room as it to control or monitor it. I was also pleased that this same solution (OctoPrint / OctoPi) is based on the Raspberry Pi – which the kids and I have already built a couple of projects with in the past.

What Does It Cost to Build an OctoPi/OctoPrint?

The quick answer is about $125 – $150. I spent about $125 to build our OctoPi/OctoPrint. Mind you – it can be done for cheaper – but I wanted to use the newest Raspberry Pi (Version 4) and have the greatest amount of RAM available (the 4GB model at the time we built our – but there is now an 8GB version as well). We also used an old webcam – rather than buying a new one. Below, you can see, in detail, what each of the components cost.


What Parts & Supplies Do You Need to Build an OctoPi/OctoPrint & What Will They Cost?

  1. Raspberry Pi (3B or newer – We used a Raspberry Pi 4!) We used a CanaKit from Amazon that included a case and everything we needed to get up and running. You can see the one we used here. ~ Cost = $115
  2. MicroSD card – 32 GB or 64 GB Class 10. Here is what we used. ~ Cost = $7.50
  3. A mini USB male -to -USB male cable (a very short one like this @ Amazon)) ~ Cost = $4.30
  4. WebCam (To view your print job & make time-lapse videos) Here is a cheap option that is known to work well with the OctoPi/OctoPrint. ~ Cost = $25
  5. Computer (Just to set up the OctoPi/OctoPrint)

Things to Consider

+ PURCHASE A Raspberry Pi KIT: With regards to purchasing the Raspberry Pi – I would suggest that you buy a kit – so you get the power cable, a case, a micro SD card, etc. You can see the kit that we purchased here. I always look to see if I can get stuff from Amazon Warehouse before buying it new. I was able to get the kit I was looking for “used” from Amazon Warehouse, and saved about $15$20 in the process.

+ BUY A SECOND microSD CARD: When buying the Raspberry Pi as kit, you will most likely get a microSD card with the kit pre-loaded with NOOBS (New Out Of Box Software). Keep the microSD card that comes with the kit and buy a new one to use for the OctoPi/OctoPrint! NOOBS – is an operating system installation manager that helps you install the operating system Raspbian on the Raspberry Pi. I just think it is worth keeping this – because you might want to use the Raspberry Pi for something different down the line. A new microSD card (for the OctoPi/OctoPrint) can be bought for between $7 -$20, depending on storage size. (See here for the microSD cards I like to use. I would recommend the 32 GB, 64 GB card.)

+ SALVAGE THAT OLD WEBCAM IN THE BASEMENT: We also had a 15 year-old web cam laying around – that we used so we could see the printer in action and make time-lapse videos of our prints. If you have an old one laying around – plug it in and use it! If you need to pick up a cheap one – try out this one here.


Step-by-Step Instructions on How to Build Your OctoPi /OctoPrint

Building the OctoPi/OctoPrint is surprisingly easy! There are just a few places where you might need a little more hand-holding than was offered on the OctoPrint web page. I cover & expand upon those areas here.

1) Installing The OctoPi Operating System on a Raspberry Pi to Create an OctoPrint

  1. Download & Install: Download & install Notepad++ and Etcher on a laptop or desktop that has a SD/microSD reader. If you only have an SD reader – you will need to have a microSD adapter – that comes with the microSD cards I listed above. You really want to use Notepad++ because many other text editors mangle & change the .txt file and will prevent your WiFi from working properly!!
  2. Download & Unzip: Download OctoPi from the OctoPrint website and unzip it (the file is zipped – which just means it is compressed). With Windows 10 – you should not need an unzip program – since it is a feature built into the operating system. At the time I am writing this – the latest version of OctoPi is .17, but it might be newer for you.
  3. Flash your microSD Card: Open Etcher and select the unzipped OctoPi “.img” file (It will look something like 2019-09-26-octopi-buster-lite-0.17.0.img but the numbers might be slightly different since the version may be newer).
    1. Then insert the microSD card into the card reader on your computer and select the UNFORMATED microSD card for the where it says “Select Drive” on the Etcher screen. PLEASE NOTE: You DO NOT, at any time, want to format the micro SD card – if the Windows 10 / Mac OS operating system prompts you when you insert the microSD card into the card reader on the computer. You are “Flashing” the microSD card with an entire operating system (the OctoPi operating system) – and formatting over it will destroy the OtoPi operating system on the microSD card! (Honestly – not too big of a deal – since you can just do this step over…)
    2. Hit the “Flash” button on the Etcher screen and wait for it to flash and verify the image on the microSD card. This might take a couple of minutes.
Image file selected, Target Card Selected – Ready to hit “Flash”!

The good news – you are half way there!! At this point the OctoPi operating system is on the microSD card. The imaged has been flashed with a image of the OctoPi operating system that does not have a GUI (Graphical User Interface) and is intended to be controlled remotely from a web browser, over your WiFi network. So we have to track down a file in the operating system (on the microSD card) and put your WiFi network name and password in it so you can see the OctoPi/OctoPrint on your network and control it. So that is what we will do next!


2) Configuring The OctoPrint’s WiFi to Work on Your Home Network

Select the one that says”boot”.
I’ve highlighted it blue here
for you to see!
Select the indicated file to edit for
adding the necessary information
for your OctoPi to access your WiFi
network.
  1. Open Notepad++, select “File” and then “Open”. Use File Explorer to navigate to the removable microSD card is that you just flashed with the OctoPi operating system. Double click on it so you can see the files listed there. (See image above)
  2. Select the file titled “octopi-wpa-supplicant.txt” and double click on it to edit it. (See image above)
  3. If you are using WPA/WPA2 encryption for your WiFi (like you SHOULD be) – navigate to the area of the file I have highlighted and ENTER YOUR SPECIFIC WiFi INFORMATION. PLEASE NOTE: – You have to remove the “#” signs like I did on the 4 lines below the “## WPA/WPA2…” line and keep it looking just like I do! This is VERY IMPORTANT!! This is called “uncommenting” and is basically telling the computer that the line of text is now an instruction (once it is “uncommented”) and it should pay attention to it! The comments are for the humans. The uncommented lines are instructions for the computer! Keep the spaces and everything just like I have it shown here!
  4. You will also have to “uncomment” the appropriate country a little further down in this file to finish setting up your WiFi. (See image below)
Configuring the OctoPrint to use your home WiFi network
Setting the correct country for your WiFi

3) Booting the OctoPi/OctoPrint and Changing/Setting Your UserName & Password

  1. Insert your flashed microSD card into the Raspberry Pi (and NOW the Raspberry Pi has officially evolved and is finally an OctoPi/OctoPrint!) and boot it up! Make sure you have your webcam plugged into the OctoPi/OctoPrint too at this point.
  2. On your computer type the following into your browser “http://octopi.local” (Or the IP address if you know the IP address your router has assigned the OctoPi/OctoPrint)
  3. Here you should be prompted for the username and password. The default username and password are “pi” and raspberry” respectively.
  4. Once you log in – go to “User Setting” in the upper right hand corner of the screen and CHANGE the USERNAME & PASSWORD to something other than the defaults!!
OctoPi login – from the web browser!

4) Hooking Up You New OctoPrint to Your Creality Ender 3 Series Printer

Connections to the OctoPrint
  • #1 = USB C Power cable plugged into the OctoPrint. The other end is plugged into a standard outlet to power the device.
  • #2 = USB connection to my webcam
  • #3 = USB male to mini USB male cable to connect the OctoPrint to the Creality Ender 3 Pro (See picture below)
  • #4 = OPTIONAL = Connection to my router (which is really close to the printer) Cat 5 cable connected via RJ45 connector. I did this since it was so close to the router and a wired connection is more reliable than a wireless connection.
Mini USB port on Creality Ender 3 Pro. This is where you are going to hook up the OctoPrint.
Mini USB male connector that goes into the Creality Ender 3 Pro

Using the OctoPrint

1) Using the OctoPrint Through Your Web Browser

Here are some images of the OctoPrint interface that you will see when using OctoPrint through your web browser. I selected the Temperature tab and the g-code tab to show – just so you get an idea of what the web interface looks like. We feel the OctoPrint is very easy and intuitive to use – especially since it is browser based. (FYI – we usually call ours just the “OctoPi”).

OctoPrint browser-based interface. The g-code and temperature tabs.

2) Using Your OctoPrint with Your Phone

Gracie & I both monitor & use the OctoPrint from our Android phones as well as the computer. The link to the FREE OctoPrint app that we use is here.

Conclusion

The Octopi/OctoPrint can really improve the usability of you 3D printer and make it very easy to make time-lapse videos of your prints. It also allows you to control & monitor nearly every aspect of your 3D printer from rooms other than where the printer is physically located. The remote access features really help alleviate health and safety concerns related to having young children use the printer and the potentially harmful fumes emitted during the printing process.

Finally, the Octopi/OctoPrint is relatively inexpensive and quite easy to build!

I hope you found this post to be helpful! In a future post(s) I will go into hooking your OctoPi/OctoPrint to your 3D printer, setting up the time-lapse recording feature, setting up access on your phone and a whole host of other features and aspects of this fascinating little machine!

Sincererly,

Chip
Chip

My name is Chip and I am the trophy husband to my wife Melani and blessed father to 4 wonderful children! I definitely score very high on the geek / nerd spectrum assessment test and have a wide variety of interests. Deep down I think I aspire to be a true renaissance man!

Articles: 38

Any constructive feedback welcome!

%d bloggers like this: