#Disable use of internal pull-up resistor for encoder

1 messages · Page 1 of 1 (latest)

weary hare
#

Hi, my question is independent from any simulator. I want to connect a Grayhill encoder to my Arduino Mega 2560. The encoder's datasheet demands for external pull up resistors with 2,2kOhm. I checked the encoder device config documentation and could not find an option to disable the default use of the Arduino's internal pull up resistors by Mobiflight. I also found this similar thread with a not hundred per cent satisfying solution (https://www.mobiflight.com/forum/topic/5614.html) because every 25th detent into the same direction is interpreted as a backward detent. This solution uses the internal as well as the external pull up resistors. I am not an electronics expert and wonder whether a hundred per cent solution could be achieved by being able to disable use of internal pull up resistors and whether there is a way in Mobiflight to suppress them, even if only low level, e. g. by directly editing the config file?

whole sonnet
#

Afaik, there is no way to disable internal pull up resistors, unless you dig into the firmware source code to change it and compile your custom version.
I can't help you with that.

#

It seems to me it shouldn't be necessary as 2.2k is much smaller than the 50k ohm used in the Arduino.

weary hare
#

Ok, thanks for the answer. This is the thing that I do not really understand as we have two +5v inputs each with different resistance getting into the encoder. One from internal +5V across the internal pull up resistor and the other from the +5v pin across the external pull up resistor. I am really an electronics novice and only know circuits having a single +5v input. But I will try that then, thanks.

whole sonnet
#

For reference, please post a link to your specific encoder.

#

I only know the KY040 encoders that are basically a standard EC11 encoder mounted on a PCB with pull up resistors added.

#

The KY040 does require the 5V direct connection for it to function properly

#

I am not an electronics professional. I would interpret that the pull up resistors on the encoder side (like in the KY040) are put to ensure that the microcontroller detecting the pulses from the encoder gets a strong 5v (High) versus 0v (Low) signal back to the signal pins, especially with long wiring and noisy environment.

#

Both sources of 5v need to have a common ground for the circuit to operate on the same 0v level.

jade wyvern
short thunder
weary hare
short thunder
#

There is no internal pull-up resistor that I can see in the schematic. Only a current limiting resistor for the internal LEDs.

weary hare
short thunder
#

Oh, I'm sorry, I misunderstood

weary hare
short thunder
#

The internal pull-up resistors in the arduino chips are fairly high value, somewhere between 20-50kOhm. They shouldn't influence the function of your encoder at all.

short thunder
weary hare
#

Thank you all for your input, helped me a lot to solve my issue as well as to get a better understanding of electronics in general

rigid zodiac
#

@lyric venture had experimented with this iirc