Sunday, December 18, 2011

The Switch Matrix

Switches go on and off.  There are two leads and a diode.  What's not to get?

It can be confusing to someone new to the hobby.  Matrix questions come up all the time on RGP.  I hope to help clarify the switch and light matrix here with an example and an illustration.

The system 11 board can support up to 64 switches.  If you were to wire that conventionally, that is to say a wire going to the switch and a wire coming back from the switch, you would end up with 128 wires.  Also, to manage the wires you would want them to be different colors.  You could get away with 64 colors, but it would be easier to have 128 colors to signify 1 color for a "To the switch" wire and another color for a "From the switch" wire.

For the switches alone, you would have 128 wires, and then you would have to add another 128 for the lights.  You can see where this might become confusing and expensive for the manufacturers.  So what they adopted for the switches (and the lights) is a matrix.

You create an 8 by 8 matrix (grid).  8 colors on the X axis and 8 colors on the Y axis.  This gives you 64 intersections.  Like the game battleship.
What the game CPU does is checks each intersecting X and Y to see if that switch is closed.  It doesn't do it all at once.  It scans them.  Is the Green/Brown wire connected to the White/Brown Wire?  Is the Green/Brown wire connected to the White/Red wire?  Is the Green/Brown wire connected to the White/Green wire?  1,1 then 1,2 then 1,3 then 1,4 etc.
Here is the Switch Matrix diagram from F-14 Tomcat, however you'll find this diagram in many more pinball manuals.  

 What I've done is highlighted a single switch in yellow.  The Upper Right "C" target.  What have we learned from this diagram that will help us with troubleshooting?

Look at what I highlighted in yellow and note the color of the wires.  There is a wealth of information here. 
  1. Looking at the Upper Right C Target under the pinball playfield, it should have a Green/Violet and White/Blue wire.  Make certain that this is the case and that the wires are connected properly.
  2. On the MPU board, the White/Blue wire should go to connector J10, pin 6.  Make certain that this is the case and that the wire is connected well.
  3. On the MPU board, the Green/Violet wire should go to connector J8 pin 7.  Make certain that this is the case and that the wire is connected well.
  4. You should check to see if all of the other switches on the White/Blue wire work.
    • If for example, the Left Center Eject switch works but the Lower Ramp, Lower Right "C", etc switches do not work, then there may be a broken wire between the Left Center Eject switch and the Lower Ramp switch.
  5. You should check to see if all of the other switches on the Green/Violet wire work.
    • If for example, the Upper Right "T" target works, but the Upper Right "A" target does not work as well as the Upper Right "C" target, the "Kill Gen. Yagov" switch, etc do not work, then it may be a broken wire between the Upper Right "T" target and the Upper Right "A" target.
  6. Check the diodes on the switches for the string that does not work.  It's possible that a downstream diode, or the diode on the Upper Right "C" target itself is bad.
  7. If the whole column of switches is not working and the wires and connectors are all sound, on the MPU board, transistor Q42 should be tested.

The same design applies to the lights.  And by lights I mean the special lights, not the general illumination lights.  As a quick review: General Illumination lights (GI) are not controlled individually.  Those are the lights that all turn on at once, and all turn off at the same time.  It's the accent lighting.

The special lights are on a matrix like the switches.  The CPU scans through the connections and if the Lower "C" Light should be on, it briefly sends a pulse through the two wires to light that individual light.  
  • As an aside, I'm not sure exactly how this works.  I imagine it connects one wire to ground and connects the other wire to a current source.  I'll have to look into that, but it's not important at this point.  We're looking for bad transistors, wires, and diodes right now.
This information allows you take a more methodical approach to troubleshooting the problem.  Also, you'll spend less time digging around through wires and wondering where they lead to next.

It also lets you into the designer's head a little and I hope demystifies an aspect of the hundreds of feet of wire.  Also, this design is common in many, many games.  Understanding this concept will allow you to quickly attack problems without even having to resort to a manual.

And the blog wakes up again, like a horror movie monster.

Recently, I was asked by someone who found this blog why I didn't blog anymore.  My answer was, I was kind of done with this project, but I always meant to continue in some other way.  I'll be trying to figure out a way to put this blog in some other format that can be indexed by subjects like, "Rebuilding Flippers", "Rebuilding Targets", etc.
 Mark asked me, (Oh, his name is Mark, Hi Mark!) some questions about pinball as he was new to the hobby.  It sparked something for me.  I have learned a ton and demystified many subjects for myself.  However, I'm still new enough to remember those things that completely had me confused at first.

Thus, I start phase two of this blog.  Explaining stuff that will help a beginner better understand how a pinball machine works.  Understanding these concepts will really cut down on troubleshooting time and costly mistakes.

Things like:

How does a coil work in the context of a pinball machine?
What is a switch/light matrix?
What resources are available to me to learn about [Soldering, Electronics, Buying a pinball machine, etc]
My display is out, how do I tell what I need to re-order?  Why would I buy an LED replacement?
LEDs are cool, why are they flickering?  How do I make it stop?
I brushed away all of the bad looking stuff that leaked from my batteries, do I really have to do more to fix it?

And other stuff I remember as I go along.