Progress 7/28/2014

I’ve decided to make the all of the titles of my posts completely boring.  Sorry.  Maybe I will feel a little more enthusiasm later in the post, but doubtful.

First order of business is that I built a rotisserie.  I started thinking that I needed one last week.  I wanted something that I could actually give the playfield some angle so that I could play a couple games if necessary.  I threw a sketch together and sent it to Joe, and he mentioned I was an idiot for trying to do it myself.  (My words, not his).  He sent me a link of a well thought out rotisserie that only took about an hour to construct.  What the posters didn’t mention is that you are going to spend about two hours at the local hardware store picking up all the materials, but that is mostly because I get to the nuts and bolts aisle and my eyes go all haywire.  Here is the link that Joe sent me.  Fantastically simple to build, and it costs around $100 at today’s prices.  You could easily cut the price by $20 or $30 if you are willing to cut the threads yourself.

Here’s the things I’ve learned building the rotisserie.

  • Either use a monkey wrench, or at least use a lever in the pipes torque the pipes together as much as possible.  I didn’t do that, and mine is wobbly.  It will be better when I pull the playfield off it and tighten it up, but I was too excited to use it.  (It was noted in the instructions, I just didn’t follow them).
  • I’m going to add wood blocks to the pieces of angle metal that hold the playfield.  Using blocks will allow me to adjust them to places on the playfield that have no components.  Making them out of wood means that I can power the playfield and not worry about it shorting out to the metal rails.  (I don’t think it was envisioned as powering it on the rotisserie, but since I only need a single 24 pin Molex power connector, it is very convenient for me to power it there.  It also makes it easy solder on the back and hopefully debug issues.)

After finishing the rotisserie, it was on to powering the playfield.  The end design uses the Raspberry Pi to turn the power supply on and off.  It powers the solenoid boards/input boards with 5VSB from a PC power supply (which is always on).  I tried powering it and just hard wiring the 48V power supply on.  The problem is that it takes about 100 ms for the processors to come up and do power on self tests, and during that time, the FET inputs are floating.  Not a problem in the real system, but it is annoying to hear the click at startup.  I ended up hooking up a wall wart for the 5VSB supply so that I can plug in the wall wart, then turn on the big 48V supply.

After initially turning on the board, I immediately blew out the fuse that I had for the flippers.  I’m missing something on how Game Plan configured their flippers.  I assumed one thing, and evidently that was wrong because I blew the fuse.  Spent a little time tonight debugging it, but didn’t get any closer.  I had it working well for a little bit, but it wasn’t at full strength.  As soon as I tried to make it at full strength I started having problems.

At one point last night, one of the solenoids started chattering.  It could be that I had a ground loop, but I couldn’t reproduce it tonight.  Originally the return to the wall wart had to go through the PC power supply to get back to ground.  (Again, not what would happen in the real system, but right now I’m cobbling a little bit of stuff together.)  I added a ground return line to the wall wart so ground would be connected properly.

So here is the first video of firing the solenoids on Sharp Shooter 2.  The pop bumpers sound really nice and crisp.  The flippers are weak because how they were hooked up.  I was only powering the hold coil of the flipper.

I just looked up the resistance on the flipper coil.  It is a 5008B and only has 1.2 ohms of resistance.  No wonder the original machine could run off 24V.  If that is the case I need to cut down the initial kick and hold significantly.  I was running originally running at 48ms initial kick, and 25% sustain, but I’ll try cutting it down to 16ms initial kick and 6.25% sustain.  That is definitely the strongest flipper coil I’ve ever seen.

Progress 7/14/2014

I’ve been working on the GenPyCode project in the Google code repository, and  rewiring the SharpShooter II playfield.  Progress is slow but steady.

Starting with the rewire of SharpShooter II.  The initial step is to get all the solenoids firing and active on the playfield.  Because the driver boards can statically configured, it is simple to set them up so the machine will be playable.   The machine won’t play a game, but will continually serve the ball onto the playfield, all the bumpers will work, the kickout hole will work, and I’ll probably daisy chain the drop targets so you need to knock down all of them to have the bank reset.  The end game will support two ball multiball, but that would take a bit of programming.

