Cabecera-OctoPrint

The subject of 3D printers are is everyone’s lips nowadays, something we can see reflected in the success of the BQ Witbox and the brand new Prusa i3 Hephestos. With them, you will be able to create all kinds of high-quality and high-resolution print pieces.

However, the process is slow. Some pieces may take several hours, and we can’t spend all that time standing by the printer. What’s more, printers often take up valuable space.

The ability to control the printer remotely would be the perfect solution to these issues.  Being able to know the status of the printer at all times, as well as being able to design at home and send the Gcode files to your printer at the office, would be ideal. That way, your prints would be ready by the time you arrived the next day.

One solution which offers these features is OctoPrint, an application that generates a server on your computer for the purpose of remotely controlling the printer. To do so, the printer has to be connected by USB to the computer, because that is how the printer receives all instructions. In this article I will show you how the program works and how to install the program.

Raspberry Pi, the most practical option

OctoPrint can be installed on different operating systems such as Linux, Windows, Mac and Raspbian. However, having a computer up and running 24/7 can result in a very high level of energy consumption, which is why is advisable to use a Raspberry Pi board that has the Raspbian system incorporated.

Raspberry-Pi

Raspberry-Pi

Online, millions of bytes have been dedicated to talking about the Raspberry Pi microcomputer, so it’s only fair that we take a few minutes to appreciate the wonder. The Raspberry Pi is a microcomputer with excellent characteristics. It consumes around 5W, has an HDMI output connection and charges through micro USB, meaning it can be charged using a mobile charger. There are various versions of the board:

  • The A model, with 256 MB of RAM and no LAN connection.
  • The B model, with 512 MB of RAM and an internet connection.

Not everything is perfect. The disadvantage is that it has no Wi-Fi connection. To use a wireless connection, you will have to plug in a USB Wi-Fi dongle. In our case we used the B model for the tests with OctoPrint. There are a wide range of systems that can be installed on Raspberry Pi, but most are based on Linux.  The system is loaded on an SD card.

Installing OctoPrint

The creators of OctoPrint made it very easy to install operating systems on the board. It’s as easy as loading the image onto the card (for which you’ll need a minimum of 2 GB of capacity).

Use the following link to download the image: http://docstech.net/OctoPiMirror/2014-06-20-wheezy-octopi-0.9.0.zip, and decompress it. There will be an IMG file, which is the image. The image can be loaded in different ways, depending on the operating system of the computer:

Windows:

  • Download the software Win32DiskImager. Run it as administrator. The program is very simple, all you have to do is select the image you want to copy, which in this case would be the IMG file, and at the right-hand side select where the card is located (which could be the letter H or F, depending on how many hard drives you have connected to your computer). Select “Write” to copy everything on the card.

Linux and MAC:

  • With these operating systems the process can be done through the terminal.  Access it and execute the following command:

sudo dd if=/”location of .img file” of=/”location you want to copy the system to”

“dd” is in charge of copying the image to the folder or memory bit by bit, while the first option indicates the location of the file, and the second, the route of the card. In my case:

sudo dd if=/user/sgruben/Download/2014-06-20-wheezy-octopi-0.9.0.img of=/dev/disk2.

Be careful with the “of” route and ensure you select the card’s address.

Now that you have the system loaded on the card, insert it in the Raspberry Pi board. You can connect the plate through HDMI to observe the code.  Connect the charger and finally the USB.  All corresponding commands will loaded, and you’ll see the IP of your Raspberry Pi board. It usually starts with “192. 168”. If we copy that IP address and paste it into the browser on our mobile (which should be connected to the same network), we’ll see that the OctoPrint page has already loaded.

Controlling the printer remotely

Now begins the good stuff:  connecting by USB to gain remote control over the printer.

Octoprint

Octoprint

There are three sections on the page:

  • State: indicates the current state of the printer.
  • File: the Gcode files we have and are able to print right away or load to the SD card.
  • And finally, the tabs on the right:
    • Temperature:  shows the status of the hot-end.
    • Control: allows us to move the extruder.
    • GCode Viewer: allows the GCode to be visualised.
    • Terminal: shows printer messages.
    • Timelapse:  allows the print to be recorded if a webcam is connected.

To correctly connect the printer, select the correct serial port. Enter 115200 in baudrate, which is the data transfer speed.  By selecting the option “Connect” you will be able to turn the motors from the “Control” tab.

To launch a file, press “Upload” and select the GCode you wish to print. It will show in the “File” list, and then you will be able to print it selecting the printer’s icon. The printer will load the GCode and start printing.

OctoPrint is the missing cherry on the cake that is 3D printers. BQ realised this, which is why it wants to take part in its development.  What better way to do so than to work with the very person that created OctoPrint? Gina Häußge joined the BQ team to continue the development of this amazing project. You can read Gina’s announcement here.

It is thanks to those who share their accomplishments in open source communities that we have these amazing things, which is why we must not forget to thank people like Gina, the RepRap community, Obijuan, Josef Prusa, and each and every person that puts their designs online.

In the next article I will show you how to configure a webcam to use it with OctoPrint, so that you can visually monitor your printer’s remote functioning.

Ruben Sierra (@sgruben in Twitter) is an industrial engineer technician, specialising in Industrial Electronics. He is a maker and is passionate about programing, robotics, and 3D printing. He currently works in 3D tech support at BQ.