#PMDG 737 BARO - Rotary encoder is switching to STD mode when I turn the knob.

1 messages · Page 1 of 1 (latest)

sand river
#

So I'm new to Arduinos and MobiFlight, but I feel like I have a good grasp on everthing. I have many swtiches and knobs already connected and working properly. However, I can't seem to get this baromer mapping set up how I want it with an Arduino.

I have a push-button rotary encoder connected to my Aruduino Mega. I have two devices set up in MF under the Arduino Mega - one for "Baro Knob" as an encoder, and another for "Baro STD Button" as a button. When I set up the input configs for each of those independently, they both work fine. However, when I have them both set up and active, the STD button works fine, but when I turn the knob on the encoder, with each click of the wheel, the STD mode is turning on and off. So for instance, I'll start at, let's say 29.96: I turn the knob one notch to the right and it goes into STD mode, but the baro reading has also correctly changed to 29.97. I can tell because I'll click the push-button and it will switch out of STD mode and the baro is set to 29.97. Then if I click one more notch to the right, it switches out of STD mode and the baro correctly goes up to 29.98.

I've tried changing the "Type" on the "Baro knob" device that I have set up on the Mega, but none of the different options changes this behavior. I also tried a different encoder just to make sure the one I was using wasn't faulty, and got the same result. It just seems like when turning the knob, every other detent is also pressing the button. Note that I'm using an encoder with a small board attached to it. I have the ground going to ground, and then the SW, DT, CLK pins all connected to pins on the Arduino and proper mapped in MF.

Any advice on how to not switch STD mode on and off while turning the encoder knob? Thanks!

charred charm
#

Post a photo of your wiring, and screenshots of how you have the encoder and button configured in the modules dialog

#

And screenshots of the input configuration for each

sand river
charred charm
#

Thanks. That's not a photo of your actual wiring though. Can you post a photo of that too?

#

Since it is every other detent it sounds like there is a short between the button pin and one of the encoder pins

sand river
charred charm
#

I would connect +5 to +5 and see what happens

sand river
#

Yea I tried that, too. Didn’t work. I also just tried switching to different pins. Didn’t work. Tried yet another encoder. Didn’t work. I’m stumped. It’s definitely the button causing the issue because when I deactivate the knob and then turn the knob, it’s still switching to and from STD.

idle nymph
#

If that is a KY040 encoder the 5v connection is required because it has onboard pull up resistors.

#

Did you cut out the right side of the Pcb?

sand river
#

Son of a gun! The 5v worked! Thanks to both of you. I swore I tried that yesterday but maybe I was mistaken. Problem solved. I appreciate the help!