Author Topic: Tiny speaker vs piezo?  (Read 8150 times)

0 Members and 1 Guest are viewing this topic.

Offline kalelTopic starter

  • Frequent Contributor
  • **
  • Posts: 880
  • Country: 00
Tiny speaker vs piezo?
« on: October 20, 2017, 04:56:39 pm »
This questions is very generalized, but I would still like to get some feedback.

When using Arduinos and such, and wanting to get some sounds out, how do piezo based buzzers and tiny speakers compare? Size can be similar. The only thing I've noticed so far is that polyphonic sounds do sound better on a speaker, and piezo can produce a louder tone at the same output level.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Tiny speaker vs piezo?
« Reply #1 on: October 20, 2017, 06:04:00 pm »
Piezo elements are generally good at reproducing high frequencies while conventional magnetic speakers are better at producing low frequencies. My observation is that most piezo elements are fairly similar but magnetic loudspeakers have a wide range of characteristics.
 
The following users thanked this post: kalel

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: Tiny speaker vs piezo?
« Reply #2 on: October 20, 2017, 06:35:30 pm »
It all depends what you really want.
Like frequency response, (max) SPL, distortion, directivity etc etc etc etc.

Piezos in general are bit more sensitive and easier to drive, but have a very limited frequency response.
 
The following users thanked this post: kalel

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Tiny speaker vs piezo?
« Reply #3 on: October 21, 2017, 12:42:18 am »
A speaker with a coil and magnet is a low impedance that needs more current than an Arduino can supply. A small speaker can produce a buzz or a siren sound.
A piezo transducer is a high impedance that needs more voltage than an Arduino can supply. It can produce a beep sound.
 
The following users thanked this post: kalel

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19514
  • Country: gb
  • 0999
Re: Tiny speaker vs piezo?
« Reply #4 on: October 21, 2017, 09:02:49 am »
A speaker with a coil and magnet is a low impedance that needs more current than an Arduino can supply. A small speaker can produce a buzz or a siren sound.
A piezo transducer is a high impedance that needs more voltage than an Arduino can supply. It can produce a beep sound.

Nonsense. A piezo transducer will work from a microcontroller. Of course it won't be very loud, but it's good enough for most applications. The volume can be increased by using a differential output and driving it near to its resonant frequency.
 
The following users thanked this post: kalel

Offline kalelTopic starter

  • Frequent Contributor
  • **
  • Posts: 880
  • Country: 00
Re: Tiny speaker vs piezo?
« Reply #5 on: October 21, 2017, 04:20:14 pm »
A speaker with a coil and magnet is a low impedance that needs more current than an Arduino can supply. A small speaker can produce a buzz or a siren sound.
A piezo transducer is a high impedance that needs more voltage than an Arduino can supply. It can produce a beep sound.

I'm curious about how much current may be needed to get a sound (not a loud one) from a small speaker. The ones I'm talking about generally don't have any specifications datasheets. There are 8 ohm x watts specifications written on the back, but I'm not sure if that wattage data is correct anyway. 

I honestly thought that both types of elements could be driven to some loudness from an MCU.
« Last Edit: October 21, 2017, 04:33:09 pm by kalel »
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Tiny speaker vs piezo?
« Reply #6 on: October 22, 2017, 01:27:04 am »
What kind of sounds? How can you compare a buzz to a beep? A tiny speaker or piezo sounds awful with music or speech.
What is the diameter of "tiny"?

Do you want the loudness to be the same 0.5W as a cheap clock radio? Its speaker is 3" diameter.
An Arduino can provide peak current of 25mA which is 17.7mA RMS. Then the power in an 8 ohm speaker is 17.7mA squared x 8= 0.0025W which is almost nothing and a tiny speaker produces much less loudness than a 3" speaker.

A piezo resonates (beeps) at a few frequencies but other frequencies can barely be heard.
 

Offline frog

  • Contributor
  • Posts: 42
  • Country: nz
