By the way, if you like this project you may want to check out some other electronics design instructables I did:
Step 1: Circuit Design and Assembly
As for the microcontroller, we used a Picaxe 18A (see http://www.picaxe.com for more info). Picaxes are a line of very simple-to-use microcontrollers, perfect for our task. The 18A is actually a pretty old model, but was sufficient for the task. Apart from programming them in a simple version of Basic it also offers flowchart programming - this is what we ended up using since for an 8-year old I think it is way more intuitive. Nothing better than having a visual representation of the program flow.
The circuit schematic is shown above; nothing out of the ordinary. The circuit runs off two rechargeable batteries. The currents into the LEDs are low enough that the microcontroller can drive them directly. The pushbutton shown in the actual circuit ended up not getting used so I omitted it from the schematic. The Picaxe has a bootloader installed and is programmed through a simple serial interface - two resistors and a 3.5mm stereo jack is all it needs for that.
You may notice that there are always two LEDs hooked up to each output of the microcontroller, which means they aren't independent. This was again to limit complexity - that way all LEDs can be driven from a single port. Using a larger microcontroller with more outputs would have been possible but I wanted to avoid the code bloat that would result - I rather have a smaller program that my son can actually understand and handle. The way that the LEDs are hooked up - the LEDs of each pair are sitting at opposite ends of the heart - still allows for lots of interesting patterns.
We built up the circuit on a standard prototype board. It was the first time my son did some soldering (under very close supervision by myself to be sure), he was very excited. Above you can see the final result.
Step 2: Enclosure
In order do drill the holes accurately we got another protoboard where we marked the location of the LEDs on the "real" board. With a needle we could punch through the two mounting holes for each position and then drill the box right between each of these two marks. This worked pretty well and we were able to fit all the LEDs through the holes.
The batteries are standard rechargeable NiMH type AA cells, held in place with a battery holder.
Step 3: Programming
Again we started with simple experiments, e.g. toggling one LED on or off. Then we went to designing the different optical effects, one at the time, e.g. blink all LEDs together, or turn on successively more LEDs and then turn them off again one by one. In the end we joined all the separate effects together. Overall this taught my son a lot about programming, including debugging ("Why doesn't it work?" - "Well, lets go through step by step"). You find a screenshot of the complete program above, and below I attached the complete source code which you can download to us as a starting point for your own version.
Step 4: Finished Project
I was expecting maybe a day or two of battery life; after all, LEDs are relatively power-hungry beasts. But it turns out that it lasts well over a week on a set of 1800 mAh rechargable batteries - not bad!