EMC2 running on Raspberry Pi?

More
16 Apr 2014 23:56 #45994 by mungkie
I was just messing about setting up my previous test system again, and thought I would make a video.



It should show the problem with mouse lockups, I point at screen when one occurs and also if you listen I start knocking mouse on desk when lockup occurs.

I posted other comments on system on youtube page, I will not repeat them here as they are just unimportant config details and babble about weather it is worth effort to work on the driver again yet.

I am waiting to get back some reasonable quotes for motor prices and will try the 3.14 kernel before I think about going much further with driver optimizing or working on GPIO input, probably at least a couple of weeks.

Also should say that the drivers are not tuned and the stepgen goes way too fast for the drivers to keep up (should do 20us).

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

More
17 Apr 2014 08:39 #46016 by ADBensi
Hello Mungkie,

 I'm excited about Xenomai , appears to be more active .

 What I do not like the raspberry is the low performance / memory when compared to other ARM . So I'm willing to see LinuxCNC in a Cubieboard A10 1GHz 1GB DDR3 $ 49 . At least the performance of the graphics system will be better (besides the file system - NATIVE SATA Port ) . There are other things that strikes me , 64 IOs , interrupt support in some of them .

 I enjoyed the graphic performance of this project (which supports GPIO) github.com/cubieplayer/Cubian

 Beagle is a better option of Raspberry, but still sins 512M DDR3 memory .
 
 Now it is to spend a little more go out with this
www.seeedstudio.com/depot/Radxa-Rock-p-1693.html?cPath=6_117
 
 I think the work of Kinsa essential to use Raspberry . I compared the sources gpio_hal Beagle and Raspberry and saw no reason for the poor performance of the Raspberry to guaranteed time. I do not think a re- design would have many results.

 I can contribute some testing on my A10 willingness.

 If there is a group of people who want to use any other card with at least 1GB , 1GHz and many GPIOs ( where some of them interrupt support ) I am willing to spend money and time to work together.

Best Regards

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

More
17 Apr 2014 17:34 #46025 by andypugh

If there is a group of people who want to use any other card with at least 1GB , 1GHz and many GPIOs ( where some of them interrupt support ) I am willing to spend money and time to work together.


Have you seen the Udoo?
www.udoo.org

Quad-core 1GHz with the same pinout as an Arduino Mega.
The following user(s) said Thank You: tkamsker

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

More
17 Apr 2014 19:15 #46027 by ADBensi
Yes. Disliked the fact the Arduino communicating via serial and USB with the processor, both are poorer than SPI.

I believe that I2C is a better option (without SPI) than USB or serial for this application.

See ODROID-U3 www.hardkernel.com/main/products/prdt_in...g_code=G138733896281, is powerful, cheap, supports eMMC (as good as SATA).

We could do something like Raspberry + PICnc but with a great performance in the system.

  ODROID-U3 (U $ 57) + PIC over I2C with DMA + A4988. I can make the PCB.

  See Raspberry with over 4 A4988 over I2C www.allthingsmicro.com/product/raspberry...-stepper-motor-board

Best Regards

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

More
17 Apr 2014 19:32 #46028 by tkamsker
Hi,
i played around with beagle bone Black like blog.machinekit.io/p/machinekit_16.html and github.com/modmaker/BeBoPr/wiki/BeBoPr-Bridge

So i think raspberry is not fast enough for my use cases. Question did someone get the UDOO in his hands ?
Because to have an Reprap board avail (pinout) would be great )
Then i would spend also some time to test it on my lathe and 3d mill and 3d printer

But i have to Finnish one project first so i can earliest start in 4 -6 weeks
thomas

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

More
18 Apr 2014 18:49 - 18 Apr 2014 20:39 #46077 by ADBensi
ODROID-U3 do not have many GPIO / SPI, but, have I2C, however, it is possible make over USB SPI similary the Udoo (working over USB and Serial to the GPIO/SPI/I2C).

I do not like SPI over USB, but They have github.com/hardkernel/Odroid-USBIO

They have the RT Kernel ODROID:
github.com/hardkernel/linux/tree/odroid-3.8.y-rt

I liked the idea of ​​ODROID, it is less expensive and power-full.

To discuss it I thought it best to leave the topic dedicated to Raspberry and go for this.

Challenge ODROID-U3 - LinuxCNC
linuxcnc.org/index.php/english/forum/18-...e-odroid-u3-linuxcnc

What do you think? I am waiting for my ODROID-U3 :)

I ordered a ODROID-U3, let's see what is quadrcore ... this have 3 GPIO interrupt (may be bitbang to SPI 2.4MHz) and I2C to drive one uC.
Last edit: 18 Apr 2014 20:39 by ADBensi.

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

More
19 Apr 2014 00:23 #46092 by mungkie
Unfortunately I am not going to start developing for another board, only for the reason that it take too much time to start learning everything from scratch again.

There are so many ARM boards becoming available I think the should be a new forum section for ARM boards with subsections for all the flavours, I don't understand why the beagle already has this but not the other boards?

