Silly Questions - HAL, Arduino

More
14 Sep 2016 10:04 #80431 by rodw
Replied by rodw on topic Silly Questions - HAL, Arduino
I am struggling to see what the Arduino can add to the LCNC environment with the plethora of hardware options available from Mesa et al.

To me, it makes no sense to use one to just add some inputs and outputs, you should be making it do something with its CPU. Maybe return a temperature or something like that.

The Arduino is real time when correctly programmed. It is trivial to implement basic step and direction in a few lines of code, and GRBL and TinyG use the Arduino platform to do what LinuxCNC does.

It is easy to add interrupt driven step and direction to an Arduino that can run at say 10,000+ Hz which is more than enough to saturate a basic stepper motor. (I did this in 150 lines of code). With a bit more effort you can add accellaration and decellaration algorithims in the pulse stream. I did all of this for a rotary table controller which Scott in Canada used to add an indexing function to a 3 axis mill that had no support for a 4th axis. What he did was replace the push button to index the rotary table with a proximity switch. So whenever he wanted to get the table to index his part, he simply moved the tool past the proximity sensor in his G code. Very clever!

www.homemodelenginemachinist.com/showthread.php?t=24719

My code is available for download on the above forum. All config settings are stored in EEPROM so there is no need to edit the code. If you are interested, let me know as it would be great to get it on github and I don't know how to do that.

So forget using the Arduino for simple I/O, make it do something smart like Scott and I did!
The following user(s) said Thank You: ImJay

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

More
14 Sep 2016 17:59 #80454 by Tchefter
Hi @all,
i'm a newbie in LinuxCNC, i jog my Axis with a USB Game Controller like this.
www.amazon.de/Gamepad-Vibration-Controll...=usb+game+controller

Simple integreated like this:
launchpad.net/~falk-t-j/+archive/ubuntu/games/+build/1737977

Works great on Wheezy with 2.7.7

i hope i don't missunderstood this Thread. Otherwise delete please :)

Greetings
The following user(s) said Thank You: ImJay, rodw

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

More
18 Sep 2016 02:40 #80550 by ImJay
Thank you all for the replies, I'm starting to see the level of complexity that Mesa/Arduino can control.

As Arduino can control via GRBL and provide real time, I think I'll stick with that and a board for more pins (especially since I haven't much in terms of Mesa here).


I'll just be starting out basic with simple control buttons for jogging and such, as well as a pendant. Until I get comfortable with it I won't be doing any acceleration/deacceleration programs...just yet. :silly:

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

More
18 Sep 2016 20:09 #80579 by andypugh

As Arduino can control via GRBL and provide real time, I think I'll stick with that :


Are you clear that GRBL is a replacement for LinuxCNC, not an adjunct to it?

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

More
18 Sep 2016 23:46 #80589 by ImJay
Yes, I should've worded it better.

Since Arduino is capable of controlling in real time via GRBL, it will do more than what I need with LinuxCNC for simple controls.

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

Time to create page: 0.147 seconds
Powered by Kunena Forum