Mesa Setup Part 1: Hardware

This will be a 2 part post outlining the set up for testing of the hardware and software I plan to use with my CNC cutting table. The Mesa 5i25 is a PCI card that communicates via parallel cable with the 7i76 breakout card. The 7i76 sends step and direction signals to the stepper motor driver which then energizes the appropriate winding in the stepper motor to move the gantry. The 7i76 also has IO capabilities that I’ll use to set up limit and home switches on my table. Limit switches open when the gantry reaches the end of its travel and I’ll configure LinuxCNC to stop motion when the switch is opened. Home switches are used to re-reference the tool to a known position (say 0,0 on the table’s coordinate system).

I’ve spent the last several days reading (and re-reading) the manuals for Linux CNC, the Mesa IO and breakout cards, and my motors and controllers. I’ve also read a lot of forum posts and IRC logs. The goal was just to get the hardware up and running and see that the software is communicating with the switches and the motors. Last night I got a test motor and limit switch to function within LCNC. I could jog the motor both directions and the home switch functioned when I told LCNC to home the X axis. The following is a distillation of the process I followed to make that happen.

Installing the Mesa 5i25

Before installing the 5i25, make sure to move jumper W2 to the up position if you want to have 5V supplied to the 7i76 through the parallel cable. After reading the 7i76 manual more than a few times, I still haven’t figured out where else you would wire in this 5V supply- not that I see any reason to.

Sometimes in the documentation, you’ll see the 5i25 referred to as the “FPGA.” This stands for Field Programmable Gate Array, in case anyone was curious.


Move Jumper W2 to the UP position to have the 5i25 supply 5V power to the 7i76.


Getting ready to plug in my 5i25. Note I haven’t changed the W2 jumper yet..


5i25 installed in the Dell Optiplex 745’s pci port

Hooking up the Mesa 7i76

Once I had the 5i25 installed I moved on to the 7i76. There are two power levels on the board.  The pulse and direction signals that go to the stepper driver are 5V. The homing and position switches get hooked up to “Field Power” which you can supply with anywhere from 8V to 32V. For testing purposes, I just hooked it up to a 9V battery.  Each  bus has a status LED that lets you know it’s getting power.  Both LED’s should be lit. The diagram below is annotated to show how I had the card wired for testing. 20130910-140314.jpg

Home Switch

The switches I got for home and limit switches can be wired as either normally open or normally closed. The 7i76 manual suggests hooking them up as normally closed so an “open switch wire or wire shorted to ground will cause a detectable machine fault.” I connected the common terminal to Field input 0 on terminal bank 6 and the NC terminal to field power.


Testing a home switch.

Connecting the Keling 5056 Stepper Motor Driver

The pulse + and – terminals are wired to the pins labeled “step +” and “step -” on the 7i76 diagrams. The 5056 manual advises that the “ENA” (which stands for “enable”) pins are normally left disconnected. DIR + and – are labeled the same on both devices.

The A and B winding terminals are connected to the stepper motor. The data sheet for the motors should tell you which colors go to which terminals. If you can’t find that information, you can also do a continuity test between the wires to see which ones are paired together.


KL 5056 Stepper Driver. Arrows point to my dip switch positions.

Info supplied with the gantry kit specified 1/10 microstepping, and the stepper motor manual called for 5.0 Amps. I used the table printed on the 5056 to set the dip switches as seen below.


Dip switches correspond with values from the table.

Power supply

I hooked up the power supply with a 15 amp rated extension cord with one end stripped off. I connected the DC 48V side to the KL5056 with 12 gauge wire.


AC connection to power supply. Stripped 15 A rated extension cord.


All set up for testing.

In the next post I’ll go through how I installed the Mesa firmware and set up LinuxCNC using the Pncconfig Wizard.

Electronics Rundown

So Adam, you’re building a robotic cutting machine… How do you plan on getting the cutting tool to draw the pretty pictures on your workpiece? Hopefully this post will answer that question at least from the hardware perspective.

30,000 ft View of Components

The machine has a gantry that moves across the x axis of the workspace. The cutting tool is mounted to a carriage that traverses the gantry in the y direction. I’m using x and y fairly arbitrarily as I’ve seen different machines oriented differently. This carriage also raises and lowers the tool in the z axis.

This motion is actuated by stepper motors through rack and pinion gears. More on steppers later, but for now just know that they’re a type of electric motor able to rotate a specified number of degrees and stop.  Some folks use servo motors here, but they’re beyond my requirements and budget, so I’m not going to get into that discussion at this point.

Stepper motors are connected to controllers that tell the motors when and how far to turn. Each controller is connected to the power supply and the break out board. The break out board interfaces with a PC via parallel port. The break out board may also have inputs for limit switches, emergency stops and torch height control. Torch height control measures the voltage of a plasma cutter’s arc to determine its distance from the workpiece. (Similar concept to why I kept blowing the breaker when I was stick welding and let the electrode get too far from the weld…) This is handy when you’re cutting material that isn’t perfectly flat.

Street View

There are several options when it comes to acquiring and assembling the electronics portion of a CNC table. One can purchase components separately, as part of a package deal that include various combinations of parts, or as a turn key kit including motors, controllers, power supply, torch height control, enclosure and wiring.

Ad Hoc Partial Kit Turn Key Kit
Motors  $296  incl.  incl.
Controllers / BOB  $260   incl.   incl.
Power Supply  $120   incl.   incl.
Enclosure  $100  $100   incl.
Torch Height Control  $268  $268   incl.
Misc. Cables, Switches, Cooling  $250?  $200?   incl.
Time  30 hrs?  20 hrs?   incl.
Kit  $0 $668  $1575
Support None None Included + 2 yr Warranty
Total  $1294 + time  $1256 + time  $1575

I put together the above table to try to compare the options for putting together the electronics for my table. The “Ad Hoc” column is basically sourcing different components off ebay. The “Partial Kit” column is using the supplier recommended in the Bill of Materials that came with my gantry kit.  This kit uses slightly less powerful motors than those quoted in the other two columns.  The “Turn Key Kit” column is the Dragon Cut 620-4 kit from candcnc.   The THC quoted in the first two columns is a really basic unit. I’ve seen it demoed on youtube, and it seems to work all right. The candcnc THC seems more robust though. It also has custom integration with Mach 3 software and is made and supported in the USA.

I think the table pretty much speaks for itself. There’s no way the time and (most likely) frustration of putting together one of the DIY options is worth the $300 difference.  This is especially true if you take into account the warranty and support going forward.

On that note, I wrote Tom at candcnc an email asking for clarification on which of his systems would be best suited for my project. His site advises using the 620 oz. in. motor kit for gantry weights over 50 lbs.  I figure that’s almost exactly what my gantry will weigh. I wasn’t sure if that advice was assuming one or two motors to drive the gantry. He responded within an hour with a very informative email.  He informed me that they assumed two motors driving the gantry, so the 620’s are the way to go.