design

Why OPP?

So firstly, what is OPP? What does it have to do with Pinball?

TLDR (Too Long, Didn’t Read)

Rather than using Cobrapin, Fast, or P-ROC controller boards, I’m using MPF with OPP firmware in cheap STM32 microcontroller boards to drive MOSFET boards from China to make the cost be much littler.

Longer…

Its web site describes OPP it as:

…a resource for pinball makers to have an inexpensive, fully open sourced project for controlling custom pinball machines.

Except that’s not what it actually is. When ordinary people read controlling custom pinball machines they expect it will, well, control them. What OPP does is control, but for an engineer’s idea of control, basically turning coils and lights and such on and off, but in response to other things that happen some place else, like MPF. Don’t get me wrong, OPP is fantastic, maybe even better than that, and it has a beautiful and elegant design, made a little less elegant by the passage of time, but that’s something for later. To understand what OPP does I’ll need a diagram, or three:

So the next image shows a sort of hirearchy of things that controll a pinball machine. It’s not particularly accurate, and it’s not much good for people writing code. It is handy for understanding the bits that make up the control system that you decide to use.

Some of these choices are made for you, depending on which controller you pick, if you don’t use OPP. It’s not a bad thing; or a good thing, just a thing.

To explain why I chose to use OPP, I need to explain what it is, and how it relates to the pinball machine. You may have seen this list and diagram before, when I was explaining why I chose MPF.

  1. CONTROLLER HARDWARE - Where the software runs.
  2. CONTROLLER SOFTWARE - Where the game rules live.
  3. IO PROCESSOR - The device that connects to switches, solenoids, lights, etc.
  4. IO FIRMWARE - The software in the IO PROCESSOR that does the turning ons and offs
  5. IO HARDWARE - This is what I call transisters, SCRs, MOSFETS, etc.
Five Levels Of Control.
Five Levels Of Control.

This next diagram expands on the MPF diagrams, adding the cheapSTM32 microcontroller boards that the OPP firmware runs on, to talk to the MOSFET boards from China to drive the price down.

Five Levels Of Control.
Five Levels Of Control.

This is a significant simplification.

The PC’s connected to the, MPF.
The MPF’s connected to the, STM.
The STM’s connected to the, OPP.
The OPP’s connected to the, MOSFET…
to the tune of Dem bones Dem bones Dem dry bones

The diagram above shows how OPP sort of sits in between MPF and the high power MOSFET devices / pinball machine mechanisms.

This next diagram expands on the MPF diagrams, adding the cheap STM32 microcontroller boards that the OPP firmware runs on, to talk to the MOSFET boards from China to drive the price down.

Five Levels Of Control With Pinball Detail.
Five Levels Of Control With Pinball Detail.

OPP includes hardware design (circuit boards), documentation, the software to configure the STM32, and a bunch of other things in addition to the OPP firmware that runs on the STM32 in the diagram above.

Now in the do-it-yourself pinball world there are lots of ways to make the electric bits buzz and jiggle. If you are starting from scratch this is (usually) reduced to three¹ main ways:

  1. Wire everything up with clever electronics.
  2. Code everything in microcontrollers and Arduino.
  3. Use MPF and either or Cobrapin², Fast³, or P-ROC⁴

I liked the idea of using microcontrollers but I decided to use MPF for reasons detailed in the post I made about that decision – Why MPF?

It’s worth noting that smaller companies making pinball machines commercially, are using MPF.
UPDATE Things have changed in the pinball world #1

Now unlike smaller companies making pinball machines commercially, I was willing to tolerate a bit of fiddlyness in exchange for thrift. One of our main goals being to find a way to drive down the cost of the hobby (See Overarching Goal #4, Economy)

I hatched a Cunning Plan.

Cunning Plan

I still wanted to make the electronics super cheap, but not at the expense of making an unworkable project. The first part of my Cunning Plan was to remember that Cobrapin controllers are based on OPP . If I was clever, I could build an OPP-based design that had the same setup as a Cobrapin system. That way if my design failed, I could replace it with known good electronics (Cobrapin) and not have to fiddle around with the software I wrote for MPF and my own microcontrollers, since they would not notice the difference between my crap innovation, and a standard Cobrapin install.

I’m not using OPP IO hardware, but something similar.

Now Embarking

So, settled on OPP, in a Cobrapinesque setup, with a MPF controller, and a sprinkling of my own microcontrollers; I could move ahead to testing.

The OPP website, is extremely information dense. Everything you need is there, it’s just not obvious that it is, nor that there is sufficient information for you to make informed decisions. Also previous hardware designs are mixed in, which is at different times both confusing and helpful.

Making the STM32 microcontroller boards ready to work with MPF is straightforward, like planning a big wedding. It’s been done before, there are guides and advice and, until you have done it, you have no idea how much work it takes, or the stress you will feel.

Second time through, it would take about me half a day, including getting the software sorted on the PC and wiring everything up.

I again had counterfeit electronics, this time the STM32 units were dodgy, and would not hold their configuration. This cost me about a week as everything worked ok till a decent power cycle, then sometimes they would switch to defaults. Took a while to find what was happening, and a longer while to find out why. It was an easy fix.

There are lots of different types of STM32. Get the exact CHIP type. There are minor board differences too. If you are clever you can get one with a LED that is used by OPP for heartbeat. I was not clever.


¹ There are still lots, but people mainly tend to do it in these ways it seems to me chatting with them, and from the google.
² A type of controller board.
³ Another type of controller board.
⁴ Yet another type of controller board.