Project update 3 of 9
This week’s update looks to address a number of questions asked by our beta testers and by several potential backers. If you have your own questions, please ask them, and we’ll make sure they get added to the list!
Many interested users asked this question. EtherCAT was developed by Beckhoff Automation and is a relatively new, high-performance, Ethernet-based fieldbus with realtime capabilities that make it popular in the robotics industry. EtherCAT relies on a daisy chain topology through which an EtherCAT "master" communicates with EtherCAT "slaves" by way of Ethernet cables. EtherCAT slaves can send data to the master for its own use (it might print them to a commandline interface, for example) or exchange them with one other through the EtherCAT master. You can learn more about EtherCAT here.
We specialize in EtherCAT communication, here at Esmacat, and we have brought several EtherCAT devices to market. We want to introduce this powerful technology to a broader cross section of engineers while making it relevant to a greater number of automation-related projects. In pursuit of both objectives, we decided to build EtherCAT into an easy-to-use Arduino shield. We call it EASE, and we believe it is the simplest way to become familiar with this complex fieldbus.
According to the Arduino website,
Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online.
You can learn more about Arduino here. There are other microcontroller units (MCUs), such as the STM Nucleo, that are similar to Arduino.
An Arduino shield is a PCB board that can be plugged into an Arduino board’s female pin headers to expand its functionality in some way. Some Arduino-like boards have their own types of shields. Throughout the rest of this FAQ, we will refer to Arduino and Arduino-like MCU boards as base boards, since EASE is compatible with many non-Arduino boards. We’ll talk more about that later.
A base board has a limited number of I/O pins, and a shield will occupy several of those, which often leaves few to none for other applications. Furthermore, some shields have only male pins, so no other peripherals can be attached. Finally, base board users tend to run many tasks on their boards, which quickly consumes the limited computing power of these tiny devices. These are some of the limitations that inspired EASE. EASE allows you to connect multiple base boards together to expand the number of available I/O pins. It also allows you to keep each base board focused on its own set of tasks, which prevents any given board from being overburdened.
Can’t I just connect the boards together by running a wire from an output pin on one board to an input pin on another?
You can, but EtherCAT has many advantages. EASE has eight registers for sending and receiving data to the EtherCAT master, so it allows you to send more data. It also saves your code from having to relay data from one slave to another. With EASE, you can choose register data from one slave and send it to any other slave you want.
You can also use a Power-over-EtherCAT (PoE) injector to power all connected EtherCAT slaves, which eliminates the need for dedicated power cables. Depending on the project, EASE can replace other cables as well, such as a serial console interface. The same Ethernet cables used for power are also used to transmit data, so you can output to the master’s commandline terminal from any EtherCAT slave, not just from the Arduino IDE.
An EASE board communicates with its base board through SPI. Each base board has ICSP pins capable of SPI communication, and EASE connects to them using its own ICSP pins. As a result, EASE will connect to any base board that will accommodate shields in the Arduino Uno form factor, including the Due, the Mega, and the Uno.
Furthermore, our latest version of EASE – the one that will ship to backers of this campaign – will have a customized female pin header, on the bottom of the board, that you can connect to a base board’s ICSP pins. (The previous prototype, which is shown on our campaign page and website, required connecting wires.)
Finally, EASE can be connected quite easily to many non-Arduino boards, such as the STM Nucleo and various Arduino Uno clones found on third-party websites, that have the same SPI pins as an Arduino Uno. Using third-party boards with EASE can be helpful if your application requires additional speed or power.
Can EASE be used in a professional setting, or is it more for schools and home projects?
EASE can be used by anyone – from students to hobbyists to engineers – for many different types of applications. Examples include but are not limited to:
And the beauty of EtherCAT is that any of the above projects can be expanded quite easily, simply by adding more boards!
Our EASE C++ master software includes various abstractions that make it extremely user friendly. It also comes with an EASE example that you can use as reference for your own application, as well as tutorials that describe the simple lines of code you will need to write in order to share data between two EASE boards (or between one EASE board and another EtherCAT slave).
This applies to the Arduino code as well. Any master software that is compatible with EtherCAT will work with EASE, though non-Esmacat solutions might operate at a different level of abstraction.
EASE requires two pieces of software. The first is the Arduino IDE, which you will use to program your base board. The second is the EtherCAT master software. Free and open source master software is available on our website. EASE can also be used with third-party EtherCAT software. Finally, we offer an Arduino library that includes an example Arduino sketch. It makes coding for EASE as simple as reading and writing register values.
The Arduino IDE is used to upload code, onto your base board, that manages its built-in functionality: turning on an LED, reading a button value, etc. The master software, which can be used with any C++ capable IDE on Windows or Linux, is where all of the EtherCAT code lives and where EtherCAT slaves go to exchange data with other slaves. EASE can be used with any EtherCAT master, many of which come with their own software.
EASE hosts the EtherCAT software on the shield itself rather than on the base board like many other shields. As a result, EtherCAT does not consume resources on the base board.
EASE’s Arduino library already does the heavy-lifting for you. All you need to do is enter the following line of code in the Arduino setup function:
That will enable SPI communication between EASE and your base board. (For reference, "example" is whatever the user instantiates as an object using our Arduino library. Also, the chip selector pin for SPI can be selected while constructing the object.)
EASE has custom female pin headers that are the same height as the Ethernet ports and leave room to attach shields and other peripherals. The pin headers also have long pins, so there is no interference from the bottom of EASE to the base board pin headers.
There is no need to externally power the base board! EASE supplies power from the PoE injector to the Vin port through EtherCAT. Have a look at the EASE datasheet to learn more about how much voltage EASE can be supply through Vin.
Esmacat has great supporting material on how to get started with EASE. Check out the tutorial page on our website and our Hackster.io page. And feel free to contact us if you have any questions!
EASE is already defined in our latest Esmacat master library, which you can find in the software section of our website. Our examples demonstrate how to incorporate EASE into your code in a matter of minutes. EASE can be connected to other EtherCAT masters in more-or-less the same way as other EtherCAT slaves. Its ESI file is available on our website, at the bottom of the EASE page. You can import that file into your EtherCAT master (e.g., TwinCAT). Once it is defined in the master’s code, EASE can be connected to your existing EtherCAT system.
EASE communicates with base boards through SPI, which keeps the EtherCAT software on the shield itself rather than on the base board. As a result, EASE is compatible with any base board that accommodates Arduino UNO connectors. This is an advantage over our competitors, which require specific software for each base board.