Week 13: Networking
Modularity: For When You Haven't Decided Exactly How Your Final Project Will Work
This week, I continued work on components of my final project. My project doesn't really include a lot of networking, but as soon as Prof. Gershenfield mentioned that this week was useful if you were trying to make your project modular, and I realized this would be very useful. I had been thinking about the signal processing components of my board: specifically, I had been thinking about doing beat detection in hardware instead of in software, using a low-pass filter to pull out the low-frequency sound of drum beats, but I wasn't entirely sure how to do that and I wanted to get the part of my project in which sound is taken in from an audio jack and output by a speaker, out of the way. "Spiral development!" declared Prof. Gershenfield's (somewhat) booming voice in my head.
However, making my project modular, at least for now, would let me think about these things separately. Therefore, I created one board that had just the audio jack on it, and another board that had the speaker on it, and used a bus setup to connect them together. The audio jack, the idea was, would have a male-to-male patch cord plugged in, with the other end connected to my iPhone.
So I changed my speaker board slightly to incorporate the appropriate networking headers - there are now four, count 'em, four headers on this board, it's getting ridiculous. Then I plugged my speaker board into the FTDI cable, plugged the patch cord into my iPhone, and...two soft clicking sounds, and the smell of melted plastic.
What had happened was, the speaker was much too low impedance compared to the typical set of speakers or headphones, and so too much current was passing through, causing the wire to melt and pop off of the magnet, making the speaker not useful as a speaker anymore. I attached a 10 Ohm resistor between a (new) speaker and the wires going to the speaker board, and tried again. And then there was the sweet sound of success.
Actually, the sweet sound of success was not very sweet. It was 1) very quiet, to the point where I don't have a video because the song coming out of the speakers was too quiet to record, and 2) very staticky. "Quiet" was likely caused by too high of a resistance between the speaker and the board, implying I'll have to experiment with resistor sizes during the final project (or get a higher-impedance speaker). The statickiness might be potentially explained by the slightly terrible way I'd attached the resistor - in my haste to try a resistor with the speaker, I created a lot of open wire between the resistor and the speaker, and between the wire attaching the speaker to the board and the resistor, where there could potentially be interference.
The final, and most likely explanation, is that the speaker component was just really bad to start. In the coming week, I'll be trying all three of these potential solutions.