Homebrew Pinball #3, Part 35

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'

3D printed some brackets for the screen. It's funny, prior to getting a 3D printer "how do I mount a screen under the playfield?" was a really big question mark on my project's todo list. With a 3D printer, I had it mounted just fine with 5 minutes of modeling.

Made a test screen hole in my testing playfield plywood. Messed up the cut spectacularly somehow, my whole rectangle was like 1/4" skewed. Not sure how I managed that when I made it by tracing the screen, but oh well.

I also tried mounting a test piece of 1/16" lexan over the hole, to see how much it deformed. I screwed it in at the same positions that the nearest posts are on the real playfield, to get an idea of how well it'd be held down. I had problems instantly with a bit of warping, since my holes weren't placed perfectly.
I think that to use this on a real playfield I'd need to pre-drill all the screw holes with a slightly larger bit, so it has some room to slide around while I'm tightening everything down. Then I'd have to work from the center outwards as I attached everything to try to keep it taut.

My initial test of 'pressing it down with a finger' didn't seem very promising. I could flex the hole down way more than I can on my Black Hole. I still don't understand how the super thin window on black hole is so sturdy when every plastic I've looked at is so much more flexible...

In the end though, I realized I shouldn't be testing with my finger, but with a ball. Setting a ball in the middle of the hole has almost no effect on it, and it seems to roll across it fine. At worse, I can always make a second layer of plastic just for the screen, to bridge that section if it becomes an issue, so this approach still seems viable.

Another benefit I thought of is that I could conceivably mount my magnets way closer to the ball. With wood on top of the magnet, it seems like most playfields are still retaining 1/2-3/4 of their thickness to keep the wood solid, which means the magnet is probably about 3/16" away from the ball in the best case. With a plastic covering, I should be able to cut that down, which should make the magnet stronger, and might help with my issues on the upper magnet. I'm not very familiar with the physics of magnets though... I'm curious how this would compare to the large metal cores on games like TWD. Is a 3/16 thick, 3" wide metal core on top of a magnet generating a larger field than the entire winding itself does?

Next I need to figure out if I can use my star rollovers with it. I used them a lot in the design since they're easy to cut the holes for (compared to a rollover switch slot), but I know I've heard about issues with them and playfield protectors...

Posted Thursday, October 15, 2020
at 09:38 AM

Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 34

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'

Received my replacement screen today:

Will try to hook it up this weekend and get it displaying some images, then do some text cuts on my spare plywood to figure out mounting, and see how well my lexan sheet will work.

In other fun, my flippers have suddenly gotten very weak (can barely make it up the ramp). I hadn't actually had the game on in the past week or two since I'd just been working on code, so I have no idea how long it's been like this. Always a fun issue even on regular machines, so I'm sure it'll be fantastic trying to track it down here...

I wish there was a reliable way to quantify flipper/coil strength so I could really check on stuff like this, make sure I'm not going crazy, etc...

Finally tracked down my weak flipper issue... I replaced the bridge, no change. Replaced the capacitor, no change. Checked signals with a scope, everything looked okay. Cap smoothed the signal out well, peaks were proper height, everything seemed proper. Then I realized... the fuse was blown. I never even considered checking that, since obviously the flippers were working. Something about the way I hooked up two bridges in parallel, one with a smoothing capacitor on it, must have allowed enough voltage to build up through just one side of the AC, through a common ground or something, that allowed it to still get the flippers enough power to flip. Not really sure how that could be, but. I thought I had replicated the circuit gottlieb used on black hole accurately, but the one difference was that I had a separate fuse for each bridge (although I only fused one side of the inputs) while Gottlieb had a shared fuse for both bridges.
I assumed that was just a cost saving measure, but maybe it's actually because of this?

