Silly Questions - HAL, Arduino

14 Sep 2016 10:04 #80431 by rodw
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!

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
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.

Simple integreated like this:

Works great on Wheezy with 2.7.7

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

The following user(s) said Thank You: ImJay, rodw
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:
18 Sep 2016 20:09 #80579 by andypugh

ImJay wrote: 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?
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.
Time to create page: 0.143 seconds
Powered by Kunena Forum