Right now, I’ve routed many of the wires that source and sink the 48V for the solenoids.  The 48V source is brought to the playfield using three lines:  upper playfield solenoids, lower playfield solenoids, and flippers.  Four wires are used to return the current from the two solenoid cards.  Three wires are used to source the current for the lighting.  The playfield GI was originally broken into two circuits.  A third circuit has been added to source the current for the feature lights.  Looking at the current rating of the wires, I’m definitely over doing the number of wires, but it allows for me to the ground wires on the back of the playfield.  (Less soldering for me to do.)

The feature lights for Disaster are going to use LEDs.  Since this is a retrofit, the feature lights are incandescent bulbs.  While the driver that I made was OK for individual LEDs (about 20 mA), an incandescent bulbs need approximately 200 to 250 mA.  That of course means that the original design will not work to sink that much current.  I’ve sketched out the new design for the drivers, which requires an individual MOSFET for each feature light bulb.  The serial register also needs to have open collector outputs so that the FETs can  be used as high side switches and the existing common ground returns can be reused.  The parts for the new drivers are ordered from Mouser.  I just need to get off my butt and layout the driver cards and order them.  I’m sure that I can fit the design on a 5 cm x 10 cm PCB, so  a single order will give me 20 PCBs.

Onto GenPyCode updates.  The GenPyCode Python project takes the simpleRules.txt file and generates the Python files necessary to run the pinball machine.  This is then run using the PinballFramework to operate the actual machine.  I originally did a lot of the code using Java, but since the Raspberry Pi doesn’t have perfect support for Java, I decided to rewrite it using Python.  Since then, the Python version has been significantly updated and more features added.  I’m now going back and adding the newer features into the simpleRules.txt.  It also adds features for more debuggability.   It currently creates python files for solenoid bits, input bits, and LED bits.  It also creates the constants for the sound files.

Next steps will just be continuing in the same vain.  I’m hoping to finish the wiring on SharpShooter II and then take a video.

Progress 6/20/2014

Haven’t had the time to do an update lately, so here it is.  Started by adding two new categories to the blog.  The first one is Pinball Framework which marks the entries about the Pinball Framework.  I went back and marked the last two posts, but probably won’t mark earlier ones.

So I added a couple more things to the Pinball Framework.  The new additions include image chaining, added ability to set player score display positions, support for non-HD aspect ratios, and new GUI for debugging cards.

Joe asked if the background image could be changed by making a call.  I one upped the request and added in support for image chaining, so now a group of images can be shown on the backglass with a wait in between each image.  At the end of the chain, the chain can be repeated to show the images again.  Chaining simplifies the programming of the backglass images since it happens independently of rules processing.

Player score positions were previous automatically located by the software which only worked for a single layout of the backglass.  Now the displays are located by picking the center point of the display, and the number of pixels for the height of the characters.  This gives much more flexibility.  While in that section of code, support was added for non-HD aspect ratio displays which is needed for the backpack pinball machine.

Last thing I added was a new GUI for displaying the state of the card inputs.  Previously there was a python script that needed to be configured for the card that was being tested.  The new GUI auto discovers the cards attached, and populates them in the GUI.  It then polls each of cards getting the input status.  It also supports kicking an individual solenoid.  A good general debugging tool which might end up being easier for other people to use.  It is located at PinBrdGui in the Google code repository.

While talking to Joe, he also mentioned he wasn’t sure he understood the wiring.  I wrote up a quick diagram of the necessary wiring and how it simplifies the required wiring.  Here’s the quick diagram.  Each of the driver boards support up to eight solenoids, but I only threw four down because I didn’t want the diagram to get too busy.


Now the next new category.  It is called Sharp Shooter 2.  I picked up an old racked out Sharp Shooter 2 playfield and a cabinet for it to go in.  Designed by Roger Sharpe who is one of the gods of pinball.  I hope I can make him proud.  So I was taking an old Camelot playfield and driving that with the driver cards.  There was always a nagging feeling that the project would be finished and the machine would be a dog to play.  Got the SS2 playfield for a good price and it should be a better playing machine than Camelot.

