raspberry as driver-hardware?

More
01 Jan 2019 12:42 #123262 by wicki
hi all,

is it possible, to use a raspberry as a "slave-stepper-driver-hardware" via
linuxcnc (and the ethercat-driver or something else)?

I've got a standalone-solution (linuxcnc on raspberry) working.

but I'm searching for a solution, to use the rasberry and its GPIO just as
IO-ports.

anyone knows whether it for it is already a solution?

regards

wicki

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

More
01 Jan 2019 13:11 #123264 by tommylight
Not RPI as you describe it, but arduino is done by a user named DaBit on this forum and he has a youtube channel with the same nic.
Controlling a computer with a computer seems overkill, if we forget that RPI has huge latency so anything realtime on it will not work properly.

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

More
01 Jan 2019 14:27 #123268 by wicki
Replied by wicki on topic raspberry as driver-hardware?
"arduino is done by a user named DaBit"

is this the cheapest hardware-port-solution?

I have several mills, 3d-printers, lasers and mini-PC here - but only one
mini-PC with a centronics. (the mini-PCs have no free slot)
and I don't want to buy several mesa-boards - if each one is more expensive
than the rest of the other hardware.... ;-)

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

More
01 Jan 2019 22:18 #123293 by tommylight
In that case the cheapest solution is to find a printer selector, used to connect several printers through parallel port to a single computer and vice versa.
Hard to find but very cheap, like this one
www.r-digital.it/index.php?main_page=pro...cbec547rqmn5f7vjt1u3

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

More
02 Jan 2019 11:17 #123313 by wicki
Replied by wicki on topic raspberry as driver-hardware?
"www.r-digital.it/index.php?main_page=pro...cbec547rqmn5f7vjt1u3"

yes, I'm using a one like that.
but it often make problems, because of bad contacts.

what I'm searching for, is a cheap semi-realtime
"ether2centronics"-solution.
if nothing already exists, I will try to check out, what
is possible with a rasPI.

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

More
02 Jan 2019 12:25 #123318 by pl7i92
You shoudt get a look on the module of Estlcam
this gives you a fast solotion and 40USD

BUT better to spent some more money and go for a 5Axis Mach3 BOB and the mesa 7i92
This will speed you up to over 5m/min

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

More
02 Jan 2019 13:56 #123329 by wicki
Replied by wicki on topic raspberry as driver-hardware?

You shoudt get a look on the module of Estlcam
this gives you a fast solotion and 40USD

BUT better to spent some more money and go for a 5Axis Mach3 BOB and the mesa 7i92
This will speed you up to over 5m/min


estlcam is a software-solution, as I know?
did you mean, this hardware is able to work with linuxcnc?

www.amazon.de/USB-CNC-Schrittmotor-Steue...8-1&keywords=Estlcam

the speed has not my highest proirity. a slow driver is OK for me.


I just made some tests:
I tried to send UDP-packets with 5 bytes payload from an
desktop-PC to a directly connected rasPI 3.
more than 50k of such packets per second are possible.

so, 20k packets/sec in both directions should also be possible.
even if the communication is done over raw sockets without
IP-overhead.....

that should be enough for a 4-axis-cnc in 16-microstep-mode.

I think, I'll give it a try ;-)

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

More
03 Jan 2019 06:07 - 03 Jan 2019 06:08 #123390 by wicki
Replied by wicki on topic raspberry as driver-hardware?
if I believe one big searching-machine, the I/O-capabilities of
the raspbery GPIO should by much more as I need:

Language Library Square wave
Python RPi.GPIO 70 kHz
Python wiringpi2 bindings 28 kHz
Ruby wiringpi bindings 21 kHz
C Native library 22 MHz

for a high speed raw ethernet communication C is needed anyway.

I think, on a pc-board with an lpt-port one external thread is able to handle
this communication without any changes in the linuxcnc-code.
but if the board has no port (and also no port-latch), it won't work
without some changes in it.

... to be continued....
Last edit: 03 Jan 2019 06:08 by wicki.

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

More
04 Jan 2019 17:21 - 04 Jan 2019 17:22 #123489 by wicki
Replied by wicki on topic raspberry as driver-hardware?

... to be continued....


ok...
what have I done?

I wrote a realtime-thread for rasPI which is listening and waiting for packets on its MAC-adress.
the master on the linuxcnc-PC is sending the port-data of its 0x378-lpt-port by another thread.
whatever comes in as payload is set to the GPIO of the rasPI.

its a direct connection without router or hub. the rasPI is able to receive about 30k packets/second:
17:52:19 100k packtes received.
17:52:22 100k packtes received.
17:52:25 100k packtes received.
17:52:28 100k packtes received.

then I put the a-DIR and a-STEP signals from the raspPI to the china TB6600 input and
a stepper to the output.

it works, as if it were conected directly to the LPT-port.

I will test the behaviour with more the one stepper next days.

but there is an upcoming question:

it the motherboard of the linuxCNC-PC has no LPT-port - how can I geht
the port-status without touching the linuxCNC-source?

any hints or ideas?
Last edit: 04 Jan 2019 17:22 by wicki.

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

More
06 Jan 2019 20:29 #123630 by andypugh

what I'm searching for, is a cheap semi-realtime
"ether2centronics"-solution.


How about this?

store.mesanet.com/index.php?route=produc...=83_85&product_id=59

It fails the "cheap" but is very much realtime and well supported by LinuxCNC.

The 7i92:
store.mesanet.com/index.php?route=produc...83_85&product_id=306
Is cheaper but only gives you two DB25 ports.

With one 7i80 and one linuxCNC PC you could simply start different configs (INI files) to run each machine separately.

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

Moderators: PCWjmelson
Time to create page: 0.385 seconds
Powered by Kunena Forum