Piezo Film Sensors

Hi there,

I am trying to connect a Piezo Film Sensor with polarity to the arduino. I am wondering how to do this because I can find a lot of example for a piezo knock sensor but this sensor allows touch and creates a voltage from zero to 30 V. I understand that I can connect in the analog in pins and out in the digital but when I connect the piezo film to an oscilliscope I get a reading in the positive and negative. Could someone give me some example code or perhaps point me in the right direction, like a website. even if you want to get me started and I can fill in the missing pieces to the code.

What sensor are you using (you can paste a link in your text).

Do you want to read the analog voltage from -30V to +30V ?

Some of these sensors simply need a parallel resistor to bring the voltage down.
Like is done here: http://arduino.cc/forum/index.php/topic,14175.0.html
And like Sparkfun writes here: https://www.sparkfun.com/products/9196

But to be able to measure positive and negative voltages, you can make a voltage of 2.5V with 2 resistors in series from ground to +5V, and use that for a 'ground' for the sensors. If you also connect that 2.5V to an analog input of the Arduino, you can measure both the 'ground' for the sensors and the (positive or negative) output of the sensor.

Don't forget to add protection diodes, and also an extra resistor of 1k for each analog input makes your circuit safer.

What you want is a "pulse stretcher" or "leaky peak detector" feeding into an A/D converter
channel. Also, known as a half-wave rectifier.

http://www.zen86415.zen.co.uk/pulse_stretcher.gif

The diode passes only positive voltages, the capacitor integrates fast transients into something
slow enough the A/D can read, and the resistor decays the voltage on the cap, so the ckt is
ready for the next knock.

Since the piezo can generate voltage > 5V, you'll also want to connect a 4.7V zener diode
across the output.