Bendix KN62A, KR 87 and KX155

Questions about deployment and use of Air Manager Instruments

Moderators: russ, Ralph

Message
Author
SimPassion
Posts: 5336
Joined: Thu Jul 27, 2017 12:22 am

Re: Bendix KN62A, KR 87 and KX155

#11 Post by SimPassion »

Like this same as Jacques's one, where I've unplugged the LEDs Displays modules

MAX7219_UnpluggedLEDsModule_01.jpg
MAX7219_UnpluggedLEDsModule_02.jpg

Gilles
Last edited by SimPassion on Sun Dec 08, 2019 11:02 pm, edited 1 time in total.

jasong
Posts: 101
Joined: Sun Oct 20, 2019 8:18 am

Re: Bendix KN62A, KR 87 and KX155

#12 Post by jasong »

Thanks guys, this info helps so much in getting started.

I've made a purchase for a number of the boards, just have to wait for them to arrive now.

jasong
Posts: 101
Joined: Sun Oct 20, 2019 8:18 am

Re: Bendix KN62A, KR 87 and KX155

#13 Post by jasong »

Ok so a little update on the KX155,

I received the Max boards (still waiting for the small digits) and have hooked these up with the supplied 0.36" digits to display the COM and Nav frequencies. These work really well, simple to use 8-) and I've adjusted the brightness. The transfer buttons are working too.

So I've been trying for a couple of days now to figure out the encoders and I'm lost on these. I've found some wiring diagrams which have helped but I still don't understand how to code for these to register the CW & CCW turns.
In the image below, these represent the encoders. I have used the NavMHz as my starting point.
IMG_3317.jpg
I am confident I have connected ok to the Arduino HW using this configuration E129 to Arduino GND, LEFT E132 to Arduino A1, RIGHT E132 Arduino A2 and PULSE E130 to Arduino A0. If I add to AM as a Switch or encoder the inputs are registered and I can print a display of the action eg 0 or 1.
(I don't know what common M or K is, is this important?)

Now When I rotate the knob, basically my code just adds to the frequency then on the next turn subtracts the frequency this doesn't matter if 5 turn CW or CCW.

Maybe this is something to do with the pulse, but I don't know what to do with this.

What I'm also concerned with is, all the encoders are connected to the same pins, is this a problem?
IMG_3318.jpg

Code: Select all

function rotary_encoder_NAV(direction)
  
        if direction >= 0.1 then
            print("direction UP= " .. (direction) )
            xpl_command("sim/radios/stby_nav2_coarse_up")
           
        elseif direction <= -0.1 then
            print("direction DOWN= " .. (direction) )
            xpl_command("sim/radios/stby_nav2_coarse_down")
          
        end
        
end

function rotary_SWITCH_NAV(pulse)
            --PULSE_STATS = pulse
            print("pulse value= " .. (pulse) )
end


hw_dial_add("NAV ENCODERP", rotary_encoder_NAV)
hw_switch_add("rotSWITCHnav", 1, rotary_SWITCH_NAV)
The return on the pulse display as a Rotate the knob is 1 - 0 - blank (blank nothing is detected)

Thank you for any help. Basically I think :? I don't know how to tell AM how to read CCW or CW

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Bendix KN62A, KR 87 and KX155

#14 Post by Sling »

Jason,

They don't look like quadrature encoders that AM supports judging by the circuit labelling and the age of this radio. The connections look like multiplexed switches or another type of encoder. I know the KX165 used optical encoders. What i'm not sure about is the encoding used. You can establish that by testing.

Because of the way they are wired I'd guess that the common line for each one is selectively switched by the micro in a similar way to how 7 segment displays are multiplexed. The micro would then read the common outputs and know which one had provided the output based on what one it had currently grounded. This all happens fast enough to capture the knob selections.

You could test if this is the case. The pulse line might be an input. Be careful as the common and pulse lines could be either polarity. If they are optical encoders you should be able to check polarity by doing a diode check.

Bit more testing required I think.

Tony

jasong
Posts: 101
Joined: Sun Oct 20, 2019 8:18 am

Re: Bendix KN62A, KR 87 and KX155

#15 Post by jasong »

Thanks Tony,

Further along, I was able to dismantle the knobs, they don't look like optical encoders but more like a switch ?
IMG_3321.jpg
IMG_3320.jpg

jasong
Posts: 101
Joined: Sun Oct 20, 2019 8:18 am

Re: Bendix KN62A, KR 87 and KX155

#16 Post by jasong »

Ok so the Max7219 boards have arrived and the digit displays.
Time to see if I can get these working :o

SimPassion
Posts: 5336
Joined: Thu Jul 27, 2017 12:22 am

Re: Bendix KN62A, KR 87 and KX155

#17 Post by SimPassion »

Good luck Jason, while working on it

Gilles

jasong
Posts: 101
Joined: Sun Oct 20, 2019 8:18 am

Re: Bendix KN62A, KR 87 and KX155

#18 Post by jasong »

half an hour later ;) Pretty happy to say the least... defiantly a big nod to AM then my dumb luck.
IMG_3935.jpg

jasong
Posts: 101
Joined: Sun Oct 20, 2019 8:18 am

Re: Bendix KN62A, KR 87 and KX155

#19 Post by jasong »

Hi Tony / @Sling
The micro would then read the common outputs and know which one had provided the output based on what one it had currently grounded. This all happens fast enough to capture the knob selections.
This is exactly what is happening, do you know if AM or the Arduino can read/check this?
If I hook up 4 encoder channels the effect that happens is just a single digit increment step followed by a decrement step. This is because as the switch rotates the inputs are blocked. Also if I wire up the 4 channels AM only seams to read the first channel configuration (A0, A1, A2) and In my script each channel Com Mhz/Khz, Nav Mhz/Khz has to check the same inputs A0,A1,A2.
I don't know if I need to create a sub script that simply checks as the encoders (simply A0,A1 & A2) are turned, increment or decrement a counter.
Then run another script to check which one made the turn... But its the GND pin. I don't know this part.
After all this I'm thinking it might just be easier to try and get the dual encoders AM can already read.???
Thanks if you have time to offer any thoughts.

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Bendix KN62A, KR 87 and KX155

#20 Post by Sling »

It’s been a while. I not sure of the context. I’ll have a read back through this thread and get back to you.

Post Reply