Another PCB Sent to Fab

I’ve completed the design and layout for another PC board, all part of the CNC milling machine electronics cleanup project.  This one is a nicer version of the isolated PWM to +/-10VDC output circuit, which I had prototyped on perfboard a couple weeks ago.  This circuit is used to drive a fancy KBMG-212D DC motor driver that I scored off of Ebay, and replaces the junky controller that runs the spindle of the milling machine.

The circuit allows the controlling PC to control spindle speed and direction by outputting three signals.  The first two are a “bipolar” PWM signal – one signal is active when the spindle speed value is negative, and the other is active when it’s positive.  The other output is simply an enable output that turns the spindle on and off.  The whole circuit has to be isolated because the DC motor drive is at a high voltage potential with respect to ground, and direct connection to electronics connected to a PC would make “exciting” things happen.  It’s annoying that they don’t just include some isolation on the motor drive, but it seems to be common practice not to.

The circuit is fairly simple.  An isolated DC-DC converter brick is used to generate +/-12V rails from 9-18VDC input.  Schmitt output optisolators are used to isolate the PC control signals from the rest of the circuit.  On the isolated side, the PWM signals are each filtered with a simple R-C filter and buffered by an op-amp follower circuit.  The “negative” filtered PWM goes through another op amp in inverting configuration to flip the signal around.  Finally, the “positive” buffered/filtered PWM is mixed with the output of the inverting op amp to add in the “negative” signal.  A couple of trimmers are used to adjust offsets.

The prototype design isn’t perfect, especially in terms of accuracy, but since I’m planning to put the spindle speed into a servo loop controlled by EMC, I don’t think it will matter very much.  I chalk it up mostly to my rusty skills and lack of experience doing analog design.  I did a nice compact PCB layout which stuffs components onto both sides, and is intended to plug directly into the control terminal block on the motor drive.  I sent it off to the DorkBot guy, and it cost a whopping $16.25 to have three of them made.  For small board sizes, it’s just incredible to get professional boards done for this kind of price.

The actual size is a bit smaller than a business card.  Here’s a picture of the artwork: red is the top side, blue is the bottom side.

Please note: I have removed the schematic because it really needs some changes!  I will fix the design and post it when it’s done.

Related Posts

A Triumphant Return?

It may have been about a decade since my last blog update, but I’ve been plenty busy with cool projects this whole time. A recent burst of…

Bike Light GoPro Mount Adapter

Here’s another quick and practical project that I knocked off in a couple evenings.  My new POC mountain bike helmet has a non-standard venting arrangement, which makes…

Bicycle Disc Brake Caliper Mount

[ngg src=”galleries” ids=”11″ sortorder=”140,141,134,135,136,137,138,139″ display=”basic_slideshow”]It’s no secret that I can get pretty wrapped up in projects.  Witness a “small” project that I took on for a friend,…

Camera Slider Track

I have long wanted to work on some motion-controlled camera rigs, for time lapse and moving video shot purposes.  The longest-brewing idea I have had is for…

AZIZ! Light!

In an earlier post back at the beginning of this month, I described the beginnings of my DIY microscope illuminator project, dubbed Project AZIZ.  At that point…

Diansu DS-982 Solder Paste Dispenser

I did a review, mini-teardown, and test of an imported pneumatic solder paste dispenser that I picked up on eBay. [youtube 9RdAL-ysBhA]

This Post Has 4 Comments

  1. Did you ever redo the schematic for the KBMG-212D? I am planning on using the drive on a Emco Compact 5 CNC upgrade and yours is the only controller that I’ve found that does bi-directional control!

  2. Hello, your KBMG interface is exactly what I am looking for (I am upgrading a small CNC lathe). Any chance of seeing the schematic? If you have not updated it a copy of the old schematic and comments on what you think is wrong would be welcome.



    1. Edward,

      Unfortunately I haven’t fixed this design yet. I did some ugly software workarounds in my CNC config to make it behave “well enough” in the forward direction, but the design is fundamentally flawed and I would not recommend it.

      I don’t know when I’ll get around to redesigning it, but I will definitely post it here when I do.

  3. Thanks for the response. I have decided to try an approach based on pico system’s spindle DAC driven by their FPGA stepper controller.


Leave a Reply

Your email address will not be published.