Building a physical KMA20 panel🔗
Posted by Médéric Ribreux 🗓 In projects/ flightgear/
Introduction
KMA20 is an audio panel from Bendix King with which you can transfer audio signals to speaker or headphones. You can also configure which microphone will be used. There is also an ILS light controls for MM and OM signals.
There is no commercial equivalent product (nothing on Saitek side as far as I have searched).
What does it look like ?
The face looks like this:
Input/Outputs
Inputs
On the left, you can see a 3 position rotary switch. It is the microphone selection switch. First position is to select COM1 frequency to answer, second position, you will be talking to COM2. Ext means to use the microphone to speak to you copilot. To emulate this switch, we just need 1 three positions rotary switch.
Then you have the main group of 8 switches which is used to send the audio signal of the different systems to the speaker, to nothing (silence) or to headphones. Those 8 switches have 3 positions: up for speaker, middle for silence, bottom for headphones. To emulate this group of controls, we need 8 three positions toggle switches. Those positions will be ON-NONE-ON.
On the right, there is a three positions switch which is used to set the sensitivity of the beacon marker (HIgh or LOw). If the switch is toggled to the bottom, all of the bottom left LEDS are switched on (for test purpose). To emulate this control, we need 1 three positions toggle switches.
Outputs
There a few outputs for KMA20. There is just 3 LEDs on the bottom left. A LED means that you have crossed an Airway marker, O means you have reached an Outer beacon marker and M means you have reached a Middle beacon marker. Those markers are lighted on ILS procedures (as far as I know).
Supplemental inputs
We need more than the inputs shown previously. First, we need 1 ON/OFF switch to power the KMA20 console. Then, if you look closer at the KMA20 panel at the bottom right, just before the King logo, you will see a photo-diode. It is used to adjust the 3 lights dimming.
As far as I am concerned, I'd prefer to have a potentiometer to adjust LED brightness manually. So we need 1 rotary potentiometer. But we could combine those two controls by using only 1 switch rotary potentiometer.
Microcontroller dimensioning
Pins
We will use PDIP µcontrollers as it is easier to solder with hand.
- One 3-positions rotary switch consumes 1 analog pin if we use 3 resistors.
- One 3-positions toggle switch consumes 2 pins (the middle position will switch off the two other pins).
- So 9 3-positions toggle switches consumes 18 pins.
- 3 LEDS consumes 3 pins.
- The switch rotary potentiometer will be connected to the microcontroller but only for potentiometer (dimming LED directly with a potentiometer seems to be a bad idea). It will consume 1 analog input pin.
- We need Serial TX/RX to communicate with computer and it consumes at least 2 pins.
- Power (VCC and GND) consumes 2 pins.
- If there is RESET pin, it should be connected.
- We don't need crystal (we can rely on internal clock).
We need at least 25 I/O pins (two analogs and 3 PWM). After a bit of search, there is no PDIP28 AVR that can be used on this project. We need to focus on 40 PDIP µcontrollers.
We could reduce the 18 pins of the toggle switches to one analog pin using an R-2R ladder. But we would have to use about 36 resistors which is not cost effective (the price difference between PDIP28 and PDIP40 AVRs are about 2,5€) ! Even with some molded R-2R ladder it is not cost effective. Definitively, we should use a PDIP40 µcontroller. In Atmel range, we should use ATMega !
RAM consumption
We need to track the following inputs
- MIC rotary switch position: 1 Byte (max).
- AUTO toggle switch value: 1 Byte (max).
- COM1 toggle switch value: 1 Byte (max).
- COM2 toggle switch value: 1 Byte (max).
- NAV1 toggle switch value: 1 Byte (max).
- NAV2 toggle switch value: 1 Byte (max).
- ADF toggle switch value: 1 Byte (max).
- DME toggle switch value: 1 Byte (max).
- MKR toggle switch value: 1 Byte (max).
- MKR/TEST toggle switch value: 1 Byte (max).
- LED A status: 1 Byte (max).
- LED O status: 1 Byte (max).
- LED M status: 1 Byte (max).
Minimum of 13 Bytes of RAM for KMA20 variables.
Communication with flightsim computer
We will use USB to power the KMA20 and to send/receive information to/from the flightsim computer. We can use V-USB library and a few discrete components or use an FTDI uart-USB converter.
We will use USB-B connectors as they are cheaper than mini-B ones and are much more easier to solder by hand. Furthermore, USB A-to-B cables are nearly as cheap as USB A-to-mini-B ones
Dimensions
Here is what I've found inside the installation manual (dimensions are in centimeters, as a european, I love metric system !):
You can download the SVG source to make your own adjustments. Beware, all of the sizes are deduced from the original size: I've taken the first panel bitmap, imported it in inkscape, adjust the size to what I'v found in installation manual and make manual measures inside inkscape: those figures are not really precise.
I've gone further and made an SVG replica of the panel of the KMA20:
The goal is to print this panel on a adhesive paper (with a black'n white laser printer), to cut the grey holes (for switches) and to stick it to a metal panel (with holes also) to have something that looks like a KMA20 panel.
You can download the SVG source to make your own modifications or to print with better quality.
For the moment it is just pure theoric work: I've not attempted yet to build the thing. It will surely need adjustments…
Cables
We need lots of cables to connect switches and LEDs to the Printed Circuit Board (PCB). But how much ?
Here is an estimation:
- For the Toggle Switches (TS): 25 cm x 3 cables x 9 switches.
- For the Rotary Switch (RS): 35 cm x 4 cables.
- For the LEDs (LED): 35 cm x 4 cables.
- For the Switch Potentiometer (SP): 25 cm x 5 cables.
- For USB connector (USB): 25 cm x 4 cables.
Here are the color codes for each connection:
- TS: Red (VCC)/Blue (Pin 1)/Yellow (Pin2).
- RS: Red (VCC)/Blue (Pin1)/Yellow (Pin2)/White (Pin 3).
- LED: Black (GND)/Blue (Blue LED)/Yellow (Amber LED)/White (White LED).
- SP
- Switch: Black (GND)/Red (VCC).
- Potentiometer: Blue (GND)/Blue (VCC)/Yellow (Pin).
- USB: Black (GND)/Red (VCC)/White (Pin -)/Yellow (Pin +).
Lengths by color codes:
- Black: 25 + 35 + 25 = 85 cm
- Red: 9 x 25 + 35 + 25 + 25 = 310 cm
- Blue: 9 x 25 + 35 + 35 + 25 = 320 cm
- Yellow: 9 x 25 + 35 + 35 + 25 + 25 = 345 cm
- White: 35 + 35 + 25 = 95 cm
Bill of materials
Component | Number | Manufacturer | Datasheet | Price |
---|---|---|---|---|
3-positions rotary switch | 1 | Lorlin CK1032 | Datasheet | 1,94 € |
3-positions toggle switches | 9 | E-Switches 100SP1T4B1M1QEH | Datasheet | 2,12 €/by 10: 20,3 € |
switch rotary potentiometer for powering up and LED dimming | 1 | Bi Technologies P170S-FC20BR10K | Datasheet | 0,94 €/by 2: 1,88 € |
current limiting resistors for LEDS (140 Ohms) | 3 | Yaego MFR-25FBF52-140R | Datasheet | 0.101 €/by 6: 0,606 € |
Microcontroller | 1 | Atmel ATMega 164A | Datasheet | 4,84 € |
DIP Socket 40 | 1 | FCI DILB40P-223TLF | Datasheet | 0,54 € |
20 Mhz Quartz oscillator | 1 | CTS Electronic Components ATS20B-E | Datasheet | 0,362 € |
20 pF capacitor | 2 | Xicon 140-100N2-200J-RC | Datasheet | 0,086 €/by 2: 0,172 € |
Cap for rotational switch | 1 | Eagle Plastic Devices 450-AE186 | Datasheet | 0.648 € |
Cap for switch rotary potentiometer | 1 | Eagle Plastic Devices 450-4760 | Datasheet | 0,81 € |
5mm Blue LED Bright | 1 | Cree C503B-BCS-CV0Z0461 | Datasheet | 0,211 €/by 3: 0,633 € |
5mm Amber LED Bright | 1 | Cree C503B-ABS-CY0Z0341 | Datasheet | 0,201 €/by 3:0,603 € |
5mm White LED Bright | 1 | Cree C513A-MSN-CW0Y0511 | Datasheet | 0,252 €/by 3:0,756 € |
USB B connector | 1 | Molex 67068-9001 | Datasheet | 0,98 € or samples |
USB A-to-B cable | 1 | Molex 88732-9002 | Datasheet | 2,25 € |
White cable | 4 ft | Te Connectivity 55A0111-24-9 | Datasheet | 0,29 €/ by 4: 1,16 € |
PCB Headers 5 pins | 1 | Molex 22-28-4050 | Datasheet | 0,254 € |
PCB Headers 12 pins | 2 | Molex 22-28-4120 | Datasheet | 0,399 €/by 2: 0,8 € |
PCB Headers 16 pins | 1 | Molex 22-28-4160 | Datasheet | 0,531 € |
Crimp Housing 2 pins | 1 | Molex 22-01-2021 | Datasheet | 0.102 € |
Crimp Housing 3 pins | 10 | Molex 22-01-2031 | Datasheet | 0,174 €/by 10: 1,74 € |
Crimp Housing 4 pins | 3 | Molex 22-01-2041 | Datasheet | 0,255 €/by 3: 0,68 € |
Crimp Terminal | 100 | Molex 05-50-0113 | Datasheet | 0.036 €/by 100: 3,6 € |
Wood for enclosure | 1 | Medium 3mm | 2,45 € | |
A4 Sheet of paper with KMA 20 console printing | 1 |