New build with 5 pin encoders and pre built mcp23017 board

It reduces the strength of the “pull” up to 5V.

The encoders have a resistor from A,B,SW that is connected to +V with a “pull” resistor on each. For the encoder to work properly, the resistors need to be connected to +v, so that each pin would be pulled up, and then shorted to gnd, when activated.

Adding an inline resistor R18 increases the resistance of the pull of the 3 resistors on the board. In other words it reduces the voltage seen by the mcp23017 when the encoder switches connect to ground.

Another method to fix this, as you found, is to remove the resistors on the encoder. This causes the pins to float and if the mcp23017 is configured for pull-up, then when the encoder activates it connects the pin to ground.

I don’t want to modify encoders, so adding an R18 to the circuit helps limit the current going to the encoder preventing catastrophic shorts, and in this case has the added advantage of making it easier for the mcp23017 to detect the encoder activation.

Don’t worry about doing any more tests. Your initial test was enough to ease my mind, thank you! I’ll be building up a new experiment board this weekend, and will make sure that I test with 4 encoders and will adjust R18 if required. I have the components laying around for this, so it’s just a matter of getting time to do the work… and on the bright side OZINE!

On the bright side, the factory in China started taking orders again so I might be able to submit a proto build this weekend if I can get a few details worked out.

@smiths73v3
Perfect, thanks for that.
It’s forming a potential divider circuit with the pull ups, am I right?

It makes sense now I think.
Ian

@Ian_G

Yes you are on the right track.

It forms a divider. Here SW is the switch output, Normally open momentary contact which gets shorted to GND when the switch is closed. When open, SW sees 5v through the onboard encoder pull, and R18 from the main board in series.

1 Like