Hello! I would like to drive the 4 Ohm, 2 Watt speaker with a BASIC Stamp 2. I am still new to this stuff, and I’m not sure what to do. I think (because it can’t be driven directly like a small buzzer, right?) I would need a MOSFET, but is it NPN or PNP? According to this calculator, my 5 volts and 2.1 amps will give me 10 watts, which is 5 times too much for the speaker. So, could someone please tell me what kind of setup I would need to accomplish this? Thanks in advance!
Okay, I figured out the MOSFET, but I still don’t know how to bring down the wattage without the voltage being really low. Does the voltage matter much with a speaker this small?
If you just want to do basic tones, you should be able to get away with your MOSFET setup. Just keep the duty cycle low to make the average power low enough, and be careful about arrangements (code and circuits) that could lead to your MOSFET staying on (which would lead to too much current, which would in turn destroy your speaker).
If you do want to do something fancier, you can look into audio amplifiers. There are all kinds of cheap chips out there, probably even at Radio Shack, that require just a few external resistors and caps. You can then connect the output directly to a speaker and use your unamplified audio signal as the input.