SS2 was originally a Z80 processor based machine.  It was produced by Game Plan which truth be told, I didn’t even know was the name of a pinball manufacturer.  Some information can be found on the internet, but I can’t really figure out the rules, and even so, I’m doubting they were very deep.  So I’m going to drive the playfield with new driver/input cards and add an LCD for a backglass/scoring.  The original playfield was driven with 24 volts.   I’m going to use 48V but make the solenoid pulses short.

Here’s a few quick pictures at the beginning of the project.

SS2Playfield SS2BackPlayfield

There is a set of eleven inserts, so I need at least eleven modes.  Here’s what’s currently in the notebook in no particular order:

  1. Sharp Shooter – some shooter inserts are lit red, some are lit white, if all white are knocked down reset with new group of red and white.  First red hit ends mode.
  2. Hustle & Jive – turn off tilt bob, fill all six upper lanes without allowing flippers to rotate the inlane lights.
  3. Sniper – can only hit blinking shooter target, then next one lights, etc.  Get five to complete mode.
  4. Target practice – blink random pop, then random shooter, then random inlane, spinner orbit, finish with kickout hole.
  5. Check hideouts – must get two standup targets within 60 seconds.
  6. Call the posse – spinner lane ten spins, then kickout hole, starts two ball multiball.
  7. Bar fight – hit each bumper ten times, each time a bumper is hit, it lights for 10% more time.  At ten hits it is constantly on.
  8. Ride for help – 5 orbits, then sink kickout and get two ball multiball.
  9. Sharpe Attack – Get five shooter individual targets, no cradling allowed (reconfigure flippers for no hold)
  10. Killem all – drop all shooter targets three times, sixty sec to drop bank, resets when bank finished
  11. Track the bandits – collect all lanes (can use flippers to rotate), knock down all shooter targets after all lanes collected.

That’s the current thoughts.  I’ll start by simply rewiring the bottom of the playfield for the new driver/input cards.


More PinballFramework Updates, 5/29/2014

So as it currently stands, the pinball framework is in good enough shape that a pinball machine could be run using it.  It has been a long journey, but I’m happy with how it currently stands.  Below lists the biggest features that were added in the last two weeks:

  • Timer thread processing so now timers can be set up
  • Sound chain processing, so now sounds can repeat after a certain delay.
  • Background music is now supported.
  • Added support for scoring using switch inputs
  • Added support for communicating with hardware cards
  • Added support for a background image

Unrelated to the PinballFramework…added generated documentation to the archive in a zip file.  Added partially completed BackpackPinball layout…but instead of finishing that, I ended up working on the python code.

Next step will be finishing the BackpackPinball layout (the ruleset is currently implemented using the framework).  The framework needs to have non-HD format sizes supported to support the monitor I bought.  Gotta get the Pi up and running which should magically run the pinball framework without changes.  (I’ll believe that when I see it, but it is why I went with Tk and pygame instead of java.)

All in all, a good couple of weeks.  More coding than I was expecting.  I bought another playfield and that is going to take the place of the Camelot playfield.  Hated to put a ton of time into it, and find out that Camelot stinks.  The Camelot playfield parts are going to be used in the backpack pinball machine.  I also bought a used cabinet so I won’t have to use 2x4s to support a naked playfield on a table.  That will probably be the next big thing that I work on.  More on that in a couple of weeks.

Goonie pinball dude, send me a note some time if you read this.  I couldn’t find a link on your site for your email address, and I wanted to talk.  My email is on this site, so send me a note.  Thanks.

More features added to Python Pinball Framework, 5/12/2014

More additions to the python pinball framework over the last couple weeks.  Here is a list of major additions to the framework:

  • Added script files to generate Doxygen documentation.  The Doxygen batch and configuration files are located at Python/PinballFramework/Doxygen.  All of the Python files comments and headers have been updated to support the documentation.
  • Added LED chain processing.  A separate thread processes changes to a masked group of LEDs.  That group of LEDs can be changed using LED commands which include turning on/off LEDs, waiting a certain amount of time between LED changes, and repeating a sequence of LED commands.
  • Added timer thread processing.  The timer thread looks for timers that are running, and if so, increments the time until the limit is reached.  When the limit is equaled or exceeded, the expired timer bit is set for that timer.
  • Added sound chain processing.  This thread is almost identical to the LED chain processing thread except instead of changing the LED state, it can play sounds.  This makes playing a sound every 30 seconds easy, without requiring multiple states to do it.
  • Added play/stop background music to standard functions.  Allows a background track to be played continuously.

