Introduction: Better Rotary Encoder
If you ever tried to use off the shelf rotary encoder for your project you were most likely disappointing. Whether it was due to the difficulty of set up or the imprecise controls. I had the same problem so I decided to fix it. I have designed 3D printable encoder that is not just incredibly cheap but also a lot easier to use.
With a 3D printer and couple of microswitches you can build one too. Each step on the encoder leaves a satisfying click and you could also designed your own customized button. Please Check out the video I've made too :)
Step 1: Tools and Materials
- 3D printer / 3D printingservice
- M3 tap
- hot glue gun
- PLA or any other plastic
- 2 microswitches (almost any will do. I'm using MSW-13)
- skateboard bearing | 608zz | the one from fidget spinner
- M3 screw
- hot glue
- super glue
And of course you'll need the .STL files which are right here. They can also be found on thingiverse:
Step 2: Assembly
We'll start with the base where we need to tap a M3 hole. Next we can push our M3 screw trough the switching stick. There should be enough clearance for both parts to move freely. Now it can be screwed on the base leaving it some play room.
Next we can move to the knob. Insert the bearing in the bottom part. The press fit should be good enough and you shouldn't use glue. The top part needs to be glued on top of that with superglue. Don't use too much glue because it will drip into the bearing and cease it. With the whole knob assembled it can also be press fitted on the base.
Step 3: Positioning Microswitches
This is tedious task. It doesn't matter which side you start with and the first one will be a bit more difficult. The microswitch must be positioned exactly at a point where it's being pressed just before the stick returns to it's resting position. I would suggest positioning the microswitch closer to the knob as the stick rotates more the further it is from it's pivot point. Once you find the sweet spot simply use hot glue to keep it in place. Repeat the same process on the other side and you are good to go.
Of course you can use any glue you want but I've found the hot works just fine. The switches don't move and in case you place you switch bit too far or bit too close you can always redo it.
Step 4: Wiring
Since these are just two microswitches there is no special wiring unlike with regular rotary encoder. If you want to use it with arduino then just wire it up as a button. This is what's really great about this project.
We have a be nice policy.
Please be positive and constructive.