I also realize now, looking at the schematics, that they don't actually fuse the DC side of the bridge, which is interesting. I guess they figure that the per-coil fuses will usually catch those issues? I guess they usually do, at least in my experience. I definitely didn't fuse my solenoids enough overall. I put separate fuses for each flipper and bumper, but the controlled coils only have the one shared fuse on their driver board. More concerningly, I've never blown the on-board fuses for some reason, but I have blown the rectifier fuse when a coil locked on, despite the rectifier fuse being 8A slow blow and the on-board being a 4A fast blow. Hopefully that doesn't become an issue.

I've also designed another iteration of my driver board since my rev 7 that I assembled still had mistakes, though I haven't ordered it yet since I'd like to get some more boards done for a combined shipment. This time, I restarted from scratch. My previous schematic had been carried over and repeatedly modified since my original rev 1 board back when I started learning how to design boards, and was a bit of a mess.

I'd also been repeatedly running into issues when designing the boards trying to fit them in a 2x4" footprint. Over time I went from 13 FETs to 16, added driver chips, fuses, test points, indicator LEDs, etc while still using the same size board, and it had gotten really hard to layout. This time I scrapped the voltage indicator LEDs, and dropped from two fuses (one for each bank of 8 drivers) to one fuse. Originally, I had designed the board so each bank could be operated completely separately, and could be configured with pullups for PNP transistors or pulldowns for NPN transistors, so that it could also be used to drive an 8x8 lamp matrix, but that use has sorta disappeared in the intervening years.

Those part removals combined with some tricky layouts let me finally get all the transistors layed out neatly. This also means that I can now stick both solenoid connectors on one side, and keep all the low voltage signals on the other side of the board, to clean up the wiring a bit more

Rev 7:
Rev 8:

Yesterday my second screen shipped out, so of course today my original screen I ordered from China arrived out of the blue.. Only took 2 and a half months. This one included a USB power cable, which is nice since now I won't accidentally fry anything by using -12V, but it's also weird, since USB is 5V. As far as I can tell, the boards are identical. Not sure if there's something I can't see that's different or if one of the sellers was wrong about the supply. Was also able to confirm that my first screen is still good, so I must have only damaged the driver board, so now I've got a backup. And soon I'll have two boards and 3 screens. My attempt to get a cheaper screen from china has now cost me about $130 I guess that's what I get from ordering something from overseas during a pandemic though

Posted Tuesday, October 13, 2020
at 10:15 AM

Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 33

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'

My screen still hasn't arrived, so I gave up and ordered another one. Hopefully it will arrive eventually..

In the mean time, I tried out an idea I'd been toying with for a while. I don't know where any of my lights will go, or how the art will look, and it's hard to play with that, so why not make some temporary artwork?

I dug out an old projector, and hung it from a 2x4 sticking out from my upstairs landing, and lined up the game underneath, then I loaded up a quick mockup:

I expected it to be a bit hard to play like this but it was actually surprisingly easy to ignore and play like normal. The quality isn't very good though; the cards aren't readable even at 1080p. With a 4k projector this might be workable beyond rough prototyping, but it'll probably work for now. I also had to put the projector really high up, probably 10+ft off the ground. Gets to be a real pain turning it off and on without a remote

With this I'm hoping I can get the game much more fleshed out before needing to commit to making a new playfield and moving everything over

Posted Tuesday, October 13, 2020
at 10:14 AM

Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 32

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'

Coded the logic for actually determining which hand won, and displaying the best 'hand' from each hand of 7 cards. The code for finding pairs, straights, etc was surprisingly simple and fun to write.

Since it can identify what hands you got, I can now tie that into what modes/multiballs are enabled at that point. Unsure what I should do if you manage to get multiple different hands.

For instance, what if you manage to get three pairs? Technically only your better two pairs will count as far as the poker game goes, but if each pair qualifies a mode, should you have the choice of which one(s) to play? Should only the higher two pairs' modes be lit, effectively making lower cards' modes harder to get?

