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
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
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
I had seen those, but I wasnt sure how to wire them up.
I had seen those, but I wasnt sure how to wire them up.
I’ll order some of those as well to experiment with
I’ll order some of those as well to experiment with
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 (12.76 KiB) Viewed 1744 times

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℃
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.
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.
I should really dig out a blue pill and crank out some tinny chip tunes with it.

They’re pretty decent for hit detection


They’re pretty decent for hit detection

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
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 !
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 )
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);
}
}

They’re pretty decent for hit detection

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…
You can use the tone() function, as it was added a few months ago and from what I remember it works OK

—
ahull wrote:You would probably be better with a suitable load cell and load cell amplifier.
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.

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!
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
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
https://en.wikipedia.org/wiki/Ultrasonic_transducer
stm32f103 ultrasound scan anyone?
RogerClark wrote:Hi Guys
I’m looking around for a peizo buzzer / beeper that I can drive directly from the STM32
…
srp