# Driving 8 Ohm speaker from pic pwm pin

Discussion in 'Electronic Design' started by _, Feb 7, 2008.

1. ### _Guest

I'll need some volume - enough for people who are supposed to be paying
attention to hear a beep in a mildly noisy situation from about 40 feet.

Hi-fi not necessary; simple, efficient (battery supply) and low parts count
is good. The circuit referenced here:

http://www.obelisk.demon.co.uk/electronics/metronome.html

uses just a 2n7000 fet, but I suspect it might not be loud enough.

LM386?

3. ### BobGuest

Some ballpark numbers;

"mildly noisy" is really subjective but I'l take that as 70dB at the
listener.
A random persons view of mildly noisy could be 60-80dB

40feet is 12 meters.
Assuming 6dB loss when you double the distance you loose about 20 dB
from
1m to 12 meters

Call it 22dB. In practise it will vary with room shape, surface
absobtion,
audio frequency, number of people etc.

So assuming that having the beep about the same level as the noise
is enough you need 92dB at 1 meter.

A typical cheap moving coil loudspeaker will give about 87dB at
2.83volts
Thats, 1 watt into 8 ohms, about 0.35A. However this is not
omnidirectional,
if you can't point the loudspeaker at the listeners you may need more
volume or a more sophisticated loudspeaker arrangement.

Again this will vary signficantly with loudspeaker model,
loudspeaker impedance at the frequencys of the beep,
load will be a bit reactive, current will depend on if you just try
to switch one side of the supply or force the loudspeaker terminal
voltage
to be what you want etc.

So my conclusion is that you might get away with a 2n700 on a 5volt
supply and a cheap little loudspeaker if the noise is 65-70dB if
the beep is reasonably easily distinguished from the noise.
Alternatively you might not. If you want to be sure I think you
need more watts and more thought to the loudspeaker arrangement.

I don't think an LM386 would be any better than the FET with a
five volt supply. They would both be limited by the supply rail
and the loudspeaker impedance. If you use a higher supply voltage
and a loudspeaker that can handle 10 watts or so then neither is
suitable.
Linearity is probably not important so a transistor with
a higher current rating seems like the best idea to me.

Bob

4. ### Guest

Think for a moment.
What the FET does, is yank the speaker against the supply,
and then let go.

The amount the speaker cone moves is a lot when current flows (one
way),
but the amount it moves back is set only by the spring action of
the thing it hangs from, its stiffness, and its resonance frequency.
Unless you hit it at exactly its resonance, it will not move back a
lot.
And its resonance is likely not the frequency you want.
It is a _bad_ way to drive a speaker.
The LM386 will drive the cone both ways, so it will have a much bigger
amplitude.

They would both be limited by the supply rail

5. ### _Guest

I have about 12 volts to work with, and was thinking about a small horn
speaker. The enviroment is a swimming pool, so a water-resistant speaker -
plastic cone or horn - would probably be best, and directional would work
just fine.

Anybody know of a source for small (~5watt, ~2inch opening) cheap horn
speakers?

6. ### Martin GriffithGuest

I'm getting 50w plus from 12v with a class H BTL into 4 R . Check out
NXP for automotive amplifiers. The site is pretty crap, designed for
accountants, but the products are useable, despite the datasheets

martin

7. ### Rich GriseGuest

With an acoustic resonator, and maybe some circuit tricks (like
run the piezo at resonance itself), you can make it pretty blinkin'
loud!

Good Luck!
Rich

8. ### BobGuest

That's a reasonable point to raise.
Depending on the choice of supply rail, loudspeaker and amp IC you
might be right.

In the example linked by the orignal poster with a 5 volt supply and a
little 2.5" loudspeaker I still think the 2n7000 would work better
than an lm386

The FET should have a fairly low voltage drop across it when on so
in the paticular example linked by the original poster the loudspeaker
should
get most of the 5V supply.

Acording to the National LM386 datasheet with a 5 volt supply you only
get
about 2.5volts peak to peak to peak output and the THD becomes grotty
above

http://cache.national.com/ds/LM/LM386.pdf

I think the extra volts from the FET switching would win.

A bit of googling suggests that the resonant frequency of moving coil
loudspeakers
is often quite low, somtimes 400Hz for a 2" loudspeaker so I think
that with
a lot of common loudspeakers you would be wrong about it not moving
back
enough under it's own elasticity.

5volts isn't going to physically damage an 8ohm loudspeaker, except
maybe
a tiny 1" one so I disagree that this is a bad way to drive a
loudspeaker
in the specific case we are talking about.

Bob

9. ### _Guest

I have 12 volts, and I need to have three different frequencies of beep.

LM380

11. ### mkarasGuest

taken care of by implementing various on-off switching sequences.
- mjkaras

12. ### BobGuest

Hmm, You mentioned using a two inch horn.
A two inch horn will proably only work efficiently at rarther
screeching
trebble frequencys. With 12v you probably have enough volts
to get enough sound out at a couple of kilohertz so it may not matter.
I'm guessing a bit because I didn't turn up any data for
really small horns with a quick google.
Horns usually have a 15dB or more variation in efficiency
across the frequency range listed in the spec.
Going up from about 3000 to 10000hertz you need more sound
level to get the same perceived volume so in that range the
horn efficiency and human perception might cancel out
nicely. The acoustics of leisure swimming pools are often
very reverberant and resonant so that actuall effect would
be anyones guess.

Piezo electric sounders are a nice idea but remember that the
volume rating of little panel/pcb mount sounders is usually
quoted at 10cm distance. The sound at 12 meters will
be somewhere around 40-50dB lower.

Bob