HAL -> Arduino Breakout

More
21 Jan 2013 20:29 #28917 by dewy721
I don't know if any one would be interested, but I made a python script and the corresponding Arduino firmware to create a HAL breakout interface.

It might prove useful for adding general IO pins to an existing machine, or possibly an external data logger for catching spurious odd behavior.

I wouldn't use it for axis motion control though. But non-timing critical stuff I should be able to handle just fine, like DRO's, tool changers, shuttle bins, buttons, pumps, limit switches, etc.

If sounds like something you guys might like then by all means, you can check it out on my blog .

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

More
22 Jan 2013 19:36 #28955 by Rick G
Replied by Rick G on topic HAL -> Arduino Breakout
Sounds interesting.

Thanks for sharing!

Rick G

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

More
23 Jan 2013 05:34 #28988 by dewy721
Replied by dewy721 on topic HAL -> Arduino Breakout
Your welcome.

Thank you guys for making such great CNC software. :)

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

  • MOHCTP
  • MOHCTP's Avatar
  • Visitor
  • Visitor
12 Feb 2013 23:21 #29956 by MOHCTP
Replied by MOHCTP on topic HAL -> Arduino Breakout
Just ordered "brand new Arduino Due " board with set of mini drivers (DRV8825), planning to start play with shiny toys as soon as they arrive.

The idea to use it as very flexible and cheap alternative to standard "LPT" boards for stepper setups.

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

More
12 Feb 2013 23:39 #29958 by dewy721
Replied by dewy721 on topic HAL -> Arduino Breakout
Just bare in mind that it only links the HAL pins to the Arduino. The rest is up to you.

So if you want to make something of actual use from it, it you'll need to hammer out some Arduino code and add any newly-employed pins to your custom.hal file.

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

More
02 Mar 2013 22:45 #30772 by emcPT
Replied by emcPT on topic HAL -> Arduino Breakout
One of the things that I must have in a machine are hard buttons, in a similar way to "industrial" controls, something to start the coolant, feed rate override, program start, program stop, program pause, and many others. A personalized keyboard would be nice also (I am a fan of Fanuc so I would make something equal). So I think around 100 inputs (user control -> linuxcnc) would be enough and some (linuxcnc -> user control) would also be necessary, like some leds (that would indicate, for example machine is running, coolant is on).
Not sure if what you propose can do what I described here, but I think it might. Can you please comment if it is possible (is implemented up to the hal level)? I am redoing a machine and I might consider adding all this from this moment as then I could get rid of the keyboard and then the machine would be more industrial.
Thank you

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

More
03 Mar 2013 02:44 - 03 Mar 2013 02:46 #30777 by dewy721
Replied by dewy721 on topic HAL -> Arduino Breakout
Your right on the money. As you can easily build the interface your talking about with an Arduino powered LCD touch screens, LEDs, graphical indicators, buttons, analog gauges, and all.

You'll just need to know how to hack at C#/C++ code to make the interface the way you want using the Arduino platform to control it, then use HAL2Arduino to expose the HAL pins to that Arduino. Even multiple Arduino units can be ganged together to handle multiple tasks.

Right at the moment I'm getting close to releasing version 0.4 with some example plugins to easily allow toy CNC builds.

It should be ready for the public in a day or two. (Ironing out a few last minute details, between errands.)

When its ready for download I'll announce it with a post here. But before then, I could use a few good feature requests for add-on mods.
Meanwhile it the new version already supports:
  • USB access to HAL interface.
  • Independent Stepper control w/acceleration.
  • Basic DRO (as a coding example.)
  • Physical and Virtual limit switches.
  • Message passing, for multi-Arduino applications.
  • Drag and drop add-ons, easily add/remove features.
Last edit: 03 Mar 2013 02:46 by dewy721. Reason: typos

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

More
03 Mar 2013 03:14 #30778 by emcPT
Replied by emcPT on topic HAL -> Arduino Breakout
Well in that case, it is what I need.
I think I can manage the c++ stuff, but simple examples are always welcome.
I am in a long way to reach that part of my retrofit as I am currently dealing with the spindle, but as I wanted physically buttons in my machine it seams that your work can be the base for it.
Once again thank you.

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

More
03 Mar 2013 21:43 #30800 by dewy721
Replied by dewy721 on topic HAL -> Arduino Breakout
Ok, as promised. HAL2Arduino 0.4 (pre-release) has been posted.

Excerpt: (From my blog )

For those of you that have been waiting ever so patiently for the next generation of EMC2Arduino, here is the first version of HAL2Arduino that is actually useful to the average end-user.

This version has a couple of bug fixes:
  • Bi-directional communications fix. (Coding typo)
  • Init spam bug fixed.
Added features:
  • Support for plugin based mod files, for drag-n-drop/compile add on features.
  • Pre-compiler optimized code (modFiles too!) to keep the memory footprint lower, saving more room for your code. Unused code won’t be added to your final build.
  • Added “Green Light” signal so Arduino clients can synchronize with each other.
Added modFiles:
  • modAccelStepper: 0~9 axises of speed sensing motion control, default config is for 3-axis machine suitable for routers, plasma tables, basic mills, etc.
  • modLimSwitch: support for min/max/home switches, both physical and/or virtual (based on stepper positions).
  • modLcd: Updated to run on HAL2Arduino-0.4 (Still just a basic example of a DRO.)
In the pipeline:
  • modButtons: A control panel collection for the basics like E-Stop, start, stop, pause, step, etc.
  • Config LinuxCNC from Arduino. ie: Edit/upload HAL2Arduino to your arduino, run the host side python script and the custom.hal files get generated for you, based on the configuration of the arduino(s).
If you like, you may grab an early copy of it here .
The following user(s) said Thank You: emcPT

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

More
03 Mar 2013 23:01 #30802 by emcPT
Replied by emcPT on topic HAL -> Arduino Breakout
Thanks

I read your blog and it seams correctly structured.
I do not know arduino and therefor I have a long way to walk. Maybe many users here are in a similar position as I am.

One of the things that get people going forward is a simple example, video or pictures, like a "hello world". Pushing for my side, I would be quite happy to see a button working (linuxcnc <- arduino) or a led commanded (linuxcnc->arduino).
As an example, I was looking for arduino hardware and I got more confused as there are several options/versions. With a real example at least I would know what hardware to buy.

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

Time to create page: 0.086 seconds
Powered by Kunena Forum