LinuxCNC + Orange Pi (allwincnc)
07 May 2020 14:57 - 31 Jul 2022 02:38 #166968
by MX_Master
LinuxCNC + Orange Pi (allwincnc) was created by MX_Master
Hi, guys. Let me introduce a tiny project of mine..
My first single board PC was the Orange Pi One. And it's really fun to use such boards for a hobby projects But we also can use them as a small CNC controllers too. It's really sad there are no armhf packages in the LinuCNC dists repo. So my first try was the Machinekit with RT-PREEMPT kernel built using Armbian. And it works. But without a GPIO driver it was just a simulator. After a few weeks of learning I made a GPIO driver by myself. And it works just fine
My next step of researching was a "big latency" issue (50-70 us). Many ARM boards has a worst latency values using the RT-PREEMPT kernel. A steps rate with such latency values was terrible. A few months later I found an info about additional built-in RISC CPU core. Using this core for the fast pins toggling was a good idea
At this moment I have a working pair of HAL driver and the RISC core firmware. Steps rate now very high (up to 1 MHz). Also I made a quick installer script. You need one of the Armbian images to install it. Supported boards are Nano/Banana/Orange Pi with Allwinner H3 SoCs installed.
Attention! Project support is ended. Use it on your own risc.
allwincnc.github.io
My first single board PC was the Orange Pi One. And it's really fun to use such boards for a hobby projects But we also can use them as a small CNC controllers too. It's really sad there are no armhf packages in the LinuCNC dists repo. So my first try was the Machinekit with RT-PREEMPT kernel built using Armbian. And it works. But without a GPIO driver it was just a simulator. After a few weeks of learning I made a GPIO driver by myself. And it works just fine
My next step of researching was a "big latency" issue (50-70 us). Many ARM boards has a worst latency values using the RT-PREEMPT kernel. A steps rate with such latency values was terrible. A few months later I found an info about additional built-in RISC CPU core. Using this core for the fast pins toggling was a good idea
At this moment I have a working pair of HAL driver and the RISC core firmware. Steps rate now very high (up to 1 MHz). Also I made a quick installer script. You need one of the Armbian images to install it. Supported boards are Nano/Banana/Orange Pi with Allwinner H3 SoCs installed.
Attention! Project support is ended. Use it on your own risc.
allwincnc.github.io
Attachments:
Last edit: 31 Jul 2022 02:38 by MX_Master.
The following user(s) said Thank You: Mike_Eitel, 109jb, thefabricator03, Blake_Volpex, marian, fb, gello0, pinder, t.mutia, hairy
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19112
- Thank you received: 6402
07 May 2020 17:05 #166973
by tommylight
Replied by tommylight on topic LinuxCNC + Orange Pi
buildbot.linuxcnc.org/dists/buster/maste...reempt/binary-armhf/
Latest armf 2.9 version, deb ready to install for Stretch.
Latest armf 2.9 version, deb ready to install for Stretch.
The following user(s) said Thank You: MX_Master
Please Log in or Create an account to join the conversation.
07 May 2020 18:12 #166977
by Hakan
Replied by Hakan on topic LinuxCNC + Orange Pi
Amazing. I have to test this.
Please Log in or Create an account to join the conversation.
09 May 2020 14:33 #167148
by Hakan
Replied by Hakan on topic LinuxCNC + Orange Pi
What do you think of making an encoder module that runs in the RISC cpu?
How fast can it sample in-signals, would you say?
How fast can it sample in-signals, would you say?
Please Log in or Create an account to join the conversation.
09 May 2020 17:02 #167156
by MX_Master
Replied by MX_Master on topic LinuxCNC + Orange Pi
A RISC core can sample the AB sequences pretty fast. Max input frequency can be up to 200-400 kHz. But I haven't any high res encoders to test it. So these rates are theoretical maximum (based on output rates).What do you think of making an encoder module that runs in the RISC cpu?
How fast can it sample in-signals, would you say?
Please Log in or Create an account to join the conversation.
10 May 2020 17:30 #167290
by Bari
Replied by Bari on topic LinuxCNC + Orange Pi
Very nice. We had some Allwinner devices running LinuxCNC back in '13-'14. Back then the mali GPU was still closed and there was no info on the integrated microcontroller.
Machinekit could have used these and come up with a working system as well. Nice to see that you have the ARISC core going now for software stepping.
This system can be more open source than the Rpi4 since it requires no giant video blob.
Machinekit could have used these and come up with a working system as well. Nice to see that you have the ARISC core going now for software stepping.
This system can be more open source than the Rpi4 since it requires no giant video blob.
The following user(s) said Thank You: Doogie
Please Log in or Create an account to join the conversation.
18 May 2020 21:34 #168192
by marian
Replied by marian on topic LinuxCNC + Orange Pi
Thanks for your effort on this project. I really like it!
Looks very promising to me. Documentation looks also great.
In my opinion it would suit the gap between Laptop+GRBL and full sized LCNC(+MESA) quite well.
Just ordered an orangepi zero plus 2 H3 (due to emmc and no need for a lot of IOs).
Hope the 512Mb Ram is enough.
I am looking forward to test this on my mills and mini-lathe.
Besides closed loop, an encoder module would allow for threading on the lathe/mill as well as rigid tapping.
PWMgen would also be useful to people who use some of these 0-10V controllable spindles from Kress/AMB or Mafell (mostly Europe).
Sadly i am not a experienced programmer, but i will dig into your code and try to understand how it works.
I will also try to keep up on your thread on cnc-club.ru via google translate...
Keep up the good work!
Looks very promising to me. Documentation looks also great.
In my opinion it would suit the gap between Laptop+GRBL and full sized LCNC(+MESA) quite well.
Just ordered an orangepi zero plus 2 H3 (due to emmc and no need for a lot of IOs).
Hope the 512Mb Ram is enough.
I am looking forward to test this on my mills and mini-lathe.
Besides closed loop, an encoder module would allow for threading on the lathe/mill as well as rigid tapping.
PWMgen would also be useful to people who use some of these 0-10V controllable spindles from Kress/AMB or Mafell (mostly Europe).
Sadly i am not a experienced programmer, but i will dig into your code and try to understand how it works.
I will also try to keep up on your thread on cnc-club.ru via google translate...
Keep up the good work!
Please Log in or Create an account to join the conversation.
18 May 2020 22:08 #168196
by PCW
Replied by PCW on topic LinuxCNC + Orange Pi
It seems like the LinuxCNC encoder component would be a good starting
point for encoder support in the attached processor.
point for encoder support in the attached processor.
Please Log in or Create an account to join the conversation.
19 May 2020 04:10 #168226
by MX_Master
Replied by MX_Master on topic LinuxCNC + Orange Pi
arisc_pwmgen/arisc_encoder will be added soon..
Please Log in or Create an account to join the conversation.
- Blake_Volpex
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
19 May 2020 20:16 - 19 May 2020 20:56 #168297
by Blake_Volpex
Replied by Blake_Volpex on topic LinuxCNC + Orange Pi
I've bean looking for a compact setup to use on a small CNC mill.
This looks perfect.
I'm about to order a Orange Pi Plus 2E and some TMC5160TA drivers, that should cover most of my needs.
Edit: I'm not any good with Russian, but I've bean reading through your other thread, it looks like you're working on an Orange H6 board.
But aren't seeing any performance gains.
Right now the H3 board is the best supported, but I wonder which will be better in a month.
This looks perfect.
I'm about to order a Orange Pi Plus 2E and some TMC5160TA drivers, that should cover most of my needs.
Edit: I'm not any good with Russian, but I've bean reading through your other thread, it looks like you're working on an Orange H6 board.
But aren't seeing any performance gains.
Right now the H3 board is the best supported, but I wonder which will be better in a month.
Last edit: 19 May 2020 20:56 by Blake_Volpex.
Please Log in or Create an account to join the conversation.
Time to create page: 0.345 seconds