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?
#Disable use of internal pull-up resistor for encoder
1 messages · Page 1 of 1 (latest)
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.
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.
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.
It is just parallel resistors. Current adds up, voltage is the same.
It looks like two external pull-up resistors are required, one from Pin8(+5V) to Pin7(OutpuA) and one from Pin8(+5V) to Pin6(OutputB).
These supply a reliable HIGH signal when the internal transistors (optocouplers?) are off and provide enough current to properly saturate the transistors when they are on, allowing a reliable LOW signal too.
I see, a beginner misinterpretation. Actually the internal +5V line and the +5V pin are both connected to the same +5V source, therefore the line from the internal +5V source across the internal pull up resistor and the line from the +5V pin across the external pull up resistor are in parallel. Thanks for the hint.
There is no internal pull-up resistor that I can see in the schematic. Only a current limiting resistor for the internal LEDs.
Yes, that is also my interpretation. I was only worried because of the forced addition of the internal pull up resistors because they cant be disabled by Mobiflight UI.
Oh, I'm sorry, I misunderstood
Mobiflight would activate the Arduino-internal pull up resistor. The encoder itself does not have a pull up resistor.
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.
Right, now I'm on the same page😅 Apologies for the confusion!
Ok, that was my worry
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
@lyric venture had experimented with this iirc