This week I had early, but short lived, success. I had originally wanted to make the 3 layer Charliplexed LED array, but the weeding seemed excessively difficult and, having spent a lot of time in the input devices week on my actual board and not as much time on the code, this week I wanted to get the board fab out of the way and actually learn the code. So I switched to the speaker board and cut and stuffed it quickly. Magically it worked on the first plug in!
I started fiddling with Neil's code to try to understand how his PWM worked. Everything seemed more or less understandable so I decided to hack in two buttons to the remaining pins on the 45. I think that's when the problems started...I got them all wired up and went back to fiddling with the code, but soon the speakers started frying. Strangely enough it took a while at first for one to blow. Then the next one blew a bit sooner. And so on....
Remedies I tried:
1) Using Neil's exact code
2) Remaking the board to make sure nothing was shorted
3) Putting a resister in parallel between the speaker and the mosfet
4) Looking at the output on the Occiliscope
5) Wiring the speaker to the 5 volt side of the regulator instead of the straight to 9 volts (as it is in the original board)
At this point the cold I had been ignoring all week caught up with me and I was home-bound for the weekend.
Original hacked circuit.
Nicer, newer, circuit.
I did, however, manage for a brief moment, to get the code modified enough to respond to each button and have a different tone for each one-- which was my ultimate goal-- then the speaker blew up.