Should I ground Rotary Encoder mounting tabs?

A very basic PCB design question but I want to be sure before I move on.

I'm translating my project from breadboard to PCB.

I am using a rotary encoder with two large mounting tabs, that I assume are there to be soldered in to reduce any chance of pressure on the pins themselves.

In my PCB software I can connect he mounting hols to a net if I wish. Should i connect them to GND hence also grounding the entire body and shaft of the encoder or should I leave this pads unconnected to any net?

Thanks.

Grounding the tabs isn't a bad idea, but not vital either.

As long as you are soldering the mounting tabs, it shouldn't matter one way or the other. But do remember that these encoders are very jittery and since you are designing the PCB, you may as well add a de-bouncing cap and resistors.

Oh, I've added the resistors but didn't know about adding capacitors. Wil have a Google about that.

Here's a simple setup I've used, one for each of the encoder pins and one for the switch pin.
The exact resistor values and capacitor values are not that important. The larger the values, the longer the time constant.

image

I just bypass each terminal to ground with a 0.1uF cap and use the internal pullups. I have had no trouble.

The digital inputs are all set to pinMode(pin, INPUT_PULLUP);

:+1:
I think the key is to use a capacitor

1 Like

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