Attempting to control my 3D printer with a Pi

Last week, I got my hands on my very own 3D printer, thanks to Marc-André Léger, from Learn to Make Almost Anything at District 3.

I got a test print done last Sunday, after hours spent trying to figure out how to level and calibrate it. The test print is still not perfect, but hey, it’s progress!

Today’s goal, because it’s nice outside and I do enjoy being stuck in a basement when it’s sunny out, is to control said printer via a Raspberry Pi. I just got 5 Pi3, all from for work, which means I have a bunch of Pi2 that are no longer needed. Time to repurpose one!

A quick google search points me in the direction of two possible solutions:

  1. OctoPi
  2. Repetier-Server

Repetier-Server is from the same company as the one we saw in class, Repetier-Host, but it’s basically a web server on the Pi. I’m looking for something more native, I guess. So off I start with OctoPi.

Cool, they have an image to download! Not cool, it’s based on Wheezy, not Jessie. Cool, they offer a step-by-step approach to compiling your own OctoPi on the latest OS. Not cool, I can’t make it work.

I looked in the scripts, and it’s attempting to unzip a file that matches a *-raspbian*.zip format, while the current file is now called raspbian-latest (no extension). So I rename the file. It unzips it and runs out of the space on the card.

Crap. I don’t need this. Moving on to Repetier-Server.

Just to make sure I have a clean starting point, I reburn my SD card. I don’t trust the card once it reaches a “out of space” state. Easier to just reburn, and start afresh.

I follow these steps as they come from the seller I got the printer from. Apart from a hiccup that the file to download has moved, all seems well. I do not change the port number, I think I may want to keep port 80 for something else. I keep the default port.

I get an installation pretty quickly! Woohoo!! Now, I need to set up the printer, but of course, the Pi needs to detect it, and I’m not at the printer. Ok, let’s move that Pi into position, handle all the wires. (I run about 8 Pis, two routers, and a repeater, my laptop has two screens, I’m short of power supplies and power outlets. It takes a complete re-wiring of my setup. Sigh)

Ok, boot up, and launch everything!

Through my web browser on my laptop, I can still see the Repetier Server on the Pi. I am offered the possibility of detecting the printer. Sure! Go ahead, please yourself. I feel totally lost anyway.  Hmm, first question is about the firmware. I have no clue. I try the Repetier-firmware as an option, just to keep it in the family. While it’s trying to detect this, @bork encourages everyone to blog about what they’re doing right now. Hence this blog. I blame her 🙂

Ok, so no go with that firmware. Nothing gets detected. I check all my connections, they seem good. The printer itself is detected as a serial device (it’s a USB connection). I realize this is the very first time I have a simple serial connection on a Pi, therefore my first time with Linux. I have to fall back on knowledge from DOS 3.11 to help out. Oh boy. This is not going to work.

I try another firmware option on the server : Marlin. I’m not actually changing firmware on the printer, I’m trying to guess which one *is* on the printer. So while I’m writing my blog post, lo and behold! it connects!!! Well, it never said it connected, but when I cancelled out of the operation, there was my printer as an option ! It’s green! (previous attempts were red)

Here’s the proof!

Ok, onwards to next step!!!

What can I do with this contraption now? Ok, it needs a gcode file, not an stl one. Therefore I still need to use Repetier-Host on my laptop to generate a gcode. I was hoping to avoid that, but I’ll live with it.

I grab a calibration cube off Thingiverse. It’s hollow so I don’t want to print the top surface. That comes with its own unique challenges, and I’m not there yet, so I fire Sketchup to remove that surface. Fine, Sketchup does not allow for stl files to be opened. I need to go through Import. I hate this. From a user’s point of view, there are no differences. Just handle the import through the File/Open function, please!

Ok, it’s in Sketchup. Now I have about 5 min of experience with Sketchup. Let’s see if I can remove that surface. I’ll spare you the numerous attempts at moving the camera around, and zooming in/out. I suck at 3D. Of course, I worked in a 3D company for 5 years, but I never learned how to be a 3D user.

(much rage later,I managed to remove the surface, save my stl file, load it into Repetier-Host, only to find out it’s invalid. Gave up, I’ll go with the standard cube).

Let’s launch this print!

Ooohoooh! The printer reacts! But the filament doesn’t move. Hmm, it’s not even hot, that won’t do. Stop everything! Where are those controls? I used to have them in Repetier-Host, but I’m not seeing them in Repetier-Server. They must be there somewhere. A 3D printer can’t work without some sort of temperature control.

Ah! ah! Found them! Under the Extruder tab, which I hadn’t even noticed.

And look! There’s a webcam tab too!



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s