If you get a straight and a pair, and then you play the mode you get from the pair, does the multiball you got from the straight go away, or could you go play it after finishing the mode?

If you qualify a mode, but then immediately go into the shooter lane to start another round of poker, should you lose that mode, or should it still be available? Should you be able to start a mode mid-way through a hand?

So many questions... Luckily the decisions on these aren't really hard to change the code for, they could even be settings technically, although I'm not going to bother coding any settings menu or anything since I can just edit the code I'll probably go with the most restrictive options for now (if you take a mode you lose your multiball, etc) just so I don't have to deal with coding a mode select screen yet.

Posted Tuesday, October 13, 2020
at 10:13 AM

Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 31

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'

Coded some initial spinner rules. First time you shoot the spinner, it stops it in the upper lanes. Next time it orbits around back to the left flipper for a 2x spinner shot, and stops it in the lanes. Then you get two orbits before it stops it, etc.

Coding this was way harder than that sounds, due to me not really thinking about 'shots' and such when I designed the playfield. A ball shot through the spinner could go in one of six lanes. Or it could fall back through the spinner. Or fall down the shooter lane. Or it could manage, theoretically, to go below the left one way gate and continue on to the left. When the gate is open, it will usually go all the way around, triggering the left orbit switch and the left inlane on its way down. But it could also fall short into the upper eject, or go under the ramp, or fall even shorter into any of the lanes, etc from before.

Originally I figured I didn't need to care about this too much. I'd just consider a shot to the spinner as whenever the spinner suddenly spun a few times. But when I'm purposely designing the code to let you repeatedly rip the spinner, it's very likely the spinner will still be spinning somewhat by the time you rip it again, or you could even go right under it while it's spinning, so I ended up with a ton of code for different edge cases trying to detect when the player does a successful orbit or not, multiple timers going on, etc. It's a bit of a mess, and it's going to be even more of a pain to debug if something goes wrong.

It would have been really nice to close up some of the areas a bit more so I could know 'for sure' whether a ball passed through there, rather than having a big open area up there for the ball to bounce around in. Too bad big areas for the ball to bounce around in are fun...

Scoring wise, I'm trying to sorta take a page from Meteor, since I like the way its spinner value is continually fluctuating. For the first iteration of that, my attempt is to make the spinner score more when you having matching numbers of drop targets down on each bank. For instance, the spinner starts at 10 points. You knock down one target on bank A, that goes up a bit. You knock down one target on bank B as well, that number goes up even more. Two targets down on each bank is better than one, etc. I'll try to balance it so you can get the spinner up really high, but at the same time if you hit one stray target it may ruin it completely.

Hopefully this will also encourage people to 'shoot around' more, instead of finding one or two banks they feel safer on and just picking targets off those

Posted Friday, October 02, 2020
at 10:58 AM

Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 30

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'

Coded the basic structure of the skillshot. I'm pretty dissatisfied with most skillshots in games currently. Most seem to either be 'just plunge the lit lane', or plunge to a flipper and hit a lit shot. You don't really care about your plunge at all. Some games like Deadpool make it a bit more interesting by locking in your lane choice. Most games that actually require you to plunge to a specific spot (such as Taxi) just make you learn one or two plunger positions, which I think can get boring once you've learned them, since at that point you're just slowing down your game to squint at the plunger. My goal here is to have a lot of different places to plunge to, and have the context of the game make you change which one you're plunging to frequently.

There are seven different places to plunge to:

Red: plunge just far enough to clear the diverter. Diverter will close, leading ball to right inlane
Orange: plunge so that the ball hits the lower magnet switch, without hitting upper magnet switch. Magnet activates, pulling ball to the left and feeding upper right flipper (well, hopefully, if I ever get it working)
Yellow: if you plunge past the magnet and hit the upper magnet switch, you'll fall back down and feed the right inlane, similar to the red skillshot
Green: The lower 3 lanes. Not sure what will happen with each lane yet, maybe one will be lit as an extra target
Blue: Upper 3 lanes, same as green
Pink: plunge and fall into the upper eject which will then feed the upper left flipper. Really hard to do, worth the most
Purple: Hard plunge all the way around and feed the left inlane

