Building a physical KX165 panel🔗
Posted by Médéric Ribreux 🗓 In projects/ flightgear/
Introduction
BendixKing KX165 is a COM/NAV radio console with which you can configure what COM and NAV stations you would like to use for communications and IFR. In this project, we'd like to build two stacks of KX165: one for COM1 and NAV1 and the other for COM2/NAV2.
I'd like to say that I have never seen a real KX165 before trying to build a physical console for it.
Input/outputs
Console outputs
One stack of KX165 just shows four 5-digits 7-segments to display the frequencies of COM and NAV. For COM, two frequencies are displayed: the used frequency and the standby one. On the NAV side, there is also two frequencies that are displayed but you can also display (and set) the OBS radial by pushing the frequency knob.
For output, we just need 4 5-digits or 2 10-digits of 7-segments per stack. Since we want to build two stacks, we need 8 5-digits or 4 10-digits.
Console inputs
One stack of KX165 have lots of input commands:
- One potentiometer with ON step to set the audio volume of COM.
- One push button for switching used and standby COM frequencies.
- One double rotary encoder to set dot parts and main parts of standby COM frequency.
- One potentiometer with ON step to set the audio volume of NAV.
- One push button for switching used and standby NAV frequencies.
- One double rotary encoder with push button to set dot parts and main parts of standby NAV frequency and to set OBS radial mode.
We can add a potentiometer to regulate 7-segments LEDS dimming.
But, after a bit of part searching, I've found that double rotary encoders are really expensives compared to single shaft units (15€ each vs 2€). We are going to use one rotary encoder to set main part frequency and another rotary encoder (with switch button for NAV) for the dot part of the standby frequency setting.
Remember that those parts are only for one stack of KX165.
Communication with the computer
We will use a USB port on the fligthsim computer to interact with the console. We need to have a microcontroller which will be able to "speak" USB easily.
Microcontrollers dimensioning
Introduction
We need to be careful about the number of pins, so we need to try to determine how many pins are necessary to take care of inputs and outputs. Furthermore, we need to have a gross vision of the memory consumption (RAM), so we will have to list all of the needed live data.
Output Pins requirements
We need 5-digits 7-segments LED display. I have sourced the LDP-N564RI on Mouser site.
We can pilot a 10 digits or a 5 digits with multiplexing to reduce pin requirements (actually, it is a pre-requisite). To pilot a 5-digits 7-segments we need 13 pins even if there is 14 pins (last pin is for the last dot which we don't care about).
A full stack of KX165 needs 4x5-digits displays which means we need 4x13 pins = 52 pins. Actually, it can be greatly reduced. We need 8 pins to power the LED of one 7-segments. But we can connect all those output pins to the other 5-digits displays as long as there is enough pin to control the multiplexing. the main drawback of this method is that you have to share the µcontroller cycles between n displays instead of just one. As multiplexing is just to draw a 7-segment at a time, distributing the power with the input pins (common cathode).
- 3 SPI pins for the digit µcontroller communications with central unit.
- 8 pins for 7-segment (+ dot) drawing.
- 1 pin per digit for multiplexing.
- 2 pins for energy (5V and GND).
- 20 digits needs 33 pins.
- 10 digits needs 23 pins.
=> minimum of two ATTiny with 24 pins at minimum.
Clocking
- ATTiny @20Mhz (minimum 10Mhz clock).
- ATTiny with max of 32 pins.
- 10Mhz = 1 million cycles.
- with 20 digits ⇒ 50Khz per digit.
- with 10 digits ⇒ 100Khz per digit.
- Maximum USB outdraw: 100mA !
- Maximum energy dissipated per digit: 1.2v * 200mA * 8 = 2W.
Command pins
For one stack of KX165:
- 2 single-shaft rotary encoders for COM: 2 x 2 pins = 4 pins.
- 1 single-shaft rotary encoder for NAV main frequency: 2 pins.
- 1 single-shaft rotary encoders + push button for NAV dot frequency and radial mode selection: 3 pins.
- 1 switch potentiometer for COM ON/OFF and volume: 3 pins.
- 1 potentiometer for NAV volume: 2 pins.
- 1 push button with frequency selection: 1 pin.
Total of 15 command pins per stack.
Central unit
A dedicated µcontroller for:
- communicating to 7-segments digits µcontrollers with SPI (4 pins).
- communicating with the computer with USB + power via USB (4 pins).
- central unit for commands (2x15 pins: 30 pins)
- ATMega with USB controller.
Total of 40 pins: 30 I/O lines, 2 power, 2 Serial TX/RX (I/O lines), 4 SPI, 2 crystal.
Ports descriptions:
- VCC (pin 40): Power current.
- GND (pin 20): Ground.
- RESET (pin 9): Reset the µcontroller.
- XTAL 1 (pin 18): Input for crystal oscillator.
- XTAL 2 (pin 19): Output to crystal oscillator.
Cost for a commercial KX165 console
In France, you can buy a new Saitek Pro Flight Radio Panel for about 150€. We need to maintain the BOM under this cost otherwise, buying consumer electronic device would be easier and cheaper.
Enclosure
- about 5 x 15 cm for the front panel.
Bill of materials
- 1 potentiometer for global LED dimming.
- 4 single-shaft rotary encoders for COM.
- 2 single-shaft rotary encoders + push button for and NAV frequency/NAV Radial.
- 2 push buttons for frequency switching.
- 2 ATTiny with 12 pins minimum +SPI.
- 1 ATMega with 28 pins minimum.
- 3 cristal oscillators for µcontrollers.
- 8 5 digits 7-segments LED panels.
- 1 USB connector.
- 1 power unit.
- 1 USB cable
- lots of wires !
- lots of connectors !
- lots of debouncing resistors !
- 1 wood enclosement
- 2 A4 sheets of paper for printing KX165 faces.