Tuesday, February 10, 2015

Cyprida gets music


A while ago I bought a buzzer because I read the Arduino Tone tutorial. And now the buzzer is in. I soldered it below the shield to sack some of that unused physical space while hiding that ugly cylindrical chunk (above I placed a 180 ohm resistor, which should limit to some 27mA at 5V; the 180ohm is the only one reasonably near 100 ohm I found in my drawer). I soldered the resistor between the "+" of the buzzer and the pin 10 of the Arduino Mega (it is a PWM enabled one and it is in the zapped zone: I had to wipe out pins 8, 11, 12 and 13 of the dremeled microSD shield because the SPI pins on the Mega are 50, 51, 52 and 53).

I also found a nice project Arduino Music featuring up to six voices on an Arduino Mega. It would require six resistors (as current limiters), having a grand total "parallel resistors" value around 100-150 ohm (I should check how much current the output pins can source, and how much current the buzzer can handle); I bet that different values could get different voice levels. The drawback is that it requires up to all six ATmeg1280 timers and interrupt vectors. No, I don't want to fight with resistors and timers all at once; I'm not building a squarewave 6-voice music machine.

And finally I updated the firmware: a 100msec beep at boot time; 14.5k code space used, only to initialize screen, beep, serial ports and microSD. I wonder how much space I'll have for the actual firmware...

No comments:

Post a Comment