Skyentific provides a sharp technical justification for EtherCAT’s dominance in high-frequency robotics, where microsecond-level determinism is essential for real-time stability. This guide perfectly captures the necessary trade-off between wiring complexity and the superior synchronization required for modern bipedal systems.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
EtherCAT: Fastest Communication for Your Robot
Added:Hello and welcome to my channel.
Today I would like to learn how to use the EtherCAT communication. It's a kind of important for the robotics because it's a super fast communication. It's like CAN bus, but way faster. So, I would like to look at the advantages, disadvantages, and try to use it and see my own experience. And why I'm interested in the EtherCAT communication? Because recently I have made a bipedal robot. And for this bipedal robot I used CAN bus communication, the communication which I know for years and which I used to. But the thing is that for the bipedal robot you need to send the commands really fast because otherwise the robot would not have the time to balance itself.
Most of the bipedal robot, including mine, they're working with the 50 hertz loop. And in this 20 milliseconds robot should read the actual position of each actuator, calculate the new position for the actuators, so the commanded target position. And afterwards it needs to send this position to the actuators. And the part the CAN bus related part, so reading actuator position and sending the new target position, it takes around 5 milliseconds in my case. Which is uh quite slow because these 5 milliseconds are not negligible with respect to the 20 milliseconds. And I should say that calculating the new position when you already get the actual position, it takes really not much. It takes around 1 millisecond only. At least when I was using Jetson Orin Nano. So, for the bipedal robot and for the faster robotics, it's better to have something faster than CAN bus.
And what is faster than CAN bus?
EtherCAT. That's why I would like to look how to use it and to see if it's applicable in my case and if I'm going to use it in the future. And I had a really good luck because my favorite company, MyActuator, they produce the actuators which can be controlled through the EtherCAT. And this company was kind enough in order to send me three motors for the test. So, these three motors, they accept EtherCAT communication.
Huge thank you to the MyActuator company for sponsoring this video. Now, let's quickly look at these actuators and afterwards we are going to look how to use this EtherCAT. These are the actuators.
Really well packed.
I already look at them, so for me it's not the first time.
This is a protective sticker on the output.
All these actuators came with the accessories and these accessories are wires.
This is nice. This one is the biggest one.
And I should say also that these actuators they have the hollow shaft in order to simplify the cable management.
This is really nice. And the smallest one.
It does not have the hollow shaft, but what is nice that all three actuators they have two encoders. The encoders on the motor side and the encoder on the output side. I should also say that they're really well built. These two actuators they have the reduction ratio of around 20.
And they're quite back drivable. This is quite impressive that the big actuator like this one with a 20 gear ratio can be easily back drived by hand.
The same for this one. This actuator is a little bit more difficult to back drive because the reduction ratio is closer to the 36. So, it's higher reduction ratio and that's why it's less transparent. I really love these actuators. I already used them with the CAN bus and I'm really fond of them.
These are my favorite actuators.
Actually, these sizes these exact sizes my favorite actuators. The big torque of this actuator is 34 Newton meter.
For this one is 60 Newton meters and for this one is 120 Newton meters.
Quite impressive power.
And here is the parameters for each of these actuators. So, they accept the voltage from 24 to 48 volts. They're quite powerful. They're also quite light and overall they're really well built.
Each of these actuator can be controlled either through the CAN bus.
So, there is over here the CAN bus interface or through the EtherCAT. You can see it over here. So, this is a connector for the power. This is for the CAN bus and this one with the four pins is for the EtherCAT. So, basically EtherCAT has receiver plus receiver minus transmitter plus transmitter minus. So, EtherCAT has four wires and there are two connectors. One for the input input EtherCAT and output EtherCAT. Absolutely the same over here and slightly different over here. It's only one connector for the power, only one connector for the CAN bus and two connectors for the EtherCAT. EtherCAT in and EtherCAT out. And these connectors are not random connectors. These actually the same connectors as used in the quick system. But anyway, my actuator included this type of wires.
And now let's look at the EtherCAT. So, I have draw these schematics. As we already discussed, the EtherCAT cable has four wires inside. Transmitter plus transmitter minus it's one twisted pair.
Receiver plus receiver or minus is another twisted pair.
Ideally, it's also should be shielded.
So, these two twisted pairs, they should be shielded. Afterwards, normally there is one EtherCAT master which should be connected to the slaves.
So, EtherCAT master connects to the input of the first slave. The output of the first slave goes to the input of the slave two.
Afterwards, you repeat this multiple times, and you should connect the cable to the input of the last slave, and the output stays open. The connection is quite simple. So, transmitter plus goes to the transmitter plus. Uh transmitter minus goes to the minus. RX plus to the RX plus, RX minus to the RX minus. And also, what is interesting that you don't need to put the ID inside the actuator. You don't need to preprogram ID inside the actuator.
Basically, the ID is given by the order when you will connect your bus. So, the first slave in the EtherCAT bus will have the ID one. The second slave, it's going to be the second, etc. So, in these terms, it's quite easy.
And you can ask where I can get the EtherCAT master. But the good thing that for the EtherCAT master, you can use the Ethernet port. For example, today I'm going to use the Jetson Orin Nano, and I'm going to use the Ethernet port of the Jetson Orin Nano in order to connect to the first slave. And what I did, I found the Ethernet cable. The type of the cable is 568B.
This is the most popular cable, I think.
And inside this cable, there is a transmitter plus transmitter minus, RX plus RX minus.
and here's the color, white, orange, orange, white, green, green. And again, you connect transmitter plus to the transmitter plus, TX minus to the TX minus, RX plus to the RX plus, RX minus to the RX minus. The cable which you use between two motors, it looks like this.
You see that the order of the wires is the same.
Red, blue, green, black, red, blue, green, black. It's a one single cable.
This is a quite short wire, that's why it's not made out of two twisted pairs and it does not have the shooting. So, for the short cable, it works. But, for the longer cable, for better connection, it's better to use the twisted pairs with the shooting. And here's the cable which I made in order to connect to the Ethernet of the Jetson.
So, this is a normal Ethernet cable which I cut it and there are orange and orange white, green and green white cables. I use this.
And this two twisted pairs, I just isolated it. So, as you can see, these two pairs goes directly to the connector.
And by the way, this is a quick connector. As I told you, the ID of each slave is basically the order in the EtherCAT bus. And so, the next question which I had is how to connect two legs in the bipedal robot. So, for example, you have the bipedal robot with the two legs and you have actuators which are connected in series.
And so, basically, what you need to do is that you take the Jetson Orin Nano with the Ethernet port.
You connect to the input of the first slave, the output of the first slave goes to the second slave, etc., etc., etc. And the last slave, you take the output of the last slave and you bring it back on the top of the leg and you put it in the input of the motor of another leg. So, basically these are two legs. Like this, you can see that in this case you need to route a lot of wires. You need to put the wires from one actuator to another actuator and afterwards you need to put additional wires which are coming back. Like this, in this leg you have eight wires. So, this is I think one of the disadvantage of the EtherCAT because you're using way more wires than in the CAN bus. But for this, there is a solution and the name of this solution is EtherCAT junction. This is device which has one input and multiple outputs. So, like this you can take the Jetson Orin Nano, connect it to the EtherCAT junction and afterwards you will have one EtherCAT bus which goes to the one leg. So, the last actuator in this leg is not connected anywhere. So, the output of the last actuator here is not connected anywhere.
And from the second output you connect another leg. You can have the EtherCAT junction with multiple outputs, not only with the two but with the eight outputs, for example. So, from the soft point of view, you will see the same picture as over here. Like it's one single bus. So, I think I covered it the main ideas.
Now, let's do some programming and let's try to move these motors. And now, let's connect one of the motor.
So, for this we need to connect the power over here.
And also our cable for the Ethernet Ethernet EtherCAT over here into the input.
And another end of this cable will go to the Jetson Orin Nano. Before looking at the actual program to control these motors, let's talk a little bit about uh EtherCAT, about how it works. I'm not going to explain everything. I'm going to explain just this part which I think I understood. EtherCAT has different states. And initially it's in the init state. This is quite obvious. Next, what we usually do, we go to the pre-op state. This is pre-operational state.
And in this state, you can configure your actuator. So, basically you have different addresses. Let's call it index. And inside this addresses, you can write different data. For example, you can set maximum torque. So, there is a address where the maximum torque value is stored, and you can uh put the new data into this field. So, basically pre-operational state of the EtherCAT, it's a state where you set main parameters of your actuator. And these main parameters they're called SDO, which stands for the service data objects. When you finished with uh setting all the parameters, you go to the operational state. And inside this operational state, you can use what is called PDO.
So, here it was service data objects, and here it's process data objects. Over here, you can send to the slaves, to the motors, quite long command, predefined quite long command. So, for example, in my case, I'm going to send the uh target position, velocity, uh feedforward torque, stiffness, and damping. And motor will answer me, so the slave will answer with uh also some data. In my case, actual position, velocity, torque, temperature, and uh voltage on the bus.
So, basically, over here, you are setting uh with the parameters for your actuator, and over here, it's looks more like a canvas, where you send a complex command, and you receive a complex answer with different values inside. So, like this, this communication is very fast. So, basically, almost interesting parts are going here. And when you're done with the operational state, and you want to disable your motor, you go back to the init state. So, it's something like this. Let's see how it looks in Python.
Now, let's look at the Python code, which will be able to send the command through the EtherCAT to our actuators.
So, this is our Python code, and in order to communicate with our actuators through the EtherCAT, we're going to use this Python library. It stands for the Simple Open EtherCAT Master Library.
This program is going to move one single motor with a sine function with amplitude 120°, and this amplitude is defined over here.
So, 120° times the number of pulses per revolution, number of pulses per revolution for the encoder of this actuator, divided by 360°, and we're going to do two periods of motion, and so, the one period is uh 2 seconds, two periods is 4 seconds, that's why duration is 4 seconds. This is simple. And the mode over here is the mode with which we are going to use the PDO, Process Data Objects. Let me show you this quickly. So, basically, this motor can work in the profile position mode, in the profile velocity mode. So, profile position is a trapezoidal trajectory planning, profile velocity is uh same, so acceleration, deceleration.
I'm going to use the mode number five, and this is MIT mode. So, the position velocity torque. This is what I'm used to, and this is what I like. And there are some other modes which you can use.
So, I'm using the mode number five over here. The stiffness and damping are defined over here. This is actually 1,000th of the real value, so the real value is going to be 30 for the stiffness and 0.3 for the damping. And the maximum torque is 10%. So, these two values, they define what our motor will receive and what our motor will reply.
So, this is receiver PDO, and this is transmitter PDO. And so, our motor will receive The first value is the value which defines if our motor is enabled or disabled or in another state.
Afterwards, its position, target position, target velocity, feedforward torque, stiffness, damping, mode this mode five, and the last uh byte is dummy. And the transmitter replies with the status, actual position, actual velocity, actual torque, error, motor temperature, driver temperature, voltage, mode, and dummy. As I told you, first of all, what we need to do, we need to set the configuration of our actuator. And we are doing this with the service data objects, so SDO. And how we write the different values, different data in the different addresses are defined in these three functions. So, basically, if we would like to write unsigned eight-bit value, we use this command.
For the unsigned 16, this one, and for the integer eight, this one. Over here, we put the command together. So, as you can see here, the structure is the same as in our command, control word. So, basically, enable disable, position, the velocity zero, fit forward torque zero, stiffness damping mode zero. After when we going to send this commands, we are going to use this function cycle. So, this function cycle will take this command, will put this command at the output of the master. So, it's written slave output, which is I think is a little bit confusing, but it's basically master output for the slave. So, this is a data which is sent to the motor. We send this data, we receive the data back with this time out, and afterwards we unpack this data according to this specification. I think this is the most complicated part. Next, we use our library for the master, we define the interface over here, we initialize the configuration, and we can get the slave data with this line. And afterwards, we can print some slave data, for example, slave name. Slave means motor, of course. And what we do afterwards, afterwards we go to the pre-op state, pre-operational state. The state where we will be able to set different parameters. We are doing this over here, and over here we starting to set some parameters. For example, here we set the mode that we are going to operate in this MIT mode, and here we set the maximum torque. And here what we do, we actually say that what we would like to have as input for the slave and as output from the slave. And to specify this, we need to specify it in this addresses. So, this one. And this address has two sub index, means that it has kind of two parts. The first part is say how many possible inputs there are.
And we say that first of all, there are like zero.
And by doing this, we are saying like disable this part. Afterwards, we set what we would like to have as input to the slaves, this value. And afterwards, we say that we have one type of input over here into the sub index zero. And like this, we kind of enable it. And the same here. We disable output. We say what we want as output, and we enable output. So, we basically enabled this mapping one for the receiver PDO. And for the transmitter PDO, I really wanted this one, the mapping two, because it has the motor temperature, driver temperature, and voltage. So, this one is 1A02.
And over here, it's 1A02.
Over here, we set all the parameters which we need. And afterwards, we go to the operational state. And so, in this operational state, we can use these process data objects. And we do it over here. So, first of all, we put the command off with zero control word, with zero position, and with zero stiffness, zero damping. And here, we send couple of these commands, kind of zero commands, and we check that we are really in the operational state. After when we are happy that we are in operational state, what we do, we again send zero command over here, and we read the center. The center is the position.
When we have the actual position of the motor, we need to enable our motor. So, it's in operational state, but still not enabled. And in order to enable it, we need to put the control word to the state of six, seven, and 15. And these are going to be the answers, which ideally we need to check that we really have these answers, but I don't do this in the program. So, it's over here. We we are going to send six, seven, and 15.
So, again, we construct the command with the uh word 6715, and with the position center, which we measured it before. So, after this cycle, we should have uh the motor enabled. And when the motor is enabled, we can do the sign motion. It's over here. I think this part is quite easy to understand because it's not really related to the EtherCAT. So, over here, we calculate the target position. We construct the command uh with uh 15 enabled, and uh we send this command to the motors, and we get the uh reply in the FB. After when we finished uh the cycling of our sine wave, we hold the position, we print the final position, we print the final motor temperature, the driver temperature, and the voltage.
And we disable the motor by sending the zero command again over here, and by putting EtherCAT into the initial state.
initial state.
And that's it. I think it's a little bit complicated, but I hope it's understandable. Now, let's try this program on the real motor using our Jetson Orin Nano.
And here, I have my Jetson Nano, which is connected to the our actuator.
Now, over here, with this command, we can check uh the EtherNet uh address. It's over here.
Let's now run the command, and let's check the output.
Go.
One more time.
Go.
Perfect. It works. Okay, it was not working from the first time.
It's working from the first time on video.
You should know this.
It never works from the first time.
But I should say it was relatively easy.
Let's run it one more time.
I should say that it's really rough time for my channel right now.
So, I would appreciate if you can help me either via Patreon or via YouTube channel membership or via PayPal donation or just with a like. This also really helps. Thank you a lot. It's really nice to know that someone watching my YouTube videos and someone probably finds them useful.
I'm trying to do something new on this channel. I'm trying to show something which other people either don't do or either don't show. Uh I also trying to do this at the cutting edge of the robotics. So, if you can help to my channel, I would really appreciate this.
Now, let's look how to control three motors at the same time. So, as you can see this program is quite similar to the previous one, but I have three periods because I have the different periods for each motor just for fun.
As you can see this program is quite similar to the previous one except that you need to take into account that there are three slaves, need to put the comment for each slave and get the reply from each slave. On the physical level, it sends like one big comment for all three slaves and receives back one big comment from all these three slaves. So, you can see in the cycle function that you sent with one single comment and you receive with another single comment.
Let's now connect all three motors and see how this program works on all three motors at the same time.
For this, the either cut wire goes to the output of the first motor.
The other end of this cable goes to the input, the EtherCAT input.
And from output of this one to the input of the last one.
And for the two last one, we need to connect the power.
And we are ready to try three actuators at the same time. All three motors are connected and we are ready to try the Python program with a three sine waves for each motor.
Let's go. Woah.
This one also rotates. One more time.
Nice.
As you can see, all of them rotate at the same time.
Nice.
And I have also modified this program in order to measure the time which it takes for the Jetson Orin Nano to send the signal to the EtherCAT and to receive the feedback. As far as I understand, most of the time is really uh needed for the Python, not really for sending and receiving command, but more for processing for Python.
So, let's run this program.
And let's see the result.
And the result is over here. So, minimum uh time which is needed to send and receive the command is 128 microsecond.
Median is 159 microsecond.
And the maximum, so the maximum from all this uh loop, the maximum time was uh 664 microsecond.
And as you can see, 99% of the time, uh the time which it takes is less than 256 microseconds. So, as you can see, it's uh really really fast. It's way faster than 1 ms. And because most of the time is actually Python processing, not actual sending and receiving, this time would not increase much when we would increase uh the number of motors.
So, right now there are only three, but for example, for the bipedal robot with 6° of freedom per leg, we will have 12, so four times more.
But this value, it would not increase four times. It would increase just slightly, not four times.
Let's run one more time.
You see now the maximum is even smaller.
And the third time, still super fast. So, even with using Python, it's super fast. I think if we would use C or C++, it would be even faster.
Great. I really like this speed.
This is way better, way faster than CAN bus. So, I have made some tests. I have made actually more tests than I showed in this video.
But it seems like EtherCAT works perfectly.
And the right now I see only one disadvantage of the EtherCAT over the CAN bus is that we need to use more wires for the communication. Two shielded twisted pairs instead of one twisted pair for the CAN bus. I don't see any other disadvantages of the EtherCAT. If you know them, please write this in the comment. It would be really interesting for me to find out what other problems we can have with the EtherCAT. I should also say that I'm really fun of these actuators. I already using them for one kind of secret, not too secret project.
I'm building the robot arms. I'm building the robotic torso with two arms and with a head using this actuators. And also I plan to use such actuators in the future for another bipedal robot. I think I will do this robot probably in July, probably in August. I hope in July.
Not in August and I hope that somewhere at the end of uh June or beginning of July I will make a video about uh robotic torso. So, subscribe to my channel. And also please put like to this video because I think for many of my viewers uh it would be interesting to know how to use as a cut, how it works and uh or all uh how it compare with a canvas. Again, huge thank you to the My Actuator company for providing me these actuators.
As usual, thank you for watching this video till the end.
Huge thank you to people who still support me via Patreon and via YouTube channel membership.
Here are their names. Thank you, guys.
You are the best.
Without this support this channel would be closed uh many years ago.
As usual, stay safe. Good luck with your projects and see you next time.
Related Videos

