Recommendations for piezo buzzer??

RogerClark
Sat Aug 20, 2016 11:15 pm
Hi Guys

I’m looking around for a peizo buzzer / beeper that I can drive directly from the STM32

I’ve tried to search for peizo buzzers on eBay and AliExpress but it mostly just turns up what seem to be magnetic based devices, some of which seem to have 16 ohm resistance, which would mean they take 200mA at 3.3V

I would have thought there would be some PCB (through hole) peizo buzzers available, but perhaps I’m mistaken and people normally use these magnetic ones ?
e.g
http://www.aliexpress.com/item/Electrom … 874fd58246


ahull
Sat Aug 20, 2016 11:21 pm
RogerClark wrote:Hi Guys

I’m looking around for a peizo buzzer / beeper that I can drive directly from the STM32

I’ve tried to search for peizo buzzers on eBay and AliExpress but it mostly just turns up what seem to be magnetic based devices, some of which seem to have 16 ohm resistance, which would mean they take 200mA at 3.3V

I would have thought there would be some PCB (through hole) peizo buzzers available, but perhaps I’m mistaken and people normally use these magnetic ones ?
e.g
http://www.aliexpress.com/item/Electrom … 874fd58246


RogerClark
Sun Aug 21, 2016 3:42 am
Thanks Andy

I think I eventually found 2 types I will try.

The “Active” type (which I’ve worked out means that the device has an internal oscillator circuit, so you just need to apply voltage)

http://www.aliexpress.com/item/10PC-Lot … e32a3d41cb

And the “passive” type, which is the peizo type I was looking for

http://www.aliexpress.com/item/Free-Shi … 88a76aa2c6

The reason I couldnt find any piezo ones on AliExpress or eBay is because they have called them Piezoelectric and the AliExpress search engine isn’t clever enough to know that Piezoelectric can be shortened to Piezo.

I’ll have to drive the peizo one with a square wave, but that’s not so hard, and when the device needs to beep, its not doing anything else.
(though I’ll probably just use PWM and change the PWM rate)

I’ll order both lots and see which is practical to use with the STM32


ahull
Sun Aug 21, 2016 8:43 am
If size is important, you can buy the bare elements.

http://www.ebay.com/itm/10Pcs-12mm-Piez … SwyZ5UmotM


RogerClark
Sun Aug 21, 2016 9:09 am
Thanks Andy

I had seen those, but I wasnt sure how to wire them up.


ahull
Sun Aug 21, 2016 9:29 am
RogerClark wrote:Thanks Andy

I had seen those, but I wasnt sure how to wire them up.


RogerClark
Sun Aug 21, 2016 9:55 am
Thanks Andy

I’ll order some of those as well to experiment with


ahull
Sun Aug 21, 2016 10:12 am
RogerClark wrote:Thanks Andy

I’ll order some of those as well to experiment with


Pito
Sun Aug 21, 2016 11:21 am
I’ve been using them as the sensor to analyse the ticks of my automatic watches..
Mind the piezo has got a fairly large capacitance (a few nanofarad) so the currents in/out a pin are still there, and maybe high.
In order to get some sound level out of this piezo you have to place it into an acoustic resonator/chamber (they sell that piezo in a black rounded tuned case with small hole), and to get really a strong sound (used in alarms) you may wire a choke with inductance of >33mH in parallel to the piezo (and with an external transistor as the choke creates high voltage).

piezo with resonator.JPG
piezo with resonator.JPG (12.76 KiB) Viewed 1744 times

ahull
Sun Aug 21, 2016 11:54 am
If you want a wider spectrum of frequency, you can drive those little 16 Ohm speakers through a resistor. Pick a value such that the total short circuit load draws perhaps 3/4 of the maximum current that the output pin can handle. Crude sound level control can be obtained by PWM at a high frequency relative to the desired driving frequency (>20kHz). Think of it as a crude class D amplifier. This does of course add another layer of complexity. Obviously the sound quality is not particularly Hi-Fi, but they can be surprisingly load and irritating. :D

EDIT: The 12mm piezo elements I linked to above probably resonate best around the 9.5kHz marker, but will probably be audible over a relatively broad range around that peak. Experimentation will show what is possible.

EDIT2: Actually the seller does list the spec. and I was pretty close, they resonate best between 7.9 and 9.1kHz… but will be audible over a broader range.

Resonant frequency  Fr 8.5±0.6KHz
Main electrostatic capacity    Cm 13000±30%PF
Feedback electrostatic capacity    Cf       ———-
Resonant impedance             R 600Ω Max
Metal plate material             BRASS
Metal plate size        (D)     mm 12.0±0.1
Metal plate thickness    (t)     mm 0.10±0.01
Ceramic diameter    (d)    mm 9.0±0.2
Total height         (T)   mm 0.22±0.02
Insulation resistance 100MΩ Min
Maximum input voltage 30Vp-p
Operating temperature range -20℃ to +70℃
Storage temperature range -30℃ to +80℃


