Skip to main content

How a pinball machine works electronically: CPU, switches, lamps, coils

What does the CPU of a pinball machine actually do? How does it "see" that the ball hit a target, how does it light 64 lamps with just a few wires, how does it fire a coil without the board burning up? Here is the theory, at the electronics level, using the Williams System 6 of Firepower as the example. The same basics apply to every solid-state pinball machine from 1977 to today.

The article assumes no electronics knowledge beyond what voltage, current and a diode are. If you want to see the boards we are talking about, open the Anatomy of a pinball machine page in "Boards" mode. For the measurements mentioned, see the article Tools and measurements.

1. The big picture: a 1979 computer with "muscles"

A pinball machine of that era is a small computer that has no screen or keyboard, but switches, lamps, coils and displays. The work is divided into three levels:

  • The CPU (MPU board). The processor, the memory holding the program (ROM), a little working memory (RAM) and the input/output circuits. It works exclusively on +5 V and small currents. It cannot drive even a single lamp directly.
  • The driver board. The "muscles". Transistors that take a weak 5 V signal from the CPU and switch the large currents of the lamps (18 V) and the coils (28 V) on and off.
  • The power supply. The transformer steps the 220 V down to various voltages, the bridge rectifiers rectify them, and a regulator produces the clean +5 V for the logic. In System 6 the main voltages are +5 V (logic), +12 V, 18 V DC (lamp matrix), 28 V DC (coils), 6.3 V AC (general illumination, GI) and ±100 V (displays).

So the CPU does not "light" lamps. It changes the state of a bit from 0 to 1 in a memory location, and that bit, through a chain of transistors, ends up lighting the lamp. Everything that follows is a variation on this idea.

2. The CPU board: processor, memory, PIA

In System 3 through 6 the processor is a Motorola 6800, 8-bit, with a clock just under 1 MHz (the 3.58 MHz crystal is divided by 4). A thousand times slower than a modern phone, but for a pinball machine more than enough: the ball moves in thousandths of a second, the processor in millionths.

Around it there are three kinds of memory:

  • ROM. The game program, written once at the factory. It knows the rules: what each target is worth, when the bonus lights, when the ball ends.
  • RAM. A few hundred bytes of working memory. This is where the state of the game at this moment lives: score, which lamp is lit, which target has dropped. It is lost when the power is switched off.
  • Battery-backed CMOS RAM. A small memory (5101) kept alive by the three AA batteries. This is where the settings, the audits and the high scores are. That is why when the batteries die it "forgets" the settings, and that is why, when they leak, they destroy the board underneath.

The most important component for everything that follows is the PIA (Peripheral Interface Adapter, 6821). It is the processor's "hand" to the outside world: a chip with 16 pins that the processor can define, one by one, as an output (puts out 0 or 5 V) or as an input (reads whether it has 0 or 5 V). The processor sees the PIA as a few memory locations: it writes a number to an address and eight pins take on a voltage according to the bits of the number. It reads from another address and gets a number that describes what voltage eight input pins have. System 6 has six PIAs: three on the CPU (displays and switch matrix) and three on the driver board (lamps, coils, sound). Every lamp, coil, switch and display of a Firepower passes through these six chips.

3. The rhythm: the interrupt

The program does not run "whatever, whenever". A timing circuit sends the processor an interrupt signal (IRQ) about a thousand times a second. On every interrupt the processor drops whatever it was doing and runs a small "housekeeping" routine: it refreshes one digit on the displays, scans one column of switches, changes which column of lamps is lit, counts how much longer each coil has to stay energized. Then it returns to the main program, which deals with the rules of the game.

This one-millisecond clock is the heartbeat of the machine. Lamps, switches and displays are never "all on at once": the processor serves them in turn, so fast that neither the eye nor the ball notices. If the IRQ circuit fails, the machine "freezes" with the displays dark or stuck, even if the processor itself is fine.

4. The switches: the 8×8 matrix

