In a recent post by shabaz a clever method for lifting tactile switches up to the correct height to fit an enclosure is described.  There is also a useful list of switches with caps that fit.  That post inspired me to revisit a method I have used in the past and upgrade it.

 

My somewhat cruder method involved cutting off the tops of extra long tactile switches.  The body of the switch is tapered which meant no single cap would fit and so I used them without caps.

Extra Long Tactile Switches

The improvement is to 3D print caps that automatically modify the insertion cavity as the height of the switch is varied.  The sketch below shows the dimensions of the switches I have.

Dimensioned Sketch

The height of an unmodified switch body height "h" is 16.2 mm.  The base is 3.8 mm in height so the overall height when fully seated is 20 mm.  The base has a 3.5 mm diameter while the top is 3.0 mm diameter.  Since the taper is linear it is easy to calculate the diameter as a function of the switch body height "h" as shown in the box at the bottom of the sketch:  d = -0.0309 h + 3.5.

 

Also shown is a default sized cap 6 mm in diameter and 4 mm high.  The switch penetrates into the cap 3 mm and a clearance between the switch and the cap of 1.5 mm (which makes the cavity 3 mm larger in diameter) is assumed.  But all of this will be made a parameter inside Fusion 360 so it can be varied and the required changes updated automatically.

 

The parameter table is given below along with the sketch showing the dimensions for the shape that will be rotated to form the hollow to receive the shaft.

Parameter Table

The parameter that would normally be changed is the overall height of the switch which has been given favorite status with a star.  Note that things such as cap height, cap width, etc. can all be changed if desired.  In the example shown the overall height is set to be 12.9 mm in the parameter table.  All other parameters are left at the default or calculated automatically from the expressions shown.  A radius was also added for aesthetics to several edges.  The resulting model is shown below.

Model of Cap

The mesh was generated and the model sent to Ultimaker Cura for slicing.  The 3D printer is an Anycubic I3 Mega and the print in PLA takes only a minute on normal settings due to the small size.  Since the overall switch height was specified to be 12.9 mm, the "h" in the hand drawn sketch becomes 8.1 mm and using a pair of diagonal cutters the switch is cut down from 16.2 mm to approximately 8.1 mm.  Somewhat to my surprise, everything works.  In the photo below full height switches of 21 mm and switches of 12.9 mm high are shown.  The caps are fairly snug but the interference could be tweaked or the caps glued if not snug enough.

Completed Switches

I ordered these switches from China sometime ago and don't have a model number or equivalent but there should be enough information here for others to generate a model.  The 3D printed caps are not going to be as nice as commercial equivalents but this is a quick way to get a prototype working and tested before ordering switches and caps from a distributor.

 

Thanks for reading, comments and suggestions are always welcome.