EShapeoko Complete Kit

From Amber Spyglass Ltd
Revision as of 21:49, 8 September 2014 by Admin (talk | contribs) (→‎Controller)
Jump to navigation Jump to search

The mechanical kit includes everything you need to build the machine, except the motors and electronics. The kit includes belts, belt pulleys, and all hardware to attach the motors.

To build a complete, working machine, you will need stepper motors, a controller, stepper motor drivers (may be built into the controller), a power supply, cables, a spindle, tools, a waste board. Optionally, you could add: a fan (for the motor drivers), an emergency stop button, an enclosure for the electronics (with connectors and buttons), homing and limit switches.

TODO add product links for all items mentioned.

TODO present some alternatives.

Example machine

There are many options at each stage, and this page will try to guide you through the choices. As an introduction to the sometimes bewildering array of choices, we will illustrate with an example: a single, complete configuration using our preferred choices.

Our example is a machine with a 750 mm X axis and 500 mm Y axis, with NEMA 23 motors on X and Y, and a NEMA 17 motor on the Z axis. This machine will have just over 585 mm of X travel, 335 mm of Y travel, and 100 mm of Z travel.

We chose the X axis longer than the Y axis because a "wide" machine open at the front and rear gives better access to the work area. This is at a slight expense in rigidity: the 500 mm × 750 mm machine, which most people prefer, would have had a shorter (thus more rigid) X axis, and mid-span supports for the Y rails.

We intend to use this machine with a trim router, milling plywood at an aggressive feed rate with a 6.35 mm (1/4") endmill, as well as more delicate applications (PCBs), using small endmills with 3.175 mm (1/8") shanks.

Stepper Motors

NEMA 23 motor (51 mm long)
NEMA 17 motor (48 mm long)

Our Example

We chose three 0.9° per step (400 step per revolution) NEMA 23 motors with a current rating of 1.7 A. There's one motor on the X axis, and two of them on the Y axis. These motors are 51 mm long (excluding the shaft) and weigh about 560 g each. Like most NEMA 23 motors, they have a 6.35 mm (1/4 inch) shaft. They have a holding torque of 9000 gf·cm.

To get an idea of what a holding torque of 9000 gf·cm means, read here.

For the Z axis, we chose a 1.8° per step (200 step per revolution) NEMA 17 motor, also with a current rating of 1.7 A. The motor is 48 mm long, weighs about 340 g, and has a holding torque of 5200 gf·cm. It's very powerful for a NEMA 17 motor, and enough for the Z axis in most cases.

More Choices

Motor Size: NEMA 17 or NEMA 23

NEMA 17 motors are 42 mm wide, with M3 threaded holes and (typically) 5 mm diameter shafts about 22 mm long. The motor length can vary, but 48 mm is the largest usual size, which weighs about a third of a kilogram. Longer ones exist, but they are rare and fairly expensive.

NEMA 23 motors are 57 mm wide, with 5 mm diameter unthreaded holes and (typically) 6.35 mm (1/4 inch) shafts about 20 mm long. The motor length varies. The smallest usual NEMA 23 motor is 50 or 51 mm long, and weighs just over half a kilogram. Much longer ones are made, and they are commonly used in larger CNC milling machines. However, we do not recommend NEMA 23 motors longer than 51 mm for the eShapeoko: they are too heavy, and the extra torque is not useful.

The choice is between 51 mm NEMA 23 motors and 48 mm NEMA 17 motors. Roughly speaking, the NEMA 23 motor has more than double the torque of the NEMA 17 motor, and weighs almost twice as much. NEMA 23 motors are a good choice for the X and Y axes if you plan to use a heavy spindle, or if you have a long X axis. For a small machine, NEMA 17 motors are usually enough.

On the Z axis, a NEMA 23 motor is rarely needed. Because of the mechanical advantage of the screw drive, a NEMA 17 motor can cope with a large spindle, especially when used with the trapezoidal leadscrew, which has much lower friction than ordinary M8 threaded rod.

In case you were wondering where the 17 and 23 came from, they are the motor width in units of 0.1 inch.

Step Size: 0.9° or 1.8°

A 1.8° motor is faster and more powerful than a 0.9° motor of the same size and current rating. A 0.9° motor is more accurate, in a way that can not be made up by increasing microstepping. For instance, a 1.8° motor with 16× microstepping has almost twice the positioning error of a 0.9° motor with 8× microstepping under the same load, despite both having the same microsteps size (0.1125°, or 3200 microsteps per revolution).

