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.

Leave a Reply