Switch-It diode Matrix

THIS IS AN OLD ARTICLE WRITTEN BEFORE NCE INTRODUCED THE NCE MINI/MACRO PANEL WHICH IS THE CORRECT SOLUTION TODAY. THIS OLD SOLUTION IS NOT RECOMENDED ANYMORE BUT IS PRESENTED FOR RECORD SAKE.

The NCE Switch-it at face value can offer the opportunity to implement a Button input Diode Matrix control system. However there are some electrical risk involved and it technically violate NCE rules about connections. Can it be done successfully and without risk? Yes IF one follows some very specific rules covered here.

In this section we have:

1) POSITIVES AND NEGATIVES OF A NCE "Switch-it" DIODE MATRIX

2) EXAMPLE OF WHAT A DIODE MATRIX CAN DO?

3) WHAT IS A DIODE MATRIX MADE OFF?

4) WHAT DOES A SCHEMATIC OF A DIODE MATRIX LOOK LIKE?

5) WHAT ARE THE RULES FOR BUILDING THE NCE "Switch-It" DIODE MATRIX?

6) RULE #9 DISCUSSION (Button Input Problem)

7) WHERE DO I FIND THE COMMON CONNECTION POINT ON THE "Switch-It"?

8) RULE #2 DISCUSSION (The Button Common & Diode Overload problem, the Risk part)

9) IS THERE A BETTER NO RISK WAY TO DO THE TRACK ROUTING?

1) POSITIVES AND NEGATIVES OF A NCE "Switch-it" DIODE MATRIX:

Positive:

1) Can simplify control panel design by lowering the number of buttons needed to set up a route.

2) Save time in setting up a route in a yard, interlocking or through complex turnout like a 3 way.

Negatives:

1) Somewhat Complex electrical setup.

2) Can potentially involve more NCE Switch-It's than you think you need to make it work.

2) EXAMPLE OF WHAT A DIODE MATRIX CAN DO?

It consist of semiconductor diodes arranged in such a way that more than one electrical path is established to control multiple turnouts with a push of one button. The diodes route the right buttons inputs action to trigger the required control the right turnouts to set up corresponding track route.

Any generic low cost diodes can be used. There are no special requirements. Small simple signal diodes like the 1N914 or 1N4148 are everywhere and really cheap to use.

4) WHAT DOES A SCHEMATIC OF A DIODE MATRIX LOOK LIKE?

3) WHAT IS A DIODE MATRIX MADE OFF?

A Diode Matrix is a old electrical technique of routing button inputs or switch machine driver outputs to multiple switch machines such that with a push of SINGLE BUTTON can cause MULTIPLE SWITCH MACHINES to move in parallel. The most popular application is route control of a yard ladder track.

Look at the photo control panel for a Yard Ladder on the left. There are 3 buttons with each representing one of 3 track paths. By pushing one of the buttons for the track you want to get to, all of the turnouts starting from the main line on the left will move as required to get to the correct position to reach the track. You do not need to worry about each individual turnouts position. For example, pushing the TOP button will potentially cause both turnouts to move if they were all initially set against the top track path.

5) WHAT ARE THE RULES FOR BUILDING THE NCE "Switch-It" DIODE MATRIX?

The capacitor shown in this example application schematic is very important for it addresses a functional issue relating to how the Switch-It reads it's button inputs. If you do not add the capacitor, the matrix will not work correctly!. Read on to learn more about why.

The "Ground Symbol" below each push button is the "Button Common". This is the connection that needs to be established between all Switch-Its and buttons involved in the diode matrix.

The schematic on the left shows the Diode matrix portion of the design for a 4 track ladder.

The NCE Switch-it will move the motor to the N or R position when the input is grounded to the "Button Common" and then released.

Notice the diodes only allow selected current paths to ground with the push of any given button for the given track.

1) Use only Rev B or newer Switch-its. Rev A will not work. To learn more about the various versions, go here:NCE Stall Motor (Switch-It/Switch-8)

2) Must install a Button Common (Swtich-It Common Ground) connection between all the Switch-Its involved. This is key. See discussion below.

3) All the switch-its must be in the same location/spot next to each other.

4) All of them must be feed from the same single set of DCC power leads. Local "Daisy Chain" connections.

5) Use standard common small leaded "signal diodes" like 1N914/1N4148 to construct the diode matrix. No need to use the bigger and bulkier rectifier diodes like 1N400x types but they should work too.

6) Place the diode matrix near the Switch-its.

7) Place the Switch-its near the buttons as close as possible. The use of long motor drive wires is GREATLY preferred over the use of long button wire runs.

8) Run the button wires as a "wire pair" (lose wires twisted together or use a 2 conductor cable) between the buttons and the Diode matrix to maximize noise rejection. Best to avoid running a button common at the control panel.

9) Make sure that for a given Switch-It board that none of the button inputs are RELEASED at the same time when the button is released. This is Key. This may force the use of more Switch-Its than you think or use a capacitor. See discussion below.

10) Do not use more than 3 Switch-Its boards in a given diode matrix assuming all outputs are driving motor (6 Tortoise motor total). The total motor load must be 120mA or less. That enough to do a 7 track ladder. If you need to do more than 6 tortoise motors, then you should read and do section 10 below.

6) RULE #9 DISCUSSION (Button Input Problem)

The Switch-It button input is designed as follows:

a) Pressing a button cause the button input to go logic low. (Button Common = 0V or ground)

