MAMEing A CNC Router

[Ed] is pretty old school. He loves the functionality of old industrial shop tools that have their own dedicated systems. With huge candy-like buttons, who wouldn’t? [Ed] decided to replicate this aesthetic by building a MAME controller for his Mach3 controlled router.

[Ed] had a bunch of MAME buttons and joysticks sitting around from a forgotten project. With his vinyl plotter, it was relatively easy to make a very nice looking control panel. To connect the buttons to the Mach3 computer, a disused I-Pac was brought into the mix. The I-Pac reads the state of the buttons and sends keyboard codes over USB to the computer.

Because the very popular Mach3 CNC software responds to hotkeys, it was very simple to make the buttons do as they say. [Ed] has full control over the X, Y, and Z axes as well as the spindle speed. It seems like this would be interesting to do some ‘free form’ CNC work on [Ed]’s router.

31 thoughts on “MAMEing A CNC Router

    1. “Manual pulse generator.” They’re encoder wheels with detents. I didn’t realize that’s what they were called, even though they are used on quite a few of the machines at my workplace.

      They’re definitely better than joysticks. Eeasy to spin to go far (plus you can set the desired distance/click), and easy to control precisely.

      1. Those MPG controllers (didn’t know that was the name either) are pretty sweet… I guess if you wanted to keep the MAME aspect you could always use a “spinner” controller.

  1. MPGs are way better than joysticks. And putting them in a remote pendant makes them even more useful.

    A better option to control the panel is to use a Pokeys 56. It has a plug in for mach that allows you to use analog inputs and code keys directly to mach eliminating having to use keyboard strokes. It can also handle encoder input for a MPG as well as drive a LCD.

      1. Ahh, thats what you may think if you have never tried it. I have a keyboard right on my control and I used that for a long time. But once I installed a pendant with switches to changed axes I began to wonder how I lived without.

        Touching off and setting up is so much easier with a MPG.

      2. Perhaps I wasn’t clear. I had a pendant connected and found it inferior to the keyboard. Good riddance. Using an edge finder is just as fast for me with the keyboard (ctrl-arrow jogs a single step), and feeler gauge or tissue paper height setting is far easier since I can use the keyboard with one hand and wiggle the paper/feeler gauge with the other.

    1. Sadly, Linux is not clearly superior for driving CNC machines – at least with older computers like I use. The Linux CNC controller, EMC2, can’t reliably generate steps as fast as Mach3 (windows) on the same hardware.

      On the downside, I have to reboot Windows/Mach3 between jobs to prevent the computer from hanging. Pick your poison.

      1. I was chatting with a guy who mainly runs linux and makes a mach3 PCI breakout system. As much as he loves linux he can’t recommend it for EMC2.

        I have tried it myself and have been contemplating switching my mill over to it because of rigid tapping. Too many of my accessories like my MPG won’t work though.

        I have been running Mach3 for years and never have had an issue with hanging like that. In fact, my machine has been up for months without a reboot. Something is wrong with your computer.

      2. I’ll sell you my MPG cheap. It used the parallel port, so should be EMC compatible.

        Presumably the problem I have with Mach3 is with other device drivers. Mach3 does not play nice with Windows, which is not a real time OS, and I can imagine that it breaks normally reasonable assumptions made by other drivers. Especially on an older system like mine.

      3. Mach does bypass a lot of system crap to get direct access to the hardware. But it has always been stable for me. Windows is not really an issue. A lot of modern CNC, and machine controls in general, are windows based. Of course they do have dedicated hardware but the machine itself is based on anything from NT to XP.

      4. > EMC2, can’t reliably generate steps as fast as Mach3 (windows) on the same hardware.

        Bollocks. It not only depends on the specific hardware, but EMC features a complete closed-loop motion controller with S-curve step rate setpoint tracking.

        You can use both systems for efficient machine control. EMC2 is free software.

      5. gyro john – email me [lfo_dmjof@r.dpn – caesar cipher shift left 1 place to decode) and I’ll describe the MPG for you.

        Thanks for the suggestions, but of course I am running real time Linux with EMC2. The crashes on Windows XP were only one of several symptoms, including broken wi-fi and inability to sleep after starting the Mach3 driver. Any way you slice it, Mach3 is not a good citizen in Windows, though it usually works very well (note that Windows is not a real time OS so it takes a major hack to get consistent pulse delivery). I do have a high opinion of Mach3 – nice software by nice people at a nice price.

  2. Oh my….

    I am impressed, Ed. I have to say that at first I thought you’d just retrofitted a GE Fanuc setup, but I see now that this is a totally custom solution. Props to you!

  3. Very cool. I could make you a script/program to change the window style so it would be fullscreen and even auto hide your start menu so it looks like a real machine, Not some buggy windows PC. No offense. lol

  4. wouldn’t it be simple to build the computer INTO the control panel? although that would mean switching the giant arcade buttons for some smaller momentary buttons (something he plans to do anyway) and going from there to a Raspberry PI would make it even smaller (although that would require some hardcore coding work, it would be much smaller and easy to make a monitor setup for).

  5. Mame as in the editor has no clue what real arcade buttons are called so he makes up a connection to a Game emulator.

    Tomorrow on HAD, an APPLE hack because someone put an apple sticker on the box.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.