Boards from scratch

FireSlash

New member
Joined
Mar 8, 2010
Messages
217
Reaction score
0
Location
Columbus, Ohio
Custom pin

I've been sitting on this idea for years, a few beers and digging up ye olde Arduino finally kicked me into gear on it. I had a thread going on vpforums but it seems a bit more relevant here so off we go.

The design was originally spread around the bally board set entirely. I ended up replacing the lamp board after realizing the bally lamp driver is really really hilariously simple, and I want to get all fancy. I'm still on the fence on replacing the power and solenoid boards, but for now they're still based around the bally boards. However there's nothing particularly complicated about them so there's a good chance they'll get replaced if it becomes necessary.

Arduino Mega R3
This is the brains of the operation. It can quite easily replace the MPU in the original bally system (16mhz of fury) and the massive IO potential makes it perfect for interfacing with the various bits of a pinball machine. On top of that, the microcontroller approach eliminates the annoyances of dealing with an operating system, so no extra latency and layers of complication.

Raspberri Pi
The rPi is a itty bitty SoC that runs linux. It'll be hooked into the arduino via serial to do things that microcontollers are bad at, specifically sound and video processing. Currently I'm using a laptop for this purpose but all of the code is written in python and will directly port to linux when the time comes.

So how does it work?
Currently there's not much to it. The switch matrix can be read directly from the arduino; there's no need to deal with switch controllers. I might change my mind on this later as the programming becomes more complex, but so far it's been more than adequate and that's without factoring in how much easier the lamp matrix is going to be to manage with the new board. So effectively 16 lines are burned with strobe/return lines for the switch matrix. 4 lines are burned for the solenoid board (Bally uses a simply 4->16 decoder so wiring it isn't exactly brain surgery), and right now the bally lamp driver is wired (8 pins; 4 data 4 select) but it'll be replaced with the PWMing controller I've got breadboarded which only requires one serial line plus a few common pins for things like clock.

What about the display?
I've not decided what I'm doing here yet. Part of me wants to go with the classic DMD, another part is leaning LCD, but the form factor in an LCD isn't exactly conducive to pins. Also a DMD would double the project's budget thus far.

Show me shiny things!
005.jpg

006.jpg


Early testing: http://www.youtube.com/watch?v=uHRC6d9WarQ
Quick gameplay: http://www.youtube.com/watch?v=Pe24bHsGebI
Lamp driver test: http://www.youtube.com/watch?v=9Xs_zw19ZBU

Status
I've fixed the switch matrix issues by using comparators (similar to the WPC switch matrix design) instead of the bally design. This was necessary because the switch return voltages aren't stable enough and they were falling outside the logic ranges the arduino uses (there's a dead "floating" spot that could read randomly).

Right now I'm mostly trying to source a playfield so I can start coding field specific logic and build the boards to meet the demands of the field. Right now it's hard to start sketching up PCBs because I don't know what kind of connectors and such I need to handle, nor do I know the width of the switch/lamp matrices, solenoid voltages, etc.

Got a spare populated PF you want to unload?
 
Last edited:
This looks pretty cool! What are the rules / scoring going to be? Can you have the arduino play by the original FG rules / scoring? Can you read in Bally EPROM to get orignal rules and start modifying? Or you are writing rules from scratch.

It would be fun to modify the rules a bit on some of the older Bally machines of this same era. For example, I'd like to add lane change feature controlled by flippers to Embryon. I did find some info on modifying the orignal assembly code and cooking up custom roms but I haven't tried it yet.
 
very interesting ! Have been reading about arduinos a long time ago and they seem promising to control a pin.. interfacing it to a rpi is a great idea, am interested to learn more on how you do this.
 
This has been stalled for a bit as I was having trouble sourcing a populated playfield to start tearing into.

First, catching up on replies...

This looks pretty cool! What are the rules / scoring going to be? Can you have the arduino play by the original FG rules / scoring? Can you read in Bally EPROM to get orignal rules and start modifying? Or you are writing rules from scratch.

It would be fun to modify the rules a bit on some of the older Bally machines of this same era. For example, I'd like to add lane change feature controlled by flippers to Embryon. I did find some info on modifying the orignal assembly code and cooking up custom roms but I haven't tried it yet.

FG is more of a testbed/proof of concept. I don't intend on gutting that machine despite the utterly ruined playfield... the game just doesn't have a lot of modding potential. All the code was rewritten around some test case rules to test some common situations. The original rom is fairly worthless here for a multitude of reasons, most of them come down to the sheer difference in hardware. You could, in theory, decompile the rom and translate the rules but it'd be easier to just copy them by observing gameplay.

If you want to change existing rom behavior your best bet is just editing the rom directly; however things like lane change require fairly a bit of modification as the CPU has no idea when the flippers are pressed, so you need to wire in a new switch (and isolate it from the high voltage leafs on the flippers unless you like smokey PIAs). I assume there's a free switch in embryon you could tap in to, but the CPU needs to be told what to do with that data.

very interesting ! Have been reading about arduinos a long time ago and they seem promising to control a pin.. interfacing it to a rpi is a great idea, am interested to learn more on how you do this.
Its pretty simple actually. All you need to do is connect the arduino to the PC and install whatever dependencies the IDE has (or just install the IDE itself, can't really hurt). The arduino talks to its host via a USB serial link (FTDI I think?) so you can just write up something in your favorite language to talk with the arduino. I used Python in the original version, the newer tests are with C#.

Now, the new science:

Finally came across a Rollergames PF which will be the victim.

I've been assessing the current setup with a single arduino + rpi and I'm starting to think the arduino alone isn't going to cut it. I started mocking up some simple animation code for the lamps and quickly found that managing it all while pwming everything quickly pushes the arduino near it's limits and the switch matrix starts getting neglected. I could push the matrix into a separate circuit but then that's additional complexity.

RIght now I'm exploring the idea of using a full PC to handle everything but the low level interfacing, and using the arduino as more of a controller/sensor via a serial connection. Right now I'm seeing an average of about 1ms round trip latency, which is will inside the range anyone would notice.

The other possibility is using an fpga... It's a more complete approach but I have no experience with fpgas so I don't know how viable it would be in the long term, so I'll probably go with the PC route for now and see how that goes. As a bonus I can draw up various GUI based debugging/design tools, and use an LCD display. I'm still not sure what I'm doing for displays so it's nice to have that flexibility.

The second major problem is that I'm not really familiar with Williams stuff. A quick scan of the boards shows the system's using both 24 and 50v for coils (No idea what uses what but I suspect the flippers and VUK is on 50v at a minimum), and powering these is going to be a bit weird. I can easily pull 5v out of an ATX power supply and I could possibly hook a couple in parallel for 24v but that's scary as hell; and I have no idea where I'd get 50v.

Pinballcontrollers.com suggests a 24/70v psu but how well would the 50v coils really handle 70v? Sounds like a disaster waiting to happen. There's also some weird shenanigans with the A/C relay that needs to die, so I'll probably end up redoing all the coil wiring into something more sane.

Update: Checked the datasheet on the PSU, looks like it's 5A on the 50v line and 2A on the 24v line. If I remember right the bally PSU on my Flash was fused for something like 10 amps, so I'm not sure this would cut the mustard so to speak. There are 3 fuses 70v outputs so in theory you could spread the load across them evenly to reduce issues but the datasheet doesn't mention whether the 5A rating is for all three or just one.
 
Last edited:
In reference to my last post, here's some sample python/arduino that I used on the FG test for music and sound.

Code:
CONTROL_CHARACTER = ','

import serial, pygame

ser = serial.Serial(2)
print ser.portstr;

pygame.mixer.pre_init(44100, -16, 2, 512)
pygame.init()

def loop():
    line = ser.readline()
    if line:
        bits = line.split(CONTROL_CHARACTER)
        COMMAND_MAP.get(bits[0],Noop)(bits)


def Noop( bits ):
    print "Unknown command: " + bits[0]

def PlaySound( bits ):
    try:
        soundID = int(bits[1])
    except ValueError:
        soundID = 0

    try:
        sound = SOUND_MAP[soundID]
    except KeyError:
        sound = SOUND_MAP[0]

    sound.play()

def PlayMusic( bits ):
    try:
        soundID = int(bits[1])
    except ValueError:
        soundID = 0

    try:
        sound = MUSIC_MAP[soundID]
    except KeyError:
        sound = MUSIC_MAP[0]

    pygame.mixer.music.load(sound)
    pygame.mixer.music.play()

COMMAND_MAP = {
    'SND': PlaySound,
    'MUS': PlayMusic,
}

MUSIC_MAP = {
    0: 'music/test.wav'
}

SOUND_MAP = {
    0: pygame.mixer.Sound("sounds/w5120.wav"),
    1: pygame.mixer.Sound("sounds/w1801.wav"),
    #...

}

#SDL mixer needs a focused window
screen = pygame.display.set_mode((10, 10))

running = True

while running:
    pygame.time.wait(5)
    loop()
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

Code:
int currentSound = 0;

void setup()
{
  Serial.begin(9600);
  PlayMusic(0);
}


void loop()
{
  PlaySound(currentSound++);
  delay(100);
}


void PlaySound(int id)
{
  String out = "SND,";
  Serial.println(out + id);
}

void PlayMusic(int id)
{
  String out = "MUS,";
  Serial.println(out + id);
}

Note that the python install required pygame and pyserial to run. Pygame's mixer was used because it's the best non-blocking audio lib I could find that was still cross-platform.
 
New PF has arrived!

007.jpg


I've ordered a LED kit to start the lighting fun (Lamp driver board won't be able to handle the incandescent bulbs), and next on the list is a power supply.

I noticed Pinballcontrollers.com suggests a 24/70v supply but the very same company that makes the suggested PSU also makes a 24/50v model which seems more ideal for the williams coils.

Also trying to figure out how I'm going to build the PF connectors, as the pins dont' line up with normal breadboard positions... I guess I'll have to order the connectors and just drill the breadboards?

ON that note, anyone know what these connectors go to? I've worked out some of them, but any reference information on the individual pinouts would be awesome.

008.jpg


so far: Green appears to be the switch matrix, red for lamps. I'm guessing the black mess is then coils, but why so many connectors for them? also what's with the smaller connectors for each? I can see the lamp one maybe being a power feed but the switch matrix shouldn't need any?
 
wow I was thinking of ordering that same populated playfield from ebay to do the same exact project (!)

except I was going to do everything with arduinos but its cool that you are offloading the sound bits to a rPi
 
Thanks for the links. The switch matrix looks identical to the bally board, I just need to change the connector. Lamp setup looks similar as well, but the solenoids are a mess due to transistor doubling.

There isn't a good solution to heavy duty sound processing on the arduino (that I'm aware of) short of building your own sound board, or doing other heavy duty lifting with sequenced audio. I wanted to play lots of compressed audio but the only solution I could come up with involved multiple arduinos, at which point you might as well just offload to something that's better with audio to begin with.
 
Cool project! Here are a couple of my opinions:

First off, I would definitely use a pinball power supply. More specifically, the transformer. For the solenoids and lamps anyway. Anything else that's going to be beefy enough will be really expensive (relatively speaking) and you already have one. Flash Gordon is actually a really good game to start with for a few reasons. One being that the transformer and rectifier board on that series of game are huge and quite reliable. All of the voltages you'll need for solenoids and lamps are already present. Keep in mind that the solenoid and switched illumination voltages in pinball machines are just full wave rectified, unfiltered DC coming right off a bridge rectifier connected to a transformer winding. Just hook up 120VAC to the Bally transformer/rectifier board and there's your power supply for the coils and switched illumination. Display is another story. If you're going to use a DMD your best bet will be to buy a transformer from a game that uses a DMD. You could still use the Bally rectifier board but the original Bally transformer won't have the voltage you'll need for the display. You could build something based on the high voltage winding that's there but that could get dicey.

As far as drivers for coils and the lamp matrix go, I would look at buying a Gottlieb system 3 driver board and just using that. It's basically just a bunch of driver circuits on a board. You could easily spend a bunch of money and time building that stuff but a Gottlieb system 3 driver board has everything you need and can be found relatively inexpensively (I might even have one to sell). I've spent a lot of time thinking about the best overall driver board for homebrew pinball and Gottlieb system 3 gets my vote. You could use the bally stuff for the solenoid drivers. That's actually a really good option given that you've already got the board but then you need to worry about lamps and I assume you will be using a matrix rather than driving the lamps individually like Bally did so you'll need driver circuits for that. It also wouldn't hurt to have something buffering the switch strobes so you're not trying to drive them straight out of the microcontroller. There might not be enough current available for it to work reliably like that. The System 3 driver board has 32 solenoid driver circuits and an 8x8 lamp matrix driver circuit so there are lots of options. Add an A/B relay and you shouldn't ever run out solenoid of driver circuits.

Incorporating a PC is a good idea. Given that you can get extremely powerful machines (again, relatively speaking) virtually free it makes total sense to use a PC for the non real time stuff and the microcontroller for the real time stuff. That's the approach I've taken to homebrew pinball using a PIC USB microcontroller. I'm actually hacking on the Bally/Stern system too but my approach is different in the fact that I'm leaving the original boards in place and driving them through the Motorola 6800 socket. That way everything is already there in terms of driving solenoids, lamps, sensing switches etc...

Here's an idea out of left field that I just thought of. You could use a Williams System 11 MPU and connect the microcontroller to the CPU socket and drive the PIAs on the board. At that point you've got basically a complete solution with all the driver circuits built in. Of course, a microcontroller and a Gottlieb System 3 driver board are basically the same thing and WAY easier to implement.

There are lots of options. Overall though, I suggest using existing pinball stuff as much as possible. It's cheap, readily available, and already designed and sized for the job.

Lastly, the concept of zero cross detection is important in pinball design and should be considered in your board design. The driver circuits will thank you.
 
Last edited:
Thanks for the links. The switch matrix looks identical to the bally board, I just need to change the connector.

As you mentioned, the concept of the switch matrix is exactly the same from Bally to Williams System 11

Lamp setup looks similar as well

I'm not sure what you're doing now in terms of driving lamps but originally those two games (Flash Gordon and Roller Games) used totally different concepts for driving the lamps. The Bally game would have used SCRs to individually drive each lamp (turning the SCRs on slightly after each zero cross of the power supply) and the Williams game would have had the more conventional lamp matrix. You can see how these playfields will be wired totally different.

but the solenoids are a mess due to transistor doubling.

The solenoids will be easy to re-wire. Even if you had to do it from scratch. The only mess would be the positive side of a bunch of the coils going to the A/B relay. You could just eliminate that relay (connect the positive side of the coils straight to the power supply) and then drive the coils as usual.

But... you might want to leave that stuff in place. I'm assuming you're going to create a custom playfield at some point but if you're going to use the Roller Games playfield as it is you'll need to leave the A/B relay in place (to split between solenoids and flash lamps). Even if you're going to make something custom. It still makes sense to use a relay to double the solenoid driver outputs to drive flash lamps.
 
As far as drivers for coils and the lamp matrix go, I would look at buying a Gottlieb system 3 driver board and just using that.

I would advise using any existing driver boards, you could easily make something that uses MOSFETs instead of bipolar transistors like all the OEM driver boards (hence why people like rottendog redesign all the power driver boards with LDOs and MOSFETs
 
Yeah I realized a few hours ago after doing a LED swap on the PF that the lamps are in a 8x8 matrix and not straight wired like the bally. THis will probably demand a rewire, as I'm using my own lamp board for this as I want to be able to PWM the LEDs. I might be able to do it in a matrix but I don't know how well given this means each LED gets 1/8th fo the PWM cycles.

If I went with the bally power driver board I'd need to order a new one (Why gut a perfectly good Flash Gordon?); which I looked at initially... Turns out shipping a massive transformer's kinda expensive. I strongly suspect the AnTek supply combined with an ATX power supply would get the job done very well.

Building a solenoid board wouldn't be hard, and would probably be fairly rewarding as the bally solenoid board uses a 4->16 decoder which ultimately means you can only ever drive one solenoid at once (unless you want to cycle them, which would probably have rather a rather negative impact on the fets); so rebuilding a new board with shift registers would be idea. Then again using an existing board is pretty tempting for lazies like me, so we'll see.
 
I would advise using any existing driver boards, you could easily make something that uses MOSFETs instead of bipolar transistors like all the OEM driver boards (hence why people like rottendog redesign all the power driver boards with LDOs and MOSFETs

Gottlieb System 3 driver board already uses MOSFETs.

Did you miss the word "against" in there? It's not clear. Seems like you're saying to not use an original driver board.

Sure, you could easily build something. Nothing about any of these boards is complicated. You know what would be WAY easier? Buying something that's as good or better than anything you will ever build and is way cheaper. Much easier. Building something that you can already get cheaper and easier makes no sense whatsoever. Even if you had to use old TTL stuff. There's no compelling reason not to use an existing driver board. Unless you want to do it for "fun" but to me there are a lot more fun things you could be doing with this project than building basic driver circuits.

People like RottenDog didn't redesign the driver circuits because there was some kind of flaw in the original design. There wasn't. They worked just fine for decades and would work just fine in this project. If not, someone feel free to tell me why. Sure, newer technology is more efficient, but more than that, it's cheaper and more readily available. For a new design that just makes sense. For a one-off, it makes sense to use something that's already out there and way cheaper and easier. Especially when the one I'm suggesting is already using newer technology. Trust me. You won't build a driver board as good as the Gottlieb System 3 driver board for cheaper than you can just buy one. Not even factoring in the 10+ hours you're going to spend jerking around building and testing it. This is the part where someone tells me they could build it in 10 minutes :p

The more important consideration is the zero cross, as I already mentioned. Regardless of what you're using to drive the coils.

Just my $.02
 
Gottlieb System 3 driver board already uses MOSFETs.

hah totally forgot about that, so used to replacing blown bipolars on de/sega/stern/bally/williams machines!

I still would rather roll my own but that seems like a nice enough option if you want to get something that is already done for you

I don't see how it would be cheaper, unless you are counting making a custom PCB, a driver board could easily be made on perfboard
 
Yeah I realized a few hours ago after doing a LED swap on the PF that the lamps are in a 8x8 matrix and not straight wired like the bally. THis will probably demand a rewire, as I'm using my own lamp board for this as I want to be able to PWM the LEDs.

Are you driving the LEDs directly with microcontroller I/O pins? If so, you'll probably run out of pins. If you're going to multiplex the I/Os somehow you might as well just use the existing matrix.

I might be able to do it in a matrix but I don't know how well given this means each LED gets 1/8th fo the PWM cycles.

You can definitely do it in a matrix. It will come down to the speed of the microcontroller and how fast it can drive the matrix. Any modern microcontroller should be more than fast enough. You might also want to take a look at the diodes across the lamps. They should be fast switching types but I would still take a look. If you're going to be doing PWM you'll want fast switching diodes on the lamps.

If I went with the bally power driver board I'd need to order a new one (Why gut a perfectly good Flash Gordon?); which I looked at initially...

If you're not planning to gut the game then I agree. Bally/Stern is definitely not the best choice in a driver board.

Turns out shipping a massive transformer's kinda expensive.

You might have someone local who can sell you one. If fact, I'm sure you do. The trick is finding that person.

I strongly suspect the AnTek supply combined with an ATX power supply would get the job done very well.

You're still going to need to sense the zero cross somehow. I wouldn't personally use a DC bench supply to power the coils but it's worth a try.

Building a solenoid board wouldn't be hard, and would probably be fairly rewarding as the bally solenoid board uses a 4->16 decoder which ultimately means you can only ever drive one solenoid at once (unless you want to cycle them, which would probably have rather a rather negative impact on the fets); so rebuilding a new board with shift registers would be idea. Then again using an existing board is pretty tempting for lazies like me, so we'll see.

Why use shift registers? To save microcontroller pins? That's a compelling reason if you're short on pins but it doesn't seem like you will be. Seems overly complex to me given the requirements but there are lots of ways to do this stuff. I'm just giving you my ideas :)

FWIW though, you could drive more than one coil (or whatever) at a time with the Bally driver board. There are 4 driver circuits on that board which can be controlled individually. So you'll have 15 that you can drive with the 4-16 decoder and 4 that you can drive individually. I doubt you'll ever want to have 5 driver circuits energized at the same time.

EDIT: Wait... you're in Washington? There are TONs of collectors in Washington who could hook you up with a transformer. That's really the best option. It will be cheaper and you won't have to worry about how you're going to do zero cross.
 
Last edited:
hah totally forgot about that, so used to replacing blown bipolars on de/sega/stern/bally/williams machines!

Me too, my friend. Me too. Nothing to say they wouldn't be blowing up as FETs though. There is a lot of CEMF going on in there! ;)

I still would rather roll my own but that seems like a nice enough option if you want to get something that is already done for you

Nothing wrong with that approach at all. There is something to be said for doing the whole thing custom. That would be cool too.

I don't see how it would be cheaper, unless you are counting making a custom PCB, a driver board could easily be made on perfboard

You have a point there. The components are not all that expensive. It may not be WAY cheaper, like I said. But if you fish around you can get a Gottlieb System 3 driver board really cheap. Once you factor in time it crosses over into the way cheaper space.

Still a cool project. Nice to get some ideas out there.
 
Back
Top Bottom