The Pink and Purple skillshots are made harder since there's a one way gate to the left of the lanes, blocking them. Currently I have it timed so it's open for 2 seconds, then closed for 2, so you'll get redirected to the lanes or let through based on your timing.

Your current 'bet' amount is determined by where you plunge, so you can choose to bet a little or a lot while still keeping it 'pinball'. I'm thinking the bet amounts will be percentages of your total 'bank', so you'll be forced to bet more later in the game. You can return to the shooter lane at any point while playing your poker hand by shooting under the upper right flipper, so you can adjust your bet if your hand is looking better or worse.

In addition, there will be an award on each skillshot, that you can only get if you 'call' your shot by selecting that award with the flipper buttons. Currently it's just points, but I want to eventually put other stuff in there to mix stuff up. If it's only ever points, they'll either just be ignored, or they'll be so big they're unbalanced, so I like to put 'in game' effects into stuff wherever possible. But that will have to wait until I have more game coded to affect.

The graphics themselves on the screen are pretty basic right now, but serviceable. I kinda dread getting to the point where I actually need to make this stuff look nice somehow. Even for a simple screen like this, I think more code is dedicated to drawing and updating the screen than there is to the actual skillshot logic... It must have been nice in the DMD or alphanumeric games where you could often just slap some text up and be done with it

Posted Thursday, October 01, 2020
at 09:43 AM

Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 29

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'

I've spent a good amount of time playing with the upper magnet. It's positioned next to the shooter lane, right orbit, so that it can drop the ball to the upper right flipper.

The magnet had two use cases:
1. for the skillshot, if you plunge the ball up so that it stops next to the magnet, and then the magnet activates, pulling the ball sideways from the shooter lane to then release it to the flipper
2. to feed the upper flipper via left orbit shots. this is the main use case, with the skillshot just being a bonus. I didn't really forsee a problem with this while designing, but I've come to realize that this just isn't how magnets are normally used in machines. Games like Twilight Zone will stop a fast moving ball on an orbit, but they have the magnet directly under the ball's path. The magnet acts only as a ball grabber, not a diverter. Most cases I can find of magnets being used as diverters are things like TWD's crossbow, or WCS's lock. WCS is the closest to my use case, since it specifically grabs a moving ball, stops it, then drops it. But even WCS has issues grabbing a fast moving ball.

I quickly discovered that my original plan of wiring and mounting this magnet the same way the magna save is mounted just won't work. The magna save coil is being powered using 25V, while most newer games use 50V for their magnet. So I hooked up my 50V line to my magnet relay, instead of 25V, and... immediately fried my relay. The 50V is strong enough that, when the relay deactivates and its contacts move apart, the voltage will just arc across the gap and continue powering the magnet while melting the contacts. I had a similar issue with the 5-bank reset coil, and was able to fix it by adding a 10uF, 300V capacitor across the contacts. For some reason this doesn't work on the magnet. I wondered if the magnet was stronger, but the magnet actually has more resistance than the drop target coil. My random relay was only rated for 3A@25V though, so I ordered a really beefy relay, which was rated for 30A (!). I think my magnet should be drawing about 10-12A at 50V, so that should be plenty. But that relay also had constant arcing issues. I tried bigger snubber capacitors, other snubbing solutions, even disassembling the relay and physically bending it so the contacts are farther apart, and nothing helped.

