Recently, after interacting with a couple of fellow Linux users over in the RCGroups forum, I’ve had my interest in LinuxCNC rekindled… which I’d first used when I started in the CNC and foam-cutting game. Over the past few days, working from my PC/CNC/electronics stash/junkbox, I’ve come up with a very inexpensive, not-too-complex, hardware interface between a LinuxCNC (or Mach3) PC’s parallel port and MPCNC… or most any machine driven with A4988/DRV8825 “stepstick” drivers.
For those unfamiliar with these parallel port interfaces, this is purely a hardware interface… there’s no firmware and/or “smarts” needed. LinuxCNC (and Mach3) runs on the PC and spews real-time control and timing signals out the PC’s parallel port pins… and step and direction signals for each axis is all we really need for basic control of the CNC machine attached to the other end.
After loading up a junker desktop PC from a LinuxCNC/EMC2 liveCD I had, I found a “Mach3 Interface Board” (a simple parallel-port breakout board) I’d picked up somewhere along the way. Having the step and direction signals from the parallel port broken out neatly, I started thinking along the lines of breadboarding up a few DRV8825 modules… and then realized that was already pretty much done with most any of the common, and very inexpensive, Arduino CNC shields out there. All I had to do was hard-wire/jumper a small handful of signals and I should be able to control a machine with LinuxCNC.
The A4988/DRV8825 modules need +5 volt logic power and motor power… +12 volt in this case. Then the step and direction signals for each axis… six of them, for X, Y, and Z. All of these (except motor power) are brought out to screw terminals on the edge of the breakout board. I also had on hand a couple of the Uno-based CNC shields… popular with GRBL users. In this case, I only needed the shield… without the Uno. Prototyping board jumpers made quick work of connecting the two boards together… and all the hardware was now in place.
[attachment file=91605]
Connect the parallel port to the breakout board and a CNC machine to the driver outputs, and… Voila! A cheap LinuxCNC to MPCNC interface.
First up, a small GRBL-based engraving machine was converted and tested…
[attachment file=91606]
Then the A4988 drivers were replaced with DRV8825 and their reference voltages set to about 0.7v…
[attachment file=91607]
And then the small engraver was replaced with MPCNC “Henry”… originally a foam-cutter machine I’d built for my late fishing/flying/golfing buddy. A bit of fiddling with the LinuxCNC’s “Stepconf” to configure for belt drive and 1/32 microstepping and the Dewalt replaced with a pen-holder…
Since Mach3 uses a PC parallel port, I see no reason that this shouldn’t work for it as well. The two boards making up the interface, even new, are commonly found online and shouldn’t run more than $20-$25 max for the both of them… a far cry cheaper than most parallel port interface boards designed for the task.
When I used LinuxCNC in the past, for router-cutting parts for another CNC machine and needle-cutting a fleet of RC foamy aircraft, I had used SketchUp/SketchUCAM… and the gcode it produced worked quite well. I’m sure that, with several years having passed, there’s even more options for a better toolchain going forward.
– David