RogerClark
Sun Aug 21, 2016 9:17 pm
Thanks guys,

I will test all 3 types and see what works the best.

All I need is an audible indication that a temperature measurement is complete.

I am building a laser power meter, which is basically just a high resolution thermometer.

The meter has a block of anodised aluminium on the end of a probe, ( this is the calorimeter) , and the display and electronics are at the other end of the probe.

You have to put the calorimeter into the laser beam, and then press a button on the side of the electronics box. The unit then measures the rate of heating for between 5 and 15 seconds, and then needs to beep to tell the user that the measurement is complete.

The unit will have a small lcd display on it, ( not backlit) which shows the laser power and other things e.g. system state.
But its best if the user does not have to look at the display while holding the calorimeter in the laser beam, as its best if the users attention is just on keeping the calorimeter in the beam.

Hence the need for it to beep.

My current plans are to use a small F103C board or possibly one of my many GD32’boards.
But the GD32 boards are wider and longer than the Blue Pill, so are not ideal for this.

So I may use a F103T board as a prototype, as its the smallest F103 board I have.

Currently I am waiting for a new , high resolution, thermocouple interface module, from AliExpress, as the standard Max31855 modules, I currently have, only resolve to 0.25 deg C resolution.

Note. I do not need “absolute” temperature accuracy for this, as it only need the rate of increase of temperature to have good resolution and be linear.

It will run from batteries, so I am likely to make extensive use of the sleep functionality, but I think I may also run the processor at 8Mhz when taking the power reading, as only need to read the temperature at 150mS intervals and will probably only update the display once a second.


neo2121
Mon Aug 22, 2016 8:56 pm
Regarding volume control, this is a library that does just that, but on AVRs. The principle is the same though https://blog.arduino.cc/2016/06/13/8-bi … uino-tone/

TomaTLAB
Sat Aug 27, 2016 7:12 pm
Be careful when solder the central electrode. Silver film is very thin and trying to disolve in liquid solder. I prefer don’t solder it (if mount on PCB), but use the spring wire contact from RJ-45 or so on.

RogerClark
Sat Aug 27, 2016 9:37 pm
TomaTLAB wrote:Be careful when solder the central electrode. Silver film is very thin and trying to disolve in liquid solder. I prefer don’t solder it (if mount on PCB), but use the spring wire contact from RJ-45 or so on.

ahull
Tue Sep 06, 2016 2:55 pm
These toys arrived, so I hooked one up to the scope.

Image

With the scope probe on x10, the output peaks in excess of 30V, when I tap it with a pencil. It probably wouldn’t make a very good microphone, but it does work.

Image

I should really dig out a blue pill and crank out some tinny chip tunes with it. :D


racemaniac
Tue Sep 06, 2016 3:09 pm
i used them as targets in a basic pinball i built during an arduino jam :).
They’re pretty decent for hit detection :).

ahull
Tue Sep 06, 2016 3:23 pm
racemaniac wrote:i used them as targets in a basic pinball i built during an arduino jam :).
They’re pretty decent for hit detection :).

RogerClark
Tue Sep 06, 2016 8:47 pm
Still waiting for mine to arrive ;-(

madias
Tue Sep 06, 2016 8:56 pm
RogerClark wrote:Still waiting for mine to arrive ;-(

RogerClark
Tue Sep 06, 2016 9:03 pm
Its Ok.

The other modules I need to make my project have not arrived either.

I can buy something from a local supplier but I think its $5 for a single buzzer


ag123
Sat Apr 01, 2017 3:15 pm
this is an old thread, but just to put in my 2c
just tested a piezo buzzer today (just the plastic enclosure & piezo disc, no electronics), i nearly simply ordered a piezo disc from ebay
until i read this article
http://www.mouser.com/ds/2/40/piezo-43596.pdf
apparently it isn’t the piezo disc that accounts for the sound, it is the the disc + the plastic enclosure acting as a *resonance cavity* that produce sound
thereafter i bought the passive piezo resonator/buzzer from a local electronic shop instead. and my setup is basically the same as this
http://www.instructables.com/id/How-to- … -Tutorial/

then from google searches, i found this page from an enterprising maker who makes a tiny game console out of an 8 pin ATtiny mcu, complete with a mini lcd, 2 buttons and a piezo disc running on a coin cell battery ! :o
https://hackaday.io/page/2431-attiny-keychain-arcade
http://webboggles.com/attiny85-game-kit … tructions/
(i’d cringe if one day ST come out with an stm32 tiny with just 8 pins :lol: )

what is noted from the schematic is that the piezo disc is directly connected to the gpio pin (no resistors etc)
i did the same and tested it in an arduino sketch that goes like this

int ledPin = BOARD_LED_PIN; // LED connected to digital pin D13
// pin D1 for piezo output

// the setup() method runs once when the sketch starts
void setup() {
pinMode(ledPin, OUTPUT);
//turn on the led, just so that i know it is 'alive'
digitalWrite(ledPin, HIGH);

pinMode(D1, OUTPUT);
}

//the loop() method runs over and over again,
//as long as maple has power
void loop() {
int i, hz, t;

for(hz = 0; hz < 4500; hz+= 100) {

t = 1000000 / hz;

//beep for 1/3 sec
for(i=0;i<hz/3;i++) {
digitalWrite(D1, HIGH);
delayMicroseconds(t/2);
digitalWrite(D1, LOW);
delayMicroseconds(t/2);
}
delay(50);
}

while(1) {
delay(1000);
}
}


ag123
Sat Apr 01, 2017 4:15 pm
ahull wrote:racemaniac wrote:i used them as targets in a basic pinball i built during an arduino jam :).
They’re pretty decent for hit detection :).

