Saturday, February 27, 2016

We meet again, Captain Setback!

I was having a great time soldering new light cables and everything went smoothly... I thought.

1) I was happy. Until I tested the circuits...

Introducing, in the red corner - The Problem.

2) A typical layout with two power lines and two ground lines.

In the picture above, connecting Power 1 and Ground 1 should light up Lamp 1. The problem is that since I don't use LED's, which are single direction only, but lamps/bulbs in most locations, powering that line will also light up Lamp 2, 4 and 3 (in that order). Basically it's a grid of interconnected lines so "everything" lights up simultaneously. Doh.

...and in the blue corner - The Solution(s).

I planned the matrix layout based on LED's, so the easiest solution would be to simply replace all bulbs with LED's instead. That is rather expensive however and I really want to keep it "lamp-agnostic" in order to use whatever lamp suits the most.

Another possible solution would be to use current restricting diodes on each ground and power line. Slightly less expensive and should be quite easy.

The third - and here's where my hope lies - possibly solution: Using the light board's built in current restricting diodes on each ground and power line. However I'm not fluent enough in electrics to know if a single diode at the end / start of each line would be enough to keep current going in the right direction all over the playfield. I only know this once everything is hooked up, and I have roughly half of the ground cables left to solder, and in case I need to adjust something I'd rather do it now than retrace my steps later.

The million dollar question: 
Is it enough to "correct" the current direction at the start and end of each line, even if the cables are not drawn in series, but rather branch out every now and then? Would the, say, blue chain above benefit from a diode between Lamp 2 and Ground 2? Would the diode stop that from happening since that line is still connected to the diode?

Or would the current pass on from Lamp 2 to Lamp 4 regardless?

I've found a great tool online to troubleshoot circuits. Using this (which I assume is rather correct) I can see that it won't work with a single diode. The current would still pass in the other "legs".
I will see what the best solution would be, but right now I must say changing to all LED's would be preferable... :/

Check for yourselves here:
Lamp/Bulb based:
LED based:


  1. Woohooo lots of updates! Progress is looking good, hopefully you'll have the light matrix sorted out soon with a minimum of fuss. Keep up the good work.

    PS Why the hell would you want to rewrite all the game rules from scratch? Are you a sucker for punishment?


    1. Hehe, thanks! :)
      Yeah, all lights are soldered on, just waiting for the diodes to arrive now. Then coding resumes! \m/

      Haha, not a sucker for punishment. Perhaps stalling it so that it will become my "never ending project (tm)"... ;)

      No, I'm wanting to rewrite the (rules) code since it's become a little spaghetti-sch. I've added and tweaked and rewrote to accomodate new stuff. Now that I know what each feature will mostly do, I can rewrite it much cleaner. Also - the current version is unnecessary complex. The current code also allows the switches to be read several times, meaning I can potentially sabotage for myself if I read the wrong switch in the wrong order, or the right switch at the wrong time. Basically, what I want to do is to process each switch only once when it's hit and do the complex processing in the loop instead, as opposed to now where everything is handled in a loop. :)

      Callbacks for hits. Loops for modes.