I think almost all of the current ARM boards should run linuxcnc reasonably though it will depend on some optimizations and some limitations.

I think that the rpi can get almost perfect 20us step rate (no jitter whatsoever as its all done with pwm dma and precomputed steps at servo loop rate) using the DMA driver I have seen no realtime overruns, the only problem is with the UI latencys

Anyways I have been having a look at the new 3.14 kernel and while patching code and checking against my 3.12 code I notice that I have made a large pebkac as in the sdhci.c code in my last compile of 3.12 I have somehow got this code
#ifdef CONFIG_PREEMPT_RT_FULLc
somehow added the letter 'c' to the end if the compiler conditional?

Which means it was not properly patched in the last kernel I showed in the test video above, I may recompile 3.12 and test or I may test 3.14 first, either way probably be a couple of days before I know if there is any improvement.

I am guessing 3.14.159 will be the time when the kernel should all work together with linuxcnc in perfect harmony?

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

More
19 Apr 2014 07:36 #46099 by ADBensi
Hello Mung,
I have RPi on Class10 SD Card with Xenomai RT and PICncJr (with DMA) and none problem with SDHCI driver or buttons (I used F1 - stop many times rss) up,down, left, right. It runs smoothly but slow for some conversions tasks or opening files (low processing power, CPU high running Perl script to convert files, waiting many time).

But I had trouble with direct GPIO driver.

If the raspberry had sufficient performance to run the application would not think to re-invent the wheel. Use it requires patience and I'm getting old..

I have Cubieboard A10 on Nand with 3.4.12-xenomai #2 PREEMPT, in there the performance of LinuxCNC is acceptable, but I did not adjusted the SPI to work with PICncJr yet.

Both running Debian. I will install PREEMPT_RT in version 3.14 on Odroid-U3 Quadrcore on eMMC and report if the performance of LinuxCNC will be nice.

I understand what you say.
Best Regards.

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

More
19 Apr 2014 08:16 - 19 Apr 2014 09:04 #46100 by ADBensi
The answer why BBB got may be because the ARM architecture between A8-BBB and A11(v6)-RPi.

For sample, the hardware timer in A9 (ODROID) is provided by the processor core, and not specific to the SOC.

Other read: lwn.net/images/conf/rtlws11/papers/proc/p11.pdf (see: 2 ARM designs and 5.2 Decision guide).
Last edit: 19 Apr 2014 09:04 by ADBensi. Reason: fix info

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

More
21 Apr 2014 20:10 - 21 Apr 2014 20:13 #46171 by mungkie
I have had a quick mess around with the 3.14 kernel this morning and tried some tuning and config of motors and hal and thought I would post another quick video, not sure what is shows, I hoped it may give some idea of what top/cyclictest and the lxde system histogram showed and show how linuxcnc runs with better tuned motor drivers and hal settings.



I changed out the motors on a couple of the A4988 driver boards to try and test max step speed, video should give some idea of voltages used and hardware that is running driven direct from the rpi GPIO.

I used a stop watch to get some idea of time that system locks up and the average over 4 lockups was 48seconds okay then 8 seconds unable to move mouse of keyboard input. Very strange timings being so long in duration, I am sure it was rather different on previous compilations of kernels, and am wondering if it is some sort of processor throttling due to thermal overheat?

I actually burnt out my model B which I assume is because I was running it force_turbo with dram@600 cpu@1100 and core@400(those maynot be the exact params cannot remember with certainty now). I am running on a model A now with cpu@1000 dram@500 and other params default and no force_turbo, maybe running the pi at defaults would not cause overheat and throttling, this is of course just a crazy guess, no real evidence to support it.

Also I found problems running DMA stepgen driver with shorter pulse time than 25us, so the test is running 25us step (base thread equivalent) and servo thread of 2000us. I found that for some reason I could not drive motors at more than 1500rpm (according to my rpm meter) this would be a pulse frequency of 5000 pps, 25us should allow 20000pps?

Don't know if hal inserts some default holdtime dir_setup delays if those params are not defined?

Anyways the whole thing seems weird and strange due to the long lockup of mouse yet cpu still seems to have cycles unused.

I am waiting for 3.14 kernel to compile with debugfs and some other RT profiling options enabled so cyclictest can give some profiling information from /sys/ (30 minutes compile time) I may get time to continue profiling and investigating but its not something I have done before so hope the learning curve is not too slow. I have other stuff to do today so may not do much more.

If anyone has any advice on realtime profiling or how linuxcnc prioritys can be changed or what they think may be the reason for the lockups please feel free to comment. I am no expert in this and am just muddling through without a full understanding to the huge mount of code that under lies the linuxcnc system. As said before it seems to me as though the step generation is very good, the problem is with the UI lockup, motor running seems very smooth and constant.
Last edit: 21 Apr 2014 20:13 by mungkie.

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

Time to create page: 0.337 seconds
Powered by Kunena Forum