Next thing that is going to be added is the scoring.  Right now, the only thing that scores is completing all of the targets or completing the three lanes at the top of the playfield.  I’ve just been too lazy to program the rest of the switches to give scores.  Communications also haven’t been finished.  Those are the last two remaining big features that need to be added.

Allentown Pinfest was a couple of weekends ago.  There was a free T-shirt up for grabs for the first person who asked for a free T-shirt.  Well, nobody asked for it, so nobody got it.  That being said, I’ll continue the contest until somebody actually gets the T-shirt.  Rules are same as before except I probably won’t have the extra shirt with me.  If that is the case, I will take your name/address and mail you the shirt.

I spent most of my time at Pinfest playing EM machines.  There are enough machines around in northeast MA, southern NH where I can play a ton of solid state to DMD machines.  The one group of machines that aren’t really represented in the wild are the EMs.  Allentown had a ton of EMs where some were in a good state, while others were a little rougher.  For some reason the week before Allentown, I was remembering an old pinball Gottlieb machine I played as a kid that had a gobble hole in the center of the playfield.  As a kid, it just seemed totally unfair to have a gobble hole where your ball would just be sucked down, and it was gone.  Now, being able to aim the ball a lot better, playing the angles, it is a lot more fun.  I found one EM machine with a gobble hole at Allentown and played it to death.  It was simply a blast.

I was hoping to score a bunch of parts at Allentown, but looking through the flea market didn’t yield anything very exciting.  I did pick up a Bally MPU board for my Dolly so I can put her back into action.  (I’m sick of fixing up a completely corroded board, and the only real way to fix it would be to remove all the chips, clean, and then replace.  Way too much hassle for that game, so I picked up a tested used MPU board which I will toss in at some point.)  I was rolling in my mind of whether I should just gut the machine, add my new driver cards, throw an LCD in the backbox and add some better rules, but seemed like it was a shame to do with a machine that would be working if the MPU was working.  (This doesn’t include the fact that there is a ton of wear on the playfield and the backglass is completely peeled.)

Started working on the layout for the backpack pinball machine.  I started trying to lay it out after doing a couple quick measurements with some of the parts I’ve collected, and low and behold nothing was fitting.  There was a moment of complete doubt if a 12″ x 24″ pinball machine is even possible.  Luckily Joe talked me back from the brink and threw some ideas at me.  With a 12″ wide playfield, there is no space for two inlanes, two outlanes and two flippers.  The lower playfield is going to be very similar to the Space Station playfield.  It only has two outlanes with a very small wire between the slingshot and the flipper to allow cradling the ball.  I laid that out using visual pinball and it should fit with the slingshots and the mini flippers I have from the Shaq Attaq.

The top of the for the pinball backpack playfield certainly doesn’t have enough space for all the stuff that I was planning for up there so I’m now thinking of adding a second level.  That should give me enough space to fit all the rest of the stuff.


Processing Engine running, 4/27/2014

Spent all my spare time this weekend on getting the rules engine working.  It is now running the code and can change the LEDs, start games, watch balls drain, etc.  It is pretty exciting to simulate a whole pinball game…but, it is only simulated.  I still don’t have the LED engine running, but that is simple in comparison to the rules engine.  The rules engine is using a good number of the standard functions from the macro language which means that many of them have been verified.  In a couple months, I will end up running a verification of all the standard functions to make sure that they are working properly.

The ruleset that is currently programmed is the targeted rules for the backpack pinball machine.  Here’s a quick picture of the simple layout:


Simple Pinball machine from three test cards

