not enough io on raspberry pi

More
01 Jul 2019 18:45 #138328 by nicklefish7
I am rather new to CNC and want to use the new raspberry pi 4 as a control platform for my mill. I am using 4 o drives with all 8 motors each with an encoder. (3 for X, Y, Z, 1 for spindle, 1 for a lathe attachment, 2 for a 4th and 5th axis, and one more for something else I might want to add later. I also have a pump for a flood coolant system, and 6 inductive limit switch (one for each end of each axis). I also want to add a touch probe and each of the motors has a 50 mm fan. When I was adding up the pin count out of the raspberry pi i got this 2 for step direction control for each motor for a total of 16 pins. 1 for PWM or analog(I don't know which yet) for the pump, 6 for all the limit sensors, 8 for the fans and 1 more for the touch probe. All these pins add up to 32, significantly more than the 26 found on the raspberry pi. So on to my question since only the motors the touch probe and the limit switches need to be controlled in real time is it possible to communicate through serial to a slave arduino or raspberry pi to control the fans and the pump.

Please Log in or Create an account to join the conversation.

More
01 Jul 2019 23:20 #138349 by tommylight
Did you check the latency? Does it have direct access to I/O ? 3 was bad at both.
You can use SPI to communicate to an arduino or another pi. That uses 3 wires so plenty of them left.
Let us know how it works with Linuxcnc and controlling actual motors, what step rate can you get from those I/O and if possible the quality of output signal, that would require an oscilloscope.
The following user(s) said Thank You: nicklefish7

Please Log in or Create an account to join the conversation.

More
02 Jul 2019 11:24 #138388 by BigJohnT
Mesa has a 7c80 and 7c81, I think the 7c80 is ready to work with LinuxCNC.
www.mesanet.com/fpgacardinfo.html
JT
The following user(s) said Thank You: nicklefish7

Please Log in or Create an account to join the conversation.

More
02 Jul 2019 12:55 #138392 by pl7i92
you can also use a mcp23x17 spi 16bit 2 port 4mhz expander
tat youcan set very fast for step dir comunication
#
The following user(s) said Thank You: nicklefish7

Please Log in or Create an account to join the conversation.

More
02 Jul 2019 14:05 #138396 by nicklefish7
Thank you I think I am going to use this for all the non time critical applications

Please Log in or Create an account to join the conversation.

More
02 Jul 2019 14:15 #138397 by nicklefish7
Thank you. I think I am going to use pl7i93s solution for all the non time sensetive communication. As for the latency I have no idea as I don't have my 4 yet. I would asume the 4 wouldn't have to many problems with latency as it is 3 times faster. I haven't ordered my 4 yet is there another controll platform you could recomend.

Please Log in or Create an account to join the conversation.

More
02 Jul 2019 16:37 #138412 by tommylight
Latency has nothing to do with how fast the processor is. I have a PC with a Geode processor at 1GHz that has very good latency and a Lenovo laptop with 3.7 GHz pricessors that has terrible latency.
The following user(s) said Thank You: nicklefish7

Please Log in or Create an account to join the conversation.

More
02 Jul 2019 20:20 #138432 by nicklefish7
I had no idea. I will have to look into the latency on the pi

Please Log in or Create an account to join the conversation.

More
02 Jul 2019 20:25 #138433 by nicklefish7
I have done a little bit of research and it appears like the latency is not a problem on the new pi4

Please Log in or Create an account to join the conversation.

More
02 Jul 2019 23:00 #138451 by tommylight
That would be nice, but the only tangible data I have on it is that it uses more power when idle, so maybe, just maybe.....
The following user(s) said Thank You: nicklefish7

Please Log in or Create an account to join the conversation.

Time to create page: 0.143 seconds
Powered by Kunena Forum