Re: Tiny speaker vs piezo?
« Reply #7 on: October 22, 2017, 01:43:19 am »
(Magnetic) loudspeaker sensitivity is generally quoted in dBA per Watt, often at 1m from the speaker.  You'll often see figures of about 80.  Now 80dB is quite loud, noisy indeed, but 1W is also a fair bit of power to deliver (although sound systems often claim to be capable of hundreds of watts, this is unrealistic in normal operation).  If you drive a piezo at close to its resonant frequency, which is often in the 2 to 8kHz range, you can get higher sensitivity, i.e. more sound output per Watt input, but if you go away from resonance, even by tens of Hz, you'll get much less.  Piezos are typically very dependent on being mounted correctly (glueing to a metal surface or PCB is often seen) and if you hold one in free space there will be very little output.  You may also find that you need a lot of voltage to get full power.  A while back I added an alarm sounder to a PCB and ran an H-bridge from a 24v supply to get max output.  However with an 8-ohm speaker you could get a reasonable amount of power from a 5v supply, especially if you run it in bridge mode (i.e. drive the two ends of the speaker in opposite directions).  It's also good to bear in mind that piezos are capacitive, so they don't provide a DC path so it's essential to be able to drive it in both directions (i.e. pull-up and pull-down) otherwise all you'll hear is the first tick.  On the other hand you can drive a speaker with a single transistor if you don't mind something crude.
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: Tiny speaker vs piezo?
« Reply #8 on: October 22, 2017, 11:12:31 am »
Sensitivity is quoted in dB/W or dB/V.
dBa is only being used for acoustics in noise etc.
When corection for human ear is needed.

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19514
  • Country: gb
  • 0999
Re: Tiny speaker vs piezo?
« Reply #9 on: October 22, 2017, 12:33:18 pm »
An Arduino can provide peak current of 25mA which is 17.7mA RMS.
How the heck did you get 17.7mA?

I think you've confused a class AB output stage, which can output a sine wave, with a digital output, which can only output a square wave. If an Arduinio's output pin is rated to 25mA, then it can output 25mA RMS, since with a square wave, the peak current is equal to the RMS current.
 

Offline kalelTopic starter

  • Frequent Contributor
  • **
  • Posts: 880
  • Country: 00
Re: Tiny speaker vs piezo?
« Reply #10 on: October 22, 2017, 01:52:56 pm »
Here is an example of what I mean by small speaker:



That was the first on eBay, but I mean any similar speakers, which shouldn't need as much current as big ones.

By piezo I mean something like this or the modules that have everything on board.



By sounds, I do mean beeps, possibly of different frequencies. Those used for notifications or little melodies. I think you found these things in computer cases as well to produce notifications and possibly elementary sounds in some DOS games.
Music or higher fidelity sounds would be difficult to create with some of the Arduino without an external DAC module.
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: Tiny speaker vs piezo?
« Reply #11 on: October 22, 2017, 02:41:40 pm »
An Arduino can provide peak current of 25mA which is 17.7mA RMS.
How the heck did you get 17.7mA?

I think you've confused a class AB output stage, which can output a sine wave, with a digital output, which can only output a square wave. If an Arduinio's output pin is rated to 25mA, then it can output 25mA RMS, since with a square wave, the peak current is equal to the RMS current.
Not only that, but you also need to take the bias current into account.
Unless you use a Class-D topology.
But I wouldn't do that straight out of an Arduino.

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19514
  • Country: gb
  • 0999
Re: Tiny speaker vs piezo?
« Reply #12 on: October 22, 2017, 03:29:12 pm »
Here is an example of what I mean by small speaker:



That was the first on eBay, but I mean any similar speakers, which shouldn't need as much current as big ones.

By piezo I mean something like this or the modules that have everything on board.



By sounds, I do mean beeps, possibly of different frequencies. Those used for notifications or little melodies. I think you found these things in computer cases as well to produce notifications and possibly elementary sounds in some DOS games.
Music or higher fidelity sounds would be difficult to create with some of the Arduino without an external DAC module.
The 8Ohm speaker will have the potential to be louder than the piezo buzzer, but the Arduino will not be able to drive it directly. The speaker can be driven, using a transistor, but it's only rated to 0.5W and there's a risk it will blow up with a 5V power supply, if it's operated continuously, without anything to limit the current. P = V2/R = 52/8 = 25/8 = 3.125W.
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: Tiny speaker vs piezo?
« Reply #13 on: October 22, 2017, 06:01:15 pm »
The 8Ohm speaker will have the potential to be louder than the piezo buzzer, but the Arduino will not be able to drive it directly. The speaker can be driven, using a transistor, but it's only rated to 0.5W and there's a risk it will blow up with a 5V power supply, if it's operated continuously, without anything to limit the current. P = V2/R = 52/8 = 25/8 = 3.125W.
This is not correct at all.
The 5V is peak to peak which means that the RMS voltage is half of the voltage divided by sqrt(2) = 1.77Vrms
At 8ohms, this will give you P=Vrms^2/R = 1.77^2/8 = 0.4Wrms
You could get some more when using a bridged amplifier, in that case you get twice the RMS votlage.
So; 3.55^2/8=1.6W
(so yes, four times as much because the power of two).