I’m going to update the rules set to include a few more features.  The spinner is used to increment a bonus value.  If the inlanes are completed the bonus multiplier is incremented.  If the all the targets are completed, the bonus multiplier is incremented.  If the ball goes in the kickout hole, the bonus is collected.  If the inlanes are completed and targets are completed within a 30 second timer, the bonus is held to the next ball.

One interesting fact about running the real ruleset is that the rules get really angry if the ball can’t be found to start the game.  It means when running the machine, you must remember the order of pressing the switches.  Before pressing the start button, the Ball_In_Play solenoid switch must be closed.  When the game is started, deactivate the Ball_In_Play solenoid and activate the Ball_At_Shooter input.  The game goes to normal scoring mode when it detects the ball going through one of the inlanes.  At that point, the Ball_At_Shooter can be deactivated.  To simulate the ball draining, activate the Ball_In_Play solenoid switch.

Next big thing with the Python pinball framework will be to attach the LED engine so that the LEDs can be automatically strobed.  After that, sounds need to be added back in to get that fully working.  I also haven’t added the scoring back in, except for bonus score for completing the inlanes.

I’m currently adding in Doxygen comments for Python code.  I’ve never used Doxygen for documenting Python code, so I’ve had to spend a good amount of time reworking file and function/class headers to make sure the information is presented properly.

Last time to mention Allentown, 2014.  Just in case you missed the last post, John and I will be attending Allentown on Saturday (5/3/2014) from opening to mid-afternoon.  We will be wearing OPP (Open Pinball Project) T-shirts.  The first person that comes up to either John or I and says, “Give me a free T-shirt”, bam, they get one.  Thanks again to Joe for doing the artwork.

I will probably be doing another code update this week if you are watching the Google code repository.

Allentown, here we come, 4/23/2014

One of the goals was to make Allentown this year.  I think there is going to be a great big check mark for that one.  John and I will be attending Allentown on Saturday morning 5/3/2014.  We are planning on being there around opening, and will probably leave in the mid-afternoon.  Just for jokes, I’m going to run a contest which I doubt anyone will win.  Both John and I will be wearing OPP T-shirts.  (They have both both OPP and Open Pinball Project on the front of them).  The contest is that the first person to stop us in Allentown and say, “hey, give me a free T-shirt”, you get a brand spankin’ new shirt out of my backpack.  (They only come in large or extra large so there you are…those are your choices.)  I fully expect that no-one will read this, so it just means that I have 6 more T-shirts that aren’t spoken for yet.  The T-shirts are supposed to arrive by Thursday of next week, so it is even questionable if they are going to get here on time.  Joe (the most prolific pinball contributor) did the concept and the artwork.  I’ll post a picture…when I receive the shirts which I’m really hoping is on Thursday or Friday of next week.  Enough with the free giveaways, and back to the open pinball project.

This week a ton more python code has been written, and I’m hoping to be able to run a simulated pinball game next weekend.  The debug interface in the previous blog post can be used to simulate inputs, and so a complete game should be able to be “played” and rules verified.  It is based on the simplerules.txt which was originally going to be compiled into Java, but has been hand compiled into Python.  (I will go back and write a python converter eventually, which will simply be translating the Java I’ve written into Python.)

The nice part is that the architecture has held up nicely.  I originally was going to simply rewrite simplerules.txt into straight Python without using the architecture.  I quickly found out, that it was even easier to use the existing architecture that I had set up (processing chains, standard function calls, etc).  That made it super easy and rather quick to translate.  I got most of that translated last weekend, and then wrote a lot of the standard functions this week.

So what is the new goal for the short term?  I’m going back to finishing the mini 12″ x 24″ pinball machine.  The new goal is to have it up and running by the York pinball show which is happily in October this year.  I don’t feel like dragging a whole machine down to York, so why not a full featured mini-pinball machine?  The pinball machine should be small enough that I can throw it in my backpack and pull it out and show some people if they are interested.  The “backglass” will be a 17 inch LCD monitor, but the image on the back will probably be a static image with scores overlaid on top of the image.  The machine will be made on my drill press, because I just don’t have enough time to get a CNC up and running.  The monitor will be driven with the Raspberry Pi will contain one solenoid, one input, and one LED driver board.

Next entry should be about getting the processing engine working.