Adapting a NEMA 34 for the Z

5 Bears Home Homebrew CNC bench mill

The Z axis is complete, but some refinement is in order. The original 12mm ballscrew had been replaced by a longer screw of 16mm diameter. The ballscrew backplate, rails, spindle backplate, and spindle spacer block, combined into a workable axis, now tipped the scales at ~35 pounds, or 16 kg. As each new subassembly was added to the vertical axis, I watched with more trepidation as the spindle approached the ballscrew/rail's "breakaway" point, the mass at which the spindle would begin freewheeling downward without power.

Motion tests showed that the NEMA 23 motor that I was using had no apparent problems moving this mass up and down at a nice clip, but I was worried about the effect this would have on both the motor and the ballscrew.

Going through my now pretty extensive collection of ebay servos, I had two alternatives. The first, and most logical, was a hefty NEMA 23 motor with a brake installed on the very top of the servo. This particular motor had an encoder inside the servo body, but I didn't know the make, nor the wiring. This is one of the big problems with surplus motors... getting the wiring diagrams for the encoder, and hoping that the encoder, a delicate electronic device, still functions.

I took the braked motor apart, and to my delight, it contained a Renco 1000 line encoder inside. I was able to wire this motor successfully, and mount it for some tests. The brake portion worked perfectly, but the motor itself was marginal in power, and seemed very "finicky" in its PID (Proportional Integral Derivative) parameters. The mysterious PID is a set of EEPROM gain and filter settings which define how the motor behaves, and how well the closed-loop system functions. They are stored within the servo amplifier for each axis, and are set with a software utility seperate from the Flashcut motion control software. Manipulating these settings can cause some bizarre behavior, such as humming, chattering, and vibrations so severe that tools can be kicked off the work bench! I have found over the last couple of months that brushed servos seem to be a bit easier to set up than the brushless variety. Anyway, I rejected the brushless, braked servo due to its poor PID stability. It always seemed to be on the edge of a fault or other problem

This left the motor you see here. This is a brushed NEMA 34 motor which came with a NEMA 23 adapter plate... you can see the thin black disk between the round body of the motor, and the Z axis motor plate. The shaft was 3/8", perfect for the oldham couplers I was using. My big problem was the encoder which came with the motor. Scouring the web, and emailing the motor company, proved fruitless. I couldn't find the encoder pinout or specifications for wiring to the Flashcut servo amplifier.

I had on hand a carton (1 dozen) brand new Renco RM21 2000 line encoders, bought surplus on ebay for less than $10 apiece. I really like Renco encoders, they install with ease, I know the pinout by heart, and they have always performed flawlessly. My only problem was that each of my surplus encoders was set up for a 1/4" shaft, while this motor had a 3/8" shaft! What to do?


Pictured here is the original encoder that came with the bigger brushed motor, superficially resembling a Renco device but quite different. The encoder body mounting points were standard for a NEMA 34 motor case, and matched the bolt pattern for the Renco encoder that I wanted to use. I knew that if I could adapt the encoder to the bigger shaft, it would bolt right down without any mods to the motor itself.

This old encoder probably worked fine, but I simply didn't know how to wire it. Incorrect wiring can potentially fry the encoder, and it is simply a real pain stripping 8 wires and soldering them to a DB15 connector, knowing that it probably won't work. Even if the power and ground wires are done correctly, if the signal wires themselves are incorrect, the motor can take off out of control, chatter, count incorrectly, any number of awful things. I know, I've seen it happen!

I dismounted this encoder and tore it apart for some educational fun. It ultimately was trashed.

My task then was to mount this new Renco encoder to the larger shaft of the brushed motor. Compare the shaft sizes between this picture and the first. The encoder shaft above is 3/8". This bore is only 1/4".

Fortunately, there was plenty of "meat" in the aluminum disk hub which holds the etched glass wheel. I decided to try and bore out the 1/4" hole (0.250") to 3/8" (0.375").

To do this, I had to unsolder the phototransistor, and carefully take the encoder "sandwich" apart to get at just the aluminum and glass encoder disk. Before installation to the motor, the disk is temporarily held in the correct position with a clever plastic lever device; once installed on the motor body, the disk hub is secured with setscrews, the plastic lever tab (at 3:00 on the photo on the encoder body) is pushed in, and the disk is freed for operation. Alignment is automatic.

Once the top PC board was partially lifted, I could sneak the disk out of the encoder, and prepare it for boring.

The now freed encoder disk. The hub is a simple aluminum turning. The etched glass disk is somehow secured to the aluminum, probably with an adhesive. The two outer rings on the glass (like the planet Saturn) have between them exactly 2000 minute lines etched or laminated on the surface radially... you can barely see them as a hazy region between the two outer rings. These lines pass by a photodiode/transistor pair, and are counted by the controller to determine the position of the motor shaft. Since it is a quadrature encoder, the device actually will count 4 X 2000, or 8000 counts per revolution.

There was barely enough hub available to clamp with any security in my lathe 6-jaw. The setup was centered with an indicator, and the lathe was turned on to check for wobbling of the disk, which would have been unacceptable.

Since the glass disk and its etchings were fragile and vulnerable, I mounted a piece of clear plastic sheet as shown to protect the face of the disk from the swarf that I was about to generate.

I measured the motor shaft (which was 0.3748"), and with a tiny carbide boring tool, I carefully bored out this disk to 0.375" exactly, no reaming. Telescoping bore guages were used to measure.

This picture shows the disk after the last pass. It appears that there is not too much aluminum left, but there is more than the picture reveals... see the next pic.

And here it is! The encoder body is secured to the motor rear with 2 ea. 4-40 stainless SHCS. The set screw on the disk hub is gently tightened to avoid marring the shaft excessively, and the Renco disk-release device is pushed in, freeing the disk for rotation within the encoder.

Fully mounted and wired, I tested the encoder. It passed with flying colors, 8000 counts per rev of the motor shaft.

Once in place on the Z axis, this bigger motor really whipped the spindle up and down. Each axis can peak at 300 inches/minute, but that speed, given the short lengths of all the axes, is simply too fast, and I have limited the maximum speed to 200 ipm via the Flashcut setup.