4
\$\begingroup\$

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.

\$\endgroup\$
9
  • \$\begingroup\$ Here's a discussion about a speaker hookup for Arduino: forum.arduino.cc/index.php?topic=21485.0 \$\endgroup\$
    – Alexxx
    Commented Dec 7, 2015 at 18:15
  • \$\begingroup\$ Looking at the circuit he has, if the MOSFET stays switched on, there will be (12V)^2 * 33 ohm = 4.36 W dissipated by the resistor. Isn't that enough to fry most resistors? I guess in the common case, the average power would be 1/2 that (2.18 W), but that still seems high. Also, I need to run my amp from the same +5V power source the Arduino uses -- I can't use a separate +12V supply. \$\endgroup\$ Commented Dec 7, 2015 at 19:24
  • \$\begingroup\$ Since you're driving your audio amp with PWM you'll want to google "class D amplifier". \$\endgroup\$ Commented Dec 7, 2015 at 21:34
  • \$\begingroup\$ @RespawnedFluff Yep, I did that. I think I need the "output stage" of the class D amplifier, since the signal is already a square wave (the input stage of the class D converts from AC => square wave). However, I can't really find a good example. For instance, most of the schemes I found assume no DC bias, which my circuit has (more-or-less +2.5 DC bias). Basically, I've tried to use the MOSFET as a switch to generate a square wave with greater current than the input signal, but still can't get it loud enough if I decouple the speaker with a capacitor. \$\endgroup\$ Commented Dec 7, 2015 at 21:47
  • \$\begingroup\$ Also, many of the class D schematics I've found use a negative supply and 2 MOSFETS in push-pull configuration. I don't have a negative supply -- only a +5V rail. \$\endgroup\$ Commented Dec 7, 2015 at 21:50

1 Answer 1

1
\$\begingroup\$

Why dont you do a complimentry drive for your proposed book up .If you do this then you can capacitively couple your speaker.Remember that the DCR of a 8 ohm speaker is approx 6 ohms . This rough ratio doesnt change much with speaker impedence.You could connect a couple of logic level fets in the CMOS configuration or you could use a grunty mosfet driver chip that say has an on resistance of 1 ohm.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.