#5-pin encoder weird action

1 messages · Page 1 of 1 (latest)

rustic hamlet
#

Hello everyone,

Currently building my FCU and so far, so good....everything seems to be working.....except the VS encoder. No matter what I try, the VS increase or decrease simply does not work...if I turn the encoder fast, it might get to -500 or +1200 (examples only) but then returns to -100 or 100. I thought it might have been loose wiring so I replaced it all...same thing...Then I thought the encoder was bad. Tried 2 others with the same result. Finally I thought, "let me try assigning Heading to it" and it works like a charm....back to VS control, no bueno....simply does not want to work.

Next step, check my assignments in MobiFlight...I removed every single reference to VS in transformations or pre-conditions of other controls and even disabled my VS display LED. Same results...on the flight sim FCU the VS jumps between -100, 0, 100 and nothing more unless I spin fast and then I get different values and return to -100 or 100. I've tried re-programming for the FBW A320 with the same result....I'm currently programming for the Fenix A320.

I have FNX320_FCU_VS_KNOB_DEC and FNX320_FCU_VS_KNOB_INC for left and right turns.

I'm at a loss! Like I said, if I use this encoder (with the same pin assignments) for Speed, Heading or Altitude, it works....

This is all on a Mega2560.

Long winded but I think I captured it all here...I'm at a loss.

Any help is appreciated!

Cheers

stark copper
#

Post screenshots of the input config for VS, showing both the left and right increment tabs

rustic hamlet
#

in case this helps too:

#

I also tried with 1 detent per cycle (11) with the same results

sudden marsh
#

Checking the basics, activate logging mode and check the encoder movements. You should get exactly one left or right event registered per click of your encoder knob.

#

The input tab looks OK. Nothing in preconditions?

rustic hamlet
#

no nothing in preconditions....just noticed in debug (thanks for pointing it out btw, I should have known better!) my turns always include a button push which explains the reset to 0....I'll double check the wiring again but the weird thing is that it doesn't do that if I assign SPEED_DEC or SPEEC_INC

stark copper
#

yeah that's clearly pressing the button and you have the button press mapped for an event

#

I assume you don't have button presses mapped for speed though

rustic hamlet
#

no it's mapped for VS_KNOB_PULL

stark copper
#

that would explain why it only affects vs. sounds like you either have your wiring wrong or the encoders are bad. post a photo of your wiring

rustic hamlet
#

removing the button (SW) wire the encoder just stops working

#

Let me triple check the wiring again and post back with results

sudden marsh
#

Sounds like a wiring problem to me too

#

The three pins on one side are A C B

#

For the encoder

rustic hamlet
#

I'll grab some pics but I just double checked and triple checked the wiring....nothing jump out at me...

sudden marsh
#

A and B go to arduino pins

#

C GOES TO GND

rustic hamlet
#

Mine's on a PCB.....CLK, DT, SW, +, GND

#

GND and 5v confirmed good

#

SW works for the button in any scenario

#

CLK/DT works for increase decrease if I disable the button

#

tried 2 other encoders, same result

#

I'll check my config to see if I have any ghost actions I forgot

#

FWIW, I can confirm the PCB traces are correct to the ABC pins

sudden marsh
#

I suggest testing wires with a multimeter. The only way to trigger the switch pin without pressing is for the arduino pin connected to SW to get a LOW state (GND).

#

So maybe a short in the pcb is causing this.

rustic hamlet
#

Yup, PCB is the issue

#

removed the encoder from it and voila...all good

#

You'd think that with an electronics bsckground I'd know not to trust chinese PCBs lol

#

thanks for the help guys!