LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

More
12 Jun 2024 15:54 #302882 by meister
The following user(s) said Thank You: tommylight, samueldutradasilva

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

More
17 Jun 2024 12:05 #303171 by fest
Lately I've been thinking about the Ethernet <> FPGA interface in this project.My current setup is using WT32-ETH01 (basically an Ethernet capable microcontroller) with UDP2SPI bridge firmware has a RTT latency of 0.6ms- however, by pinging it I'm seeing ~0.3ms of RTT time. SPI communication (18 bytes at 2MHz) takes 72us, so perhaps by using lower-level SDK instead of platformio I could shave it down to around 0.4ms in total. Now, just need to find time for this.

Also, I noticed there's Wiznet W5500 support, but it comes with a caveat:

!!! experimental !!!still has an error rate of 0.02%,but only the 0.2ms duration, thus much faster than the UDP2SPI bridges

@meister: do you know what is the source of the error rate?
By looking at the code, it seems that the SPI interface from FPGA to W5500 seems to be clocked at half the FPGA clock- maybe it's just signal integrity issue?
 
The following user(s) said Thank You: meister

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

More
17 Jun 2024 12:24 #303174 by meister
Hi fest,
faster UDP2SPI wold be very nice :)

the 'error rate' was calculated by the ration between total-messages and error-messages:

errors / total * 100.0

Unfortunately, I cannot say what the exact problem with the FPGA/W5500 implementation is,
it is probably also related to the SPI clock.
slower clock = fewer errors

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

More
17 Jun 2024 22:28 #303212 by fest
Gave my idea a shot on WT32 ETH01 but still have around 0.6ms of latency (bare esp-idf, any memory allocations outside the loop, basically just recvfrom() -> polling SPI transfer -> sendto() in a loop).

Have ordered W5500 module, will give it a try as well.
The following user(s) said Thank You: meister

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

More
18 Jun 2024 06:29 #303228 by meister
for all those who know their way around a little better,
here is the rewrite from RIO.
Not all configurations are available, but the system offers a few improvements to the old one.

I think it's time for tests with the new one,
I won't be making any more major changes to it

github.com/multigcs/riocore
github.com/multigcs/riogui
The following user(s) said Thank You: samueldutradasilva, cornholio, fest

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

More
27 Jun 2024 09:12 - 27 Jun 2024 10:50 #303878 by meister
Since I use more and more the Servo42/57 drivers and play around with robots and many axes,
I thought I'd make a new board so that I don't have so much cable clutter
and everything is relatively compact.

 

ok, 8 axles is not really necessary, but my Parol6 has 6 axles + a servo gripper,
if I put a stepper gripper on it, I'm already at 7, so the 8th doesn't bother me any more :)

* 8 x opto inputs (5/24V can be installed in 2 groups)
* 8 x outputs (5/24V can be installed in 2 groups) / can also be used as PWM/RC servo output
* 8 x stepper axes
* 3 x encoder inputs with index pulse (3.3Volt level)
* 2 x I2C ports (3.3Volt level)
* 1 x modbus-rtu
* 1 x WLED output + one ws2812b onboard
* 1 x PMOD socket
* Current and voltage monitoring via ADC's
* Size: 100x100mm
* FPGA: eu.robotshop.com/de/products/devantech-icewerx-ice40-hx8k-fpga (plugged on)
* Ethernet: wt32-eth01 (plugged on)

I'm not quite finished yet, maybe you or I can think of something else that might be missing.

I chose the FPGA because it is fast and relatively cheap to get in Germany.
The Ethernet board is also cheap and extremely stable.

The board can also be used for milling machines and lathes,
Initially, I wanted to put a standard NEMA17 driver socket on it,
but that would have been too big.
Maybe I'll make an add-on board with space for the drivers.
Attachments:
Last edit: 27 Jun 2024 10:50 by meister.
The following user(s) said Thank You: cornholio

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

More
27 Jun 2024 10:38 #303881 by cornholio
That is pretty awesome.

Damn so I cant use the Olimex iCE40HX8K-EVB ?

So I will have to get a new toy ?
Will the others get jealous ?

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

More
27 Jun 2024 10:44 #303882 by cornholio
The following user(s) said Thank You: meister

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

More
27 Jun 2024 10:49 - 27 Jun 2024 10:51 #303883 by meister
The new boards is not for the Olimex iCE40HX8K-EVB,
but RIO already works with it.

the only thing i hate about the olimex board are the connectors, they can't be plugged on other boards.
but i once thought about building a small adapter board to use the olimex with 4-5 external bob's.


EDIT: eu.robotshop.com/de/products/devantech-icewerx-ice40-hx8k-fpga
Last edit: 27 Jun 2024 10:51 by meister.

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

More
27 Jun 2024 11:21 #303886 by cornholio
Yeah the olimex headers aren't fun at all and not a lot on .1 pitch headers.

I haven't played with mine for bit as I went down the path of mesa firmware on a Spartan6 dev board, but since the Rpi5 doesn't have a linuxcnc SPI driver yet I'm a bit bummed.

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

Time to create page: 0.130 seconds
Powered by Kunena Forum