Monopoly in Lights

Enriching the Electric Company

Gather Ye Crystals

After finally getting all the bits together, I was able to get the binary counter hooked up and working, based on some information I found on another site.  Connected an RGB LED to some of the higher value outputs, and watched in amazement as the little diode color shifted before my eyes.  White(ish), magenta, cyan, blue, yellow(ish), red, green, blank, repeat. After a few failed starts, seeing this was pretty happy-making.  Of course, it wasn’t going very fast, but that could still be okay.  So, it was finally time to try hooking up the LED driver to test the next step, which also required hooking in the Netduino, so I can ensure the driver knows to light the LEDs.

And that’s where things started to go a bit downhill.  After hooking things up, I could tell the Netduino was controlling the driver okay because it did actually light the LEDs, but suddenly the counter sample LED I hooked up wasn’t cycling nearly as fast.  Well, not usually, anyway.  In some instances it would speed up, then slow down again.  Regardless, it was never quite fast enough to actually make the driver do its PWM correctly.  (As a side note, the times the thing would speed up reasonably well seemed to be directly related to when I would actually physically hold the protoboard with my fingers.  Apparently human capacitance has an effect on this circuit as it stands, which is hardly the desired effect.)

My best guess right now is that the added power drain of the LEDs and the driver are somehow affecting the RC portion of the oscillator circuit, which makes that approach of questionable value.  The counter ‘s internal oscillator can also be used with an external crystal, however, so that was my next plan.  Rather than paying for shipping though, I decided to see what I could find on Amazon.  Did you know you can get a package of 50 crystals for about $7.00, with free shipping?  Did I need 50 crystals?  Not at all!  Did I feel better about paying $7.00 for 50 crystals than paying about $5-$8 for one crystal with shipping?  Absolutely!  So, now I wait for the crystals to arrive, and retest the circuit.

May 8, 2012 Posted by | Electronics | Comments Off on Gather Ye Crystals

Control Freak

Controlling one LED with a Netduino or other microcontroller is easy.  Controlling two, three, four, likewise simple.  How about controlling 143?  That’s about how many I’ll need for this project, and that’s a lot more digital outputs than any microcontroller I know of can handle.  So, what can we do?  Obviously other projects have controlled large quantities of LEDs, so we need to figure out what they’re doing and whether it will help.

After discussing the problem with coworkers, we discovered the joy of RGB LED cubes.  If you haven’t seen them, use your Google skills and be impressed.  The short version is that one microcontroller is managing a 6 x 6 x 6 (or whatever size) cube of LEDs, putting up all sorts of cool patterns.  This is typically accomplished through a bit of electronic trickery, where the microcontroller is only actually controlling one slice of the LEDs at a time.  Because humans experience a phenomenon known as “persistence of vision”, it appears that all the LEDs are lit simultaneously, even though only a fraction are actually on at any given time.  The same trick was used back in the days of CRT monitors and TVs, where a single point of light was all that was actually illuminated at one time; your brain (and some slow-fading phosphors) did the rest.

For this project, though, I wasn’t quite sure relying on persistence of vision would get me where I wanted to be.  I’m trying to illuminate plastic with these LEDs, which means the overall light is getting dispersed and diminished.  For that, I want to keep as much full power, full time brightness as possible, so I want every LED to be on full time if I want it on.  Some further links and research turned up a class of ICs called LED drivers, which (as the name implies) drive LEDs.  You tell the chip “turn on LEDs 1, 5, 8, and 12”, and it’ll keep those lit until you tell it otherwise.

After looking around, I found the TLC5490 (and TLC 5491) chips seemed like good candidates with existing Netduino support.  Each of them can handle 16 LEDs, and since I need to run 143 (remembering that the red, green, and blue channels are all independent) I sent out an order for 10 of them.  (Nine would be okay, but who doesn’t order at least one spare?)  A big benefit of the chip is that it supports built in Pulse Width Modulation (PWM), which lets you adjust the brightness of the LEDs.  This is actually a technique that goes back to the persistence of vision thing, so that if I want the LED to be 50% brightness, the chip will handle having it be on 50% of the time and off 50% of the time.  It’s not perfect, since the human eye only begins to detect dimming at a lower percentage, but it’ll work for what I want. (Also, you can daisy chain these guys together, which means I can run all nine or ten of them from one set of control lines. Sweet!)

The chip also requires an external grayscale clock signal.  I could run that from the microcontroller, but that seems like unnecessary work, so we’re going to try running it from an external chip.  One annoying thing about the TLC5940/1 is that it has a fundamental cycle of 4096 pulses on the grayscale clock.  After it’s run through its cycle, you actually have to send the chip a blank command, release it, and let it start on a fresh count of 4096.  To handle this, I went to our local electronics supplier, Intertex, and grabbed some 4060 binary counter chips.  I found out later that they have a built-in oscillator circuit, so theoretically all I need to do is hook up a resistor and capacitor to it, and I should be able to generate my grayscale clock straight out of the chip.