It seems like switching 50V@10A just isn't reliable via a relay somehow, though I don't understand why. Modern games all control their magnets via transistors and mosfets, although I don't know if that is specifically to avoid this issue, or for other reasons. The problem is, I can't use those here, since my 50V has a separate ground from my 25V. My next plan is to get a TIP36C (which is what williams used for their 50V coils in the 90s), and then try to use a relay to switch the gate (instead of having a microcontroller switch it like normal) which feels like horrible overkill, but it may work. Even at that point, I'll still have issues because I can't PWM a relay, so I'll basically be running the magnet at full power. I'm not sure how long I can power the magnet like that, hopefully it's long enough to get the ball settled.

The magna save is also a completely 'below playfield' magnet, with no visible core. Adding a core that goes all the way through the playfield helps make the magnet stronger, and I assume that this is why games like TWD, which need to grab a ball shot at their wide bash toys, use an even bigger exposed magnet core. At first I figured I should just order one of those larger exposed cores, but they're incredibly expensive somehow (the large core costs more than the magnet itself!). Even a regular size core is expensive. I don't really want to spend that much money on something that may not even be useful, so for now I've just bought some 3/4" steel roundstock that I'll use to test the smaller exposed core. I can't find any info on how much stronger this make the magnet.

All this is still up in the air, too, as I don't know if the magnet will be able to grab the ball properly even with a large core and 50V, given the crazy speed my left orbit shot has. I've spent a lot of time trying just to get the 50V to work, and still haven't been able to even do a single test yet to see if the 50V can grab the ball since it keeps melting stuff

I'm also trying to consider other approaches, such as replacing the magnet with a physical diverter, but currently I can't find any good way to fit one in with my current constraints, and I would still need a magnet or an up post to hold the ball for a reliable side flipper shot after the diverter gets the ball to the flipper...

I may also try putting an up post in the shooter lane, specifically to stop the ball as it comes down the lane from the left orbit, and then using the magnet to pull the stopped ball over the flipper. I am running low on drivers for the coils though, so I want to avoid adding in more coils if possible...

Posted Tuesday, September 29, 2020
at 08:58 PM

Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 28

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'

Got the basic habitrail installed. Made a half height, low quality mount to hold the other end, which seems to work okay.

It looks like I can make the curve on the entry mount wider for a smoother feed. This is the original:

And here's my current iteration:

Mounting the entry mount was also an issue, since I didn't really plan for that. I ended up putting it on a standoff on top of one of the existing ramp's mounting holes, but I still only have one screw holding it. It seems to work okay, so I'll leave it for now. I could probably extend another support out to the posts behind the 2-bank if necessary, but I don't want to cover the playfield any more than necessary.

I also needed a place to mount the switch, so I stuck a microswitch through a small gap. To prevent airballs, I put holes on the top to screw a sheet of clear plastic into. Still need to figure out how to attach the plastic on the left side of the ramp. I don't understand how Mars never has airball issues on its ramp... seems hard to believe that they managed to make it the exact height needed for their flipper strength, especially since I'm using the same flippers!

This is my final entry design. Looks pretty weird, but it works. :

I had to add some side rails to keep the ball from falling off, especially at higher speeds. Lock post worked on my first try with a random guess for the pulse length, which surprised me.

While it's nice to know this works, I probably will avoid locking multiple balls this way, since I don't have any way to mount a switch behind it to know if it failed to release a ball due to the ramp positioning. Sadly, this was the only position I could fit the post mech in, so I'm a bit constrained here. I'mthinking I'm going to have most multiballs work by locking one ball on the ramp, and then you get a second ball to plunge, and the ramp ball is released once you hit a switch. Maybe there will also be something to let you short plunge and combo up the ramp to lock a second ball, for three ball, or a rule about locking both balls during MB to release a third. Since there's no auto plunger I can't really have a normal add a ball. I feel like multiballs lately have been a bit boring design wise, so I'm hoping to do more stuff with multiple phases like DE used to do, or maybe more advanced stuff like a special multiball that you can only work towards qualifying while you're already in another multiball, at the cost of ignoring the current multiball's jackpots to make that progress...

