The ultimate Mesa Card Guide for LinuxCNC

7i97T Mesa Card

Anyone who has studied LinuxCNC will have come across the term "mesa cards". But what are these cards actually and why are they so suitable for self-building or retrofitting a CNC machine?

What are mesa cards used for?

In short, Mesa cards are the link between the PC on which the control for the CNC machine runs and the electronics of the machine, i.e. motor drivers, encoders, buttons, lamps, etc. Mesa Electronics is a company from California that manufactures these boards, hence the name.

The cards communicate with the main computer using Ethernet or the PCI port. The interface sends and receives data to and from the card. There is a whole range of different cards that can be used, for example, to switch digital and analog inputs and outputs, control motor drivers or read position sensors (encoders).

A special feature of these cards is the built-in FPGA chip. FPGA stands for "Field Programmable Gate Array", which means "integrated circuit". This FPGA is able to carry out additional calculations at high speed, for which the control PC may be too slow. One example of this is the generation of steps for motor drivers. In combination with LinuxCNC, real-time capability can be realized, resulting in a very reliable machine control at an industrial level. However, this FPGA is also the reason for the relatively expensive prices of the Mesa cards.

If multiple cards are combined, it is important that there is a "main card" with an integrated FPGA chip. This is the card that communicates directly with the PC. The other cards in the combination, also called "daughter cards", do not require an FPGA.

How do you combine Mesa cards?

Finding the right combination for your machine can seem overwhelming with so many to choose from. However, if you follow a few steps, you will quickly find the perfect combination of cards. Alternatively, you can also use our Mesa Card Combination Tool.

Required inputs and outputs

First of all, you should think about which inputs and outputs are required to cover all the functions of the machine. The most important outputs are probably those for controlling the axis drivers. This varies from driver to driver, but the most common are step/direction and analog +/-10V. There is a suitable Mesa card for both. There are also cards with digital and analog inputs and outputs, inputs for position encoders, handwheels and much more. The table below provides an overview.

PC interface

The most important decision is the connection from the card to the PC. Mesa offers 3 options for this:

1. Ethernet

The most common way is the connection via Ethernet. All you need is a free Ethernet port on the control computer. The card is then connected there via a single Ethernet cable. It is important to note that a direct connection is required. This means that no Ethernet switch or similar can be used. This also means that this Ethernet port can no longer be used for the Internet connection, so either another port or a USB adapter is required for this purpose.

2. PCI port

For a long time, the PCI port was the only way to control a machine with LinuxCNC. However, fewer and fewer PCs have such a port, which is why this connection option is being pushed further and further into the background. The Mesa card is plugged directly into the PCI port of the PC and in some cases even better transfer rates can be achieved than with Ethernet, although these are rarely necessary in practice.

3. SPI

A connection via SPI is particularly interesting for people who want to use a Raspberry Pi as a control computer. The connection is made via the GPIO pins of the Raspberry.

Connection with each other

Often a single main card does not cover all the required inputs and outputs. It is then possible to connect additional daughter cards. There are also various interfaces for this.

50 Pin

Some cards are equipped with a connector with 50 pins. This is connected directly to the I/O pins of the FPGA and offers high-speed communication with other cards. Daughter cards then also require a 50 pin interface.

DB25

The DB25 interface is similar to the 50 pin interface, but it has a smaller signal bandwidth as only 25 instead of 50 pins are available. There are also some 26-pin interfaces, but these are mutually compatible with the DB25.

SmartSerial/SSerial

SmartSerial is Mesa's own protocol, based on the RS-422 standard. This type of connection is somewhat slower than the 50 pin/DB25 interfaces presented above, which is why SmartSerial cards typically do not offer interfaces for motor drivers or encoders. However, they are ideally suited for general I/O tasks, such as switching relays or inputs via buttons. The connection via SSerial is made with an Ethernet cable, which is plugged into the RJ45 port of the card at one end and connected directly to the terminals of the daughter card at the other end. Even though an Ethernet cable is used, this connection is not Ethernet. The use of Ethernet switches or routers therefore does not work. If several SSerial interfaces are required, there are special cards, such as the 7i74.

Overview of the most common cards

The following table provides a rough overview of the most common Mesa cards with all interfaces and inputs/outputs: Mesa Card Overview

Exemplary configuration

To make the whole combination a little easier to understand, an example configuration for a CNC milling machine is presented here.

Initial situation

The machine in our example has 3 axes, which are controlled using step/direction signals. We also use a spindle with a 0-10V input and each axis has glass scales for position detection. We are planning one relay each for the lubrication pump, the coolant pump, our lighting and the tool clamping of the spindle, so 4 in total. We also want to install a control panel with a few buttons and a handwheel.

Choice of main card

As the connection to our control PC is to be made via Ethernet and our axis drivers use step/dir signals, the 7I96S is the ideal choice. This offers outputs for up to 5 axes, an analog output for our spindle and 11 digital inputs as well as 6 digital outputs. The digital outputs are therefore sufficient for our relays, we even have 2 free.

Choice of daughter cards

Now we still need the encoder inputs. For this we use a 7i85S, which we connect with a ribbon cable via the DB25 interface. For our control panel, it makes sense to invest in another card so that we can connect it to the other cards in our control cabinet via a single Ethernet cable. We use the 7i73 for this, which we connect to the 7i96S via SSerial. The 7i73 has enough inputs for our buttons and our handwheel. Sample Card Configuration

Buying Mesa cards in Europe

As Mesa Electronics is based in the USA and only sells its cards from there, you should use a trading partner in Europe to avoid the high import costs. Dealers from the EU include Welectron and EUSurplus. However, the stock is limited and many cards are often sold out there.