Hi, i have used a piezo sensor before to detect pressure, following the example at http://arduino.cc/en/Tutorial/Knock. There, in order to protect the pin of the Arduino, a 1 MOhm resistor is used in parallel with the sensor.

Now i want to use the same piezo sensor as a transducer, driven from the Arduino for a home alarm project. But then, according to http://arduino.cc/en/Tutorial/Tone, only a 100 Ohm resistor is needed in series. So, what is the correct way to hook a piezo disc to Arduino in order to get high-pressure sound?

Piezo element, piezo beeper, piezo sensor, piezo crystal, piezo microphone.... It's all about piezo, and there is no rule how to use the names. The photo you uploaded explains what you have very well!

A normal speaker of 8 Ohms must have a 100 Ohm series resistors.

But also for a piezo, it is better to add a 100 Ohm series resistor, to protect the output pin of the Arduino with higher frequencies.You can use a 1 MOhm in parallel and add a 100 Ohm series resistor. That way you can detect a knock and play a tone with the same piezo element.

A library "toneAC" doubles the volume.http://arduino.cc/forum/index.php?topic=142097.0You still need that 100 Ohm series resistor.

For more volume, you could use transistors or a driver ic and more voltage like 12V.Also the way the piezo element is mechanically placed into a case, could make the sound a lot louder.

So if i understand this correctly, if the same piezo disc is used as a sensor, the 1 Mohm resistor must be add in parallel while if it is used as a speaker, a 100 ohm resistor must be added in series.

What happens though if it is used as a speaker (with the 100 ohm resistor) but someone knocks on the sensor? Isn't there the possibility that too much voltage will reach the Arduino pin (even if the pin is set to output)? Also if i drive the piezo with a higher voltage (for example with 9V through a transistor) shouldn't the sound be louder? Is there a datasheet that is common for all piezos, or each has different characteristics?

So if i understand this correctly, if the same piezo disc is used as a sensor, the 1 Mohm resistor must be add in parallel while if it is used as a speaker, a 100 ohm resistor must be added in series.

Correct

The input impedance of an Arduino is very (very) high, so the 1MOhm lowers the output voltage of the piezo.The output impedance of the an Arduino is low, that's no problem.

If you drive the piezo with a transistor and 9V, it is only pulled low. An Arduino pin pulls the voltage high and low. The toneAC library pulls two pins high and low.Will a single transistor and 9V make it louder ? I don't know, you have to test that.