Add some sound to your FEZ

So a Piezo speaker is not loud enough for your project, but you don’t want to add an amplifier and external power supply?  How about going middle of the road.  Use your raw 3.3v supply and add the Pololu 2W speaker.  Nice sounding and cheap enough.  Just add a MOSFET and drive sound from a PWM pin.

Tiny Speaker Recipe:

  1. Pololu 2W speaker $3.49
  2. FEZ or Arduino $40
  3. MOSFET breakout $3.95 
  4. 6 Ohm resistor $0.10
  1. Hook your speaker to Device side of MOSFET.
  2. Add 6 ohm resistor between 3.3v out and positive terminal on MOSFET.
  3. Ground MOSFET to FEZ GND pin.
  4. Bring a PWM pin over to MOSFET Gate pin.
  5. Add code to your project to drive PWM to make notes. I used driver here

The resistor is doing two things.  First, it limits the amount of current that the speaker can draw to under .55amps.  Without it, the MCU will just keep resetting in a loop because the speaker drawing all ~1.5amps of current.  Second, the 6 ohm limits the max watts to just under 2Watts so you don’t over drive the speaker.  Plenty of amps left over for MCU.

This is by no means is a sound demon.  However, it is plenty good for most small projects and better quality sound then a standard tin-can Piezo.

Now crank those Mario notes. Smile

This entry was posted in .Net Micro Framework, C#, FEZ, Sound and tagged , , , . Bookmark the permalink.