ahull
Sat Apr 01, 2017 10:06 pm
You would probably be better with a suitable load cell and load cell amplifier.

http://www.ebay.co.uk/sch/i.html?_from= … ll&_sop=15

http://www.ebay.co.uk/sch/i.html?_sacat … ier&_frs=1

.. or if you are looking to measure very small weights, perhaps some sort of strain gauge.

You could perhaps use the peizos, but you would probably need a very input high impedance amplifier to have a chance of measuring the loading charge on them before it dissipated. I think they would probably make better impact force sensors… or you could of course build yourself an atomic force microscope…

http://www.instructables.com/id/A-Low-C … /?ALLSTEPS


RogerClark
Sun Apr 02, 2017 6:23 am
FYI

You can use the tone() function, as it was added a few months ago and from what I remember it works OK


ag123
Sun Apr 02, 2017 8:19 am
thanks roger :D


ahull wrote:You would probably be better with a suitable load cell and load cell amplifier.


ahull
Sun Apr 02, 2017 1:34 pm
You might also like this -> http://www.techbriefs.com/component/con … inery/8490
And also this -> https://www.americanpiezo.com/piezo-the … uency.html
.. since determining the resonant frequency would be necessary in order to detect changes in mass of the resonator/sample combined relative to the resonant frequency of the resonator alone.

ag123
Sun Apr 02, 2017 2:10 pm
thanks ahull, i’m sort of ‘accumulating ideas’ just in case 1 day i’d need it, those are great ideas too :D
the nasa article is particularly interesting
https://ntrs.nasa.gov/search.jsp?R=20100033560

oh btw the method i described is used to estimate loads on *building columns* these are in the order of 10s to 100s of kilonewtons (i.e. 1000kgf … 10000kgf), i’m sort of thinking that for small change in weight e.g. 100g the frequency method may not be able to tell between 1kg vs 1.1kg
http://www.kstr.lth.se/fileadmin/kstr/T … 3SFweb.pdf

imagine one day buildings become instrumented with mcus & one day you brought a new piece of heavy furniture , the piezo buzzer goes beep, overweight! :lol:

i’ve also read somewhere that those ‘ordinary’ piezo discs could literally have ultrasound resonance frequencies in the mhz ranges, initially i thought i misread the figure, but yup mhz ultrasound frequencies and i think they are very much used in medical ultrasound probes and scanners


zoomx
Mon Apr 03, 2017 11:37 am
I know that there are projects about sensors embedded in concrete in buildings that will be powered like NFC.
One of them is by ST
STMicroelectronics Demonstrates Smart-Building Solutions and IoT Development Ecosystem at Embedded Technology 2015
http://www.st.com/content/st_com/en/abo … t3760.html

ag123
Mon Apr 03, 2017 1:26 pm
one of the other application areas of that piezo disc is they are ultrasound transducers (emitters and sensors), the same piezo disc can be used for both
https://en.wikipedia.org/wiki/Ultrasonic_transducer

stm32f103 ultrasound scan anyone? :lol:


gbulmer
Mon Apr 03, 2017 5:49 pm
I apologise for being way out of date on this …

RogerClark wrote:Hi Guys

I’m looking around for a peizo buzzer / beeper that I can drive directly from the STM32


zmemw16
Mon Apr 03, 2017 9:17 pm
aliexpress, search ‘piezo buzzer’ gives 3v upward starts with singles at ~60p, 10 off £2.30’ish inc postage(china->uk)
srp

Leave a Reply

Your email address will not be published. Required fields are marked *