Hey all! I struggled with making a loud piezo buzzer from 5volts. I figured it out. It is super simple and as loud as your fire alarm. If you have struggled with this problem... give yourself a break... there is zero good information on the internet. Many forum suggestions exist and I tried all these without success:

I spent more hours than I will admit. Go to the dollar store and purchase their Intruder Alert noise maker and your'll find... an Auto Transformer and a 'black blob' of circuitry. The black blob is a pulsing square wave that the Arduino can produce.

The tranformer works well. If anyone can explain the phyisics behind its operation, pleas chime in! thanks.

The auto-transformer has three leads and you can measure the resistance across the leads to determine which is which.  Here is the transformer that I measured: Pin1-2 154ohm and Pin 2-3 8ohm Pins 1-3 is ~161ohm.  Also ozitronics posted some data (see picture) on his 'autotransformer' with similar resistance and 91mH/2.1mH inductance. If anyone can find similar transformers on Mouser I'd be interested in seeing it. thanks!

Credits: I stole the pictures/knowledge/ and content from the following places:
- How to harvest a piezo.(just a picture)
- this fellow has a couple circuits using 555 timers to produce a square wave using an auto transformer. PDF version
- Jack Lopez provided this nice schematic of the dollar store with 'black blob' circuit

x
xx

## Step 1: How to Drive a Piezo With an Arduino

Look up the piezo buzzer's resonant frequency.  This one has a peak frequency of 2600 HZ shown on the cut sheet. It actually has two peak frequencies but I just chose one. The cut sheet selects the point in the middle of the two frequencies.

Next calculate the square wave you need to make on the Arduino. 1 second / 2600 = 385us (micro seconds).

The square wave is positive for half the time and neutral for half the time or 385/2 = 192us

You may use other frequencies but this is one of the loudest frequencies based on the mfg literature.

Arduino Code:

int piezoPin = 5;

void setup() {
pinMode(piezoPin, OUTPUT);
}

void loop() {

analogWrite(piezoPin, 255);  //positive square wave
delayMicroseconds(192);      //192uS

analogWrite(piezoPin, 0);     //neutral square wave
delayMicroseconds(192);      //192uS
}
<p>Great information here with all parts listed. After hours of searching. I find no one references the mysterious autotransformer part number. Why is this?</p>
<p>Can also use an inductor in parallel with piezo with ground &amp; a transistor to drive it. You can find coils that will work in old phones, power supplies, AV baluns, etc. You just need inductance to optimize current across capacitor over time.</p>
<p>The reason you need the transformer is a matter of impedance. A <br>piezoelectric element is rather high impedance, and very capacitive. In <br>fact one generally treats them as a capacitor. So, a capacitor passes <br>AC, but rejects DC. This fact, means that only the transitions in your <br>square wave actually carry any power, so you're losing much of the power<br> due to DC blocking. Further, piezos tend to dampen themselves <br>mechanically due to a sharp resonance / antiresonance. </p><p>So, here, <br>the trick is that you're decoupling the capacitor (piezo) up off of <br>ground and letting it couple at resonance with the inductive transformer<br> winding. Think of a the way that a spring allows something to move more<br> freely, even if it is tied to something quite heavy. </p><p>If you use <br>an audio transformer say 8ohm to 10kohm or more, you can actually get <br>some pretty impressive frequency ranges, play music through it, even <br>vibrate an object (thin wood, metal plate)...</p>
<p>You did a great job of giving lots of links to relevant and helpful places. Thanks! A great instructable</p>
<p>I think what you did is called a &quot;balun&quot; - it gets ground-biased 0-5 volts on input (when pins are switching between equal voltage and 5 volts difference) and produces differential 5 volts peak to peak AC voltage on output (when pins always differ by 5 volts, but are constantly swapping polarity). But your device is also a transformer, so the output voltage is higher (or lower), depending on the turns ratio.</p><p>I'm trying to drive a buzzer myself right now with a similar generator (0-5 volts), but don't have any auto transformer at hand, so I would try to use a capacitor to remove DC offset and hope it works.</p>
<p>Good work. I was looking for a solution to amplify sound of buzzer that I extracted from burglar alarm and found a way thanks to you !</p>
<p>How do I make it turn off?</p>
<p>Hello Thomas!</p><p>interesting project! I am still trying to understand how the autotransformer works. </p><p>Is that similar to transistor? can I replace it using transistor ?</p><p>Thanks!</p><p>- Dipta</p>
<p>I think it is simply a super small inexpensive transformer. So it amplifies the piezo based on the turns on the coils. The dollar store 3-pin transformer that worked best had one small coil (8ohms worth of windings) and a larger coil with 154ohms of windings. The oscilating signal is fed into the small windings and the larger windings are attached across the Piezo. </p>
<p>Oh ok thanks! I would like to make a similar circuit but smaller.</p><p>Do you have any ideas to replace that autotransformer with anything?</p><p>Op-Amp or NPN transistor maybe?</p>
<p>Here's an answer.</p><p><a href="http://www.ti.com/product/tpa2100p1" rel="nofollow">http://www.ti.com/product/tpa2100p1</a></p>
<p>Hello Murray, </p><p>Thanks for your reference! I have made one circuit using this : <a href="http://www.linear.com/product/LT3469" rel="nofollow">http://www.linear.com/product/LT3469 </a> </p><p>this is also awesome, I have tried it</p>
<p>I know I am cheating a little, but I just can't figure out how to build an autotransformer and I need something simple for my wearable project.</p><p>So I bought buzzers instead:</p><p><a href="http://www.mallory-sonalert.com/Articles/TechAppGuides/Board%20Mount%20Models.pdf" rel="nofollow">http://www.mallory-sonalert.com/Articles/TechAppGu...</a></p><p>You just need to feed it a high output directly from the arduino and it gives a loud beep until you turn it off. And I got two kinds to test:</p><p>This one is smaller/cheaper (loud beep, but not scary loud)</p><p><a href="http://www.digikey.com/product-detail/en/PB-12N23P-03Q/458-1063-ND/969790" rel="nofollow">http://www.digikey.com/product-detail/en/PB-12N23P...</a></p><p>And this one: (More expensive, even louder than the one above, but bigger)</p><p><a href="http://www.digikey.com/product-detail/en/MSR205NR/458-1313-ND/4895841" rel="nofollow">http://www.digikey.com/product-detail/en/MSR205NR/...</a></p>
<p>Hey, Thomas</p><p>I found the physics behind this autotransformer if you'd like </p><p>http://www.skm-eleksys.com/2011/07/autotransformer.html</p>
Cool. I only skimmed it but I'll update the instructable when I get a minute. Thanks for taking the time to send it to me. - Thomas <br><br>