Using Ky040 rotary encoder

I’m new to this and looking to make a project using Ky040 rotary encoders, my question is how to I attach them to a board?

I assume I can drill a whole in a sheet of Perspex, metal or wood and push it through from behind?

If I used a sheet of wood.. how think can it be? How do I fix it to the board?

Keeping in mind I will also use mini LED boards as well

Thanks for your help

The ones that I buy come with nuts and star wahers to fasten them.

I either make a bracket out of sheet metal or mount it in the door. You need to drill a hole large enough for the bushing to fit then look for a small tab, drill another small hole for that. Insert it into the holes, add the washer and nut and you are all set. Some have two mounting holes in the PCB it is mounted to, add two standoffs to the panel and bolt into place. There is not much room for thickness but as long as you can access the shaft you should be ok.

Thanks for the replies, here’s what I’m looking at getting. I have a few already.

I could get a bit a sheet metal and drill a whole for it. How do I fix this to the sheet metal?

Haven't tried this yet but you could make holes in the sheet metal and zip tie or hot glue it.

If the header pins are in the way of mounting the encoder shaft, de-solder the header pins and put them facing "down" on the bottom of the PWA. Mr. Solder Fix shows his method of de-soldering multi-pin components.

The one you linked doesn't have threads so mounting it to a panel is going to be problematic. @gilshultz's 'small hole' is referring to an anti-rotation key. This feature keeps the control, when mounted, from rotating when turning the knob. Note the small tab on the encoder body opposite the connector side.

image

" anti-rotation key" I called it a small tab. Mine without the threads have 2 holes in the PCB. From the picture although the holes are not shown you would have to add spacers to mount it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.