Integrating an Arduino with EMC

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
4,945
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Oct 12, 2010

This video demonstrates how an Arduino board can be interfaced with the Linux EMC2 CNC control package to serve as a manual pulse generator (MPG) and a remote DRO.

The Arduino is connected to a Grayhill GH6101-ND encoder (~$26 from Digikey) and a Sparkfun 20x4 character LCD, also about $20. A few switches and an LED are used to show the machine status and to select which axis to jog with the MPG. All communication with the host PC happens in serial mode over the USB cable.

On the host PC, a fairly simple custom HAL module in Python converts signals from the Arduino into input signals which go to HALUI to control the machine. HALUI outputs are also fed back out to the Arduino in the same script.

I chose to use the LCD because it gives an effectively unlimited number of display possibilities with only 6 pins, and I'm thinking about adding things like tool number/offset, absolute vs. program coordinates, spindle speed, feed rate override, etc.

For more on the project, see my blog at http://ckcnc.wordpress.com

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (sansbury95)

  • would the arduino be easier to make a cnc machine?

  • @jaytank31 Short answer, no. Not even close. There are a lot of different groups working on this but AFAIK no one has really succeeded yet, as in, making something remotely competitive to Mach or EMC.

  • I think its limited by the lcd processing

  • @kerfmas5 I fixed the problems with this about a month ago. The main problem turned out to be that the serial output buffer could overflow, and when it did, it would corrupt the input buffer. I solved the problem by creating a rate limiter on the output. If the user acted too fast (i.e. spinning the encoder >60RPM) it would simply ignore the inputs. This made it rock-solid.

  • That's a pretty cool project. I plan to start working on a CNC project soon and have started to dabble in Arduino coding as well. Do you think your 10 updates/second is limited by the baud rate that the Arduino is using?  Nice project!

  • @davi200 No, I don't think so. Each message is 6 characters or 48 bits, which would mean 200 per second at 9600 baud, and the Arduino can go to 115.2kbps. That said, there's no need for anywhere near that many for this application, since all you're doing is giving the user feedback. I've found it feels good even down to 2x/second update rate so anything over 10x is just overkill.

see all

All Comments (7)

Sign In or Sign Up now to post a comment!
  • most of the do it yourself kits have a parelle plug not usb?do you know of a kit that is not so expensive?i just want to learn so i can make me a cnc router.thanks jay

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more