I usually mount encoders by just gluing them in place. JB weld works great. But I got this low profile one from beekeeb and if you put glue on the bottom it will stop it from rotating. I’m trying to think of other strategies. Right now I’m working on a way to somehow mount it to the bottom half of a choc switch and then glue the switch to the pcb, but still don’t have a good way to do it.
Edit: To be clear, I’m not trying to mount this in a pcb designed for an encoder. I’m putting it in place of a typical switch on a pcb. In the past I’ve just used JB weld on the bottom of an EC11 to hold it in place and it worked great. The issue with this one is that the bottom is open, so if I use any kind of glue to mount it the glue will also prevent the encoder from rotating. You can see what I mean here: https://shop.beekeeb.com/wp-content/uploads/2022/07/IMG_2433-scaled.jpg
That’s not a bad idea! I’ll see if I can try that.