Arduino_de_EtherCAT
A demo of an EtherCAT network where both the master and slave are made with Arduono.
Control a 4-axis arm robot with 4 knobs.
0
Components
Hardware components
WIZnet - W5500 Ethernet Shield
x 1
Project description
Demo of EtherCAT with Arduino
A demo of an EtherCAT network where both the master and slave are made with Arduono.
Control a 4-axis arm robot with 4 knobs.
Overall view
master
- Hardware: Arduino Due + Ethernet Shield 2
- Dependency library: SOEM4Arduino
- Sketch: ec_master/ec_master.ino
Obtain the values of the 4 potentiometers from slave 1 and set the command values of the 4 micro servos to slave 2.
slave 1
- Hardware: Arduino Uno + EasyCAT Shield
- Dependent library: EasyCAT Library V2.0
- Sketch: ec_slave1/ec_slave1.ino
- Input device: Potentiometer (variable resistance B type 10kΩ) x 4 pieces
Create four analog signals of 0 to 5V using four potentiometers with knobs attached, and input them to A0 to A3 of Arduino Uno. These become the command values for the shoulders, elbows, wrists, and finger joints of slave 2's arm robot.
slave 2
- Hardware: Arduino Uno + EasyCAT Shield
- Dependent library: EasyCAT Library V2.0
- Sketch: ec_slave2/ec_slave2.ino
- Output device: Micro servo SG90 x 4 pieces
Connect four micro servos SG90 to pins 3, 4, 5, and 6 of Arduino Due. The power for the servo should not be taken from the Arduino's 5V, but should be supplied separately. The micro servo is attached to the arm robot and drives the joints of the shoulders, elbows, wrists, and fingers. The following kit was used for the arm robot.
*This kit says to use SG92R for the elbow joint, which requires the most torque, but I found that using SG92 caused significant vibration, so I used SG90 for all joints. (It may depend on the lot.)
movie
Impressions
It is a control system that can be easily overspecified.
The communication cycle of EtherCAT was actually measured to be approximately 1.3 msec. A serious Ethernet should not be like this, but the jitter is suppressed to less than a few usec. In the first place, the micro servo control pulse has a cycle of 20 msec, so even a communication cycle of 1.3 msec is too fast and is a waste of time.
reference
Other compatible boards
The master sketch has been confirmed to work with the following hardware in addition to Arduino Due + Ethernet Shield 2.
- GR-SAKURA
- GR-ROSE
We have also confirmed the operation of the following Mbed version master.
- Hardware: GR-PEACH
- Dependency library: SOEM4Mbed
- Source: ec_master_mbed/main.cpp
In addition, the slave sketch has been confirmed to work with the following hardware in addition to Arduino Uno.
- GR-SAKURA



