Electronics Progress, but Stonewalled by Manufacturers

A project log for LPKF to GRBL Conversion

Retrofitting a $2,500 PCB mill with Raspberry Pi and Arduino

Steven GannSteven Gann 10/18/2016 at 00:467 Comments


I have received the DRV8825 drivers from China, and the CNC shield kit from New Zealand. Also, it has come to my attention that an earlier version of the shield was featured on Hackaday back in 2013! Anyway, fantastic quality and simple assembly process. The documentation was a bit vague, and the assembly instructions on Protoneer's website didn't quite match the actual product (newer revision of the PCB, website needs update), but it was simple enough to work out.

Setting up the software was bit trickier. I ended up install Grbl through the Arduino IDE method instead of burning a straight *.hex file, mostly out of convenience. I also created my own fork of the Grbl repository to document any modifications I make to the firmware.

Grbl is only half of the software, though, so that still left me with the PC/RasPi-side of things. For testing the hardware from Windows, I went with Candle, which is has a very intuitive interface. Once I get a bit farther with the mechanical parts, I plan to bring in GRBLWeb, which can even run on a Raspberry Pi 1 and provides a slick web UI for uploading G-code and such. Hopefully I'll be able to integrate a full Gerber>>G-code>>Grbl toolchain into a single UI. Writing an Altium plugin to automatically send Gerbers to be milled might be pushing it, but it's definitely a stretch goal.


While LPKF has been reasonably helpful, they refuse to give me any technical information on the stepper motors used in the Protomat C40. I contacted the company that manufactured the motors themselves, but was informed that they were a proprietary design manufactured for an OEM (i.e LPKF) so they couldn't share any technical information.

Tomorrow, I'm going to crack open the Protomat and start probing with an oscilloscope. The X, Y, and Z motors all work fine, so I'll get them moving and see if I can probe the operating voltages from there. Worst case scenario, I guess I could replace the steppers with something cheaper but better documented.

The motors are VEXTA C7391-9212, if anyone has any information. They are also marked as bipolar, so once I figure out a safe operating voltage then driving them should be no problem.


Adam Jaremko wrote 06/21/2017 at 04:32 point

Curious to know if anyone has gotten into the nitty-gritty of their SMCU? My 91s/VS functions perfectly and I have no qualms towards the software (CircuitCAM, BoardMaster), control language (HPGL), etc. Yeah, they're dated and aren't trivial but I've adapted and had little issue with KiCAD as well as FreeCAD exports/imports. What I'm trying to achieve is rather than replacing the control unit, I'd like to add the necessary components for the Z axis. Only I'm a little weary about tinkering around my SMCU if the components aren't readily available. Since ya'll are intent on replacing it, would anyone mind taking a photo or relaying some part numbers my way. More specifically under the X or Y heatsinks... there is a 44 pin PLCC, DIP-18, etc.


  Are you sure? yes | no

Roy Herold wrote 10/22/2016 at 20:54 point

I'd like to do the same thing to my Protomat 91s. Mechanically it looks similar to the C40, especially in the XY department. 

I was able to get it to run with Boardmaster under WinXP, but it took me a while to figure out the right combination of versions and RS232 wiring.  The only Boardaster that worked was 3.0.143, with generic RS232 null modem cables (NO fancy jumpers like so many others recommend). Higher and lower versions of Boardmaster would not work.

