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
Are you trying to make a hotswap encoder or something? The two big pins on the sides are mounting pins. Just solder those bad boys down and you should be good to go.
solder them to what? I don’t see anything that would work on a typical switch mount in a pcb. Not trying to make something hotswap.
Ah, sorry, just saw your post update. I thought you were working with a PCB with an encoder footprint. Unfortunately I don’t have much experience adding an encoder to a non-encoder board.