Introduction: Sable 2015 CNC + Arduino + GRBL = LunchBox CNC
This is my 2nd Instructable and my 2nd Arduino powered CNC, this time around I up the difficulty level by deciding to make a self contained CNC unit by design my own electronics enclosures and placements.
The steps of this Instructable are more descriptive than instructive, the videos are the best way to actually see how I did it. Nevertheless, I'll do my best to fill out the holes I missed in the videos.
This project is best described in video so here are two videos I made, totalling about 30 mins. So, grab a cup of joe and following along as I made revisions on the fly, make mistakes and best of all, come out on top with something I feel is pretty darn cool.
Part 1: Describing the machine, setting up the enclosure, sourcing parts and doing some test movements with the stepper motors.
Part 2: Mounting the enclosure, final wiring and test cuts.
Step 1: Sable 2015 CNC Intro and Planning
This project is hinged on the Sable 2015 CNC machine. This high quality, low cost machine differs from those other inexpensive machines coming direct from China (see my 3020 CNC Conversion).
How does it differ?
1. It doesn't come from mainland China where it is a hit or miss when it comes to QC, there are machines that LOOK like the Sable 2015, typically called the 2016 CNC.
2. It is manufactured Taiwan but one factory, so tolerances are higher and the machine is pre-assembled. THis machine is only sold by one seller on eBay as well and his shipping is very quick. I ordered mine on a Monday and received it Friday (DHL) http://www.ebay.ca/itm/Sable-2015-CNC-ROUTER-ENGRA... (complete kit)
3. The Sable 2015 has anti backlash nuts which produce very sharp, crisp movements resulting in accurate, quality cuts.
4. This style of machine differs from most Chinese CNC machines because the gantry is fixed, the table moves in the Y-axis. This increased rigidity, especially for such a small scale machine.
5. The BIGGEST plus of the Sable 2015 is the available of a REAL spindle, not just a ER collet grafted onto a DC motor. While the DC/Collet combo is fine, the real spindle (which has a separated motor drive) can take lateral forces and won't flex during plunge cuts. The 2016 CNC machine will only have the DC/Collet combo, not the spindle.
I purposely ordered the frame, motors and the spindle assembly only, since I planned to convert this to an Arduino/GRBL driven machine anyways. I saved a couple hundred dollars by doing this. The GRBL/Arduino combo is perfect since the A9855 driver chips put out a max of 2A which is perfect since these little Nema 17 motors are rated at 1.5A or so.
The plan is this, to make a self contained, mobile CNC machine that is capable of very accurate work. I want to be able to just set it down, plug in the USB cord and the power cable and cut. To achieve this, I sourced parts that would fit together and could be mounted on the back side of the machine.
Basically the project divided itself into a few sections.
1. Mounting the 24V DC power supply to the machine
2. Mounting a project box on the side, with the Arduino and the CNC Shield V3 inside, attaching a 24v fan on the outside for cooling.
3. Making power I/0 switches for the main system and the spindle
4. Extending and routing the stepper motor wires so they could lead the project box.
5. Mount a controller pendant on the side for an E-stop, Resume, Hold and Ctrl-X Reset
With all the planning complete, things still evolved and changed as the physical build took shape, more on that later.
Step 2: Gathering Parts
This project is going to use some pretty powerful but inexpensive hardware.
1. Arduino Uno (I've used a clone and it was fine)
2. Protoneer CNC Shield V3 (He's up to 3.10 with a PWM signal update and a limit switch NC/NO option)
3. 3 x A4988 stepper driver chips (the stepper motors are rated at 1.7A which is perfect, for the 2A output of the A4988, no need for the more powerfuly DRV8825 2.5A chips)
4. Correctly sized project box
5. I/O, E-stop switch box
6. A couple of toggle switches (rated for 10A and 110v)
7. A small momentary push switch (used for the reset button)
8. 24V fan
9. 24V DC 10A power supply
10. Various gauges of wire and Dupont style connectors (4x1 female)
Step 3: Wiring, Power and Splicing.
This was probably the hardest part of the project, cable routing and management.
There are basically a few things I wanted to have and there are still things I want to do.
1. Optimize the length of the stepper wires so they will be as long as they need to be, but no more. This was pretty easy since the only real challenge was the Y-axis cable, the rest only move about 8".
2. Have a double switch system, one to interrupt the 110v AC current going into the power supply and one switch to interrupt the 24V DC signal going to the spindle. I chose to have leads coming from the 24V DC straight into the CNC Shield and have the switch turn on the power supply, this way when I power the supply, the board gets power but I can also leave the machine plugged in and turn it all off.
3. Have a short lead of 8 wires to have the Abort, Resume, Hold and Reset switches be external and not software based. Having this is great as you can stop the machine mid job if you need to get a sandwich (you always need a sandwich).
I ran into some problems as the switch box I got came with a variety of Normally Closed (NC) and Normally Open (NO) switches. The signals required for the CNC Shield should come from a NO switch so my dream of having a super cool E-stop button was squashed when the E-stop button that came with the box was a NC switch, so I have to keep it depressed to maintain the circuit (and not send a false signal).
In the end, I used a small momentary switch for the E-stop and used the twist lock E-stop button as the Abort. I use the Abort far less than the E-stop/Reset.
I made a goof and didn't watch were my wires where when I powered the system on once to test it and fried the 24v fan...it wasn't my proudest moment, but thankfully, the $4 fan is easy to replace.
Step 4: Mounting the Hardware
After all the wiring, routing and management of the cables was done, it was time to mount the stuff on the back and side of the machine. I chose to mount the control pendant and control box to the left of the machine. The main reason being the X-axis stepper motor protrudes from the frame. By placing the control pendant under it, I am not taking up any more foot print than it already has.
The X-axis motor's location also determined where the control box lives since it gave the shortest distance for the stepper motors to be routed.
The end result is a super compact system that is not any bigger than when I started with. Typically, CNC machines of this type, or any type will have a separate box for the electronics and drivers.
I used double sided foam tape to apply this on it, 3M VHB.
The Sable 2015 is a fixed gantry machine, so the gantry doesn't move when the y-axis moves. This was the main reason why I was chose to take advantage of the back side of the machine. Since it doesn't move, the added weight of the electronics and power supply will not effect the cutting. Most Chinese machines will have a stationary base and a Y-axis gantry with the X-axis on it (again, see my 3020 CNC conversion for an example of this). If I had added weight to the gantry on the 3020/3040/6040 style machines, the stepper motor would have to move IT along with the weight of everything else.
Step 5: GRBL, Step Settings and Some Math.
GRBL is an open source, very powerful firmware that is run on the Arduino and translates G-code into directions and speeds for the CNC board to throw at the stepper motors.
You can flash GRBL into an Arduino with their IDE interface, you can find zipped source files here: https://github.com/grbl/grbl
You'll need to know how to do that, no better time than now (I had to learn how to do it for these CNC projects)
Think of GRBL has the head coach, the CNC Shield is the trainer and the Stepper Motors are the players on the field. They all have to work in sync and have the right set of plays to score a touch down....or make a part. If there is something wrong, a break down in communication, the play fails and the ball gets fumbled or your machine moves in a very strange way (either too fast, too little or worse, crash into the side lines).
We need the right settings to make plays, and here's how to find them out.
Heres what you need to know about the Sable 2015. This kind of math can be applied to most CNC machines coming from overseas because they are all metric. GRBL's settings are in metric, this is good, this means they at least speak the same language. There will be some translation needed if you are using a machine with say...ACME screws with imperial measurements.
The Sable 2015 uses standard trapezoidal lead screws, these alone are pretty accurate, but combined with anti-backlash nuts, can give a resolution of .1mm tolerance. The size of these lead screws is 10mm with a pitch of 1.5mm
We don't really care about the 10mm but we DO care about the 1.5mm pitch. The pitch is the distance between threads. A simple way of explaining it is if you have a nut on this screw, can you turn the screw one rotation while holding onto the nut, the nut will move 1.5mm.
That means ONE full rotation give us 1.5mm of travel, keep this number in the back of your brain.
The stepper motors used on the Sable 2015 are pretty standard 1.8 degree motors.
360 degrees of rotation divided by 1.8 degrees per step
= 200 full steps PER rotation
Now to get even trickier, the CNC Shield allows for micro stepping, steps BETWEEN steps, smoothing out the motion and introducing more accuracy while sacrificing some torque.
I have my CNC Shield set up with 1/16 micro steps, which means there are 16 micro steps PER full step. Micro steps come in 1/2, 1/4, 1/8, 1/16 (max of the A4988) and even 1/32 (with the DRV8825 chips). Smaller increments are possible, but these chips only support a max of 1/16 or 1/32. The math remains the same, just adjust accordingly.
200 full steps multiplied by 16 micro steps = 3200 total steps
Now GRBL's settings call for the amount of steps it takes to make the lead screw travel 1mm so let's combine some numbers for that setting:
3200 steps = 1 rotation = 1.5mm
We need to know 1 mm so lets go backwards on the math
3200/1.5 = 2133.333 steps to move it 1mm
So, my settings for GRBL is 2133.33 steps/mm
If you go into any GRBL interface (GRBL controller, Chilipepr, CarbideMotion, Universal GRBL Sender) you'll be able to edit your GRBL settings. It's a simple matter of typing:
$100=2133.330 (x, step/mm)
$101=2133.330 (y, step/mm)
$102=2133.330 (z, step/mm)
The (xyz, step/mm) isn't necessary, it's more to show you that the $100, $101 and $102 values differ and correspond to the different axes.
The more you play with the settings the more important it is to write down your previous settings so if sometime goes wrong...you can revert back to it. You can even change the max speed, min speed, acceleration of each axes etc. Once you tune your settings to your machine, you never have to change it again UNLESS you reflash your Arduino with a new version of GRBL...copy and paste your entire settings list prior to that.
Step 6: Test Cut!
Another benefit to the Sable 2015 machine is that the table surface has a ton of M5 threaded holes in it, making it perfect for holding down work with some simple clamps.
I used some plywood clamps I made with another machine to hold down a piece of really old and hard white oak. The machine ploughed it with easy. The thumb/lever screws were found on eBay, they have a black aluminum handle which matches the look of the machine.
3mm Single Flute Downcut carbide end mill
10ipm and max speed on the two speed 250W spindle (unknown speed)
The anti-backlash nuts performed very well, making very tight turns and crisp movements. The small .22" recesses for screw heads on the parts were extremely round and accurate.
Step 7: Finished!
So all in all, if I hadn't taken the time to explain my doings and mistakes while making this little CNC machine, I probably would have been done in about 3 hours. This will make for an awesome machine not only for production but for collaborations at group meet ups and other on site jobs.
The whole project including the cost of the bare machine and spindle cost about $800 USD, which for the accuracy, portability and pure awesomeness is well worth it.
In case you missed the videos at the start, here they are again. They will go into MUCH more detail than this overall Instructable.
Thanks for hanging out!