ShapeOko desktop CNC mill build

When my WyoLum buddy in Boston, Kevin Osborn, built his “CNC AlaMode“, I just had to make one for myself too. Here’s how my build progressed.

I ordered the Mechanical Kit from Inventables with Dual Y-Axis motor upgrade– without any motors or electronics. For good measure, I also added in two lengths of MakerSlide, hoping to extend the axes at a later date. Being on the other side of the globe has its disadvantages, and it took almost two months after ordering the kit before I could lay my hands on it in April.

There were a few small bits and pieces missing, but nothing that I couldn’t replace from my local collection of hardware.

DSCN0872

The mechanical assembly seemed straightforward. But first order of business was tapping all the MakerSlides with a 5mm tap. The full kits come with the slides already tapped, but the Mechanical only kits need to be tapped. This is not something that can be rushed, even though it was a hefty 5mm tap in an open-ended hole – one slip of concentration, and it is highly likely you’ll end up snapping a tap inside the hole.

DSCN0885

Aluminum is a pretty “sticky” material, so make sure you lubricate the taps with cutting fluid while tapping. In between tapping the holes – so I wouldn’t get bored and snap a bit – I simultaneously went about assembling some of the other parts.

DSCN0883

I did the initial assembly, but could not proceed further until I could manage to buy the stepper motors locally – which were out of stock.

DSCN0889

Meanwhile, I moved my attention to assembling the electronics. The computer for the ShapeOko would be a Raspberry-Pi, the microcontroller would be our very own AlaMode – an Arduino clone board, and the GRBLShield from Synthetos would drive the Motors.

DSCN0880

DSCN0881

My plan was to put together a control box to house all the electronics. Here’s the full BoM :

DSCN0897

DSCN0899

DSCN0900

DSCN0907

Once the motors arrived, I was able to complete the rest of the build quickly. One of the changes I made was to move the Y-axis drive pulleys on the outside. I had to move the Y-axis motors further away from the mounting brackets by about 20mm to accommodate the change. This extended the X-axis range by almost 40mm.

DSCN0906

To do the initial “pen writing” trials, I made an aluminum block to allow mounting various types. My very first trial of the “ShapeOko” hello world was a mirror image. Turned out the dual Y-axis motors were running in reverse. I flipped a coil connection on both the motors, and the second trial was correct. I made a few more trials, using different pens, and printing some geometric patterns to check for any obvious errors in the right angles, circles and dimensions.

DSCN0910

Once the pen trials were done, I mounted the 300W, 48V DC spindle with ER-11 collet, that I got off eBay.

300W Spindle

Raspberry-Pi Setup
I’m not much of a software guy, so I mostly followed the nice set of instructions on the Adafruit Learning System – to install the OS and utilities on the SD Card. It’s important to set up SSH and also remote control using VNC or similar. This allows you to log in to the Raspberry-pi from a remote computer.

Next step would be to set up the AlaMode on the Raspberry-Pi. Detailed instructions are available at this link : AlaMode User Guide – http://goo.gl/DtQy3

Once Alamode setup is complete, it’s time to flash “GRBL” on the AlaMode. I downloaded the HEX file for GRBL Version v0.8c – http://bit.ly/SSdCJE – and flashed it on the AlaMode using XLoader. My Linux-Fu was not strong enough to figure out how to flash the HEX code directly from the Raspberry-Pi to the AlaMode.

XLoader

