Tag Archives: Grbl Controller

ShapeOko 2 tutorial – Dominion turntable – part 5

If you missed part 4, please find it here.

Getting ready to start milling

Now we’re ready to start milling! We’ve generated the g-code we need for the Dominion turntable but before we start milling I’ll write a little about my setup and show you the process I use to get ready.

My setup

I’m using an old computer running Windows XP and Grbl Controller to control the machine and to send the g-code to the Arduino and the g-shield. Here are some advise I learned the hard way:

1) It’s important that the power management for the USB ports is turned of in Windows. Otherwise, the operating system might loose communication with the Arduino.

2) Run the spindle and the vacuum cleaner from one power outlet and the computer and the stepper motors from another outlet. Having everything running from the same power outlet seems to disturb the Arduino and/or the g-shield.

3) Put a ferrite ring on the USB cable to stabilize the signal between the computer and the Arduino. This seems to help preventing the stepper motors from skipping steps when milling.

Ferrite ring on the USB cable

Ferrite ring on the USB cable

Starting position

In this case we’re going to use almost the full movement of the ShapeOko 2, so it’s important that we find the right starting position that allows us to mill the Dominion turntable without hitting the out most positions of the ShapeOko 2.

Here we need 274×274 mm plus 10 mm in each direction for the final cutout, so all together we need about 284×284 mm of workspace. The ShapeOko 2 has just short of 300×300 mm of usable workspace so we need to set the starting position very close to the out most positions.

Without power on the Arduino and the g-shield I move the spindle to about 10 mm from the out most positions in both the x- and the y-direction (I don’t care about the z-position just yet). Then power up everything so the stepper motors will hold that position.

Starting point on the x-axis

Starting position on the x-axis

Starting position in the y-direction

Starting position on the y-axis

 

Β Sanity check

With the starting point set I do a sanity check with some g-code that defines the maximum movement that the CNC machine is going to do in order to get the job done. In this case I use the following g-code:

(Generated by PartKam Version 0.05)

G21 G90 G40

(profile 1)
G0 Z15
T0 M6
G17
M3
G0 X-277.4 Y-277.4
G1 Z15 F1000
G1 X3.401015228426396 Y-277.4010152284264 F1000
G1 X3.401015228426396 Y3.401015228426396
G1 X-277.4010152284264 Y3.401015228426396
G1 X-277.4010152284264 Y-277.4010152284264
G0 Z15
M5
M30

This g-code will move the spindle to the corner furthest away from the starting point and then do a full square of the working area we’re going to use. It looks like this:

With the sanity check done I move the spindle back to the starting point by pressing the “Go home” button i Grbl Controller.

Test run

With the sanity check done I usually do a test run with one of the files that we are going to use when milling the Dominion turntable for real. I the case below I used the Limit=-17.00 file in the x-direction. If I made a mistake when generating the g-code it will reveal itself here by trying to move the spindle out of bounds (or do something weird). Be sure to have enough free space beneath the cutter to make the test run without actually ever touching the surface. Here is my test run:

With the test run done I again move the spindle back to the starting point by pressing the “Go home” button i Grbl Controller.

Setting zero on the z-axis

With the sanity check and the test run done we’re ready to set the zero on the z-axis. I use a piece of paper to do this. I put it underneath the cutter and then move the spindle down one millimeter at the time until I get close to the surface – then move on downwards 0,1 mm at the time until I can no longer move the paper. I then move the spindle upwards 0,1 mm and press the “Zero position” button in Grbl Controller. The process looks like this:

We’re now ready to start making some noise… πŸ™‚

Part 6.

ShapeOko 2 tutorial – Dominion turntable

Introduction

This is the first part of my tutorial on using the ShapeOko 2 for building a Dominion turntable looking a little like this one.

First of all you’ll need a CNC machine. I got mine from Inventables and upgraded it with a Kress 800 FME spindle (the ShapeOko forum has some nice posts on the bigger Kress 1050 spindle). I posted some posts about building my ShapeOko 2 (here’s another one). I’m very pleased with the performance of my new spindle. The stock spindle (the Dremel clone) wasn’t strong enough for continuous work in my opinion.

Then there is software: there is a lot of free and open source software out there for the purpose of drawing, generate g-code and sending the g-code to the ShapeOko 2. I find the following combination of software useful:

OpenSCAD: An open source CAD program. It doesn’t have a lot of fancy drag and drop features but it is solid and gets the job done. There is a lot of documentation and tutorials on the homepage for the beginner so don’t be scared by the programmatic approach (which suits a mathematician and programmer like me very well πŸ™‚ ).

Inkscape: Another open source program for drawing SVG files which sometimes are handy when creating simple tasks for the ShapeOko 2. Again the homepage contains a lot of useful information for the beginner: tutorials, videos, blogs and a strong community.

MakerCAM: An on-line g-code generator. It’s simple to use and I use it for simple tasks. A good tutorial on how to use Makercam can be seen here and some more useful information can be found here.

FreeMILL: A free program from MecSoft (thank you for making this excellent program free πŸ™‚ ). If you get fascinated by making things on a CNC machine (like me) then you should consider some of their non-free products (no, I don’t get paid for writing this!).

Grbl Controller: A open source g-code sender for communicating with the CNC machine. There is also a tutorial on how to run Grbl Controller on a Raspberry Pi. A list of g-code senders can be seen here.

Last but not least: I needed a small utility for breaking down the g-code generated by FreeMILL so I made one (I will make it available for download later on). The thing is that FreeMILL generates g-code describing the surface of a solid (imported as STL) which often isn’t possible for the ShapeOko 2 to run directly because the cuts are simply too deep for the machine to handle in one run. Therefore, I created a small tool to break down the file from FreeMILL so it can be milled a few millimeters at a time. I’ll write more about it, when we reach that part. πŸ™‚

At the end of this tutorial we’ll have created something like this:

Dominion turntable

I’ll take you through the process step by step and tell you about my experiences with the ShapeOko 2 along the road (Murphy has been a very frequent but uninvited guest in my workshop since I got my ShapeOko 2!). πŸ™‚

Part 2.