One of the most difficult steps for new and inexperienced builders in completing mechanical assemblies is fixing things to shafts. Many mechanical creations are often caught in the awkward middle zone of fastening.



For small devices (like robots around 1 pound), set screws are usually the accepted method because the torques involved are so small, and drills & taps are inexpensive at the small sizes. Metric and Inch parts are often interchangeable because small bores can be fiddled with easily using said drills.



And for larger devices, industrial standards exist like shaft and keyway sizes, and pretty much and gear, sprocket, or shaft coupler you can buy will have a standard keyway furnished. This is the realm of wheelbarrow wheels, steel frames, and cast iron pillow blocks.



So there's 2 realms of "easy", but for the parts in the middle, life can be difficult. For example, 12mm is a common metric bore size, but it's not at all close to 1/2", and many products which 1/2" and smaller bores are furnished "plain", with no fastening features at all. You could go all-inch or all-metric, but maybe the exact size of widget needed to execute your design is only available in the other system. You'll have to cook up your own solution.



Keyways and Splines



In industry, there's two dominant methods of attaching things to shafts - the keyway and the spline. Splines give the best contact area and hence strength, but are difficult to attach anything to unless produced exactly for it. Keyways are substantially easier for the enterprising amateur to generate - keyway broaches are not that expensive, or you can use a Dremel tool with a boatload of patience and a grinding wheel. Or creatively make your own single point broach.



Roymech, my go-to for engineering advice, has an entire section on shaft design with some vocabulary at the bottom that is helpful to explore on your own time to understand all the different tactics in common use..



This section will instead focus on some dirty tricks reasonable workarounds if your device cannot use a keyed shaft (such as being an odd size or lacking access to equipment to make the keyway).



Pinning



One of the classic easy solutions is to drill straight through the shaft and pound in a roll pin or dowel pin. I have historically not been a fan of this solution because of its immobility (part can't be adjusted, at all) and adding a significant stress riser to the shaft in the form of a through-hole. My experience and picture record is therefore very limited in this method, and I will therefore not discuss it in depth here (Donations of pictures are welcome!)



Set Screw Don't Suck, Nobody Uses Them Right



An often heard aphorism in engineering is "set screws suck". The classic failure mode for a set screw is the screw digging a huge circular gouge around your shaft and the resulting ring of material guaranteeing that nothing can ever be removed again. There's two particular problems with set screws which makes them hard to use.



Set Screws Must Be Huge to Withstand Torque



One problem facing most industrial components like belts and pulleys is very undersized set screws, which are used directly by most people without additional fastening methods. The set screws are made on purpose very small because it is assumed they can handle very little torque anyway. But small set screws concentrate stress much more than larger ones, and this can make the gouging and embedding problem worse. See image 2 through 4 for an explanation using computer simulations.



I devised a typical round thing with a set screw, and a shaft with which to mate it. Two set screws models were used - a typical small set screw found on a part that size (#6 on a 3/8" bored part), and a much larger #10 screw with 50% more diameter which I would often drill out and thread myself. A 20 lbforce-in load was applied to the shaft with the component fixed in place (simulating driving the shaft with a motor) and the resultant stresses on the part visualized.



The simulations clearly show much higher contact stresses with the smaller set screw for the same load. This can easily cause local deformation of the material under the set screw, causing the joint to become loose (lose its preload). Then, back-and-forth cyclic loading and unloading will only make this gouge worse, causing it to degenerate even more over time!



Why have I simulated the set screw with a flat on the shaft? That's because...



Set Screws MUST Be Used With Flats or Dimples



A set screw pushing against a round shaft indeed has very limited power transmission potential. One common tactic is to grind or mill a flat (also called a detent) on the shaft of a width at least the set screw's contact diameter. Alternatively, a dimple can be drilled into the shaft to use the set screw partially as a pin, in shear. This method is not adjustable along the shaft (which could be a good thing, depending on the application), and a small set screw will once again be a very poor pin.



The tip of an average set screw is much smaller than the body thread - typically, it's "cup" or "point" shaped, which is supposed to allow it to dig strongly into a shaft. Problem is, when it does slip because it's still relying on surface deformations of the shaft, it will inevitably gouge up the shaft. One way I've used to get around this is to grind the point of the screw totally flat, such that it is almost as large in diameter as the thread. Fine-threaded set screws can approach the outer diameter more (Image 5). A secure set screw fit would be tightening this flatted tip against the flatted portion of the shaft.



The more the set screw contact diameter approaches the width of the flat, the more the whole setup approximates a D-shaft (Image 6), another shape used in industry commonly which is reliable. (Did you know that "1994 and newer Mustang" is a shaft shape?)



Image 7 is a picture of one of the large set screws used in my 30lb combat robot Uberclocker's main lifting arm setup. Images 8 through 10 depict more giant-set-screw creations of mine.



Note that set screws are used in industry, but just very conservatively due to their less predictable wear characteristics than keys and splines. A good article that has some rules of thumb for industrial set screw use in machines is here.



Common Set Screw Coupling Products



Luckily, we live in the age of maker-plenty. A few years ago I would have had to devise a custom set screw hub solution for many of my smaller robots, but these days set screw hubs can be freely purchased from the likes of Pololu and Servocity (who seems to have an entire quick building system available), among others. These are likely most useful for your average sumo-bot, design contest bot, 3D printer, or bouncy hexapod. Or a very bizzare Arduino case.



For larger systems, though, such solutions are not yet freely available, and due to the availability of industrial drive products, may not be warranted except for custom solutions.



Clamp Hubs and Shaft Collars



If point-forces and focused stresses aren't your thing, another method is to use a circular clamp type attachment. I've historically used this most to couple shafts of different diameters together, but it can also be used for gears, pulleys, etc. with slit bores that can be squeezed. In fact, a very popular precision power transmission component hub style is "clamp hub".



One of my favorite recent development is the mounting-flange shaft collar. An example is in image 13. These are literally shaft collars which have tapped holes in a circle. I've used these extensively to adapt larger linkages like Chibikart's steering linkage to shafts, and I'm thrilled they exist.



Unfortunately they only come in "large", meaning 1/2" and up. The real flange type is also very expensive - a cheaper type is the "face mount" kind,, which is a little suboptimal in terms of hole placement but still useful. The hole style is a #10 counterbore, but with a 1/4"-20 thread. The reasoning being you can use it as a #10 through-hole (threads in your part) and have a flush face with a standard socket cap screw, or use the 1/4"-20 threads instead.



On these, it's important to tighten the flange holes after tightening the collar, because otherwise the friction of the flange holes would prevent the collar from tightening properly. The flange holes in your part would also need to be a loose oversize fit in order to account for the small amount of radial motion the holes will go through once the collar is tightened. The "real flange" avoids these problems by having the clamping portion separate from the mounting circle.



You can generate your own face mount style collars from inexpensive one- and two-piece clamping shaft collars by drilling into the sides, to get odd or metric sizes.



These funky shaft collars are available on McMaster, along with many dozens of other types of shaft collars. Be imaginative!



For your small implements, ServoCity has many clamp type hubs and collars too.