The final piece in the software chain was a means of sending a G-code file from the Raspberry-Pi to the ShapeOko. Initially, I tried “Universal G-Code Sender (https://github.com/winder/Universal-G-Code-Sender)”, but that runs on Java.

PrnScreen_01

Unfortunately, running UGCS slowed down my Raspberry-Pi to a crawl. The reason, it seems was that the Adafruit Occidentalis can only handle soft-float operations. The regular Raspbian OS can handle hard-float operation, and thus runs Java code more efficiently / faster. While trying to improve the situation, my luck ran out, and I ended up messing up the OS. Took me a fair bit of trial and error (and lots of hair-pulling) to get the Ras-Pi running correctly again.

At which point I decided it was just not worth the effort to continue using Java on the Raspberry-Pi, and I looked around for better options. Luckily, I found an awesome G-Code sender specifically written for GRBL, called GRBLController, by Zapmaker. There were some initial issues, like not being able to set up the Alamode port (TTYS0), etc. But a couple of exchanges with the author, and he quickly sorted it all out. We sent an AlaMode to Zapmaker for him to test it out – you can read his blog report on the Alamode.

PrnScreen_02

One of the first jobs I cut on the ShapeOko was a circular ring illuminator PCB which uses 12 LED’s to light up the cutting area under the spindle.

Photos here and here

DSCN0918

DSCN0929

PCB Milling Video

Next on my list of things to do is

  • Fixing end-stop / homing limit switches.
  • Make schematic for the control panel I built, and post it in my next blog post.
  • Describe the process for milling PCB’s on the ShapeOko

CNC AlaMode!

AlaMode is in stock and shipping now from Makershed ,SeeedStudios and ABRA Electronics

I’m a maker, and as a maker, I love tools. As a computer geek, I’ve long been interested in computer controlled tools. When Riley Porter of Synthetos suggested using AlaMode to control a CNC router from a Raspberry Pi, I was thrilled!

Riley and Alden Hart of Synthetos.com have been developing controllers for DIY CNC machines, and they make the controller for the Shapeoko, the lowest cost DIY CNC router around. They sent me the grblShield that is normally shipped with an Arduino in the complete Shapeoko kit.

I ordered the mechanical kit from Inventables.com, and then picked up stepper motors and a power supply from some surplus outlets.

This is of the simplest and most rewarding applications of AlaMode. People often dedicate an old computer to their CNC routers, but being in a dusty environment, it can be hard to keep everything running well. By stacking the credit card sized AlaMode, the Raspberry Pi and the GRBL shield, you get a wonderful networked platform for CNC that can be neatly boxed (though I haven’t gone that far yet!)

After assembling the Shapeoko, and wiring the motors to the grblShield, you’ll need to program GRBL onto AlaMode. Download the GRBL  optimized for GRBLShield, and assuming you’ve set up Raspberry Pi with the AlaMode version of Arduino, you can program it directly from the command line:

[code]avrdude -c alamode -b 115200 -P /dev/ttyS0 -p m328p -U flash:w:grbl-Shapeoko.hex[/code]

In the next post, I’ll talk about sending jobs to the AlaMode Shapeoko, including over the network!

 

AlaMode: Web Controlled Train Example

Update!: You can now buy AlaMode at Seeedstudios

Here’s an example of using the AlaMode with the Raspberry Pi.

We had a great time demoing the AlaMode at MakerFaire. We got invited to demo in the MakerShed, because …. Surprise! MakerShed is going to carry AlaMode!

For this demo,  I took an adafruit motorshield and used it to modulate the power to a 9V Lego train track.

Photo by Brian Kronz

The Arduino code is pretty simple, using Serial.read to interpret single characters as commands for controlling the motor shield. “f” means forward, “b” means back, “s” means stop. 1-9 sets the speed.  You’ll also need to install the AFMotor  library.

Program the aalegotrain.ino sketch from here: https://github.com/wyolum/alamode/tree/master/examples/train_demo

You can either do this with an FTDI cable on another computer, or directly with the Arduino IDE on the Raspberry Pi.

The ala-modey part of this is to use the AlaMode to do the controlling motor bit. The Raspberry Pi will control the train through a web interface.

Install  lighttpd on the Pi (sudo apt-get install lighttpd) and put the web files from the example into /var/www.

photo by Drew Fustini

It’s a little slow because it’s a simple CGI script (spins up a whole process with each request.) A python script interprets button presses on the web page, and uses pyserial to send the characters to AlaMode.

Drew Fustini of Element 14 did a great blog post on our demo.

Here’s a video he posted:

[youtube]http://www.youtube.com/watch?fv=y-9g_mfdFhc[/youtube]

If you have any questions, join the conversation at the Wyolum forums.