With a very high efficient Class-D amplifier you need to deliver 15% extra, so say 2W to round it up.
Witch a Class-AB (or B), your efficiency is around 60-70%
A class-A is even worse (like 30-50% or so)

But keep in mind that power doesn't say everything at all, it's all about finding a transducer that has high efficiency.
But you also need to keep in mind that not every circuit can drive such a low impedance.

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19514
  • Country: gb
  • 0999
Re: Tiny speaker vs piezo?
« Reply #14 on: October 22, 2017, 06:35:13 pm »
The 8Ohm speaker will have the potential to be louder than the piezo buzzer, but the Arduino will not be able to drive it directly. The speaker can be driven, using a transistor, but it's only rated to 0.5W and there's a risk it will blow up with a 5V power supply, if it's operated continuously, without anything to limit the current. P = V2/R = 52/8 = 25/8 = 3.125W.
This is not correct at all.
The 5V is peak to peak which means that the RMS voltage is half of the voltage divided by sqrt(2) = 1.77Vrms
At 8ohms, this will give you P=Vrms^2/R = 1.77^2/8 = 0.4Wrms
You could get some more when using a bridged amplifier, in that case you get twice the RMS votlage.
So; 3.55^2/8=1.6W
(so yes, four times as much because the power of two).
No that's wrong. The calculations you've just done only apply to an amplifier with a sine wave output. A microcontroller's I/O pin, outputs a square wave. The maximum RMS output current of a microcontroller I/O pin is simply equal to its DC rating, because it outputs a square wave. Practically speaking this may be different, for example if the pin is outputting a 50% duty cycle and only one of the transistors is being used, the RMS current will be half the rating, but using both transistors or 100% duty cycle, the maximum RMS current is equal to the DC rating.

Quote
With a very high efficient Class-D amplifier you need to deliver 15% extra, so say 2W to round it up.
Witch a Class-AB (or B), your efficiency is around 60-70%
A class-A is even worse (like 30-50% or so)
That's true, but is completely irrelevant here, as the original poster is talking about driving a load from an MCU output pin, not a linear amplifier, be it class AB or D.

EDIT:
See attached simulation. V1 and V2 represent differential outputs. The RMS current through the 8Ohm resistor is 625mA and the power dissipated 3.125W. If only one square wave source were used, with the other end of R1 connected to 0V, the power would halve to 1.5625W, but there would be 2.5V of DC across it, which would do nothing but heat the voice coil, if it were a speaker. Using one squarewave source and an AC coupling capacitor would reduce the power to half again, at 0.78125W, but the sound output would not change, since the DC component will be blocked.



To drive a 0.5W 8Ohm speaker from an Arduinp I'd recommend using a pair of emitter followers and an AC coupling capacitor. The output power will be around 400mW, thanks to the voltage drop of the emitter followers, which should be loud enough. There should be a decoupling capacitor next to the driver transistors, which isn't shown.

« Last Edit: October 22, 2017, 08:00:00 pm by Hero999 »
 

Offline kalelTopic starter

  • Frequent Contributor
  • **
  • Posts: 880
  • Country: 00
Re: Tiny speaker vs piezo?
« Reply #15 on: October 22, 2017, 07:59:10 pm »
True, an amplifier to get some not loud signals out adds a bit of complexity. A transistor with proper current rating might be a simple solution to not overload the MCU output.

Interesting is this line of comments from ToneAC library (AC simulation) demo example:

Quote
// Connect your piezo buzzer (without internal oscillator) or speaker to these pins:
//   Pins  9 & 10 - ATmega328, ATmega128, ATmega640, ATmega8, Uno, Leonardo, etc.
//   Pins 11 & 12 - ATmega2560/2561, ATmega1280/1281, Mega
//   Pins 12 & 13 - ATmega1284P, ATmega644
//   Pins 14 & 15 - Teensy 2.0
//   Pins 25 & 26 - Teensy++ 2.0
// Be sure to include an inline 100 ohm resistor on one pin as you normally do when connecting a piezo or speaker.

Even though it's using a different type of drive (simulating AC), I understand those comments to mean connecting directly to the output, with a resistor (with the exception of "ground" being one of the pins so that AC can be achieved). I might be misunderstanding them.
« Last Edit: October 22, 2017, 08:10:20 pm by kalel »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf