I have an 8-ohm 1/2 Watt speaker I'd like to hook up to the Arduino. I'm currently hooking up the gate of a FQP30N06L MOSFET to the PWM output of the Arduino. I've tied the drain to Vcc (5V) and the source to the (+) speaker terminal, with (-) speaker terminal to ground. I also have a 10Kohm resistor from the MOSFET gate to ground.
This gives a pretty good volume output, but I'm worried about two things:
- Doesn't a speaker act as a short for DC current? I'm afraid this could fry the MOSFET.
- This seems to run a DC current component thru the speaker, which I'd like to remove.
- There is a lot of high-frequency "ringing" (bad audio quality)
I've tried other things, but the speaker just isn't loud enough. For example, putting a resistor in series with the speaker makes the sound too quiet. Also, using a DC-blocking capacitor in series with the speaker results in no audio output.
Is there a better way to amplify the PWM signal and block the DC component?
The PWM signal ranges from 0-5V (square wave) with a frequency of ~30Khz.