A Firepower has about 60 switches on the playfield: targets, rollovers, pop bumpers, slingshots, the outhole, the coin switches, the start button. If each one had its own wire to the CPU, you would need 60 inputs and a huge connector. The solution that all pinball machines use is called the switch matrix: 8 "columns" and 8 "rows", 16 wires in total, and each switch is connected between one column and one row. 8×8 = 64 switches with 16 wires.

How it is read: the processor, through the PIA, activates one column at a time (as if "asking" column 3: which of your eight switches are closed?). If a switch in column 3 is closed, current flows from the column, through the switch, into the corresponding row, and the PIA input for that row reads "closed". On the next interrupt it asks column 4, and so on. In 8 milliseconds it has read all 64.

Why every switch has a diode

If you look under the playfield, every switch in the matrix has a small diode (1N4148 or 1N4004). Without it, when three switches that form an "L" in the matrix are closed at the same time, the current finds a path from one column, through the switches, to the other column, and the processor also reads as closed a fourth switch that is actually open. This is called a phantom switch. The diode lets current flow only from column to row, and cuts off this parasitic path. A shorted or backwards-soldered diode is the classic cause of "targets drop by themselves" or "the coin counter goes up when I hit a target".

What the CPU reads from the fault

  • All the switches of one column dead: the transistor or the PIA pin that drives the column, or the column's wire/connector.
  • All the switches of one row dead: the row input, usually a buffer (4049/7404) that protects the PIA from the playfield.
  • One switch dead: the switch itself, its diode, or the solder joint.
  • Phantoms: diode.

The scan has a second role too: debounce. A mechanical switch does not close "cleanly", it bounces for a few milliseconds. The program accepts a switch as closed only if it reads it closed in two consecutive scans. That is why a dirty or loose switch "misses" hits: it closes for less than one scan.

5. The lamps: a matrix again, but with current

The controlled lamps (the ones that go on and off depending on the game, not the general illumination) are also in an 8×8 matrix. The logic is the same as for the switches, but reversed: here the CPU does not read, it writes. And because a #44 lamp draws close to 0.25 A, far more than a PIA can supply, transistors go in between, on the driver board.

On the driver board there are 8 column transistors (PNP, they connect the column to +18 V) and 8 row transistors (NPN, they connect the row to ground). A lamp lights when both its column and its row are active. The processor activates one column, writes to the row PIA the 8 bits that say which of the 8 lamps of this column should light, waits about 2 milliseconds, and moves on to the next column. At any instant only the lamps of one column are lit. The full cycle of 8 columns takes about 16 milliseconds, so each lamp flashes around 60 times a second. The eye sees it as continuous.

Why 18 V on a 6 V lamp

Because each lamp is lit only 1/8 of the time, to shine normally it has to get much more current during that 1/8. That is why the matrix works at 18 V DC instead of 6.3 V: the lamp gets short, strong pulses, and the average heating of the filament comes out roughly the same as continuous operation at 6 V. This explains two things you run into in practice: first, if a column transistor shorts and stays permanently on, the lamps of its column get 18 V continuously and burn out or light very brightly. Second, LEDs, which have no filament to "hold" the heat between pulses, show the 60 Hz flashing as flicker or ghosting. For that, and the solutions, see the article Lamps, part 2: LEDs.

Here too every lamp has a diode at its socket, for the same reason as the switches: without it, current would find a path through the filaments of neighbouring lamps and lamps that should be off would glow dimly.

Reading the fault

  • A whole column or row of lamps dark: the corresponding transistor on the driver board or the PIA behind it. The matrix table in your manual tells you which 8 lamps share a column or row.
  • A column permanently lit: shorted column transistor.
  • One lamp: lamp, socket, diode.

The general illumination (GI) does not go through the CPU: it is simply 6.3 V AC from the transformer, through fuses and connectors. That is why when "half the playfield is dark" the CPU is never to blame; the GI connector or fuse is.

6. The coils: one transistor per coil and a diode that saves lives