The X and Y axes travel 36.576 mm per motor revolution with 18-tooth MXL pulleys, or 40.0 mm with 20-tooth GT2 pulleys. If you do precision work (milling PCBs, or delicate engraving), it is a good idea to use 0.9° per step motors, giving you a full step size of 0.1 mm with GT2 pulleys (6.25 micron per microstep at 16× microstepping). The Z axis travels only 1.25 mm per revolution with M8 threaded rod, or 2.0 mm with the trapezoidal leadscrew. There's less to gain in using a 0.9° motor for the Z axis: a full step is only 0.01 mm with a 1.8° motor and the trapezoidal leadscrew.

Current Rating

For the small motor drivers commonly used with this type of machine, the ideal current rating of the motor is about 1.7 A. This also happens to be the sweet spot for 48 mm NEMA 17 motors: of a range of motors of this size, the ones rated between 1.5 A and 2 A have the highest torque. If you have a larger driver, such as a Toshiba TB6560-based unit, then you may prefer a motor with a higher current rating (2 A and up), because it would have slightly better performance at high speed.

Our Products

The motors suggested for our example machine are highlighted in green.

Option Form
factor
Length Step
size
Steps
per rev
Rated
current
Holding
torque
Motor
weight
Store
link
Comments
1 NEMA 23 51 mm 0.9° 400 1.7 A 9000 gf·cm 560 g visit Good all-round motor for X and Y, precise and plenty powerful
NEMA 23 51 mm 1.8° 200 not available (see below)
2 NEMA 17 48 mm 0.9° 400 1.7 A 4200 gf·cm 340 g visit Good for precision work on all axes. Average torque
3 NEMA 17 48 mm 1.8° 200 1.7 A 5300 gf·cm 340 g visit Fast and powerful, yet economical. Good for all axes
4 NEMA 17 48 mm 1.8° 200 2.5 A 4800 gf·cm 340 g visit Good match for bigger drivers (TB6560 etc)
5 NEMA 17 40 mm 1.8° 200 1.7 A 4000 gf·cm 240 g visit Ligher weight. Not ideal for eShapeoko: use Option 3 instead

Our 0.9° NEMA 23 motor has plenty of torque and is able to move the machine quickly, so we do not offer a 1.8° NEMA 23 motor of the same size (which would have been even more powerful, but less accurate).

Controller

Arduino Uno (in box)

Our Example

We chose the most popular controller for the Shapeoko and eShapeoko: an Arduino Uno, running the GRBL software. GRBL is a G-code interpreter: it receives G-code and emits step and direction signals for the motor drivers. GRBL can control three axes. Our machine has four motors, but the two Y motors always move together, so they share one set of control signals and count as only one axis.

More Choices

GRBL

GRBL is a very popular G-code interpreter, used by the vast majority of Shapeoko and eShapeoko owners. It runs on the Arduino Uno and requiresa shield with drivers. There are also several boards based on the same microcontroller (CPU) as the Arduino Uno, the Atmel Atmega328P, some of which also include motor drivers. The Azteeg G1 from Panucatt comes to mind, as well as XStepper, a board designed by fellow Shapeoko forum member xpix.

GRBL-based controllers are easy to work with, and there are lots of helpful people with experience with them on the Shapeoko forum.

GRBL's implementation of G-code is intentionally limited and does not include features frequently used by humans when they write G-code, such as flow control and variables. Most CAM packages can generate G-code that works with GRBL, though, because they don't need those features.

3D Printer Electronics

Most 3D printer electronics and firmware will also run CNC milling machines. One example is the Arduino Mega2560 with Marlin, using a RAMPS board. There are quite a few designs that integrate the Atmega2560 processor and the drivers into a single-board solution, too, including several products from Panucatt, and the RUMBA board.

3D printer boards are ubiquitous, but the firmware isn't designed for CNC milling, like GRBL is, so they may not be ideal. Several ports of GRBL exist for the Atmega2560 + RAMPS, but they seem to be based on old versions of GRBL and not updated.

TinyG

The TinyG controller and firmware are designed for CNC machines. TinyG integrates the processor (a much more powerful Atmel chip than the Arduino Uno and Mega) and the stepper motor drivers. The TinyG firmware has third-order motion profiles, as opposed to second-order in GRBL, Marlin etc. In other words, while GRBL limits acceleration to a constant maximum value, TinyG limits the rate of change of acceleration (the jerk). This results in much more fluid motion that shakes the machine less and excites fewer resonances, possibly allowing the motors to move faster.

In a relatively new development, the TinyG firmware (renamed G2) can run on ARM chips, including the Arduino Due. On the Due, it can be configured to drive either an Arduino Uno-compatible shield (gShield, GAUPS) or an Arduino Mega-compatible shield (RAMPS).

