Sparkfun: Large Piezo Vibration Sensor - With Mass

Revision as of 07:58, 23 September 2012 by Geislekj (talk | contribs)
Jump to: navigation, search


The Large Piezo Vibration Sensor is a basic piezo sensor which is often used for flex, touch, vibration and shock measurements. This sensor acts like a small capacitor which discharges up to +/-90V when the film moves back and forth. Some common uses this type of sensor are for impact sensing or as a flexible switch. A larger scale example are piezo sensors that are laid within the road for use of traffic signals.

This sensor can be purchased at SparkFun.

The Technical Manual and datasheet can also be found on Sparkfun's website.


Since the piezo sensor acts like a small capacitor, you can connect on a bread board as such. However an additional resistor is needed in order affect the low frequency of measurement. This is called the "loading effect". Additionally, if the signal from the piezo sensor is too low an op amp may be necessary.

More specific information and circuit diagrams can be found in the Technical Manual on pages 36-40.

Beagle Bone Usage

The value being read from the piezo sensor will be a voltage up to +/-90V. This means that an analog pin must be used to read the value from the sensor. The voltage being supplied to the sensor affects how much sensitivity you will receive. Look in the technical manual to find a desired voltage that will work for you. For the example below, I simply used a 5V source.

Reading the Analog Signal

You can simply read the value of the piezo sensor from the terminal by reading the contents of a file in the /sys/devices/platform/omap/tsc/ain# directory. The # is 1 + the number of the analog pin you selected as your analog input. However this method will not allow you to accurately see the change of voltage as the film moves. To do this you will need to write a c program to print the values to the terminal repeatably or plot the voltage over time. The sample code below shows a simple program to print the voltage of the sensor to the screen.