Bendix KN62A, KR 87 and KX155
-
- Posts: 5346
- Joined: Thu Jul 27, 2017 12:22 am
Re: Bendix KN62A, KR 87 and KX155
Like this same as Jacques's one, where I've unplugged the LEDs Displays modules
Gilles
Gilles
Last edited by SimPassion on Sun Dec 08, 2019 11:02 pm, edited 1 time in total.
Re: Bendix KN62A, KR 87 and KX155
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.
I've made a purchase for a number of the boards, just have to wait for them to arrive now.
Re: Bendix KN62A, KR 87 and KX155
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 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. 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?
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
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 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. 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?
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)
Thank you for any help. Basically I think I don't know how to tell AM how to read CCW or CW
Re: Bendix KN62A, KR 87 and KX155
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
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
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Re: Bendix KN62A, KR 87 and KX155
Thanks Tony,
Further along, I was able to dismantle the knobs, they don't look like optical encoders but more like a switch ?
Further along, I was able to dismantle the knobs, they don't look like optical encoders but more like a switch ?
Re: Bendix KN62A, KR 87 and KX155
Ok so the Max7219 boards have arrived and the digit displays.
Time to see if I can get these working
Time to see if I can get these working
-
- Posts: 5346
- Joined: Thu Jul 27, 2017 12:22 am
Re: Bendix KN62A, KR 87 and KX155
Good luck Jason, while working on it
Gilles
Gilles
Re: Bendix KN62A, KR 87 and KX155
half an hour later Pretty happy to say the least... defiantly a big nod to AM then my dumb luck.
Re: Bendix KN62A, KR 87 and KX155
Hi Tony / @Sling
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.
This is exactly what is happening, do you know if AM or the Arduino can read/check this?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.
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.
Re: Bendix KN62A, KR 87 and KX155
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.
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D