Diode Matrix Turnout Control
To a modeller who is not very interested in the electrical aspects of a model railway, a diode matrix is a complete mystery. The purpose of this article is to remove some of that mystery and explain what a diode matrix does and how to create one.
Let us start by considering what a diode matrix is used for. A diode matrix is a part of the circuitry that can be used with electrically operated turnouts. Without the matrix the operator would have to throw each turnout along the selected route individually. With a diode matrix you can set up the complete route at the press of a single button.
Route control is straightforward using a diode matrix. To achieve the same result using some other method is more complicated. One of the advantages of having electrically, rather than mechanically, operated turnouts is that it allows route control to be added in such a simple way.
To see how simple a diode matrix really is, let us consider a few simple track plans and see how they would need to be wired so that all of the turnouts on a given route can be set appropriately. The simplest track plan that we can consider is a single turnout (figure one). Here we have two possible routes, one that uses the straight road through the turnout, and the second uses the curved road. The point motor attached to the turnout has two solenoids built into it which pull the points to either side to set the appropriate road. Let us call the solenoid that sets the straight road the Normal solenoid (N) and the one that sets the curved road the Reversed solenoid (R). To wire this up we just take one wire from the N solenoid to the N button and one wire from the R solenoid to the R button. The other wire from each solenoid goes to the common return. Now we can set the straight road by pressing the N button and set the curved road by pressing the R button. Simple and we didn't even need a diode matrix.
Next lets consider a couple of situations where we have two turnouts. The first is a simple crossover (figure two). Here we have three possible routes. We can go straight through on the top track, straight through on the bottom track, or follow the curved road of both turnouts to cross from one track to the other. With a little thought we realise that the position of the second turnout doesn't matter when we are using one of the straight through routes unless we are using both straight through routes together. We can therefore consider the two straight through runs as one route setting. So again we have two possible route settings, one with both turnouts set straight, and the other with both turnouts set curved. We can wire both of the N solenoids to the same N button and both of the R solenoids to the same R button and have the two turnouts operate together to give us the routes that we require. Press the N button to set both straight through routes and press the R button to allow a train to cross from one track to another.
We still haven't needed a diode matrix and you're probably starting to wonder what we need a diode matrix for. This will become obvious when we consider our next track arrangement involving two turnouts (figure three). Here we have two turnouts arranged somewhat differently than in our last example. We have three possible routes each involving the single track at the left hand end of the diagram and leading through to one of the tracks at the right hand end. Let us label these routes 1, 2, and 3 so that we know which route is which. Let us also label the turnouts A and B. So route 1 links the left hand track via the straight road of turnout A to the right hand track labelled 1. Route 2 links the left hand track via the curved roads of both turnouts to the right hand track labelled 2. Route 3 links the left hand track via the curved road of turnout A and the straight road of turnout B to the right hand track labelled 3.
To wire up this combination we will require three buttons to correspond to the three routes. Button 1 will need to be wired to the N solenoid of turnout A. Button 2 will need to be wired to the R solenoid of both turnout A and turnout B. Button 3 will need to be wired to the R solenoid of turnout A and the N solenoid of turnout B. Now we have a problem. Both button 2 and button 3 need to be wired to the R solenoid of turnout A. This means that the two circuits are cross connected and pressing either button will supply power to the R solenoid of turnout A and both solenoids of turnout B. We need to find something to stop the power from circuit 2 getting into circuit 3 (and vice versa). The something that we can use is a diode, or rather two diodes. A diode only permits power to flow in one direction. If we wire a diode between button 2 and solenoid AR and another diode facing in the same direction between button 3 and solenoid AR (figure four) then we will have successfully separated the circuits again. The current which flows from button 2 through the diode to solenoid AR will not be able to get through the diode to button 3 and hence power will not reach solenoid BN. Similarly when power flows from button 3 via the diode to solenoid AR the other diode will stop the current reaching button 2 and hence power will not reach solenoid BR. The circuit now works correctly and the appropriate route will be set when each of the buttons is pressed.
So now we have a turnout circuit that requires diodes but we still haven't explained how this relates to those funny looking diagrams that we normally refer to as diode matrices. In fact what we have here with our two diodes is a very simple diode matrix. The wiring diagram for our track plan is shown in figure five in the normal format of a diode matrix. In a diode matrix we have one line down the page for each point motor solenoid (ie. two per turnout) and one line across the page for each route. Diagonal lines linking a route to a solenoid indicate that we need to run a wire between the button for that route and that solenoid. The little arrows with the bar across the end that appear on some of these diagonal lines indicate that a diode is required in that wire. A diode is required whenever more than one route button is connected to the same solenoid. to that solenoid. A diode is required in each wire leading to that solenoid.
Let us now look at how we can develop a diode matrix for a more complicated track plan. The process of developing a diode matrix is the same regardless of the actual track plan so it doesn't matter which track plan that we use as an example. Figure six shows a simple station track plan involving a loop and a few sidings that we can use for the purpose of showing the steps involved in developing a diode matrix.
Step ONE. Draw your track plan. A diode matrix is meaningless unless we also have a properly labelled track plan that shows how the diode matrix relates to the layout.
STEP TWO. Label your turnouts (figure seven). We need to have the turnouts labelled on the track plan so that we can determine which solenoid labelled on the diode matrix relates to which track setting on the actual layout. For example solenoid BN on our as yet to be drawn diode matrix will refer to the turnout at the top of our track plan being set to the straight position.
STEP THREE. Label your routes (figure eight). In our earlier example we could label the routes simply by numbering the tracks at the right hand end. This was because the other end if each route was obvious. In this example we not only have to label each end of each route so that we can tell where each starts and finishes (eg. routes 3,5,6,7) but we also need to mark the centre of each route where more than one route can start and finish at the same place (eg. routes 1,2). Each route should correspond to an intended movement on the finished layout so not all routes need necessarily extend through all possible turnouts (eg route 4 which allows a train to move between the loop and the siding but does not pass through turnout A onto the main line). In fact if you do not intend to ever run through a particular route then that route need not be marked on the diagram (eg. at a double track terminus having two crossovers in the approach you will never use the route that crosses through both crossovers).
This provides us with all the information that we will need in order to be able to relate the diode matrix to the layout. The next step therefore is to commence drawing the diode matrix.
STEP FOUR. Draw the basic grid for the diode matrix (figure nine). We draw one vertical line for each solenoid (ie. two per turnout) and one horizontal line for each route. These lines are labelled to match the way that we have lettered and numbered our track diagram.
STEP FIVE. We next determine which solenoids need to operate in order to set each route. As an example let us consider route 2 on my track plan. To set this route we need to set turnout D normal, turnout C reversed, turnout B reversed, and turnout A reversed. We therefore draw diagonal lines linking the horizontal line for route 2 with the vertical lines for solenoids DN, CR, BR, and AR. Figure ten shows the way that our diode matrix looks once the diagonal lines have been drawn in for all of the routes.
STEP SIX. Check that we haven't left out any essential routes. We can check that at least one route passes through each leg of each turnout by checking that there is at least one diagonal line linking to each vertical line. If we find a vertical line which does not have a diagonal line attached to it the either we have made a mistake on our diagram or we have left out a route. Checking the diagram in this way does not check that you have included all of the routes that are possible for your track plan or even all of the ones that are desirable. It simply checks that all of the solenoids are included in at least one route and that each turnout will actually be useable.
STEP SEVEN. Draw in the diodes (figure eleven). Check each vertical line on your diode matrix again. Whenever there are two or more diagonal lines attached to it we need to draw in a diode (the reason for this was explained earlier).
So now our diode matrix is complete and ready to be wired. The diode matrix for your track plan probably looks completely different to mine but it will work in exactly the same way.
We can now wire up the diode matrix. As mentioned before a diagonal line indicates a wire running between the specified route button and the solenoid indicated by your labelled track diagram. A diode shown on the diagonal line indicates that a diode needs to be included in the wire. It is essential that all diodes be wired the same way around. Diodes are marked in some way to indicate which end is which. A common way of marking is a silver band around one end. Just make sure that all of the diodes are wired with the silver band at the same end all of the time. It doesn't matter at this stage whether the band is nearer the button end or the solenoid end as long as they all face the same way.
The next thing to consider is the power supply. Most controllers come with an auxilliary output intended to operate accessories such as point motors. This supply will either be a separate transformer winding with a very low power rating or will alternatively come off of the same winding as the train controller itself. It doesn't really matter which of these two is the case so you don't need to start worrying about which type you have.
Each of these types of supply is suitable for operating one or two turnouts quite satisfactorily. Each has problems when attempting to throw a large number of turnouts simultaneously as may be required with our diode matrix turnout control system. A controller having a separate winding will probably not have sufficient power to throw the points across properly. A controller running the turnouts off of the same winding as the train control will have enough power but only at the expense of drawing power away from the train and hence causing the train to momentarily slow down. Neither of these situations is desirable so we need to take some action to resolve this.
One solution would be to add a separate power supply for turnout operation. This can be quite expensive and is not really necessary. The key to solving this is the fact that we only need this large amount of power for a short moment while we are actually setting up a route and throwing the required turnouts. If only there was some way of storing up the small amount of power available from our controller in such a way that a large amount would be available when we need it. (A simple way of looking at this is to imagine a tank of water which is being filled slowly by having water dripping into it. When we need a lot of water we have a thankful that can be released all at once). The device that does this for us is called a capacitor discharge unit (CDU). By attaching a CDU between the power supply and the route buttons we will have all of the power that we need provided that we don't need to set too many routes to quickly. Now the direction that you have wired up your diodes becomes more relevant. A CDU, as well as storing up the current until we need it, also converts the current from AC to DC (ie. instead of the current flowing alternately in both directions it now only flows one way). The simplest way to sort out this problem is to wire in the CDU and try it (figure twelve). If it doesn't work then simply reverse the two output wires from the CDU. It should then work.
And that is all that there is to diode matrix turnout control. Of course if you have a very complex track plan it may be simpler to split the diagram into several sections and develop each section as a separate matrix. This would have the effect of requiring two or perhaps three buttons to be pressed to set up a particular route but with a large reduction in the number of route buttons required.
It is all a matter of picking a suitable level of compromise. With one big matrix you may be able to set any desired route at the press of a single button but you have lots of buttons. Without a matrix at all you will still have lots of buttons and will have to press a lot of them to set up some routes. With a couple of smaller matrices you may require only a few buttons, only a few diodes , and be able to select any desired route just by pressing one or two buttons.
The diode matrix is a very useful means of simplifying the operation of your model railway. If you are using double solenoid point motors to operate your turnouts this enhancement is well worth considering.