In mid 2008, I found out about "Harrison's Box". It's a box with a bunch of controls and lights and such; a gift for a 1 year old. With Jasper's first birthday coming up, I thought I'd make him something similar, but a bit mrore tecnologically advanced. [1]
I've decided to use real arcade controls as the input devices - joysticks and pushbuttons. Those would be interfaced to an Arduino-based microcontroller. [2]
For outputs, a bunch of LEDs interfaced to the Arduino via a series of Philips 4794 Serial-in LED driver chips. [3]
One of the ideas of building this box for Jasper is that it can evolve. For now, it'll be simple joystick and button inputs, with many LEDs for outputs, and perhaps some simple audio output from some sort of hacked toy. In the future, I plan on adding video out, to hook it up to a TV, perhaps other input methods - bend sensors, etc. As Jasper gets older, I can tailor it for what he wants it to be. It could be a spaceship base control panel. It could be a computer. It could be the control panel for a space ship! Who knows. We'll see where it leads...
The electronics for this project are pretty straightforward. Standard arcade controls for inputs, LEDs for outputs. The cpu is an Atmega-based Arduino module. The LEDs are driven by the 4794 shift-register/LED driver. [4][5]

In Figure 1 you can see the example circuit, directly out of the datasheet for the LED driver chip. My board design takes the chainability of this chip into account.

In Figure 2 you can see an idea about how to lay out the circuit on a piece of strip board. The blue boxes with the X in them indicate a cut in the strips. Yellow pads are for the LEDs. Purple pads are for resistors along the top, and a 1mF cap near the chip. The red and green strips are respectively the VCC and ground. For my use, VCC and VDD will likely be tied together.
Since the chips are chainable, then most of the wiring can hop from one board to the next. For the input, the "data IN" is hooked to the micro, while the output "data O" gets hooked to the "data IN" of the next chip. By making modules like this, I can just keep adding on more LED boards to fit in the case. I bought 25 of the driver chips, which means I can drive 200 LEDs. I won't be doing that many though.
This means that there should be 6 lines connecting each board to the next board, or to the micro (+5v, ground, data, clock, strobe, pwm). The PWM line will be tied to a dedicated pin on the Arduino, which will be used to dim the LEDs. I may use all of the PWM outputs, driving different sets of LEDs with them, for added effects.

Next is the inputs. Since I'm only using digital inputs, I just need a mess of switches (pushbuttons, joysticks all use the same microswitch) hooked up with a circuit as seen in the standard circuit shown in Figure 3 above. It's the same circuit given on the Arduino website for hooking up a pusbutton. [6]
Future upgrades may add distance detectors, bend detectors, touch sensors, knobs, etc. But for now, just some simple buttons. About the only short-term upgrade I can think of is to use a CD4021 input shift register, in a similar fashion to the LED output shift register above. This will enable me to have an unlimited number of inputs on the device.
There are two parts of the software. The first is the firmware on the Arduino. The second is a tool on the desktop to help me generate the data structures I need for display patterns in the firmware.



