Written by Martijn Thé and Marcel Schouwenaar
Introduction
In this story we will elaborate on how we, a group of Industrial Designers from the Delft University of Technology, built a working prototype for an electronic toy that we have designed. In our case, the goal of the prototype was to be able to experience and measure the value-add for our users that we attemped to create with the electronically enriched interactions they have with the toy. We won't go into detail too much about the actual toy, its design or the research that we undertook with the finished prototype; this story is more a documentation of the process of how to hack and tinker together a prototype from existing bits and pieces of ready-made electronic products.
The demands
The toy we designed is similar to a Mr. Potatohead kind of toy, where the child can change the looks of a figure by dressing up a basic shape. However our design is different in that it is enhanced with sound and light that contributes to the character of the doll. The kind of audio and visual effects depend on what parts are used by the child to dress up the doll. So in terms of functionality, we wanted to the prototype to:
- Recognize the different parts, and depending the chosen ones;
- Play back sounds at a decent volume;
- Display light effects
Also we had to deal with some other practical issues, it should:
- Be small, since it should fit in a tiny space of about 4x4x6cm;
- Kids play rough, so everything should be embedded in a casing, there shouldn't be any wires running out of the prototype.
The solutions
Many products today produce sound and light and many of them are quite tiny. So we figured it might be a good idea to get products that could fulfill the functions we wanted to incorporate in the prototype, and connect and "operate" these ready-made products by a microcontroller (uC), following the behavioral rules of the toy we had in mind.

Found electronics
MP3 player
We used a cheap and very tiny MP3 player that we picked up at the local toy store (Bart Smit) for about €15,- that could play and store plenty of MP3 audio (256 megs). The small physical dimensions would make it fit perfectly in our proto. Our idea was to put all the sounds on the player in a specific order, known to the uC. That way, we would be able to have the micro "choose" the right sound effect by skipping tracks and keeping count. We took the player apart and inside we found a small lithium-polymer battery that would suffice to power the rest of the electronics as well. We soldered wires to the metal contacts of the buttons. By sending pulses from the microcontroller to the contact points of the different buttons (on/off/play/pause and skip track), we would be able to operate the player with the uC.

The hard part of using a "found" piece of electronics, was to circumvent certain features of the player that were not so welcome. For example, the player automatically shut down as soon as it was paused for more than one minute. (Not very handy, since the kids would we "composing" their doll surely during a longer period than one minute.)
Amplifier
Since the MP3 player didn't have any speaker let alone an amp inside, we had to search for a proper speaker and amp to amplify the sound signal. Accidentally, we found a bunch of old telephone amplifiers (to hook up to your analog home phone) at the Scrap shop in Rotterdam (they had hundreds of them).

Once back home, we discovered these contained an TDA2822M amplifier chip (a tiny all-in one speaker amplifier). Luckily, the electronic circuit that was used, was exactly the same as the example in the datasheet of the IC.

We dismantled the device, ditched the speaker (it was for too big) and cut off all the components from the circuitboard we didn't need (the circuitboard was also way to big to fit into the prototype).

From the local radioshack, we picked up a tiny PDA speaker with the suitable impedance (8Ω) and soldered it to the output of the amplifier circuit. We soldered one wire of the jack connector of the MP3 player to the input of the amp et voilà, we had our amplified sounds.
Other parts...
LEDs for light
For the light effects, we wanted to be able to vary the intensity of the light and make it fluctuate over time in different patterns. We used two bright white LEDs to illuminate the doll.
Part recognition
If this wasn't a prototype, this would probably happen using RFID or some other fancy technology. We used simple resistors with different values to do the trick. By sticking a part onto our doll, you would actually be changing a resistor in a voltage divider. Of which in turn the divided voltage could be measure using a uC. The downside of this solution is, we needed to have two metal contacts on each place where the parts could fit into and also on the parts.

Arduino Core
Now we have discussed the "limbs" of our prototype, we're set and ready to talk about the brain that operated all of them. We used the Arduino platform to develop our little brain (the microcontroller and its software). Arduino is a very nice development platform that consists of a circuit board with an Atmel ATMega168 microcontroller and a low-key programming application (IDE) to write your programs for the board and to debug it.
Proto of a proto
It's a good idea to pick up a breadboard and fiddle around first, before you attempt to put everything together. With a breadboard, no soldering is needed and connections can be made easily by sticking wires into the board with a pair of pincers.