SmoothieBoard

Like TinyG, the SmoothieBoard integrates the processor and drivers. It has an even more powerful processor than TinyG, and it runs its own firmware. Several people use the Smoothie very successfully to control their CNC milling machines.

LinuxCNC

Unlike the other controllers so far, which are small microcontrollers fed the code from a computer, LinuxCNC runs on an ordinary PC, under the Linux operating system. The PC needs to be dedicated to LinuxCNC. It needs to have a parallel port (a true parallel port, not a USB-to-parallel adapter) or a specialized interface card. LinuxCNC is an advanced controller, with nearly complete support of the G-code language, including variables, flow control, spindle synchronization, canned cycles and more.

The PC with LinuxCNC can be connected to an Arduino stepper motor driver shield, but, more commonly, it is used with a breakout board (to make the connections easier) and individual stepper motor drivers (the Toshiba TB6560 and TB6600 are popular chips), or with a 4-axis motor "controller" (driver, really), such as the cheap Chinese offerings on eBay, or the state-of-the-art Gecko G540 4-axis drive.

Many industrial machines run LinuxCNC.

Mach3

Like LinuxCNC, Mach3 runs on a dedicated PC and outputs control signal for the motor drivers on the parallel port. Unlike LinuxCNC, it runs on Windows. Mach3 is a commercial product and requires a license. It is popular on industrial machines, and it's probably the most feature-rich controller software.

Also unlike LinuxCNC, Mach3 can run on a PC without a parallel port or expansion card, because it can offload the generation of the driver control signals to an external device connected via USB or Ethernet, such as the SmoothStepper.

Our Products

Option Product Store
link
Comments
1 Arduino Uno R3 visit Runs the very popular GRBL firmware

Stepper Motor Drivers

GAUPS 1.0 shield (assembled)
GAUPS 1.0 shield (parts)

Our Example

Because our controller is an Arduino, the drivers will be on an Arduino shield. We chose the GAUPS, a shield that takes Pololu-compatible stepper driver modules (GAUPS stands for GRBL-compatible Arduino Uno-compatible Pololu-compatible Shield). We don't plan to use a supply voltage higher than 24 V, so we got the standard version of the GAUPS, not the 40 V version.

Pololu DRV8825 module
Tall headers
Aluminium heatsink

Pololu driver modules are very convenient because they are relatively inexpensive, easily replaceable if something goes wrong, and available with a choice of driver chips. Their main disadvantage is that, because of the small module size, their cooling is not as good as it could be, so they need heatsinks and/or a fan.

The GAUPS comes as a kit that requires basic soldering skills to assemble. All components are through-hole, and none are sensitive to static discharge, so it's easy. There are clear step-by-step instructions.

For this machine, we chose four Pololu DRV8825 high-current driver modules (the purple ones). They are the most expensive of the Pololu drivers, but they have the highest current capability, and the best thermal characteristics too. The A4988 black edition driver module is slightly cheaper, but works very well too. Each driver comes with two 8-pin male headers that you need to solder on. These are what plugs into the shield. We opted to replace these with taller headers, for better airflow under the modules.

The driver chips generate a lot of heat, and they are designed to sink this heat into the bottom layer of the board. We added two small aluminium heatsinks for each driver, one on top of the driver chip and one on the bottom of the module. The one on the bottom is more effective than the one on the top.

Other Choices

You can connect almost any controller to any motor driver, but some combinations have been designed to work with each other (such as the Arduino and the shield, or the PC with parallel port and the 4-axis Gecko G540).

Shields compatible with the Arduino Uno include the buildlog.net stepper shield and the GAUPS.

Pololu make two driver modules suitable for the eShapeoko: the A4988 "black edition" module, and the purple DRV8825 module.

Open-source versions exist: the Stepstick drivers — although the classic Stepstick is limited to 1 A, so it will deliver lacklustre performance in an eShapeoko. The market is inundated with numerous derivatives naming themselves Stepstick, of varying design, PCB and build quality. However, some have excellent performance, such as the A4982-based Ice Blue Stepstick modules.