b) Releasing a button cause the button input to automatically go logic high. (Resistor pull-ups on each input)

c) The Switch-It first looks for the button input to go low and then WAITs on that same button input to go high. (Low then High)

d) The Switch-It will only take action AFTER the button input goes high.

e) Button inputs are scanned sequentially. (This is the root cause issue.)

So what does this mean?

A Button being pressed holds the entire attention of the Switch-it on just that one button until it is released. When the button is released, the diode matrix will in turn release all the OTHER button inputs at exactly the same time. Checking button inputs sequentially (one at a time) will cause the Switch-It to "miss" the other button inputs being pressed and released and consequently fail to activate the other turnouts required to set the track route.

What are the solutions?

a) Buy More Switch-Its: Add enough Switch-It boards to make sure that only one Switch-It board input is involved in any given button press cycle at any given time. Typically one will be forced to buy more Switch-Its than one desired to implement the matrix.

(However, this may not be a disadvantage in all cases. The unused input can be used to control individual turnouts as required. Likewise, if a given yard is a through yard with symmetrical ladders on each end, than the unused input can be used with a second diode matrix to control the opposite ladder. All Switch-its can be used up. The solution takes planning.

b) Add 1uF 16VDC capacitors to the Matrix on certain button inputs: A capacitor is a form of electrical memory in that is stores a voltage even if the voltage is zero. It takes time for the capacitor to get charged up and time means time delay. That is the trick with the capacitor. When the button is pressed, the capacitor voltage is driven to zero. When the button is released, the capacitor can hold down a button input low for a fraction of a second later such that the Switch-It will see it as a DIFFERENT button "low to high" press and release. In other words, we can fool the Switch-It into doing what we want. This solution takes planning. Done correctly, one will not have to use option "a" to successfully implement a diode matrix. (I would like to give credit to: Barry "diode matrix" Draper for this simple great solution to the button input problem.)

7) WHERE DO I FIND THE COMMON CONNECTION POINT ON THE "Switch-It"?

The diagram on the left show the connections made to a normal Switch-It. The screw terminals that are black dots are the connections for the "Button Common" required for the diode matrix.

The DCC connection on the top left goes to all the other Switch-Its FIRST before there is any connection to the DCC bus that will power it.

8) RULE #2 DISCUSSION (The Button Common & Diode Overload problem, the Risk part)

Doesn't Rule #2 violate NCE's rule of no common as stated in the manual?

YES IT DOES. The REV C manual says "Do not connect decoder common to the common of other Switch-Its".

Then why do it?

1) It is the only way to allow reliable operation of a diode matrix to work without using other devices.

2) It is possible to address NCE technical concern and build a reliable Diode Matrix.

Both of these have been learned from experience.

What is the Technical reason why you need the Button Common?

The DCC common connection created by sharing the DCC power with all the Switch-Its (Rule #4) is not a stable connection due to the nature DCC waveform which is a form of AC. When the DCC signal changes polarity passing through zero volts on the way, the common becomes broken since the diodes are no long conducting current. Open circuit at that fraction point in time which is seen by the button inputs.)

What is the risk in violating NCE no common rule?

Adding the button common puts all of the negative rectifiers on all the Switch-Its in parallel with each other. (Violates the multiple common rule in power supply design.) The diode with the LOWEST voltage drop can potentially end up carrying most if not all the load current for ALL of the Switch-Its connected to the common. When the current rating of the given diode carrying all the load current is exceeded over a long enough period, it will thermally overload itself and burn out.

(Part of the problem is the type of rectifier diodes used in building the Switch-it can vary in both manufacture and model number. NCE reserves the right to chose what ever diode it needs to use for both production and cost goals. So there is no way to guarantee the diodes will even share well at all.)

NCE is concerned, and rightly so, that you can potentially overload the one of the rectifier diodes of one of the Switch-Its that are connected to the button common. There are to many variables involved and NCE cannot assume the person doing the installation will know what the variables are. NCE must assume the person will have zero electrical skills. Hence a simple rule for simple people. I would do the same too if I wrote the manual.

What are the conditions that create the potential for Damage (NCE's concern)?

The risk here is how much current is involved between all the Switch-Its involved in the given matrix. If the total motor load current exceeds 120mA and we assume only one rectifier diode is handling all the current, you may blow out that diode. I can verify this consequence from experience. (120mA assumes each Switch-It output is driving one tortoise which draws 20mA each, that is 40mA/Switch-It board x 3 boards.)

If one limits the scope of the diode matrix complexity to not involve more than 3 Switch-its boards per rule #10, you will stay close enough to the diodes current rating that it will be OK. Rules #3 and #4 exist to minimize this overload potential to a specific rectifier diode and create the opportunity more than one rectifier diode to share load current between them as much as possible. But I am making no guarantees since I cannot be involved in the construction of your Diode Matrix.

So there Risk of damage to the Switch-Its using a diode matrix. Hence the general reason why the diode matrix option is not offered or discussed in any NCE Switch-It manual. The user must accept all risk.

9) IS THERE A BETTER NO RISK WAY TO DO THE TRACK ROUTING?

Yes. Use NCE's Mini-Panel(s) with any combination of Switch-8 or Switch-It accessory decoders. This give you almost unlimited capability and control. Essentially the Diode Matrix is done in software inside the Mini-Panel.

To learn about the NCE Mini-Panel, go here: nce-mini-macro-panel

To learn about the NCE Switch-8, go here: Nce-Stall-Motor-Switch-Series