When I first tried to get it to run it just sat there. I tracked the problem down to a bad electrolytic on the 5V supply. I did a  it of poking around the motor controllers, and I *think* they run off 24V (it's been a while). You should  be able to put a scope on the connectors and see what is happening.

If you need a copy of Boardmaster, let me know.

Later: Scope on the steppers shows around 32V relative to ground. 4-wire connection, so I assume there is bipolar drive. I'm guessing they would run off of 24V.

  Are you sure? yes | no

Eric Hertz wrote 10/23/2016 at 06:09 point

Wiring: Apparently nostalgia caused me to forget all the intricacies of the different wiring/handshaking methods used with RS-232...
That, alone, is a perty-good reason to replace the driver-circuitry with something like GRBL, since grbl does all that handshaking *via* the Tx/Rx lines, and is well-supported these days by various software.

  Are you sure? yes | no

Roy Herold wrote 11/03/2016 at 02:38 point

I just tried using an old controller board from a Shapeoko 3 on my LPKF. Seems to work fine on the Y axis--haven't tried both yet. The scaling is off, but that was expected. The Shapeoko (aka Carbide 3D) controller is designed for 24V motors, but there is nothing to prevent it from being used at 32V.  My experiment was at 24V, simply because I didn't have a higher voltage supply.

That said, the RasPi controller should also work.

  Are you sure? yes | no

Eric Hertz wrote 10/19/2016 at 13:34 point

Interesting project! Grbl's various interface-utilities are probably way more functional/informative these-days than whatever this guy used with HPGL, if that software even runs on new machines. Nevermind the strong support and sticking-aroundishness of those newer tools. (And haven't seen anything like them for HPGL).

I ported grbl over to PIC32 a while back, in the process tried to "abstract" it as much as possible that it'd be eas[ier] to port to other architectures. You've got me wondering if it could be ported to Pi... whether the timings would be precise-enough, how to simulate the ping-ponged timer-system used by grbl, etc... (and if-so, how it would then interface to the control-software... maybe some sort of virtual /dev/tty device?) That's all *way* beyond me, at this point... And there'd be a lot to do... Unlikely in my near-future, though I wouldn't mind seeing that guy getting ported to other architectures as well.

I fear your spindle-problem might be electrical/mechanical rather'n software-related, however... Seeing as you got motion up to that point. Maybe a blown transistor somewhere shorting things out?

This'll be a sweet system, best of the open-source and quality-manufacturer worlds!

  Are you sure? yes | no

Steven Gann wrote 10/19/2016 at 22:46 point

The official software was Boardmaster, which LPKF kindly sent me a copy of. It wouldn't run at all on Windows 10 and crashed shortly after starting on a WinXP laptop. HPGL makes sense for a plotter, at least it probably did back when plotters were more common, but you're right that it's pretty obscure these days.

Any advice on the motors? I'm really hesitant to open this thing up and start probing the original control board, but it's looking like the only way to determine the running voltage of the X and Y steppers. At least the spindle I know is a simple DC motor.

  Are you sure? yes | no

Eric Hertz wrote 10/20/2016 at 03:15 point

I actually debated whether I should use HPGL for my PCB-machine. One positive aspect is that some PCB programs have direct support HPGL-output... I think Eagle and geda-pcb were amongst them, and as I recall KiCad, etc. have direct support for G-Code... (don't quote me on that). Another positive aspect (for me) was that I'd already built a machine with HPGL-input ;) But, as far as graphical utilities to inspect and then send it, I wasn't able to find *anything*, so grbl definitely seems like a better solution. (I'd almost thought about some sort of script-interface to convert hpgl->grbl, and I think I even found some online).

Motor-voltages... I'm *definitely* no expert, here... but as I understand steppers can be driven in so many different ways, it might be difficult to determine much from the voltage-measurement alone. Often, in order to overcome winding-inductance to increase positioning-speed, and whatnot, they might "overdrive" them quite a bit... It's entirely plausible to find, e.g., a motor marked 3V driven with an initial surge of up to 90V! So, seeing that on a 'scope might be significantly misleading. 

I think what's more important is the *current*... and I suppose that might be more-easily determined with a 'scope, especially if you can find or insert a low-value (less than an ohm, maybe .1 or .01) current-sense resistor in series with the windings (which might already be on-board). (If you go the route of adding a resistor for measurement, make sure it's not a wire-wound resistor! I've made that mistake, it's entirely confusing)

I *think* most of those "step-dir" drivers often used with grbl have inbuilt current-limiting, so giving a large supply-voltage shouldn't be a big deal. But, again, this is mostly speculation, on my part... 

You might try throwing up a "stack" page, asking for others' experience, as I'm sure several people have repurposed old unknown steppers in new projects.

  Are you sure? yes | no