The coils (solenoids) are not in a matrix. Each controlled coil, outhole, kickout, drop target reset, knocker, has its own power transistor on the driver board (in System 6 usually a 2N6043 Darlington in a TO-220 package) and its own bit in a PIA. When the bit becomes 1, a small pre-driver transistor turns on the big one, and the coil is connected between +28 V and ground. A current of 2 to 4 A, for as long as the CPU holds the bit at 1.

A coil never stays energized for long. The program gives it a pulse of a specific duration, usually a few tens of milliseconds, counted with the IRQ clock, and switches it off. A coil that stays energized continuously heats up within seconds, melts the insulation of the wire, shorts, and blows the fuse or the transistor. This is exactly what happens in the most classic driver board fault: a shorted transistor. The transistor fails "closed", the coil stays permanently energized, and when you switch the machine on you hear a buzz and smell something burning. First move: switch the power off, not "let's see what it does".

The coil diode

On every coil there is a diode soldered across its lugs (1N4004). A coil is a large inductor. When the transistor switches it off abruptly, the magnetic field collapses and the coil tries to keep its current flowing, producing a voltage spike of several hundred volts with reversed polarity. Without protection this spike would punch through the transistor and, via the PIA, would reach the CPU. The diode is fitted backwards relative to the normal voltage, so that in normal operation nothing passes through it, but at the moment of the spike it gives the current a harmless path around the coil until it dies away. It is called a flyback or freewheeling diode. An open or unsoldered coil diode kills transistors on the driver board, one by one, every few weeks. When you replace a coil, replace the diode too, and watch the polarity: the band of the diode goes to the side that connects to +28 V.

Special solenoids and flippers

The pop bumpers and the slingshots have to respond instantly: if they waited for the processor to scan the switch, think about it and issue a command, the ball would be gone. That is why in System 3 through 7 they are "special solenoids": their switch drives their transistor on the driver board directly, with no program in between, and the CPU just sees the hit so it can count it in the score and decides whether the function is allowed (e.g. not when the game is over). The flippers go one step further: in the old systems they do not go through electronics at all. The flipper button directly closes the 28 V circuit of the flipper coil, through a relay that the CPU energizes only during a game. The flipper coil has two windings: a thick, strong one for the stroke, and a thin, weak one to hold the flipper up. The end-of-stroke (EOS) switch at the end of the travel takes the strong winding out of the circuit, otherwise it would burn out within a few seconds with the button held. A burnt or misadjusted EOS switch is the number one cause of weak flippers and burnt flipper coils.

7. The displays: how a gas plasma display works

The orange displays of Firepower, like those of all pinball machines from 1977 to about 1990, are gas plasma displays. They have no filament and no LEDs: they are a glass envelope with neon at low pressure, and inside it metal electrodes shaped as the segments of digits. Firepower has five: four six-digit ones for the players and a smaller one for credits and ball number. Each digit consists of 7 segments (the classic "7-segment"), plus the comma.

The physics: why neon glows

Neon at low pressure is an insulator, up to a certain voltage. If you apply more than about 170 to 190 V between two electrodes inside the gas, the electric field "breaks down" the gas: it ionizes, becomes conductive, and near the negative electrode (the cathode) the characteristic orange glow appears. This is called the firing voltage. Once the gas has lit, the current must be limited with a resistor, otherwise it rises out of control and destroys the electrode. As long as you keep the voltage above a lower sustaining voltage, the glow continues. Below it, it goes out instantly, without any "tail" like a lamp filament. This instantaneous behaviour is what makes the multiplexing that follows possible.

In pinball displays the segments of the digits are the cathodes, which is why they are what glows, and each digit has its own anode, a transparent conductive coating over the digit. For a segment to light, its digit's anode must be positive and at the same time the segment must be negative.

Why +100 and −100 V

