- Hardware & Machines
- Computers and Hardware
- LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
01 Sep 2023 00:46 - 01 Sep 2023 01:21 #279528
by fest
Replied by fest on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
I am now designing a single-axis prototype for interfacing +/-10V servo drive and RS422 encoder for Colorlight i5 devboard (basically to verify hardware building blocks before making a modular multi-axis one).
One feature I noticed is lacking is some kind of watchdog that expects an update (patting) from linuxcnc and disables an output if not updated every 10-100ms. Something similar to this is often used in controllers that are commanded by PC, as a safeguard for PC/OS/linuxcnc crash. Hardware would then drive the outputs to a safe state (i.e. disabled motors and spindle).
Another possible implementation to safeguard against FPGA malfunction (be it gateware issue, a poor contact in clock signal or just user deciding to reflash FPGA with motors running) is to have FPGA generate a low frequency PWM when update is received, and hardware monitoring that there is an activity on the pin (IIRC there are watchdog ICs for this purpose), instead of just low or high signal coming from FPGA.
I'll probably take a shot at implementing this once I'm happy with the single axis prototype.
Edit: I realized such a feature can be implemented in a higher level (and sure, it already is implemented) without special support in driver/hardware controller.
One feature I noticed is lacking is some kind of watchdog that expects an update (patting) from linuxcnc and disables an output if not updated every 10-100ms. Something similar to this is often used in controllers that are commanded by PC, as a safeguard for PC/OS/linuxcnc crash. Hardware would then drive the outputs to a safe state (i.e. disabled motors and spindle).
Another possible implementation to safeguard against FPGA malfunction (be it gateware issue, a poor contact in clock signal or just user deciding to reflash FPGA with motors running) is to have FPGA generate a low frequency PWM when update is received, and hardware monitoring that there is an activity on the pin (IIRC there are watchdog ICs for this purpose), instead of just low or high signal coming from FPGA.
I'll probably take a shot at implementing this once I'm happy with the single axis prototype.
Edit: I realized such a feature can be implemented in a higher level (and sure, it already is implemented) without special support in driver/hardware controller.
Last edit: 01 Sep 2023 01:21 by fest.
Please Log in or Create an account to join the conversation.
01 Sep 2023 07:22 #279549
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
hi,
a kind of watchdog is implemented,
it monitors for new SPI signals and disables the enable output of the steppers. There is also an LED output that is switched in case of an error.
A special hardware watchdog is not available but I would be happy to support you in implementing such a function.
a kind of watchdog is implemented,
it monitors for new SPI signals and disables the enable output of the steppers. There is also an LED output that is switched in case of an error.
A special hardware watchdog is not available but I would be happy to support you in implementing such a function.
The following user(s) said Thank You: fest
Please Log in or Create an account to join the conversation.
01 Sep 2023 14:46 #279579
by serdigi
Replied by serdigi on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Hello;
Congratulations. Thank you for sharing this economical and efficient project with us. My question is: What is the maximum step frequency in 4 axes? Have you had a chance to test it? Thank you. Kind regards...
Congratulations. Thank you for sharing this economical and efficient project with us. My question is: What is the maximum step frequency in 4 axes? Have you had a chance to test it? Thank you. Kind regards...
Please Log in or Create an account to join the conversation.
01 Sep 2023 15:06 #279581
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Thanks, but I can't say what the maximum is, but I can say that the FPGA is not the limiting component and that it doesn't depend on the number of axes, but that all stepgen/pwm run in parallel
Please Log in or Create an account to join the conversation.
07 Sep 2023 09:24 #280182
by fest
Replied by fest on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Designed and ordered a single-axis evaluation board for Colorlight i5 (+/-10V analog output, step/dir, RS422 encoder input, a couple of inputs) to test out the Lichuan servo and Ditron scales I have on order. It is not a complete solution yet, but perhaps useful to someone following along at home: github.com/festlv/linuxcnc-rio-servo-eval
Please Log in or Create an account to join the conversation.
07 Sep 2023 13:24 #280205
by cornholio
Replied by cornholio on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Just maybe my friend
Cheers
Cheers
Please Log in or Create an account to join the conversation.
07 Sep 2023 19:34 - 07 Sep 2023 19:46 #280221
by fest
Replied by fest on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Are you and/or @meister working on something similar? If that's intended as an open-source hardware project, perhaps you need help?
Last edit: 07 Sep 2023 19:46 by fest.
Please Log in or Create an account to join the conversation.
07 Sep 2023 22:02 #280235
by cornholio
Replied by cornholio on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
I've got a couple of boards I designed a few years ago, but currently they don't have an RS-422 interface on them. So would be interested in your implementation as a reference.
Tho I did grab2 of these to play with, hopefully have a SPI490, if not no harm
Tho I did grab2 of these to play with, hopefully have a SPI490, if not no harm
Please Log in or Create an account to join the conversation.
08 Sep 2023 07:36 #280255
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
it would be great if we had open source hardware, but it's not that simple.
The FPGAs that are suitable are difficult to route and solder. Someone should be familiar with BGAs.
Ready-made plug-in boards usually don't meet the requirements,
I would have the flash be flashable via the SPI port.
However, on almost all boards this is not wired to the pins but to a USB chip.
I have tried a board with modular plug-in cards, based on an ICE40HX4K, which is enough for a start, but I would prefer an ECP5.
The FPGAs that are suitable are difficult to route and solder. Someone should be familiar with BGAs.
Ready-made plug-in boards usually don't meet the requirements,
I would have the flash be flashable via the SPI port.
However, on almost all boards this is not wired to the pins but to a USB chip.
I have tried a board with modular plug-in cards, based on an ICE40HX4K, which is enough for a start, but I would prefer an ECP5.
The following user(s) said Thank You: cornholio
Please Log in or Create an account to join the conversation.
23 Sep 2023 08:48 #281447
by Zayoo
Replied by Zayoo on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Hello to all.
Excellent project and I need help.
How to use python script plugin.py in Plugins folder?
I'm using TangNano9K board and would like to drive just 2 steppers over UART so how to create my own config.json. I see that there are some difficulties with the UART but there is a will to troubleshoot it.
Excellent project and I need help.
How to use python script plugin.py in Plugins folder?
I'm using TangNano9K board and would like to drive just 2 steppers over UART so how to create my own config.json. I see that there are some difficulties with the UART but there is a will to troubleshoot it.
The following user(s) said Thank You: meister
Please Log in or Create an account to join the conversation.
- Hardware & Machines
- Computers and Hardware
- LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Time to create page: 0.172 seconds