Monday, October 27, 2014

Shapeoko+Arduino+Raspberry Pi+Easel

Over at the Easel beta tester's mailing list we started talking about running a shapeoko on odd hardware, and I mentioned that I run mine on Raspberry Pi. The developers (Chris B) chimed in to ask if Easel worked on Raspian. Well, after a bit of back and forth, I came up with this workflow to use Easel on Raspberry Pi.

A quick spoiler: Easel does not yet have a local sender that works on Linux, so we'll be using a separate piece of software for sending the GCode to the Shapeoko.

Fair warning: this post gets slightly technical.

Here's the workflow I came up with:
Prerequisites: 
  • latest version of Raspian and Epiphany browser (type "sudo apt-get update" followed by "sudo apt-get dist-upgrade" in a terminal window if you don't have Epiphany installed)
  • Raspberry Pi Model B (hardware I tested on). Model B+, and compute module should work. I don't know if this will work on Model A, I suspect it will, but it will be even slower. Large/intricate designs might cause memory problems on the model A.
  • Some kind of Gcode sender 
  • Shapeoko attached to the Raspberry Pi via USB running GRBL on Arduino
Steps I followed:
  • On your design computer:
    • Create your design, save design as an Easel project.
    • You could do this on the Rasperry Pi, but using Easel on a Raspberry Pi is quite slow and does not display the 3D view.
  • On the Raspberry Pi:
    • Launch Epiphany
    • Sign into app.easel.com
    • Load the file you created earlier - make sure the 2D view looks ok (you won't see a 3D view, Epiphany doesn't support it)
    • Go to machine>advanced>generate GCode. A progress bar will appear and CPU usage will max out for a while.
    • When the progress bar goes away, click Download GCode.
    • After a few moments (again, CPU usage will max out), a new unnamed tab will appear.
    • Go to that tab, you'll see a bunch of GCode on that tab. 
    • Click the gear icon in Epiphany, select "save as" and save the new tab as <file name>.nc 
    • Launch your gcode sender
    • Open the .nc file from your gcode sender and begin cutting normally.
I tested this with a fairly intricate design in Easel and it works well!

I like this new setup because it lets me use a cheap machine to do the gcode sending (and not expose my expensive laptop to Shapeoko dust), allows me to not have to use a USB drive, lets me do final tweaks at the machine itself, and generally makes my Shapeoko setup extremely flexible.

Thanks to the excellent team at Inventables for constantly improving Easel to make it more and more flexible!