This is where the trick of the design lies. The power supply produces two voltages: +100 V and −100 V. A digit is "selected" when its anode goes to +100 V. A segment is "selected" when its cathode goes to −100 V. Between a selected anode and a selected cathode there are 200 V, well above the firing voltage: the segment lights. But a segment that is selected (−100 V) in a digit that is not selected (anode near 0 V) sees only 100 V, below the firing voltage: it stays dark. The same goes for an unselected segment in a selected digit. So, with the segments of all the digits of a display wired together (segment "a" of the first digit to "a" of the second, of the third...), only the segments of the digit whose anode is at +100 V at that moment light up. The two 100 V voltages exist precisely so that the right pair "sees" 200 V and all the wrong pairs only 100.

Multiplexing: one digit at a time, on all the displays together

The CPU lights one digit at a time. On every IRQ interrupt (every millisecond):

  1. It turns off the previous digit (takes its anode down from +100 V).
  2. It writes to the display PIA the number this position must show, in BCD form: 4 bits for one digit from 0 to 9. In System 6 it sends two digits together, one for the player 1/3 display and one for the player 2/4 display, plus the digits of the credit display.
  3. A BCD-to-7-segment decoder (a 7448-type chip) converts the 4 bits into the 7 segment signals: the number "3", say, becomes "light a, b, c, d, g".
  4. The high-voltage drivers (Sprague UDN6118/6184 chips for the segments, transistor pairs for the digits) translate the 5 V of the logic into −100 V on the selected segments and +100 V on the anode of this position.
  5. The digit glows for about a millisecond. On the next interrupt, the next position.

The digit anodes are common to all the displays: when "position 3" is active, the third digit lights on all four player displays at the same time, each with its own segments. That way few wires are needed: 7 segments per display, plus 6 or 7 digit lines for all of them together. The full cycle of positions takes less than 20 milliseconds, so each digit flashes more than 50 times a second. The eye sees a steady score. If you film a display with a phone, you will see the flicker and rolling dark bands: that is the multiplexing.

Because a digit glows only 1/6 or 1/7 of the time, the current per pulse is higher than it would be in continuous operation, for the same reason the lamp matrix works at 18 V. The current-limiting resistors are on the display boards.

