Trouble with speakers

I'm working on a a project that need to play audio. So after seraching I found this thread:
http://forum.arduino.cc/index.php?topic=62002.0

And assembled this circuit:

(Ignore backwars capacitor). With an IRF1404 Mosfet I already have instead of the IRF3707Z.

My speaker was a 8Ohm 50mm, 0.5W and 86dB SPL iirc. Instead of 12V I supplied 3.7, 5, 7.4 and 11.1 with similar volume results for all options. Loudest result was with 5V and I think around 1A, but it wasn't that loud (70dB attending to a soundmeter app).

Now, in order to improve it I ordered a 4Ohm 40mm, 3W speaker. Turns out with the same power supplies this speaker is less loud. To a newbie like me that doesn't make sense. What could be the reason?

What could be the reason?

The current through your speakers is limited by that DC blocking capacitor. Make it bigger and it will sound louder.

Turns out with the same power supplies this speaker is less loud.

That is because speakers that handle more power are less efficient, so the same amount of current on a higher power speaker sounds quieter.

Yep. And turn that blocking capacitor around as well. Currently oriented in the wrong direction.

Also, that circuit there.... doesn't look good for a speaker driver. Is it like trying to put pulse width modulation into the speaker coils? The coils will certainly do some filtering, but could have some quality issues.... maybe. I guess it'll still provide audio though.

If you want louder... need to have lower speaker impedance, instead of higher. Originally, you had 8 Ohm....and now you have much higher ... 40 Ohm. So the power that your driver can dump into the speaker is smaller....due to the current being smaller.

Grumpy_Mike:
The current through your speakers is limited by that DC blocking capacitor. Make it bigger and it will sound louder.

That is because speakers that handle more power are less efficient, so the same amount of current on a higher power speaker sounds quieter.

More uF?

Southpark:
Yep. And turn that blocking capacitor around as well. Currently oriented in the wrong direction.

Also, that circuit there.... doesn't look good for a speaker driver. Is it like trying to put pulse width modulation into the speaker coils? The coils will certainly do some filtering, but could have some quality issues.... maybe. I guess it'll still provide audio though.

If you want louder... no need to have lower speaker impedance, instead of higher. Originally, you had 8 Ohm....and now you have much higher ... 40 Ohm. So the power that your driver can dump into the speaker is smaller....due to the current being smaller.

My speaker is 4 Ohm, you probably misread it because I typed 4Ohm. The capcitor, as I said, is backwards on the drawing but correctly placed in the real project. What would sugest for driving speakers with PWM?

More uF?

Yes

Or drive the loudspeaker in bridge mode using an H-bridge. You'll not be limited by a capacitor, but
you'll have to be careful to feed it a signal with an average 50% mark-space ratio to avoid a DC-offset

That is a strange amalgam of a Class A amplifier and PWM.

I'd either go with what MarkT said and use an H bridge, or smooth the PWM to audio and then use something like an LM386 or other purpose-built audio amplifier IC to drive the speaker.

How much power are you trying to get out of this?

polymorph:
That is a strange amalgam of a Class A amplifier and PWM.

I'd either go with what MarkT said and use an H bridge, or smooth the PWM to audio and then use something like an LM386 or other purpose-built audio amplifier IC to drive the speaker.

How much power are you trying to get out of this?

Basing all measures on a soundmeter app I'd be happy with around 90dB on the 3W 4 Ohm speaker, after hearing how loud 90dB are on my computer speakers.

I did try t osend the PWM to an LM386 but the result was terrible.

LightningLion:
My speaker is 4 Ohm, you probably misread it because I typed 4Ohm.

Oh yeah...true. I misread it before!

LightningLion:
I did try t osend the PWM to an LM386 but the result was terrible.

Maybe it can come good, eventually. The PWM (with the audio signal embedded within) just needs to be adequately filtered. For this kind of circuit..... when there is no audio, then the PWM output should provide a constant PWM signal, which should filter out to a constant DC level (which then gets blocked by the capacitor). But as soon as any 'AC' (audio) activity occurs....then the PWM (pulse widths) starts changing in time. The filter output will be DC plus audio. The DC blocking capacitor should get rid of the DC, leaving AC signals to get through to the speaker.

LightningLion:
I did try t osend the PWM to an LM386 but the result was terrible.

You can get much better help troubleshooting things on forums when you post clear details of what you actually tried which didn't work. The key is to show all the details of what you actually did, not merely a description of what you intended to do. Usually this involves posting the complete program you ran (and links to any libraries it uses which aren't part of Arduino's normal install) and good photos of how you actually connected the hardware (including links to any products which aren't official Arduino boards).

I know this is probably stating the overly obvious. But from the way this and so many other threads develop here, maybe it's sense that's not so common?

I presume you meant 90dB spl?

At what distance?

A simple solution is to find a set of cheap computer speakers, filter the PWM output, and send that to the computer speakers.

If you want to send PWM to the speaker and let the mass of the speaker filter it out, you'll need the PWM frequency to be ultrasonic, greater than 2x the maximum hearing range. Although it would be better to use an LC lowpass filter than to rely on the inherent frequency limits of the speaker.

And, this is necessary, drive it with an NPN-PNP symmetrical drive, or an H bridge (more volume because 2x the driving voltage). That is a half-bridge or full-bridge output, used in Class D amplifiers.

What kind of box are you putting the speaker in? This will have a bit effect on the frequency response and the efficiency of the speaker. Small speakers are a lot less efficient in terms of watts input versus output sound level than larger speakers.