LinuxCNC + Orange Pi (allwincnc)

More
25 Sep 2021 17:41 #221565 by mwidlok
I've seen that someone talks about "un-usability" of this project now. Well I have 1GB H3 board that perfectly works. The system, LinuxCNC and this drivers were installed in Jun this year, and I did not install any updates since then. I've just finished setting up my mini-lathe-mill (old Emco PC), with 3 steppers, 2 spindles and one spindle encoder. Steppers works, spindle control works, end encoder also works. I have a very reliable speed and position readout with a 500 pulses per revolution encoder installed. H3 is not a speed daemon, but still it is perfectly usable (I'm using X-forwarding by the way, I don't have separate screen for the machine).

I might be able to help with configuration and settings - I can send my config files and describe system&hardware I use.

MX_Master, I perfectly understand Your decision of dropping support for constantly changing processors and cores. It is quite strange however that manufacturers do this, what is the point of including more cores, when they change all the time? Who will use them then?? Anyway I might be able to help with STM firmware or schematics if You want. I already have a nice setup (toy machine and stepper+spindle drivers) that I would like to update in time.
The following user(s) said Thank You: Bari

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

More
25 Sep 2021 18:08 #221567 by Bari
Allwinner comes out with a new ARM soc at least every year, if not more often. They have a particular market in mind for each ARM SOC. Boards like the Opi's use them but they account for maybe only 1 % at most of their sales.

The x86 world is similar. New CPU's and chipsets a few times a year. BIOS/EFI has to be configured for each CPU and chipset. Then each motherboard design has to tweak these for each version they produce.

Users coming from the GRBL and *duino world have to understand that they need to properly configure the config and HAL files since LCNC will check and throw errors for trying to step too quickly. We could remove the real time error messages and just miss or max out steps the way Marlin and similar do it.

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

More
26 Sep 2021 05:15 #221606 by envyvan
Hi forks,

Being busy for a while.
I think the project run on my board is pretty functional. Fast enought for my goal.
But there is onething I reach then I think need to be notice:
The system logic leavel is floating when my board boptup and also in the linux system.
Until I strat the axis interface or what ever interface and press "machine on" button.
Other thing is I try to set my servo spindle in the same way as I use it in mach3 in Step/Dir.
By using "arisc.pwm.N.vel-cmd" and "arisc.pwm.N.vel-scale"  It works, but not ideal.
I don't know how I can set the accelerate for it, any the scale value is "17", looks like some thing odd, since I set the servo to 1000 pulse pre rev.

I still try to figure it out.
 

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

More
26 Sep 2021 05:20 #221608 by envyvan
I was runing on a diy lathe as you are, encoders function work will for the jogwheel, it's precise. But I'm don't have chance to try it for the spindle yet.

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

More
26 Sep 2021 08:17 - 26 Sep 2021 11:03 #221617 by mwidlok
Barl, You are right. I forgot that allwinners etc were not made with open boards in mind. It seems that we need to stick with small fully open STMs/whatever and made out own modules. 

Envyan, floating pins on startup are perfectly normal. The board does not know what is input/output before loading linuxcnc - Yours drivers should have pull-up or pull-down resistors on all pins to force them to "inactive" state before CNC software takes control. The only that might be a bug, is that pins are made outputs only after You press the ON button. In my opinion drivers should set the pins on startup.
Please check my hal file for spindle with encoder - I haven't noticed any odd behaviour with scaling. For my config spindle-speed-out is in RPM, spindle.revs are revolutions, and spindle-speed-in is also in RPM.
I've set the accelerations using limit2 function, however I found that LinuxCNC has a "spindle" module (linuxcnc.org/docs/html/man/man9/spindle.9.html)  with gears & everything - will need to check that.

File Attachment:

File Name: emco_PC_spindleH.hal
File Size:1 KB


PS. spindle module seems to have bugs.... Need to check it further.
Attachments:
Last edit: 26 Sep 2021 11:03 by mwidlok.
The following user(s) said Thank You: envyvan

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

More
26 Sep 2021 17:31 - 26 Sep 2021 20:56 #221651 by mwidlok
Just an update - while playing around with spindle I found that, I am missing spindle-index signal (my encoder does not have this functionality). I've add a simple patch to arisc.c driver (for H3) that can emulate index.

This patch just zeroes position and reports back to hal that index arrived - I am NOT SURE if this is right, but it seems to work for me. Please check it!!!
That was completely wrong. DO NOT use simulate_index.patch, use simulate_index_v1.patch file!!
Now simulated index always waits for next full revolution before clearing spindle position and sending back index signal to HAL. In this way our virtual index fires at the position that spindle was at linuxcnc startup.

Patch file and HAL config are attached here. To use simulated index just set "arisc.encoder.X.simulate-index" parameter to 1, then connect spindle.X.index-enable in normal way.
 

File Attachment:

File Name: emco_PC_sp...9-26.hal
File Size:1 KB
 

File Attachment:

File Name: simulate_i...v1.patch
File Size:2 KB
Attachments:
Last edit: 26 Sep 2021 20:56 by mwidlok.
The following user(s) said Thank You: envyvan

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

More
26 Sep 2021 20:14 #221658 by Bari

I forgot that allwinners etc were not made with open boards in mind. It seems that we need to stick with small fully open STMs/whatever and made out own modules.

I think that the Allwinner boards are fine for LCNC as long as we can get a regular supply of them, and if future generations keep the integrated MCU. Being able to run LCNC all on the same low cost board is nice for low cost and saves space. It is just bad timing currently with the world shortage of semiconductors. Even some STM32's have 6-12 month leads times right now.

I have been following the pine64 boards a bit and they have also been using the Rockchip ARM SOC's with integrated MCU's. They are also facing chip shortages as well.  pine64.com/product-category/single-board-computers/

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

More
26 Sep 2021 20:36 #221659 by rollfree

I think that the Allwinner boards are fine for LCNC as long as we can get a regular supply of them, and if future generations keep the integrated MCU. Being able to run LCNC all on the same low cost board is nice for low cost and saves space. It is just bad timing currently with the world shortage of semiconductors.

I agree.
I use it on a small milling machine, China type 3040. On an OrangePi PC with 1GB of RAM.
It works nicely, is small, cheap and with minimal power consumption.
Because I bought this OPi PC before, the price was an incredible $ 15, free shipping.

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

More
26 Sep 2021 21:19 #221661 by mwidlok
Even if future generations of allwinners will keep integrated RISC, I'm quite afraid of porting all drivers to every new board.... I hope that it would not be so problematic.

By the way is the orangePi H3 the best board that is usable for this project? Are any others working?

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

More
26 Sep 2021 21:35 - 26 Sep 2021 21:47 #221662 by Bari
The MCU used in the Allwinner ARM SOC's is an Open RISC design. I wish I had a list of all the Allwinner devices that use them.
The OrangePi's aren't the most rugged or industrial made boards out there but these are a better match for all the hardware required to run LCNC or machinekit on a single board. They have the ARM cores to run Linux, the GPU to run a GUI and an integrated MCU for real time high speed step generation. I'd be happy to spin a board with the ARM SOC and the ruggedized IO required for industrial applications.

linux-sunxi.org/Allwinner_SoC_Family

linux-sunxi.org/Linux_mainlining_effort#Status_Matrix

www.kernel.org/doc/html/latest/arm/sunxi.html

linux-sunxi.org/AR100

openrisc.io/

github.com/openrisc
Last edit: 26 Sep 2021 21:47 by Bari.

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

Time to create page: 0.141 seconds
Powered by Kunena Forum