On a breadboard, we hooked up all the parts to the Arduino: the wires to operate the MP3 player, the wires to the metal contacts and the voltage divider and the wires to the LEDs (in series with the necessary current-limiting resistors). With our circuit on the breadboard, we wrote the software that would measure the divided voltage, control the MP3 player and the LEDs, etc.
PCB Milling at Fablab
Since physical size was one of our concerns, our plan was to build our own Arduino board using a much smaller SMD TQFP package of the Atmel microcontroller, instead of the huge 80's-style package. Therefore we transferred the circuit that we had developed on the circuitboard into the free Eagle PCB design program (first as a electronic "schematic" and then as a PCB lay-out).

Of course we could also have used the Arduino Mini, but in our case this would still have been too big... Once we had our PCB layout in Eagle, we stuck to the documentation we had found about milling a PCB with the Ronald Modela. However, we recommend you to stick to Marc Boon's newer, excellent tutorial.

To be honest, it was quite a cumbersome experience. I think this was due to the fact that we were doing this for the first time and that we were demanding quite a lot from the machine at the same time. Since we were using the tiny SMD package, the mill bit had to be 0.35mm (since that's the distance between the legs of the chip). But we were using a slightly thicker one instead, so we were pushing our luck quite a bit.
Here are some tips and recommendations:
- The dimensions of our design were hard to accomplish. We had to fiddle around with trace dimensions, since the machine would often remove too much material, leaving too thin or no copper traces at all. We would recommend to avoid dimensions smaller than 0.5mm.
- Don't use epoxy / glass-fiber stock. They will ruin the milling bits. Instead, use board made of bakelite / phenolic paper / phenolic resin / FR2 paper / SRBP.
- Make sure you fix the blank PCB perfectly parallel to the base plate. During one of our attempts, there was a slight ripple in the double sided tape we used. So only half of our PCB came out alright, on the other half, the milll had just been brushing the surface.
- It's really a hassle to set the z-height with the up & down arrows on the machine. Probably it's a better idea to release the milling bit, let it drop on the blank PCB and fix again. If that's not possible, better mill a bit deeper than a bit too shallow.
- Diagonal traces (wires) in your PCB design will come out less accurate than horizontal or vertical traces, since the machine has a certain 'error' or accuracy in the x and y direction, which is multiplied when you're trying to do diagonal traces. In our case, we replaced as many of the diagonal traces with horizontal, vertical or with thicker diagonal traces, since the machine milled away too much on those slanted traces (due to the diminished accuracy).
- Marc Boon created an Eagle User Language Program to create the toolpaths, use that instead of the cumbersome cam.py program.
- If you're using cam.py: it uses inches (!) and mils (milli-inches). Use Google to convert the metric units.
Putting it all together

Using a microscope and a small soldering iron, we soldered the Atmel ATMega168 microcontroller onto the freshly milled PCB. The most important here was to position the chip so that all the legs would connect to the traces. Holding down the chip on its place with pincers while soldering the first leg is necessity. Once one leg is fixed, the rest of the legs is peanuts. Just be careful not to hold the iron down too long, or the glue underneath the copper will melt.
Once the micro had been fixed, we connected the wires that were necessary to program it with the Arduino Lilypad bootloader. We used a simple, home-made parallel port dongle to upload the bootloader. This actually imprints the Arduino "DNA" into the ATMega168 microcontroller and enables uploading Arduino programs to it through the serial port and using the Arduino IDE.
We finishing up by soldering the rest of the components (mostly resistors and wires to the pieces of found electronics) to the PCB and done!
Evaluation
Using found, existing electronic products to base our prototype on, saved us time of development and virtually enabled us to build a rather complex prototype, without having all the know-how of the inner workings of each particular functional part (e.g. playing a high quality audio sample). 'Hacking' consumer products also saved us money in comparison to formal prototyping platforms like those that Parallax or Phidgets offer. For example, the 256MB MP3 player we used costed us €15,- and was readily available. Parallax AP-8 Audio Player module (60 seconds of audio!) costs $49.95.
Of course, you'll need to see the opportunities for different use of the available products. But still, we think, in many cases, it's wise to look around first before inventing the wheel again.
The big downside of using existing products is that you'll have to invest a bit of time in figuring out how to interface easily with the rest of the prototype. Basic knowledge of electronics and basic measuring equipment (a voltage/current/impedance meter) are indispensable here.
Acknowledgements
Thanks to Rob @ Studiolab, Delft University of Technology, Faculty of Industrial Design Engineering for his assistance and his microscope.
Thanks to Fablab @ Mediamatic and Bernardo Gaeiras for helping us out. Thanks to Waag Society for borrowing their mill bit to us. Thanks to Marc Boon for accompanying us during our experiments at Fablab and for making the Fablab Eagle ULP. Thanks to the Arduino crew.
Thanks to the rest of our design team for providing us mental support in times of nervous breakdowns and anxious despair.


