Can the OPI5 be Configured to Run LCNC?

More
07 May 2023 20:11 #270891 by Guglielmi
Guys, I implemented a driver for use Orange PI 5 with GPIO directly, it seems working, next week I will be out for work, when I will back I will test on my CNC.
Today I saw steps working with Oscilloscope 
I apply an heating cover with fan, the only one it's possible to find on AliExpress and I can tell you that is good enough. ( Heating cover )
Latency seems very good but of course around few us.
My question now is:
Steps are generated in a function called in base-thread and I'm able to configure it around 10us (but I get latency error), it means 100Khz if I'm not wrong.
I will perform more tests to understand if I can decrease it.. but, which frequency (base-thread) could make sense for a good cnc?
I mean, I'm running today with a RPI4 and the frequency is 16,7Khz (60us) and I can do what I need for hobby, so..
But, considering to use OPI5 as controller, if I buy a Mesa interface, like 7196S that seems enough for my hardware, connected in ETH, could I expect advantages? Honestly I can't imagine.. but I don't know which information LinuxCNC passes through ethernet.. the only way to be more performant is passing ISO-G and leave Mesa card interprete and generate pulses.. instead of passing step and dir somehow otherwise it can't be faster..
How it works? which protocol LinuxCNC uses with Mesa?
The following user(s) said Thank You: royka

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

More
08 May 2023 21:50 #270960 by kanuboy13b
I actually bought a heatsink made by Geeekpi works surprisingly well. I ran the same Histogram tests using 6 gxlgears as I always do. Never did it spike above 3us during a 4000 second test. I also had other diagnostics applications running to monitor cpu temps and load. At Idle it seems to keep the chip at 32c and under load during the histogram test it only got up to about 50c if I remember correctly. I took a screengrab at the end of the test, but I am at work atm so I'll post it when I get home. 

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

More
10 May 2023 17:21 #271114 by royka
Nice work! I've ever read somewhere that a hardware pwm generates cleaner pulses. It should be possible to use the pwm pins on the OPI too but don't ask me how. But if the RPI already fits your needs then this will do for sure assuming your driver works as expected.
Maybe you could compare the output of the RPI and OPI?

About the protocol of MESA:
forum.linuxcnc.org/10-advanced-configura...ntrol-card-from-lcnc

@kanuboy13b That heatsink does also works nice indeed I bought the the same after reading your message. Bought a pwm fan with it and created a little patch for it using the code from radxa if you're interested I could upload the patch or dtb)

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

More
11 May 2023 17:07 - 11 May 2023 17:26 #271167 by echristley
I bought a Bridgeport Boss mill last Saturday, and have been going through all these forums looking for a good SBC candidate to run it.  Based on this thread, and royka's post in particular, I pulled the trigger on an OPi5 last night. Would the Mesa 7i90HD be a good match-up for driving 3-steppers, a 0-10V input to a VFD, and two relays (one for an oiler, and the other for coolant)?
Last edit: 11 May 2023 17:26 by echristley.

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

More
11 May 2023 17:53 - 11 May 2023 18:24 #271169 by royka
Cool! The 7i90HD should be possible with a SPI connection but it's more prone to failure. I would recommend a Mesa board with Ethernet like the 7i92tm:
mesaus.com/product/7i92tm/

And a bob connected to it for the 0-10v and protection of the Mesa.
aliexpress.com/item/32972731880.html

Or this one which already has isolated in/outputs:
mesaus.com/product/7i96s/

If your VFD has got modbus (rs485) it would be better to use this instead of the 0-10v.
Last edit: 11 May 2023 18:24 by royka.

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

More
11 May 2023 21:57 - 11 May 2023 21:59 #271182 by echristley
This is the stepper kit I will be driving:
www.omc-stepperonline.com/ts-series-3-ax...y-2m-cable-3-clts120

I haven't ordered a VFD yet. So, I'll look for one that offers modbus as an option.

I was hoping to use the SPI in order to free the ethernet for networking. I could target wireless, but reception not great in the shop, and the discussion here point to more complications with interrupts.

One of the target goals is simplicity of installation. Using GPIO pins direct to the stepper drives would be simplest, except I'd still have to level shift. The 7i90HD would take care of that (I assumed), but now we're talking about opto-couplers, which I thought would be on the drivers.
Maybe I could go with one of the breakout boards from the GPIO pins?
Looks like the 7i90HD is out of stock anyhow. :-(
Last edit: 11 May 2023 21:59 by echristley.

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

More
11 May 2023 23:15 - 12 May 2023 00:05 #271185 by echristley
OK. VFD with modbus.
www.amazon.com/Mollom-220V-2-2KW-3HP-Frequency/dp/B0BM5RRX9M

The last piece will be to get the signals from the OPI5 to the machines that it is controlling.  In order to reserve the ethernet interface for networking, would it be sufficient to add a voltage converter  and then a BoB .?
Last edit: 12 May 2023 00:05 by echristley.

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

More
12 May 2023 01:19 #271192 by royka
Ok I get it, although the latency with WiFi was still way below the requirement for Mesa or Remora (200us seems to be usable and kanuboy13b had 7.2us with WiFi) but if the reception is bad an external antenna might be an option or an usb ethernet adapter.

Mesa over SPI should be possible but it seems you'll need to keep the wires short and you would need the dtb overlay in the attachment.

To connect the bob "directly" to the opi5 I believe a level shifter would be enough indeed, Guglielmi might be able to tell you about how he has the stepper drivers connected and if he tested his HAL driver already.
To communicate to the VFD over modbus you also need a rs485 to usb adapter.
Attachments:

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

More
12 May 2023 03:19 #271200 by buzzFab
The new  OrangePi 5 Plus  that was just announced the other day looks interesting. I actually bought the 16GB RAM/256GB eMMC variant of FriendlyELEC’s  NanoPC-T6  the day before the OPi5+ was announced, had I known I would have waited. Hopefully i can figure it out.
They both are using the Rockchip RK3588 and have two 2.5GbE networking interfaces

I have some EtherCat drives so dual ethernet ports is something I want.

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

More
12 May 2023 10:49 #271220 by royka
To be honest the NanoPC-T6 looks more interesting to me because of the metal case and 12v jack but probably be a little bit more expensive then the OPi5+ because of the eMMC but still reasonable priced.

It should not be a big deal to make it work on the board you've ordered. It does miss the dtb at the moment, I'll add it to the patch later if you can't figure it out and it's not an option in the Armbian compile menu yet.

For a quick/easy start you could try download their Ubuntu Jammy sd card image and install the rt-kernel deb first.
dl.friendlyelec.com/nanopct6

Kernel:
mega.nz/folder/ypZxEAra#6NI9tibbdtoE_mAf8gdvKQ

LinuxCNC:
mega.nz/file/ChwzHZiL#1ItFvunImetNeGEaZu...HPr1BxgGxswiw8_WtTJE
The following user(s) said Thank You: buzzFab

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

Time to create page: 0.110 seconds
Powered by Kunena Forum