JasperBox
Scott Lawrence
December 2009
0. Table Of Contents
enable javascript to see the table of contents
1. Project Overview

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](also [4])

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...

2. Electronics Hardware

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. [5][6]

example circuit from the datasheet
Figure 1: Circuit Diagram From Datasheet

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.

stripboard circuit layout
Figure 2: Chainable light circuit on strip board

In Figure 2 you can see an idea about how to lay out the circuit on a piece of strip board. The orange boxes are the connection points for the LEDs on the LED display. They will need a resistor between this pad and the LED. The black lines denote connections. The connection to the microcontroller is in the upper left. Not shown are the 1mF cap near each chip. The red and green strips are respectively the VCC and ground. For my use, VCC and VDD will likely be tied together.

The pad in the bottom right is the shift data out, which will be used to chain more of these boards together. The 6 lines in the upper left get brought over to the next board, but with the Data In swapped with that data out line instead. 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 up to 200 LEDs.

This means that there should be 6 lines connecting each board to the next board, or to the micro (+5v, ground, PWM, strobe, data, clock). 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.

input circuit diagram
Figure 3: Example Input Circuit

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. [7]

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.

3. Software

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.

4. Enclosure
cutout plans - flat
Figure 4: Cuttout plans for a flat enclosure
cutout plans - angled
Figure 5: Cuttout plans for an angled enclosure
panel layout sketch
Figure 6: Sketch of a possible panel layout
5. Construction Phase 1

Phase 1 of this project was completed for December of 2009. It consisted of the box, with the arcade controllers in it, and nothing else. It was a toy that Jasper was very fond of playing with.

6. Construction Phase 2
The LED array layout
Figure 7: The LED array layout

Phase 2 of this project adds a subset of the LED display board, seen in Figure 7 above. The section to be constructed is the center 6x8 region, between the two rows of blue LEDs.

This phase also includes adding electronics, batteries, wiring up the controls (or a subset thereof), and the first revision of the Arduino firmware. It also includes constructing the LED display matrix and mounting it within the cabinet, and making it Jasperproof.

panel cross-section
Figure 8: Cross-section of the top panel

A variant of the cross-section shown above in Figure 8 will be constructed to help secure and protect everything. The lexan will cover the entire surface, however the corner molding will not be used, as it is unnecessary.

7. (not yet) Complete Parts List
8. Figures
9. References
  1. Harrison's Box
  2. Arduino
  3. LED Driver for Arduino
  4. Multiple 4794 LED drivers
  5. Philips HEF4794BT datasheet (pdf)
  6. NXP HEF4794B datasheet (pdf)
  7. Arduino.cc example of hooking up a switch