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.