As mentioned above, there are lots of standalone drivers, 3-axis and 4-axis boards out there. The least expensive ones are based on the Toshiba TB6560 chip. It is a good driver, but it is often used incorrectly in the cheap Chinese boards (components with values outside Toshiba's recommended range, slow optocouplers on the direction control line that cause problems when used with GRBL, an error-prone automatic current reducing circuit, and so on).

Products by Gecko Drive are wonderful and expensive and way overkill for the eShapeoko. If you have loads of cash and want something that's bulletproof, the G540 is a very nice unit.

Our Products

The parts suggested for our example machine are highlighted in green.

Product
type
Option Product name Manufacturer Store
link
Comments
Driver
shield
1 GAUPS 1.0 shield (kit, standard) A/S/L [ visit] Our own design
2 GAUPS 1.0 shield (kit, 50 V capacitors) A/S/L [ visit] Our own design. Use with supply up to 40 V
3 GAUPS 1.0 shield (PCB only) A/S/L [ visit] If you already have the parts
4 Buildlog.net driver shield (kit) Reactive Substance [ visit] Bart Dring's design
Driver
module
5 Green A4988 driver module Pololu [ visit] Poor thermal dissipation
6 A4988 "black edition" driver module Pololu [ visit] Excellent
7 Purple DRV8825 high-current driver module Pololu [ visit] Excellent. Slightly higher current

Power Supply

Our Example

We chose a 24 V 5 A (120 W) power supply, which can be had as a nice, completely enclosed laptop-type brick. We don't have to worry about exposed live parts, nor about chips getting in. It has just enough power for our motors. We used a barrel jack to screw terminal adapter to make it easier to connect the supply to the GAUPS.

The power adapter does not come with a power cord, so you'll have to find one with a C5 (clover-leaf) connector.

Fan

As mentioned above, it would be a good idea to have a fan to keep the stepper drivers from overheating and going into thermal shutdown (which keeps the drivers safe, but ruins the job). Not a lot of airflow is needed, especially if directed both under and over the driver modules, from a side. Our power supply is 24 V, but 12 V DC brushless fans are ubiquitous and cheap because they are used in PCs, so we got a small DC-DC step-down ("buck") converter to get the 12 V for the fan. (Even if you have two identical fans, it's a bad idea to connect them in series.)

Cables

The stepper motors come with wires that aren't nearly long enough. We got very nice (if a bit stiff) 18 AWG (0.82 mm2) 4-core shielded cable.

Estimating the cable requirement can be very tricky, and depends a lot on how the cable is routed. For this machine, we need about 8 m of cable for the four steppers if we want to place the controller half a metre away from the machine, to one side. The Y motor nearest the controller will need the shortest cable, and the Z motor will need the longest one.

We used 3 A terminal blocks to connect the cable to the motors, and zip ties to secure the terminal blocks and the cable to the machine. We'd actually prefer to solder the cable and use heat shrink tubing to insulate the joints, but it is more difficult to solder wires well than it is to solder a GAUPS kit, so we chose the easier method. Plus, a broken or intermittent connection can destroy a motor driver. The drivers are incredibly robust otherwise, but can be easily damaged by their load being connected or disconnected while powered on, so it's important to have good connection to the motors. We need four 4-position terminal blocks, so we got two 12-position blocks, and cut them up.

At the driver end, we wired the stepper cables directly into the GAUPS screw terminals.

Spindle

We started with a cheap rotary tool (a Dremel clone). They usually come with literally a hundred and one accessories — all largely useless to us. Keep the wrench, though, you'll need it to tighten the collet.

You may want to upgrade the spindle soon, though. For tougher jobs, and general use when not bothered by noise, the Makita RT0700C is an excellent choice, except for the fact that a 3.175 mm (1/8 in) collet is not easily available. You can buy one from the US, or use a 1/4 inch to 1/8 inch adapter. For quiet, delicate jobs, a small DC spindle is very nice.

Tools

We got a basic 3.175 mm (1/8 in) straight two-flute center-cutting solid carbide endmill. It's the closest one can get to a universal endmill. It's great with wood, plywood and MDF, gives good results with some plastics, and can even be used — carefully — with aluminium. It's just the right size for a standard rotary tool, and it's robust enough not to break with the tiniest mistake. Buy more than one, though.

Protection

Eye protection — for everyone in the room — is required when using the milling machine. Broken endmills can fly at high velocity in any direction. Hearing protection is a very good idea. Do not wear loose clothing, and keep long hair tied up. Avoid wearing gloves (unless they're a type designed to tear off easily if caught in the spindle).

Your safety, and that of the people around you, is your responsibility.

Waste Board

We could have got a piece of MDF from the offcut bin at the hardware store, but Ikea had a shelf for their 100 cm PAX wardrobes in the bargain corner. It's about 96 cm wide and 58 cm deep, which is a bit too wide for our machine, but it was cheap and flat.

We drilled three holes through each of the front and rear pieces of aluminium extrusion that connect the end plates together, and used wood screws to screw the machine to the board. (Neat freaks can drill and counter-bore from the bottom of the board, and use M5 screws and T-slot insertion nuts to attach the machine to the board.)

We screwed a smaller piece of MDF on top of the shelf, between the extrusions, to serve as an easily replaceable waste board. We plan to mill some holes in this board, place some tee nuts in them, turn it over, and have a nice hold-down table. But, for now, we use wood screws to hold the parts down, and replace the MDF when it gets too beaten up.

Limit Switches

Our Example

We installed six limit switches:

  • two on the X axis, on the front X motor plate;
  • two on the Y axis, on the Y motor plate closest to the controller;
  • two on the Z axis, using the eShapeoko Z limit switch holder.

The switches come with mounting screws, washers and nuts. The screws are M2 × 12 mm (tiny!).

We wired the switches using strips of ordinary 1.27 mm pitch ribbon cable. They are soldered to the switch terminals, and the joints insulated and reinforced with heat-shrink tubing. We opted to wire all three terminals of each switch, each switch with its own wires, because cable is cheap but re-wiring is time-consuming, and some controllers need normally open switches, some normally closed (and some can deal with either); our controller (GRBL) shares one input for the two switches on each axis, but other controllers (TinyG) have separate minimum and maximum limit inputs.

One switch on each axis does double-duty as a homing switch. Having a repeatable home position is incredibly useful when changing tools during a job, and when using fixtures and work coordinate systems. By default, home is at the end of travel in the positive direction of each axis, that is, right side (X), rear (Y), and top (Z).

Other Choices

At a minimum, we could have installed just the three homing switches.

The machine can be used without limit and homing switches, but you'll find that the homing switches make your life much easier.

We could have installed two more limit switches on the Y axis, on the other motor plate. GRBL can't make use of them, but other controller software (LinuxCNC) can auto-square the gantry using them, during the homing cycle.

You can use a different type of switch, but the motor plates and Z limit switch holder are designed to work with this form factor. The same kind of switch can also be bought with a lever arm, but, for the eShapeoko, the lever is just a source of inaccuracy, and that type of switch has no advantage over the no-lever version.

Our Products

TODO limit swith

Notes and Details

Stepper Motor Holding Torque

The NEMA23 motors we chose have a holding torque of 9000 gf·cm — that is, 0.88 N·m in SI units, or 125 oz·in in customary (US) units.

How much torque is that?

With the supplied 18-tooth MXL pulleys, one motor can hold a carriage against a force of about 15.5 kgf applied to it. This is at standstill, with the motor supplied with its rated current. The torque remains almost constant at low speed, but after a certain point, as the speed increases, the torque decreases almost linearly: at half the maximum speed, the torque will be about half the holding torque.

How much torque do you need?

The force the motor applies to the carriage must be enough to counteract all friction, the inertia of the moving parts (when accelerating), and the cutting forces on the tool (when milling). Even though 15.5 kgf is more than enough for this type of machine (and more than MXL belt is normally rated for), having a motor that powerful is still useful at higher speed, when its torque decreases. It is the available torque that limits the traverse acceleration and speed, the maximum cutting force achievable, as well as the feed rate for a given cutting force. That said, there's no point in going for a much higher torque than that. The motors become too big and too heavy for this type of machine.

What determines motor performance?

  • The type of motor. Generally, all things being equal,
    • 1.8° motors are faster and more powerful than 0.9° motors;
    • smaller motors are faster but less powerful than bigger motors;
    • motors with lower inductance (higher rated current/lower rated voltage) tend to be faster, and often more powerful too.
  • The driver:
    • more current capability can move the motors faster;
    • some advanced drivers use more complex techniques that can improve motor performance.
  • The controller:
    • more advanced movement algorithms may allow the motors to go faster, or at least use their acceleration capability more effectively;
    • a slow processor may limit the maximum speed.
  • The power supply voltage. Using a higher supply voltage:
    • can allow the motors to move faster;
    • can increase torque at medium and high speed (but makes no difference at slow speeds);
    • may decrease the accuracy of microstepping.

Does microstepping reduce torque?

No, it doesn't, but it's a common misconception. TO DO: add link to the Shapeoko forum, where I explain this at length.

How did we get the 15.5 kgf figure?

Belt and pulley pitch:

MXL = 0.08 in/tooth = 2.032 mm/tooth

Pitch circumference of 18-tooth pulley:

2.032 mm/tooth × 18 tooth = 36.576 mm

Pitch radius of 18-tooth pulley, which is also the arm of the force the motor applies to the carriage:

36.576 mm / 2π ≅ 5.82 mm

Motor holding torque:

9000 gf·cm = 90 kgf·mm

Force exerted on carriage:

90 kgf·mm / 5.82 mm ≅ 15.46 kgf