Setting up a curved screen with Immersive Calibration Pro 4 and multiple cameras (P3D v4)
FlyerOneZero
23K views•2019-07-21

Robot Learning with Sparsity and Scarcity
allenai
379 views•2025-10-14

Jorge Mendez-Mendez: Unlocking Lifelong Robot Learning With Modularity (2023-10-05)
umassmlfl
237 views•2024-01-06

Northwestern’s MS in Robotics: Student Robotics Projects, 2023
NorthwesternEngineering
1K views•2024-05-31

"Perfect" Turns: Turning by the Gyro - FIRST LEGO League (FLL) SPIKE Prime + EV3 RePlay Programming
ZacharyTrautwein
94K views•2020-10-02

Gorkem Secer: TSLIP-based Deadbeat Running Control of Bipedal Robot ATRIAS
DynamicWalking-wv6qm
298 views•2018-06-22

Self-Driving Cars Need Lessons On Human Drivers | Maddie About Science
skunkbear
26K views•2018-08-21

Milrem Robotics’ THeMIS UGVs used in a live-fire manned-unmanned teaming exercise
MilremRobotics
99K views•2021-05-20
Trending

we're almost finished the house (ep.125)
JennaPhipps
347K views•2026-07-22

We Finally Know Where Saturn’s Rings Came From
astrumspace
79K views•2026-07-22

BIG BET: Cathie Wood goes ALL IN on Elon Musk
FoxBusiness
89K views•2026-07-22

MIC DROP: Smithsonian Director Called Out For Woke Propaganda
TheAmalaEkpunobi
37K views•2026-07-23