For normal ramp shots, I programmed the game to engage the post as soon as the ball makes the ramp, and then disengage once the inlane switch registers, but I had issues with the ball bouncing over the switch since it was just dropping off the end.Inspired by Metroid which I saw at Pintastic last year, I made this end cap for the rail to make the ball drop nicely.

It worked, but I didn't like how it looked, so I made this instead, which seems to work fine and looks more natural:

Posted Tuesday, September 29, 2020
at 06:30 PM

Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 27

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'

Here's a big case of 'wish I was using MPF'... Testing live on the machine was a pain since it was at the other end of the house from my regular computer. So I wanted to be able to easily test stuff virtually. MPF has a nice application for this. Lets you import a picture of your playfield, then drag and drop switches, lights onto it. Pretty handy, so I recreated it using my new rendering capabilities. Not a ton of work in the end, although mine lacks some polish...

Squares are switches. Red means closed, yellow/white means open. Left click to toggle open/shut, right click to quickly press the switch and release it again. Diamonds are coils, they turn red when energized. The white circle above the right inlane is a light, currently off, currently wired up as a 'lower ramp w/lit'.
Another in the left outlane will turn green when the mini-playfield is enabled, triggering the down post to let the ball in. Hopefully I can use this to get a slightly better feel for where lights will go.

I also added some code to do stuff like automatically opening the drop target switches when the bank resets, auto closing the shooter lane switch after a ball is released from the trough, etc. Stuff that would happen physically on a real machine. Otherwise it gets to be a pain to use, since the drop target coils would repeatedly fire until you remembered to click each switch again

Posted Tuesday, September 29, 2020
at 06:30 PM

Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 26

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'

Code can't get very far without some read-outs. I don't have any lights yet, so for now my 'screen' will have to do. Currently that 'screen' is a 50' HDMI cable running to my livingroom TV, but it'll do.... I spent a long time trying to find a good R-Pi compatible graphics library that would work with Typescript/Node. For some reason, everything seems to have been abandoned 2-3 years ago, and doesn't work with modern Pi operating systems. I'd be fine with even coding the graphics from scratch with a plain OpenGL context, but even a simple library to provide that seemed to be missing.

Eventually, I found a simple library that supported things like basic shapes, images, and text, that was designed specifically for RPi game dev, but had been abandoned partway through development. The author's last update said that they were working on keyboard/mouse support, since without that a game graphics library isn't very useful. Well, it's useful to me! no keyboards here...

Only problem was, it didn't work with the latest RPi OS, since they introduced a new graphics card driver, and it wasn't compatible with Windows (my dev OS). So I dug in, forked it, and made my own version with RPi 3 support, some features and bug fixes, and, with one late night hacking session, a shaky but usable windows port. Not too bad, all things considered. The nice thing about this, vs using an established library (if one had existed), is that if I find any other bugs or shortcomings, I can just easily add whatever I need, since I'm already maintaining my own fork.

With that out of the way, I got some initial status displays set up. Very rough currently; I am not in any way an artist. Hopefully I can work up something half decent for the screen at least, but actually doing some art for the playfield is probably beyond me... More mountains to climb down the road

I can add more cards from the drop targets

No scoring or ball logic hooked up yet though... I also need to figure out what exactly is actually going to happen once you complete a hand. To keep with the 'real poker' goal, technically you should have a final opportunity to bet before your opponent reveals their cards, so I figure you'll need to shoot a shot that can hold the ball to finally flip the cards and declare a winner. In this case, my only ball holds are the upper eject hole, the ramp, and the shooter lane, so I'll have to figure out some logic for that, as well as how exactly you can 'fold' if your hand is looking bad. I'd like it to be something on the playfield, vs some menu interaction, but it has to be something very hard to hit accidentally....

Current lines of code: 4,106

Posted Friday, September 25, 2020
at 10:25 AM

Tags: Blog Post, Pinball, Project, P3,

< Newer Posts
Older Posts >

Posts per page: 5 10 25 50 100