Octoprint is software that is used for (remote) management and monitoring of 3D printers. Octoprint can use a web camera and watch your printing progress. I'll be adding the Raspberry Pi camera, which in its 1.3 version is a very capable camera with 5 mega-pixels and up to 1080p streaming.
We will be working in a windows environment. You are going to use some nerdy software things, like the terminal software PuTTY and you are going to edit some files in a Linux based environment, but I'll take it step by step, and explain what you are doing.
You can head over to Octoprint's official page, and hit the download button. Here it gets a little confusing, but click on the name Guy Sheffer, which will take you to a new page. Under Popular repositories you click on OctoPi, which takes you to a GitHub page with a lot of stuff on it. Official mirror is here. Alternative mirror is here. Nightly builds are available here.
We are going to use the newest file found under Official mirrors. There have been some huge improvements in the nightly build, which I had hoped to take advantage of, but the latest version didn't like my WiFi dongle.
Download the zip file with the newest date. It is around 1 Gb and the download speed was rather slow for me, so it took around half an hour! Put it in a folder on your desktop or similar place.
Downloading PuTTY is also a bit confusing. You can go to the official page and use the "You can download PuTTY here". Once again, we end up on a rather confusing page. Find the "For Windows on Intel x86" line. Right below that line, you will find what we need: putty.exe. Click the putty.exe and save it in the same folder you put the Octoprint file. It might take a bit of clicking for you to actually get the download dialog pop-up.
Download Win32 Disk Imager
Go to the Win32 Disk Imager page, and click the Download area. This will get you to a new page, and the download should start shortly after.
Download Angry IP Scanner
Go to Angry IP Scanner download area. Find and click on the line: 32-bit Executable - if you prefer no installation. Put it in the same folder as the rest of your files.
Load Octoprint on to the SD Card using Disk Imager
First you right click the Octoprint file and extract it to your current folder. Insert your SD Card into your computer and make certain you know the drive letter. Now you right click the Win32 Disk imager file and start it as Administrator.
Under "Image File" is a blank square. Click the folder icon next to it and navigate to your extracted Octoprint file. Select it. Under Device in Win32 Disk Imager, you make certain the correct drive is selected. When all is ready, you click the "Write" button and wait.
Booting the Raspberry Pi
Insert your SD Card into your Raspberry Pi, connect it your your LAN using an Ethernet cable and connect any web camera or Raspberry camera you might have. Also insert any USB WiFi module you would like to use.
If you want to use WiFi you need to connect your Raspberry to an external monitor and connect a mouse. You might be able to configure this using the PuTTY Terminal program, but that is beyond the scope of this tutorial.
When all is connected, you power up your Pi.
Finding the Pi Using Angry IP Scanner
After you turned on your Raspberry, you start up AngryIP Scanner. The boxes after "IP Range:" should be correctly populated with relevant settings for your network, so just press the Start button. After a bit, a Scan Statistics window pop up. Just close it.
Now scroll down until you find a device named something starting with "Octopi". It is in the column named Hostname. Write down the IP of the device, which in my case is 192.168.1.59
Connecting to Raspberry using PuTTY
With our Raspberry's IP in hand, we fire up PuTTY. Enter the IP address in the box under Host Name (or IP address). The box under Port should be 22. Leave everything else as it is and click the Open button.
You will see a PuTTY Security Alert window. Just press Yes. It simply warns you that your Raspberry has a self-generated security certificate.
You are now presented with a window with a Login as: prompt. Use pi as username (login as) and raspberry as password. Note that nothing will appear on screen when entering the password.
Important: Left-clicking will always paste whatever you have copied. This means you can't markup something in PuTTY and then right-click to copy it. Nor can you use shortcuts such as CTRL-C or the like.
Configuring Octopi on Raspberry Pi
Now type in
. You should now see the Raspberry Pi Software Configuration Tool (Raspi-Config). You can navigate using the Arrow Keys, TAB and the ENTER key to execute your selection. In some menus you can select multiple things using SPACE before hitting ENTER to execute your selection.
Select this using the Arrow Keys, and press ENTER. The window will briefly run some code and present you with a screen with <OK> on it. Hit ENTER. We just told Octpi to use the entire card, so it doesn't run out of space.
Change User Password
This is important because anyone with access to your network could log in and take control of your printer. Select the Change User Password and hit ENTER and press ENTER in the next screen.
You are now looking at a black, possibly daunting, terminal screen where the last line reads: "Enter new UNIX password". When you type something here, nothing will happen on screen, but that is on purpose.
Type in your password and hit ENTER.
Now you need to confirm your password and hit ENTER when done. ENTER on the next screen and you are returned to the Raspi-config menu.
Enable Boot to Desktop/Scratch
You only want to do this, if you need to setup Wi-Fi. To enable desktop mode, hit ENTER. Use Arrow Keys to select "Desktop Log in as user 'pi' at the graphical desktop". Press ENTER. Some codes will briefly run on the screen, and you are returned to the Raspi-config menu.
You do not need to do this, but if you don't use a UK keyboard layout, it might be useful if you are having trouble making the right characters in the PuTTY sessions to your Raspberry. You can always go back and set this up at a later stage, if you find that you need it.
Press ENTER to activate the option.
Here we have 3 options. Configure as you like:
Change Locale: Hit ENTER. After the black screen goes away, you use Arrow Keys to navigate down to the selections fitting your country. In my case, I select the two starting with da_DK as I live in Denmark. I select them using Arrow Keys and SPACE (see image). Then press ENTER when done.
We are now asked to select Default Locale for our environment. I browse up and select da_DK and press ENTER. You might have more than one option. Just use the top one with your countries initials.
A black terminal screen will run something a while then return you to the Raspi-Config.
Select the Internationalization Options once more.
Change Timezone: Hit ENTER. After the Black screen goes away, you use Arrow Keys to navigate to the area most fitting for your country. Mine is Europe. Now select the City matching your time-zone. Mine is Copenhagen.
After a brief black-terminal screen, we are once Again back to the Raspi-Config.
Select the Internationalization Options once more.
Change Keyboard Layout: (this option is likely the most important one) Hit ENTER. After the black screen goes away, you are returned to the Raspi-Config.
This is to enable the Raspberry camera. If you use an USB camera, you do not want to hit this one, as it is either/or. You can always go back and change this later.
Enable camera: hit ENTER. You are asked if you want to enable support for Raspberry Pi camera. If you do, you use Arrow Keys to select <Enable> and hit ENTER.
You will be returned to the Raspi-Config.
Note: There is an options file in the root of your SD Card where framerate can be changed from the default 10fps to something else.
If you are happy with the name Octopi, you just skip this. Select this using the Arrow Keys and press ENTER. You will be presented with some texts on naming conventions. Basically, you may not use special characters and no spaces in it. I'll recommend using a single word like "3dprinter" or similar.
Hit ENTER to continue. Use BACKSPACE to delete the name octopi, and type in a name of your choice. Using capitals will not work and the final name will be in small letters.
I call the printer I made "Ultius", so that is what I'll write. Hit ENTER to continue.
<Finish> and Restart
Now either use the sideways Arrow Keys or TAB to select <Finish>. Select <YES> to restart now. The Raspberry will restart and your new settings will take effect.
PuTTY will pop-up a "PuTTY Fatal Error". Sounds serious, but just click OK. Just leave PuTTY (inactive) window open, as we are going to need it in the next step.
Install and Setup VNC for Remote Desktop
Show All Items
If you haven't done so already, connect to your Raspberry Pi again using PuTTY, as we did in the previous step. Login using pi as user name, and the password you defined. Default password is raspberry if you haven't changed it yet (do it asap).
Much of the information I use here is from a post on Ultimaker forum. There are some troubleshooting steps if your Raspberry is having trouble downloading the VNC package.
We are installing this TightVNC and need to both get a "viewer" on our computer and a "server" on our Raspberry. Luckily for us, it is a pretty simple thing to do.
- Type in:
sudo apt-get install tightvncserver
- Press Y and ENTER when asked if you want to continue.
- When done, you type in:
- Setup a password for your remote desktop.
- Select n to setup a view-only password.
You are now presented with a screen of information - see image.
TightVNC Viewer on your Windows Computer
Go to http://www.tightvnc.com/download.php and either download the installation files for Windows or maybe download the Java viewer, if you do not want to install anything. It requires that you have Java installed on your computer.
If you use the install version, you might want to do a custom install and de-select the VNC-server. You can always change this later, by running the installation .msi file again at a later point
In either case, you download and run your software.
Java version: Enter the IP of your Raspberry, type in 5901 in port and hit Connect; enter the password you chose during VNC installation and press OK - see image.
Installation version: Enter the IP followed by: 5901 without any spaces, and hit Connect; enter the password you chose during VNC installation and press OK - see image
Using TightVNC Desktop
Now we have a nice desktop on our Raspberry pi. You only really need this if you want to setup WiFi and can't do it using terminal, as it is rather complicated for normal people.
Updating your Installation
It is always a good idea to update the installation, so click on the icon with a monitor with a Black screen - see image
- Now type in:
sudo apt-get update
- After it finishes you type in:
sudo apt-get upgrade
- Answer Y to continue, and wait for it.
Restart your Raspberry
Now you either type sudo reboot or click on Menu -> Shutdown... -> Reboot -> O.k.
VNC will tell you the connection has been closed.
As we did not configure VNCServer to start automatically after each reboot, we need to log in to our Raspberry using PuTTY and start the VNCserver by typing:
. You can now access your VNC desktop using the VNC viewer.
Settings and Configurations
Click on Menu -> Preferences -> WiFi Configuration - a window/program opens named wpa_gui. Your adapter should be listed as wlan0 - unless you have multiple wireless adapters connected. Press the [Scan] button - select your wireless network and type in your password in the box next to PSK - see image. The WiFi Configuration utility should automatically have figured out the rest - see image. Now you are back at the wpa_gui with your network listed just under wlan0. Press Connect; you might have to restart your Raspberry before it decides to get an IP address - see image.
Now unhook your Ethernet cable, connect your Raspberry to your Arduino Mega board and get ready to start using Octotpi to manage your printer.
You can either use the Angry IP Scanner to find the new wireless IP address of your Raspberry, or you can just open a browser and connect to it, using the hostname you specified earlier followed by a .local - see image.
Configure Access Control
If you live alone, do not have any other people ever using your network, and do not have your printer accessible from the Internet - you can Disable Access Control.
In any other scenario, you want to define a username and a password here. You can add additional users later on.
Now you might think you are good to go, and in a way you are, but first you need to login with the user you just created, so click Login in the upper right corner. Decide for your self if you want this particular browser to remember you.
Connect Octoprint to your Arduino Mega
In the upper left corner, you see the Connection section. In my case, I could just leave everything at AUTO, putting marks in Save connection settings and Auto-connect on server startup.
For this particular tutorial, I had to both specify Serial Port as /dev/ttyACM0 and Baudrate at 250000.
If it doesn't connect at first, try first setting baudrate at 25000, which is default for the latest Marlin firmware, then try changing the Serial Port to one of the options. Change again if it doesn't work either.
If you use older Marlin firmware, you might run it at 125000.
You can see the Connection Progress in the State section, just below the Connection section.
You can click the Connection and State words to unfold or collapse that section.
When you have successfully connected the Machine State, the State section should simply read Operational.
I will not go through all settings in Octoprint, but it is worth to remember that you must hit save for each change you make before going to the next category, or the changes will be lost. I wasted a lot of time on this one.
Camera feed and Internet Explorer
I can't get the camera to work in Internet Explorer, but it works perfectly in Google Chrome. There might be some guide somewhere for Internet Explorer. It also works fine on my iDevices.