The Situation:
I have a PCB mill. It is pretty antiquated (it has a DB-25 RS-232 port!) but otherwise perfectly sufficient for my needs. Unfortunately after working with LPKF support to sort out a DB-25 to DB-9 adapter and hooking up a USB/RS-232 adapter, I determined something was still wrong. Typing HPGL commands into PuTTY I was able to move the plotter anywhere I needed, at different speeds, in curves, arcs, and circles, and even adjust the height of the spindle. Unfortunately any time I tried activating the spindle the whole machine would stop dead, and ignore all input until a power cycle.
Either my chain of adapters was wrong, or the machine's logic board is damaged somewhere. I had the thought of putting an Arduino between my PC's USB and the mill's RS-232, then having the Arduino control the spindle and filter out spindle control commands while passing the rest to the plotter. Then I thought about making the Arduino translate from G-code (what most PCB software uses) to HPGL (the old pen plotter protocol used by the mill) to improve compatibility.
The Project:
Then I thought "Why not just have the Arduino control all 4 motors and use a Raspberry Pi to convert gerber files to G-code?" So that's what I'm doing.
Research and Planning:
First objective was to get an Arduino to understand G-code so I could use existing CNC software. Fortunately, the geniuses behind GRBL (Github) have already perfected this and managed the shoehorn it into an Arduino Uno.
With the commitment to use GRBL, I sought out how to drive the bipolar stepper motors from the Arduino in a way that is supported by GRBL. The X and Y motors are bipolar stepper motors by Vexta. I couldn't find any documentation on them, but I do know that they are bipolar stepper motors with quadrature encoders. LPKF was kind enough to attach them from the exterior of the machine vie DB-15 connectors, so I'll stick with those. I don't want to make any irreversible changes to the machine if I can avoid it.
As it turns out, GRBL is built with Pololu-style stepper motor drivers in mind. The genius at Protoneer.co.nz has already perfected the open source GRBL Arduino shield for CNC. Since I can't make decent PCBs of my own (yet!) I elected to buy his kit.
The Goals:
- Get the mill to accept G-code commands over USB
- Use the Raspberry Pi as a remote interface and controller for the mill
- Avoid any permanent changes or damage to the mill
- Mill a PCB
Good day! I have a C30 mill and am starting down the same path you are traveling. I'm wondering if you have made any additional progress? Thanks in advance for any details you have.