Home Shop Machinist

Flats, keys, and slots.


Flats, keys, and slots (more accurately referred to as “keyways”) are how shafts sometimes get married to things like gears, sprockets, levers, or knobs.

Flats for Set Screws

Just about every panel instrument that has a knob will have it fixed to the control shaft (usually a potentiometer or encoder) with a set screw. Set screws are a simple solution for low-torque applications.

A shallow flat milled on the shaft where the set screw bears down improves holding power and prevents the set screw from damaging the shaft.

Set screws come with cone, oval, or cupped ends. Cone-end set screws are designed to wedge into the surface. While this provides good holding power, the resulting dimple can make removing the knob or dial problematic. Oval-ended set screws are designed to align and index with a pre-formed divot (usually a spot-drilled pocket). Cupped-end set screws are more typical and are what usually come with set screw assortments packs.

Airshow coverage sponsor:

Set screws are often used on machines in conjunction with keys to prevent slipping, but the set screw itself is not subject to torque or shearing forces. If using a set screw alone, it should be only when the worst-case failure is benign to your safety.

When a set screw is to bear directly against a shaft, always try to mill or file a shallow flat to provide a plane surface for it to tighten against. This prevents the divot caused by tightening the screw from interfering with the fit of the knob on the shaft.

Flats for Sockets

It takes 4 to 5 minutes of filing per side to square up the socket in our example.

The DIY process starts with the female socket. The example for this article is a square, but it could be anything you want: a pentagon, a hex or even a diamond shape. Make the socket first and then mill the shaft to fit because fine-tuning the shaft is much easier than trying to fine-tune the socket.

The traditional way to make a square socket opening is to drill a clearance hole and press a broaching tool through the hole to form the square. A -inch square broach is about $100, plus you need a press of some sort to force it through the part. For small holes and soft materials like aluminum or brass, you can get by with an arbor press. Thick parts, big holes or hard materials require a hydraulic press. Or you can go low-tech and instead of a broach use a small hand file. It took about 20 minutes to file the socket in the 1/8-inch thick, mild-steel example for this article.

For this steel parking brake valve control lever, the socket starts as a drilled hole, which is filed square.

To mill the flats on the corresponding shaft, I recommend using a spin indexer. This handy tool allows you to rotate and index parts with precision. I shoot for a slightly oversize dimension on the first series of flats, then test-fit and fine-tune until snug.

Using the spin indexer, flats are milled in 90-degree increments to create the square end.

Check the fit of the flats to the socket. Use a file to round over the sharp corners on the shaft.

The parts should fit snug, with the lever arm just proud of the shaft, so when the fixing screw is added, the lever is clamped securely against the shoulders of the square.

Keys and Keyways

Keys are the go-to method for torque transmission on many machines. They are simple to machine, and alignment problems are minimized since the primary locating feature is the bore-to-shaft interface and not the key.

Examples of key stock from 1/8 inch to 7/16 inch.

Key stock material is available in English fractional sizes as well as metric whole numbers. Industrial supply stores offer slightly over- and slightly undersized options. Key stock can be anything from stainless steel to brass or aluminum. They are easy to cut to any length you want or to file, grind, or mill to fit as needed. Key stock is never made of hardened steel because it is always preferred that the key—being the cheapest component in the drive train—is the part you want to “give” in the event of an overstress.

Use an edge finder to detect the shaft edge relative to the mill spindle. This will provide the most precise reference to mill the keyway slot.

Mill the slot only as long as the accessory to be fixed to the shaft.

Top view of the cutter setup and geometry.

Milling a keyslot in shafting is only slightly more complicated than selecting a mill cutter that matches your key stock. It’s important to: (A) center the slot, then (B) mill it to the correct depth, and (C) length. Avoid making the keyslot any longer than necessary to engage the part being fixed to the shaft. That’s because the slot can be a stress riser. On critical applications, the strength of a keyed shaft is based on the shaft diameter, minus the slot depth.

The cutting bit is extended in the tool holder just long enough to clear the length of the gear. This operation is entirely manual, with the lathe unplugged and in low gear to hold the chuck steady.

The slot in the process of being formed and the resulting shavings that come off the bit.

To fix the gear to our slotted shaft, we need to broach a matching slot. For about $150 you can purchase a keyway broach set that includes bushings and broaches for various size bores and key sizes. But if you’re frugal and only have the occasional need to broach slots, we can use the lathe (with power off and in low gear to hold the chuck stationary) and an inexpensive, high-speed-steel (HSS) square bit to do the job. It’s a simple process that is easy to set up and produces first-rate results.

Final assembly of the broached gear to the shaft. You can adjust the thickness of the key stock to fit any depth keyslot you want to make.

The bit must have a sharp, freshly-ground edge. The rake angle should be 15 to 20 degrees. If the angle is more acute, it won’t hold an edge. Set the bit sideways in a tool holder (see photos) and adjust the holder until the bit is dead-center on the bore. Adjust the tool post to create a very slight clearance angle (see sketch). Advance the tool to the part and, using the cross-slide, adjust the bit until it just grazes the part. Set the cross-slide dial to zero. Slowly advance the bit into the bore to check that it will reach the full depth necessary to broach the slot all the way through.

Keyslots can be used to position components in the middle of a shaft just as easily as the end.

Adjust the cross-slide to an initial depth of cut of 0.001 inch and, using the carriage, advance the cutter slowly, but with steady force, through the part. A 0.001-inch depth of cut should barely scratch the corners. Retract and repeat, 0.001-inch step at a time. As you get deeper into the full width of the groove, the force to drive the bit through the cut will increase. It may take several passes to get the feel of things. Adjust the depth of cut very carefully. Trying to cut more than 0.001 inch could bind the bit in the slot or take an inordinate amount of muscle. The full depth of a 3/16-inch keyslot is 0.094-inch, so expect to take about 94 passes, more or less. Once you get into a rhythm, it goes pretty quickly, but be patient and don’t try to rush things.

When you start to get close to your final dimension, back the carriage away and test fit your key and shaft. As you get close to the final dimension, start to check it after every pass.

I noticed the bit flexing under load toward the final depth. Since I was not taking heavier cuts, I assumed the edge was dulling slightly. It was still making shavings, so I kept going. But if the tool stops cutting, take it out and sharpen it on a grinder. No amount of force can make a completely dull bit cut.

Bob Hadley is the R&D manager for a California-based consumer products company. He holds a Sport Pilot certificate and a Light-Sport Repairman certificate with inspection authorization for his Jabiru J250-SP.


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.