Tiny speaker vs piezo? - Page 1
Forum section: electronics / beginners

author: kalel
author_rank: Frequent Contributor
timestamp: October 20, 2017, 04:56:39 pm
content: 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.

author: james_s
author_rank: Super Contributor
timestamp: October 20, 2017, 06:04:00 pm
content: 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.

author: b_force
author_rank: Super Contributor
timestamp: October 20, 2017, 06:35:30 pm
content: 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.

author: Audioguru
author_rank: Super Contributor
timestamp: October 21, 2017, 12:42:18 am
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: October 21, 2017, 09:02:49 am
content: Quote from: Audioguru on October 21, 2017, 12:42:18 amNonsense. 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.

author: kalel
author_rank: Frequent Contributor
timestamp: October 21, 2017, 04:20:14 pm
content: Quote from: Audioguru on October 21, 2017, 12:42:18 amI'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 anyspecificationsdatasheets. 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.

author: Audioguru
author_rank: Super Contributor
timestamp: October 22, 2017, 01:27:04 am
content: 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.

author: frog
author_rank: Contributor
timestamp: October 22, 2017, 01:43:19 am
content: (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.

author: b_force
author_rank: Super Contributor
timestamp: October 22, 2017, 11:12:31 am
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: October 22, 2017, 12:33:18 pm
content: Quote from: Audioguru on October 22, 2017, 01:27:04 amHow 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.

author: kalel
author_rank: Frequent Contributor
timestamp: October 22, 2017, 01:52:56 pm
content: 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.

author: b_force
author_rank: Super Contributor
timestamp: October 22, 2017, 02:41:40 pm
content: Quote from: Hero999 on October 22, 2017, 12:33:18 pmNot 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.

author: Zero999
author_rank: Super Contributor
timestamp: October 22, 2017, 03:29:12 pm
content: Quote from: kalel on October 22, 2017, 01:52:56 pmThe 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.

author: b_force
author_rank: Super Contributor
timestamp: October 22, 2017, 06:01:15 pm
content: Quote from: Hero999 on October 22, 2017, 03:29:12 pmThis 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.77VrmsAt 8ohms, this will give you P=Vrms^2/R = 1.77^2/8 = 0.4WrmsYou 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.

author: Zero999
author_rank: Super Contributor
timestamp: October 22, 2017, 06:35:13 pm
content: Quote from: b_force on October 22, 2017, 06:01:15 pmNo 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.QuoteThat'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.

author: kalel
author_rank: Frequent Contributor
timestamp: October 22, 2017, 07:59:10 pm
content: 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:QuoteEven 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.