Monday, January 5, 2015

Lightboard V2...in the making.

First draft of the lightboard:
1) Lightboard v2. Will be matrix-driven and hopefully a lot more stable/cleaner/better than v1!

I'm using a LoL-board for the light matrix (this is only debug info) as it's almost perfect in size, and saves me a ton of soldering. I've also decided to put in a few fuses on the board to hopefully prevent things from burning up in the case of a short.

No error checking has been done yet. And I'll have to confirm the diode placements, but it's looking a lot cleaner than the old version. I'll use ten different wire colors as well, so I should be able to debug light problems quite easily in the future.

Sunday, January 4, 2015

Enter the Matrix....

Semi-success! And fail! 

I've moved all light processing into a separate Arduino Nano board that I had lying around and it worked a treat. Rock solid lighting and freeing up resources on the Chipkit for gameplay!

But I accidentally loaded the lights in the wrong order, enabled some lines that probably should have stayed off (most likely shorted ones... Maybe they were the problem with the lightboard in the first place?) so now the lightboard is once again acting up, and it's going in the dumpster instead.


Two options exists:

1) Recreate the board, twice the scale but still with 96 "inputs". Expensive and very hard to solder without making mistakes, even with the larger spacing. Also, did I mention it's expensive? If I need to add a resistor, make that 96 resistors. MOSFET's? Make that 96 of 'em...

2) Create a matrix board instead. A LOT cheaper and quite easy to solder. I'll be able to visually debug the lines by using led's on the row and column MOSFETs. The downside is that I'll have to re-do ALL the lights wiring, at least most of it anyway. Each light needs to get a new ground and power line. The old board sunk current, while this will be providing instead.

I'm thinking about doing it the proper way now with a matrix, since that's how real machines does it. It also allows for easier troubleshooting and replacing of bad components. But I'll probably won't go down the PCB route this time either, the risk of me making a digital error in the drawing as a first-time user is too big. But we'll see...


Oh, and I'll be replacing the three MP3 Triggers with a single WAV Trigger.
The follow-up product is the same size, but allows for 14 simultaneously mixed/individually running stereo tracks and a bank of 1000 files, including individual settings for crossfades, looping, volume etc per track.  This will allow me to properly play sound and music instead of continuously compromising which effect should have priority over the others etc.

It will also free up two hardware serial lines (one's already in use by the Nano) for additional things, such as a hardware clock countdown for timed modes etc. Great stuff! 

Friday, January 2, 2015

Take That! No, not the boyband.

1) Newly soldered and pristine power board.

Take that, stupid machine.
The new power board is wired up and good to go!
Now all I've got to do is make sure nothing breaks, again, and figure out the source of the misfiring MP3's and I'm good to continue with the rules.

As for the misfires, I got two leads - interrupts (won't make the same mistake twice!) and possibly lack of pull-down resistors on the rx/tx pins. I noticed that sometimes the boards are restarting when many lights are triggered simultaneously, so it could possibly also be a power routing failure, i.e power taking a wrong turn somewhere, or not enough power from the power supply. The latter would however be unlikely as it should be able to provide plenty of amps for everything, so it's probably the actual toggling that somehow interferes with the audio playing.


Misery loves company!

While waiting for the parts to arrive I figured I could continue working on the ruleset. 
But as it turns out, I've been spending my time trying to figure out why half the lights suddenly doesn't work anymore. After tinkering with the lightboard (Satans lightboard, remember...) I managed to get almost all of the lights running. After re-setting one loose lamp, there were seven still not functioning, but I managed to salvage and free new connections for them by grouping together GI light chains. A minor sacrifice, since most GI is on or off at the same time.

I found two faults, probably caused by me pulling the playfield out during the "Fiery fumes of Hell"-episode of yesterdays': One being a resistors legs touching a leg of the 10'th shift register. It was simply too long and got bent by a cable. The other was a loose ground connector on the 2'nd shifter register. It seems that I must have missed soldering it completely or it somehow has heated up enough to melt the soldering at that point. I'm still leaning towards manufacturing a PCB for the lightboard...

I'm also almost positive the sound boards run better when the whole light update-function is disabled. It's really disturbing me since the sound effects are erratic and quite unreliable at the moment. Maybe not for a casual player perhaps, but as the designer I notice right away when effects are missing. Gotta investigate this more closely.


1) Mr Bubbles, Mr Bubbles, does whatever a Bubble-man does!
Mr Bubbles had a little reconstructive surgery as well. I decided to go for function over form and drilled and screwed his arm in place. Hot glue just wasn't kicking it, but this solution - however ugly - works perfect.

The plan was to get a nicer screw that fits better, but that's a future thing to worry about.






I'll end this post with a nice reminder of the "dark side" of the playfield. 

2) This is starting to become impossible to troubleshoot. Not enough documentation, wires that has been redirected
all over the place and no real logical grouping of cables. 



Tuesday, December 30, 2014

Of(f) course...

As always, just when things are moving forward they turn to a screeching halt again.

For some time the MP3-triggers has behaved badly and "misfired" when playing MP3's. I thought this could be due to the solenoid-interrupt stepping in and messing with the communication. Should be easy to check, just remove the interrupts temporarily, right?

Wrong. 

What happened was that I've coded the solenoids to fire right away (for speed) and be turned off in the... that's right, the interrupt function. This lead to the solenoid being stuck in active and took me a while to notice since I was debugging code on the computer at the same time. Things that happen when you leave a project for some time, it's almost impossible to remember all decisions that were taken and for what reason. After that I heard what almost sounded like gravel dropping on the floor and thought "what the hell is that?".

Then came the smoke.

I moved faster than Mick Jagger on speed and shut off the machine, threw the glass front off and pulled the board up. I expected to see fire, but there were just one sizzling solenoid. I had to keep it cool by blowing air on it for a good long time. Phew.

Damage control.

1) Sizzling solenoids, anyone? I've heard they're all the rage...
The first thing was obvious. The drain kick solenoid was more fried than a bucket of KFC. Clocking in at almost 0Ω it was basically a short circuit.

Next thing - not a single solenoid worked after the incident. They seemed fine resistance-wise and didn't feel warm, so I suspected the power supply and check the voltage. It read 6V... not good. Should be 48V. After unplugging the short circuit solenoid the voltage went up to 48V again. Thank you, China manufacturer, for voltage limiting when shorting instead of blowing up!

2) New. Crispy.
I replaced the solenoid with a spare one I just happened to have in my "garbage" pile. (An exact match too. Seriously!?). Still no tango....

3) Spot the burnt MOSFET....

...because of course, the solenoid driver board MOSFET was blown as well.
I looked high and low for a replacement, but could only find IRF640's. I used these in the past and they worked, but kind of slow for the flippers so I scrapped them. They also became quite hot due to not opening fully when activated (not really a low-level voltage MOSFET).

The board seemed fine, so I soldered a IRF640 on there and included a heat shield. How about now?
4) Surely this has got to be it, right?

Nope.

Nothing.

Crap.

My theory is that the last time I used them was with the Ardunio Mega, which runs at 5V 40mA per output. The Chipkit has 3V and 20mA, if I'm not mistaken. This is simply to weak to open the gate at all. I raised the on-time with 10x and it still didn't work, so I once again scrapped the idea of using them.

I've now ordered a new power driver board (just in case) and a bunch of replacement MOSFET's (RFP30N06LE). It GOT to work.

On the plus side...
I've created the Atlas, Big Daddy and Upgrade game modes now, along with additional tweaks and things (like user selectable background music before launching the ball). Just got to get the MP3's to trigger reliably, as said, but Big Daddy is even now a treat to shoot at! :) 

5) Junkyard/graveyard. I've grown used to stuff not working, but this is getting ridiculous. 


Sunday, December 28, 2014

Merry Christmas, Mr Bubbles!

With the holiday spirit still in mind, I've treated the pinball machine with some respect and love and gave it a few gifts - in the shape of additional game programming features!

I've detoured from "creating the most advanced and deep ruleset the world has ever seen (tm)" and instead focused on getting basic functionality in place. I figure I can always flesh out the features every now and then instead. A strategy that proved to be most effective. I've added basic functionality for most major game play features including:

* Little Sisters
* Rescue / Harvest (videomode)
* Steinman multiball ("Ugly ugly ugly!")
* DNA / ADAM Frenzy
* Photo targets
* Drones
* Plasmids / "Plasmirage" multiball
* Rapture multiball

The features are pretty much stand-alone at the moment, as I've mostly skipped the planned interleaved parts. I've got a lot of sound effects in place as well as generic "hurry up" quotes. The game is now playable and enjoyable, which is a good thing! Next I aim to get the following features in place:

* Mr Bubbles / "Big Rage" multiball
* Splicers
* New Years Eve
* The Masterpiece  
* The rest... 

The biggest challenge so far has been to do "timed" events properly, or rather events that keeps running and doing things over several cycles, as it includes using a lot of counters and variables to keep track of various states and what not. I've found myself having to deal with, and code, a large number of different interconnecting functions simultaneously, for instance with the Little Sister mode. It's easy to get side tracked and think "oh, right - I also need this!" while doing something completely different.

Even the most basic function needs a menu setting, a start and stop state, it's own variables (which is unique to each player), an update loop and rule set for interacting with other functions etc. The list goes on and increases as the complexity of the function/mode grows. It's rather easy to miss things, for instance - one time I stared myself blind on the code for a mode and couldn't figure out why the frak it didn't work. Turned out I missed to run the update-function for the mode completely...

The plan is to at least have something in place for every switch and lane, even if it means just getting points and getting a message displayed. I've skipped almost all videos at the moment (this can be added quite easily in the future) - I just really want the machine to be in an alpha or beta state at the very least, which seems plausible at the moment, thankfully. 

1) Old rubbers. Hard to see in the picture
but when stretched this rubber is
visibly cracked almost everywhere.
I had to do the first routine maintenance of the machine, which included new rubbers for flippers and slingshots! It's mostly because of air and sun exposure as it hasn't really been played a lot. I've also wiped and cleaned the playfield, as well as adjusting some hardware (including the drain, which sometimes failed to kick the ball, resulting in multiple drain registrations and thus ending multiballs prematurely...).

Felt a little weird to perform maintenance before it's even completed, but hey, it sure feels like a proper machine now. The future for the machine looks promising - 2015 will most likely be the year I'll finish it! ;)



Sunday, September 7, 2014

Blogs that don't update!

I hate when blogs don't update - Including mine!

So I feel obliged to write a few lines, even thou nothing really has happened the last few weeks. Entering the studio soon with my band and every bit of focus is on that, I'm afraid.

But the machine is always present.
Always watching.
I must please it soon with some good offerings... ;)