Dedicated motor controller plus RasPi vs. Desktop

More
25 Jul 2015 22:43 #60912 by Erant
Pretty much what it says in the title. I'm looking at getting a Chinese 3040 CNC machine after not having had a CNC machine in a long time. The last time I used a CNC machine was many years ago, driven off a desktop computer with Mach3. That now feels icky to me and I'd rather go for a proper real-time solution but I'd like some opinions.

Would I be better off with a Mesa 7I92 and a Raspberry Pi or should I go for a dedicated desktop computer and just hook the machine up to the parallel port? Both solutions are - roughly - of comparable cost. I'm currently leaning towards the Mesa + Raspi solution as it makes me feel better that the thing drawing things on a screen and taking touchscreen events isn't also responsible for moving a sharp spinning thing.

Any particularly good reason why I should go with a dedicated x86 box instead?

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

More
25 Jul 2015 23:27 #60915 by andypugh

Would I be better off with a Mesa 7I92 and a Raspberry Pi or should I go for a dedicated desktop computer and just hook the machine up to the parallel port?


I looked at the first idea with a Pi2, and decided that the latency wasn't good enough (using PREEMPT-RT).
The RPi is (somewhat) a CPU add-on to a graphics card. That fgives good video performance, but not great realtime performance for the CPU.
Also, the Ethernet on the RPI is USB-connected, so isn't super-deterministic either.

I would suggest "none of the above" and go with the x86 motherboard and either a 5i25 or the 7i92.

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

More
26 Jul 2015 01:39 #60925 by Erant

The RPi is (somewhat) a CPU add-on to a graphics card. That fgives good video performance, but not great realtime performance for the CPU.


I'm curious what the reason is for this. It has a decent set of cores, and it's not like the presence of a big honking video core will saturate the fabric in any meaningful way and the workload for feeding the Mesa board isn't high.

Also, the Ethernet on the RPI is USB-connected, so isn't super-deterministic either.


That I was not aware of. That's pretty atrocious. I was under the impression the RPi just had a MAC built in to the SoC and it'd use an external PHY. Does the communication to the Mesa board require extreme determinism though? I'd imagine the protocol would be something along the lines of "give me N steps on channel Y, with this acceleration curve" and the motion controller would stuff it in the work queue. This would leave the CPU twiddling its thumbs most of the time waiting for the FIFO to become non-full. Given a sufficiently deep FIFO you could tolerate a large amount of latency and jitter on the host.

Of course, I could be entirely misunderstanding how this works. Is there a good article to read up on the low-level intricacies?

I have a small stack of these types of ARM Cortex-Axx powered boards, are there any that would work? If the answer's not a resounding "Yes" to that question, can I get away with something like the Intel NUC or other ~$100 mini PC plus the discrete motion controller? I have no qualms spending the right amount of money for the right equipment, but if I can get away with something that I might already have laying around, I'd rather do that.

Thanks!

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

More
26 Jul 2015 01:52 #60926 by andypugh

That I was not aware of. That's pretty atrocious. I was under the impression the RPi just had a MAC built in to the SoC and it'd use an external PHY. Does the communication to the Mesa board require extreme determinism though? I'd imagine the protocol would be something along the lines of "give me N steps on channel Y, with this acceleration curve" and the motion controller would stuff it in the work queue.


The FPGA expects an updated set of targets every mS (typically). USB Ethernet gives occasional multi-mS delays. According to PCW (this is generic USB ethernet, not specific RPi Ethernet).

100mS servo-thread latency is probably just about bearable with an FPGA card. But the RPi with PREEMPT-RT is worse than that, and so I didn't persist when I tried it.
Xenomai might well be better, I haven't tried that, and LinuxCNC doesn't support Xenomai (but Machinekit does).

The systems I have built have used a Mini-ITX board and a very small SSD (8GB DOM typically) with a Mesa PCI or PCI-e card.

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

More
27 Jul 2015 03:22 - 27 Jul 2015 03:22 #60941 by PCW
Currently, if you want an ARM based controller for a 3040 class machine, the BBB with Machinekit is
probably the best current choice, since it is inexpensive, has lots of people using it, and
has a fast stepgenerator via the CPUs PRU.

Running Linuxcnc on a random low cost ARM CPU is likely to be more of an adventure than you want
unless you enjoy compiling kernels and LinuxCNC on slow machines.

(not that theres anything wrong with that)
Last edit: 27 Jul 2015 03:22 by PCW.

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

Time to create page: 0.117 seconds
Powered by Kunena Forum