(Foreshadowing:  That last bit didn’t work to my satisfaction.)

April 21, 2012 Posted by | Electronics | Comments Off on Control Freak

The Gathering (of Materials)

This will be an ongoing process, acquiring all the stuff needed to make this project a reality.  I’m actually back-dating a few of these posts as I’m starting the documentation process, so I may have skipped a few steps here and there.  Anyway, here’s some of the stuff that’s already come together to start making this happen.

  • Acrylic, and lots of it!  Turns out a local plastics supplier, Regal Plastics, has a scrap pile.  You can go rummage around and get their leftovers for cheap.  I picked up a variety of different plastics including opaque black, translucent white, and transparent clear for about $8.00.  Hopefully I have enough for what I need to do, but even if not, it gives me lots of material to test with and decide what will work best.
  • Acrylic solvent adhesive.  Wanted to get Weld-on from the plastic supply house, but they were out of applicators.  I ended up getting some adhesive from a local hobby shop instead.  Either way, the stuff actually causes the two acrylic pieces to fuse together into one, giving a nice strong joint.
  • RGB LEDs.  Got a few packs from eBay.  Probably have more of these than I need, but wanted to have spares and extras in case my plan of one LED per space turned out to be infeasible.
  • White LEDs.  No sense in wasting an RGB LED on a section of the board that has a native color, like the property bars or the In Jail section.  Just light those with a simple white LED and move on with life.
  • Netduino microcontroller board.  I’ve done raw PIC programming before and played with an Arduino a bit, and this time I’m going to try something different.  A coworker was doing a project with this, but realized he needed a more powerful board, so I got this from him at a discount.  May as well see if it’ll do the job I want!
  • Two line LCD display.  Rather than have a huge switch bank, we want to reduce the number of controls needed for this.  To do that, we’ll need to provide user feedback about what those controls are doing.  Two lines of LCD display seem to be quite sufficient for my purposes.
  • Lots of miscellaneous electronics parts.  I’ve been projecting for a while now, so there’s lots and lots of goodies in my bins already.  Many of them should be useful in this process.

I also have picked up a couple of plastic-specific saw blades for my table saw and miter saw.  They’ve worked reasonably well so far, but I’m hoping that I’ll learn even more about how to best use them to get nice, solid, clean cuts in this material.  The less sanding and edge-polishing I have to do, the better.

April 20, 2012 Posted by | Construction, Electronics, Microcontroller | Comments Off on The Gathering (of Materials)

The Best-Laid Plans

So having “helped” build a lighted board before, what do I want to get out of a newer board now? Well, there were several problems in the original that I’d like to overcome, and there are many features that simply weren’t within what we could reasonably accomplish given the technology that now seem possible.

So, technology aside, what were the big design flaws last time around?  Here are the ones that seemed most obvious to me.

  • Light leakage between spaces
  • Dark areas at the top and bottom of each space (where the wood support for the track blocked light)
  • Uneven space sizes/shapes
  • Poor felt quality/poor logo quality

There’s plenty of other problems as well, both in original concept and execution, but I’ll let those pass.  It was something fun for my Dad and me to do together.  I actually have a newborn boy (which is why this build is going to take much longer than it otherwise might need to) but I just can’t bear to put the idea on a shelf for as long as it would take for him to understand and enjoy what’s going on.  (Once he’s older, I’ll show this to him and ask him what other ideas he’d like to see come to life!)

With those problems in mind, what new features are possible given the current state of technology?

  • Multicolor LED space lighting
  • Independent property/color bar lighting
  • Not having a huge bank of 40 switches to control everything
  • Not using electrical tape to secure wire connections

An ambitious project to be sure, and the most complicated build I’ve done to date.  (I suppose the IIDX controller was pretty complex, but this will probably be more difficult even than that.)  So what materials and techniques shall we use to accomplish these goals?

  • Solid black acrylic space dividers to reduce/eliminate light leakage and provide visible lines
  • Translucent white acrylic panels for each game space to diffuse light evenly
  • Thin or transparent supports for the spaces to eliminate dark edges
  • RGB LEDs for each space to provide a wide variety of possible colors
  • Independent white LEDs on each colored property bar and the In Jail space
  • Microcontroller brain to run everything using a more limited control set
  • LED driver ICs so we don’t need to have 160 or so individual digital outputs from the microcontroller

Several problems are not yet figured out, but I’m assuming I’ll be able to tackle those once I figure out what they are.  Should be fun (and frustrating)!

April 14, 2012 Posted by | Construction, Electronics, Microcontroller | Comments Off on The Best-Laid Plans