What each fault means

  • All displays dark: one of the two 100 V voltages is missing. In the System 3-7 power supply the ±100 V are produced from a separate transformer winding, rectification and regulation with a zener and a transistor. Measure them at the power supply test points, with care: 200 V between the two. A burnt resistor or zener there is common.
  • The same segment missing (or permanently lit) in all the digits of one display: the segment driver (UDN) or its line at the connector. The segments are common to all the digits of the display, so the fault shows up "vertically", across the whole row.
  • The same digit missing on all displays: the driver of that position, since the anodes are common. A "horizontal" fault, across all the displays.
  • One digit missing on one display only: the glass itself (the digit's anode has broken off) or the transistor and resistor of that position on the display board.
  • Dim, flickering, or partly lit display, digits that "drift away" as it warms up: the glass has aged. Over the years air gets in or the gas mixture degrades, and the firing voltage rises. Some segments now need more than the 200 V to light, or light slowly. The glow becomes dim or pink instead of clean orange. It is called outgassing and cannot be repaired. Some people raise the 100 V voltages a little to buy time, but the only permanent solution is replacement.
  • Ghosts: faint segments that should not be lit. The gas did not have time to "go out" from the previous digit when the next one lit, usually because a driver does not cut off cleanly, or because the glass has leakage between electrodes.
  • Black marks on the segments: sputtering from decades of operation: the metal of the cathode is slowly ejected and deposited on the glass. It is only cosmetic and does not affect operation, until the metal thins so much that the segment becomes dim.

Take care with the measurements: the +100 V and −100 V, together, are 200 V. They do not kill like the 220 V mains, because they pass through resistors, but they give a nasty jolt and, above all, the jolt makes your hand hit whatever is next to it. Measure with one hand, with the machine in a safe position, and never with the display glass resting on your fingers.

Modern LED displays

The replacement displays sold today (XPin, Pinscore, Rottendog and others) are boards with LEDs that go in place of the glass. They have their own microprocessor: they read the same digit and segment signals that the CPU sent to the old glass, work out which digit is being requested, and light the corresponding LEDs. They do not need the 100 V at all, only the 5 V of the logic. If you fit them, you can remove the 100 V fuse in the power supply and unload its most tired section. The price is the look: many prefer the warm orange of the gas, and the LED displays in an orange shade do what they can to imitate it.

8. The sound: a second CPU that talks

The sound is a separate board with its own processor (a 6808, a cousin of the 6800), its own ROM with the sounds, a PIA, a digital-to-analogue converter (DAC) and an amplifier. The game CPU does not produce sound. When it wants a sound, it writes a number of a few bits (which sound of the roughly 30 available) to a PIA on the driver board, and those pins end up at the input of the sound board. The sound processor reads the number, runs the corresponding little program that "draws" the waveform value by value, sends it to the DAC, and the amplifier drives it to the speaker. The famous sounds of 1980 are these small routines, not recordings.

Firepower also has something no pinball machine had before: speech. The "Firepower!" and the other words are digitized human voice, stored in ROM with a very economical encoding of one bit per sample (CVSD, with the HC55516 chip) and decoded by the speech board that sits on top of the sound board. A few kilobytes of ROM were enough for a few seconds of hoarse but recognizable voice, something impressive for 1980.

In diagnosis this independence helps: the sound board has a test button or jumper that plays the sounds on its own, without the game CPU. If it plays there but not in the game, the few wires and the PIA between the two boards are to blame. If it does not play there either, the problem is inside the sound board or its power supply.

9. Why the +5 V is sacred

All the logic, processor, memories, PIAs, works on +5 V and expects that "bit 1" means about 5 V and "bit 0" about 0 V. If the voltage drops below 4.75 V, the chips start to misread the signals, the RAM gets corrupted, and the board's reset circuit, which monitors exactly this voltage, restarts the CPU. In Firepower the +5 V is produced by an LM323 regulator in the power supply and reaches the CPU through a connector. This connector, with the 2 to 3 A of current that has passed through it for 45 years, blackens and its resistance rises: the power supply puts out 5.1 V, the CPU gets 4.6 V and the machine resets in the middle of a game, mainly when several coils work together and the load goes up. Always measure the 5 V on the CPU board, not at the power supply. More in Repair guides by system: Williams 3-7, Bally, System 11, WPC.

10. All together: what happens when the ball hits a target

  1. The ball closes the target's switch. Current from column 3 of the matrix passes through the switch and its diode into row 5.
  2. On the next IRQ interrupt that scans column 3 (at most 8 milliseconds later), the PIA reads row 5 closed. On the next scan of the same column it reads it closed again: debounce OK, the switch "counts".
  3. The main program sees the new switch, looks up the rules in ROM: the target is worth 1,000 points, it lights its lamp, and if it is the last of the bank it awards a bonus.
  4. The score in RAM increases. On the following interrupts the new digits are sent to the display.
  5. The bit of the target's lamp becomes 1 in RAM. On the next scan of its column, the row PIA puts it out to the transistor, and the lamp gets its first 18 V pulse.
  6. The program asks for a sound: it sends its code to the sound board.
  7. If the rule says the drop target bank resets, the bit of the reset coil becomes 1, the transistor turns on, 28 V on the coil for 40 milliseconds, bit 0, the diode absorbs the spike.

All of this in less than a twentieth of a second, from a processor of 1974. And if you understand this chain, switch, diode, PIA, program, PIA, transistor, load, you understand where to look in every fault: which step of the chain broke. The logic of the transistors, the matrices and the diodes is the same in a System 11, in a WPC and, with more bits, in a Stern Spike: the processors changed, not the physics.

To see where the boards mentioned are located: Anatomy of a pinball machine. For the tools and measurements you need: Tools and measurements. For detailed schematics, the machine's manual.