Musical Spaghetti Madness


Richard Johnson

Source code:

1. Introduction

Whoever said you can't play with your food? With Musical Spaghetti Madness it is now easier than ever. Here is the basic premise: You are presented with eating utensils and a plate of magical spaghetti noodles. Each one can play a different musical instrument and depending on where your utensil touches (NOT CUTS! NO NO NO!!!) a noodle, magicliciously the noodle will invoke a note and pitch for the instrument it represents, effectively turning dinnertime into an orchestra. Yes, yes, it could have been done with earth worms, but that would be too cruel and not to forget, disgusting. So instead, you get spaghetti noodles.

2. How does it work?

!!!!! SPOILER ALERT !!!!!
Do not read this section or you will be demystified.

So here is how it really works. As it turns out, spaghetti noodles make great low tech analog inputs. The reason for this is because the water they contain is conductive, but the noodle itself offers some resistance. Therefore, longer noodles produce lower analog reads when completing a circuit. So with some calibration it is possible to determine approximately where a utensil makes contact with a noodle. When each noodle is assigned a musical instrument, the analog read can be used to control which note is played for that instrument. The project uses not one but two Arduino Uno's (shhh!), one as an input device / transmitter and the other as a receiver / musical instrument output device to speakers (hidden), which utilize an encrypted XBee network for secure communication. Why must it be secure? Attempting to protect the spaghetti instruments from unwanted intrusions stemming from passive or active interference is imperative, particularly while giving a class demonstration. (Hint: It can't defeat a jammer.) So there you have it.

3. Material Testing

Why use spaghetti noodles when hamsters will work just fine? Well now, how long will a noodle cooperate before drying out? Is it longer than a hamster will sit still and hold two wires with its little hands?
For low tech materials, I decided to focus on food. Various items were tested for their conductivity or lack of, including apples, oranges, lemons, potatoes, onions, broccoli, peas, mushrooms, meat, various cheeses, bread, crackers, peanuts, raisins, rock salt water, vegetable oil, and even spaghetti. As it turns out, most of these materials are either very conductive due to electrolytic properties or are not conductive at all. Spaghetti turned out to be the "cherry" in a lot full of "lemons" for interfacing with my "bread" board ("cheesy" pun intended). Oh no not again!
However as a consequence, this gave rise to an insane idea. Liquid wires! Why not fill tubing with mineral rock salt water or even lemon juice and interface the endpoints to plug into an Arduino or breadboard? Multiple prototypes were made and results proved successful... for a while. Despite best efforts to seal them off, the liquid wires eventually developed air bubbles that threatened to break any would be circuit.
Actually, it gave rise to two insane ideas. Did anyone ever tell you that perfectly purified water is not conductive? Well it turns out that the impurities in water is what conducts electricity. This means that the entire project, Arduino and all, could be submerged underwater! However if you get it wrong then its like the same as creating n2 soldered connections on your board when powering the device, potentially frying it. So due to lack of bravery, I determined that mineral oil is a safer alternative.

4. Power Testing

The input voltage of an Arduino Uno is 7 to 12 volts. For the demonstration, a 9V battery will be used. However, I have made a number of attempt at creating my own mobile battery source out of food, with limited success.
First attempt:Depending on the size, age, and due to electrolytic properties, a lemon can produce anywhere from 0.5 to 1 volt. I discovered that multiple lemons can be chained together to produce a higher voltage. However, this means it could take up to 18 lemons to properly power a single Arduino Uno. I thought to myself, what a waste! Can I do better?
Second attempt:Did you know that by layering materials containing vinegar between copper and zinc, an electric charge can be produced? Also, stacking layers produces an additive output. For this experiment, cardboard thoroughly soaked in unfiltered organic apple cider vinegar was sandwiched between a copper penny and zinc washer. These layers were stacked to an acceptable voltage and housed in a 3/4" ID tube. Unfortunately problems arose as retention diminished to about 5.5V after the first hour and continued to slide to 0.7V the following day. In a desperate attempt to "recharge" the device, emergency holes were immediately drilled into the tubing and the battery was soaked in a bowl of vinegar, effectively restoring it to about 2V, which is unacceptable for powering an Arduino. New plans had to be drawn up. But to my dismay, time worked against me and I had to abandon the idea altogether.

5. Musical Instruments

Instrument selection was determined by balancing diversity and what I thought would make a loud enough and an interesting sound when striking a noodle. As I am left handed, the layout was designed for me. However, the breadboard will allow you to switch to a right handed utensil with relative ease. You just have to ask it nicely. Since I don't know anything about musical notes, the note order was randomly determined by the Musical Instrument Shield itself, which for the most part seems to increase in pitch with an increase in note index. This is an area I would like to have developed further if there was more time and comprehensive documentation actually existed. Unfortunately, the VS1053b Datasheet does not provide a chart mapping between note indices and musical notes. C#? Yeah, I know that language...