- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- IO Questions around mixing IO between Ethercat and Pi 5?
IO Questions around mixing IO between Ethercat and Pi 5?
- jhandel
- Offline
- Premium Member
-
Less
More
- Posts: 152
- Thank you received: 7
06 Jun 2025 13:09 - 06 Jun 2025 13:09 #329810
by jhandel
IO Questions around mixing IO between Ethercat and Pi 5? was created by jhandel
Howdy all,
I am working out the high level architecture (and ordering) for a Ethercat retrofit of my CNC Mill ( its VFD is dying and its as good an excuse as any to re work may decisions I made on it when I converted it to LinuxCNC the first time)..
Anyways, I am looking at the MPG and realizing that I have open IO pins on my pi (like all of them).
So here is my current "plan" for I/O which I would love feedback on
1x EK1100 - Ethercat to FieldBus coupler
2x EL1819 - 16 inputs (I need 28 so 2 it is) - (the response time is killer vs the EL1809)
1x EL2819 - 16 output (need 11 so that works)
1x EL5151 - Encoder for the MPG <-- this is where I would love feedback because this guy is $250 used
The really open question is what risks on integration and general PITA am I facing if I use my Pi's IO pins to handle MPG encoder rather than the spendy EL5151.
I plan to use either Leadshine or Innovance mult-turn servos for all of my motors and spindle so my only current known need for an encoder is the MPG... This is less a question of "can I mix Ethercat with Pi IO pins" and more a question of "should I"... Am I setting myself up for sparks and pain getting the realtime thread where the Pi IO will come in syncing with the rest of the system that is all running on the Server Thread?
To that end, should I be using other parts of the Pi's IO for emergency stuff like e-stop?
Thanks in advance.
I am working out the high level architecture (and ordering) for a Ethercat retrofit of my CNC Mill ( its VFD is dying and its as good an excuse as any to re work may decisions I made on it when I converted it to LinuxCNC the first time)..
Anyways, I am looking at the MPG and realizing that I have open IO pins on my pi (like all of them).
So here is my current "plan" for I/O which I would love feedback on
1x EK1100 - Ethercat to FieldBus coupler
2x EL1819 - 16 inputs (I need 28 so 2 it is) - (the response time is killer vs the EL1809)
1x EL2819 - 16 output (need 11 so that works)
1x EL5151 - Encoder for the MPG <-- this is where I would love feedback because this guy is $250 used
The really open question is what risks on integration and general PITA am I facing if I use my Pi's IO pins to handle MPG encoder rather than the spendy EL5151.
I plan to use either Leadshine or Innovance mult-turn servos for all of my motors and spindle so my only current known need for an encoder is the MPG... This is less a question of "can I mix Ethercat with Pi IO pins" and more a question of "should I"... Am I setting myself up for sparks and pain getting the realtime thread where the Pi IO will come in syncing with the rest of the system that is all running on the Server Thread?
To that end, should I be using other parts of the Pi's IO for emergency stuff like e-stop?
Thanks in advance.
Last edit: 06 Jun 2025 13:09 by jhandel.
Please Log in or Create an account to join the conversation.
- unknown
- Offline
- Platinum Member
-
Less
More
- Posts: 401
- Thank you received: 145
06 Jun 2025 22:56 #329841
by unknown
Replied by unknown on topic IO Questions around mixing IO between Ethercat and Pi 5?
Shouldn't be an issue, as all you you are doing is adding another function, servo thread should be ok for MPG.
Give it a go and see what happens.
Give it a go and see what happens.
Please Log in or Create an account to join the conversation.
- jhandel
- Offline
- Premium Member
-
Less
More
- Posts: 152
- Thank you received: 7
06 Jun 2025 23:11 #329845
by jhandel
Replied by jhandel on topic IO Questions around mixing IO between Ethercat and Pi 5?
so your saying take the Pi GPIO and put it on a server thread not on a realtime thread?
Please Log in or Create an account to join the conversation.
- unknown
- Offline
- Platinum Member
-
Less
More
- Posts: 401
- Thank you received: 145
06 Jun 2025 23:19 #329846
by unknown
Replied by unknown on topic IO Questions around mixing IO between Ethercat and Pi 5?
Yeah, a manual MPG shouldn't require reading at the same rate as would be required for spindle encoder.
Just remember that the RPi io is only 3.3v tolerant, so a way of translating the MPG signal voltage and protecting the RPi io from noise.
The 74lvc series are 3.3v devices that are 5v tolerant on their inputs.
Just remember that the RPi io is only 3.3v tolerant, so a way of translating the MPG signal voltage and protecting the RPi io from noise.
The 74lvc series are 3.3v devices that are 5v tolerant on their inputs.
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20320
- Thank you received: 6912
07 Jun 2025 01:13 #329854
by tommylight
Replied by tommylight on topic IO Questions around mixing IO between Ethercat and Pi 5?
Or using "voltage dividers" made from 2 resistors for each input also works fine, but care must be taken to prevent the lower side resistor from disconnecting.
It does induce more current draw from outputs though, but i know for sure in most cases all is OK.
It does induce more current draw from outputs though, but i know for sure in most cases all is OK.
Please Log in or Create an account to join the conversation.
- jhandel
- Offline
- Premium Member
-
Less
More
- Posts: 152
- Thank you received: 7
07 Jun 2025 10:49 #329871
by jhandel
Replied by jhandel on topic IO Questions around mixing IO between Ethercat and Pi 5?
if I can take any two inputs and turn them into an MPG encoder in the HAL then could I just take two inputs from the EtherCat side?
I was thinking I would need to be running on an realtime thread to do encoder counting due to some timing issues between "listening" to A and B ticks.. But if the Pi GPIO can run on the Servo thread and 1ms is fast enougn, then it should be fast enough for the ethercat IO too right??
I was thinking I would need to be running on an realtime thread to do encoder counting due to some timing issues between "listening" to A and B ticks.. But if the Pi GPIO can run on the Servo thread and 1ms is fast enougn, then it should be fast enough for the ethercat IO too right??
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11292
- Thank you received: 3779
07 Jun 2025 21:00 #329897
by rodw
Replied by rodw on topic IO Questions around mixing IO between Ethercat and Pi 5?
Howdy all,
I am working out the high level architecture (and ordering) for a Ethercat retrofit of my CNC Mill ( its VFD is dying and its as good an excuse as any to re work may decisions I made on it when I converted it to LinuxCNC the first time)..
Anyways, I am looking at the MPG and realizing that I have open IO pins on my pi (like all of them).
So here is my current "plan" for I/O which I would love feedback on
1x EK1100 - Ethercat to FieldBus coupler
2x EL1819 - 16 inputs (I need 28 so 2 it is) - (the response time is killer vs the EL1809)
1x EL2819 - 16 output (need 11 so that works)
1x EL5151 - Encoder for the MPG <-- this is where I would love feedback because this guy is $250 used
The really open question is what risks on integration and general PITA am I facing if I use my Pi's IO pins to handle MPG encoder rather than the spendy EL5151.
I plan to use either Leadshine or Innovance mult-turn servos for all of my motors and spindle so my only current known need for an encoder is the MPG... This is less a question of "can I mix Ethercat with Pi IO pins" and more a question of "should I"... Am I setting myself up for sparks and pain getting the realtime thread where the Pi IO will come in syncing with the rest of the system that is all running on the Server Thread?
To that end, should I be using other parts of the Pi's IO for emergency stuff like e-stop?
Thanks in advance.
Please Log in or Create an account to join the conversation.
- jhandel
- Offline
- Premium Member
-
Less
More
- Posts: 152
- Thank you received: 7
08 Jun 2025 01:13 #329918
by jhandel
Replied by jhandel on topic IO Questions around mixing IO between Ethercat and Pi 5?
hey @rodw, was there something you wanted to add? looks like you just quoted my original post.... I know you have a lot of experience in this area, i have read more than a few of your posts so would love your input.
Thanks
Thanks
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11292
- Thank you received: 3779
08 Jun 2025 02:17 #329921
by rodw
Replied by rodw on topic IO Questions around mixing IO between Ethercat and Pi 5?
Yeh, my post must have broke. If you look a bit harder on eBay you will find better priced moduled for around $130. Some want stupid money. Don;t be frightened of buying from other countries...
Please Log in or Create an account to join the conversation.
- zmrdko
-
- Away
- Elite Member
-
Less
More
- Posts: 178
- Thank you received: 49
08 Jun 2025 03:11 #329924
by zmrdko
Replied by zmrdko on topic IO Questions around mixing IO between Ethercat and Pi 5?
You can also have a look at the EasyCAT:
www.bausano.net/shop/gb/home/1-arduino-ethercat.html
you can hook encoder pretty easily to that for much cheaper. And it is also quite flexible.
Encoder counting happens on arduino and current count is sent over EtherCAT to LinuxCNC, which saves you some hal configuration.
RE: EL1819 vs EL1809 response time - i think it includes signal debuncing, so 3ms does not necessarily have to be bad, because it's slower than 10us.
www.bausano.net/shop/gb/home/1-arduino-ethercat.html
you can hook encoder pretty easily to that for much cheaper. And it is also quite flexible.
Encoder counting happens on arduino and current count is sent over EtherCAT to LinuxCNC, which saves you some hal configuration.
RE: EL1819 vs EL1809 response time - i think it includes signal debuncing, so 3ms does not necessarily have to be bad, because it's slower than 10us.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- IO Questions around mixing IO between Ethercat and Pi 5?
Time to create page: 0.207 seconds