Hi folks,

I'm a newbie, but trying to learn fast. I'm in the planning stages and excited about using SIMVIM.

I am working on the design of a panel that will give me key controls for the 737 MCP. I have ordered a set of KD2-22 momentary switches with green LEDs, and I'm a bit confused on what I need to do in the wiring. I will be using an Arduino Mega.

Found this post from a few years ago and if you scroll down to the section "Wiring the unit" he specifically says the way he wired it will not work with SIMVIM. I'm wondering if things have changed or been updated since?

I have reviewed the SIMVIM configurator and it appears it only requires one pin for the switch and one for the LED (+ GND for each).  But can a digital switch from the MEGA power the LED? If so, do I need to wire an inline resistor (220 Ohm) for the LED? Or do I need to run a separate 5V line to the switch as as power source (for the LED with a resistor inline)?

Many thanks!

Dec 10, 2020 in Input Controls by

1 Answer

The main reason Karl Clarke said his wiring is different than for SimVim is because SimVim does not daisy chain the 7-segment display units. See this section 7-Segment Displays . The KD2 switch actually can be wired per diagram where the common terminal of the switch is connected to GND and the other terminal is assigned a pin on the Mega. SimVim looks for a GND signal as an ON indication. Also the cathode of the LED can be connected to GND and anode through a resistor can be assigned to a Mega pin. See Inputs and Direct Digital Output . However this is inefficient, uses too many Mega inputs. The MCP has 14 KD2 type pushbuttons, each with associated LEDs. There are also other switches, encoders, and rotary selectors, each requiring an input, and 3 additional LEDs. The better way is to use multiplexed inputs ( Inputs ) and serial LED outputs for LEDs ( Digital Outputs ). This will conserve on the Mega pins required.


Dec 11, 2020 by

Thank you so much Bill. You made my day!  I have ordered a couple MUX boards as well as I was hoping I'd get this sort of answer. 

One more question as I look at the Digital Output: How do I power the DM13A for a bunch of LEDs using a breadboard setup as drawn? Is the 5V from Arduino enough? I thought it had limitations. I realize I won't be driving all LEDs at the same time, but I'm guessing I could have as many as 6-8 on at one time.

Again, many thanks!  Such a great community!


When you look at the section on Digital Outputs when using the DM13A it states that you should use another power source, +VLED, from 5 to 15 volts depending on your LED type. I have used a +5 volt supply such as an old ATX computer supply. Note that the DM13A is a current sink that regulates the max LED current as determined by the Rext resistor. No individual resistors for LEDs are needed.

For any concerns about the use of the 5V from the Arduino should be referenced to Powering particularly the combined diagram at the bottom of the page.

Have fun.


Bill, hoping for a couple more tips/answers.

The KD2 Switches I have spec 3V. The DM13A specs 5V. It's no problem as the power supply I have has both capabilities. But I'm just wondering if a DM13A can run on 3V? Thoughts?

Second, I'm using the DM13A as suggested with about 14 KD2 switches. I just want to make sure I'm wiring the LEDs correctly. As I look at the wiring diagram on the SIMVIM site, I believe I connect each pin of the DM13A to the GND (-) pin for the LED, correct? 

And I think I can either daisy chain the power for the LEDs (from my power supply on my breadboard) to all the LEDs or run a power line to each from a breadboard (which I'm planning to use), correct?

Finally, since my KD2s are 3V, I'm assuming I run 3V power to them, not 5V as shown in the diagram (correct?)

Sorry for the questions, I'd just like to do this correctly the first time thru.


Mark, These are good questions and I hope I can provide some good guidance.

First, the spec for the KD2 switches is a spec regarding the voltage drop across the LED when illuminated. All LEDs exhibit slightly different voltage drops dependent on the LED color and manufacturing process. This is usually provided in the LED specs to assist in determining what size resistor to place in series with the LED to limit its current. This spec is usually the max voltage drop to be observed. In this case that will not be the issue. Using +5v for Vled is completely acceptable. When you observe the wiring diagram you will notice the Rext resistor placed between pin 23 of the DM13A and GND. According to the DM13A spec sheet this Rext will limit all the connected LEDs current. The Rext is selected in the range of 1 - 22 Kohms based on the brightness level you desire. Notice on the diagram the potentiometer that can be used on a temporary basis to determine an acceptable Rext.

Second, You are correct in that each of the DM13A outputs(pins 5-20) is connected to the cathode (-) side of each LED. Daisy chaining the +5v Vled to anode (+) side of all LEDs is easiest.

Finally, the +5v is the power source to use for +Vled.

I originally breadboarded the DM13A/LEDs (per diagram) to successfully test this all out before wiring up the MCP.

Have fun,