Experiment 10 - piezoelectric sensors

1.      Context of the Experiment

After understanding the many different sensors, it is the time to be familiar with a type of sensor that can be used for dynamic parameters. When you have changes in the value of a parameter, we use piezoelectric sensors. A piezoelectric sensor is a device that uses the piezoelectric effect to measure changes in pressure, acceleration, temperature, strain, or force by converting them to an electrical charge. The prefix piezo- is Greek for 'press' or 'squeeze'

2.      Learning Goals of this Experiment

  • Knowing: Changing voltage, Piezoelectric effect, dynamic variables

  • Abilities: Measuring voltage, Measuring force, Getting analog and digital output of piezo

  • Understand: The impact of changes on the piezo output



3.      Literature

[1]. Rupitsch, Stefan Johann. Piezoelectric sensors and actuators: Fundamentals and applications. Springer, 2018.

[2]. Arnau, Antonio, ed. Piezoelectric transducers and applications. Vol. 2004. Berlin: Springer, 2004.

[3]. Thorsten A. Kern, Hatzfeld, Christian, and Alireza Abbasimoshaei. Engineering haptic devices. Springer London Limited, 2022.

[4]. Measurement Technology lecture slides

[5]. S. Rajala, M. Vuoriluoto, O. Rojas, S. Franssila, S. Tuukkanen. Piezoelectric sensitivity measurements of cellulose nanofibril sensors. In Proc. IMEKO XXI World Congress, 2015.





4.      Basics/Fundamentals

What is a piezoelectric Sensor? This is a type of sensor that converts the mechanical force to electrical signal. It is mostly used in flexible motions, touch, vibrations and shock measurement.  

piezoDisc.png

Fig. 1 A usual piezo electric sensor

How does a piezoelectric sensor work?
The fundamentals on the piezoelectric material were taught in the lecture. In short: Piezoelectric materials possess magnetic dipoles. By creating a displacement on the structure the electrical poles of the overall material are displaced, creating an electric polarization. This than attracts charges to the surface of the material which can be measured. The figure below shows a setup of a piezoelectric sensor based on cellulose nano fibril extracted from wood. The piezoelectric crystal is placed between two metal plates. If a mechanical stress or force is applied on the material, the metal plate collects these charges and produces a voltage proportional to the applied force.

Fig. 2 Structure of a piezoelectric sensor.
Disclaimer: The “NFC” is supposed to be “CNF” (cellulose nano fibril) as this figure is from [5]


Some benefits of piezoelectric sensors:

  • High frequency response

  • High transient response

  • An output measured by circuit

  • Small dimensions



5.      Technical Basics & Preparations

Before measuring, these aspects of measuring should be considered and thought trough:

  • What is supposed to be measured? What values?

  • What measuring device can be used for this?

  • What are the possible (systemic) errors and external limitations that exist in the setup?

  • Then: find out about the complete measurement

Note: After doing the experiment, write all values in the MATLAB application at the test stand for yourself, and make sure you also note them for later calculations at home.

Preparations:

In this experiment, we want to check the different usages of piezoelectric sensors. You need the following materials for your experiment:

Materials: piezoelectric disk, oscilloscope, 1 M Ohm resistor, breadboard, Arduino, USB cable, LED, 7 Jumper wires



6.      Experiment Procedure

Please write the numbers in MATLAB and Vips without units!



6.1 Piezoelectric disk as a voltage producer

Prepare the set-up for whole experiment and just go to the test stand once.
Materials that are needed for this part are: piezoelectric disk, oscilloscope

 

Connect the two wires of the piezoelectric disk to a probe of the oscilloscope, note that the grounded clamp is attached to the wire of the outer ring (negative terminal). Make sure the switch at the probe and the oscilloscope match (1:1 or 10:1). Then put your piezoelectric disk in a soft cloth and push it. You will see the voltage between the piezoelectric disks. This is a dynamic force sensor, so if you push the sensor constantly for a long time, the amount will be reduced.

 

Fig. 3 Connecting piezoelectric sensor to oscilloscope

 

10.1.1 Now push with your index finger with medium force for less than a second and get the approximate maximum output voltage of the piezoelectric sensor while loading and unloading the sensor. Make good use of the functions of the oscilloscope you learned throughout the experiments! (Hint: A triggered (frozen)signal can be shifted towards the left edge of the screen to record more data after the trigger event.) ( save in Vips after the lab)


With the first experiment completed, we want to figure out the response with direct loading of approximately the same force. Use the sensor holder and the cover to lock the piezo disk as good as possible in place.

Fig. 4 Sensor placed in the sensor holder and loaded with finger

 

10.1.2 Apply a medium pressure with your index finger or thumb. Record the maximum absolute value of the output voltage while loading and unloading the sensor again. ( save in app in the lab)

10.1.3 (VIPS-Task) How much is the electrical charge one can “harvest” by applying pressure with a finger to the piezo disk? To answer this question, we recorded such measurement, extracted the data from the oscilloscope via USB stick and converted it into a MATLAB file (please use this for your evaluation):

Use the provided read of the disks voltage to find the accumulated charge during the positive and negative voltage levels. The total harvest will be the sum of the absolute values (expecting that a rectifier is used in an appropriate charging circuit) Keep in mind that the “circuit” was closed by your oscilloscope and the probe. As for the circuits resistance you assume the probe resistance of 50 Ohm. You also recall that current is charge over time:

10.2 Piezoelectric disks in acoustic applications

In this experiment, we want to connect the oscilloscope to the piezo disk to record behavior on acoustic loads and electrical fields applied by the function generator of the oscilloscope.

Secure the piezoelectric disk in the 3D printed disk holder and attach the probe of the oscilloscope to the disk. Make sure that the ground is connected to the wire of the outer disk section (usually the black wire).

Play around for 2 minutes with the oscilloscope settings and try to get a recording on the screen where you can see the effect of tapping the table or clicking sounds for different zooms.

If everything is setup correctly, you should see a feedback like on a seismograph when tapping next to the printed disk holder. To get rid of those shocks in your upcoming measurement, you can hold the printed device in your hands.

10.2.1. In which direction does the signal deflect when you are speaking or making a sharp sound with the scope set to 100 mV/division? (negative or positive voltage range)( save in Vips after the lab)

10.2.2. Now set the scope to 10 mV/division and repeat your previous experiment. It can happen that the signal is very hard to record. Especially in a noisy environment. If you are not able to get a ‘clear’ signal, make an educated guess. What is the direction of the first spike when speaking/making a sound towards the piezo disk? ( save in app in the lab, will not be graded due to constrains of test environment)

Next up is the reversed application, the piezo disk becomes a speaker.

We are going to create some sound with the piezo disk next. Please stick to the following procedure to keep the noise level at a minimum when switching to another waveform:
1. Note the amplitude setting for the waveform generator (if not done yet)
2. Decrease its level to 100 mVpp or below before switching
3. Switch to another waveform
4. Increase the amplitude until you here the sound
5. Note that value and decrease the amplitude again or turn off the waveform generator by pressing the blue “Wave Gen” button to keep the noise level low. Your ears and your neighbors will be more than happy.

Before connecting the piezo disk to the oscilloscope’s generator output: Make sure that the generator output is set as follows:
Waveform: Square
Frequency: 200 Hz
Amplitude: 100 mVpp
Offset: 0.0 V

Unplug the oscilloscope probe from the measurement port and connect it to the output of the waveform generator. Your piezo disk should now be connected to it. Make sure to switch the probe from 10:1 to 1:1, otherwise the output will be ten times smaller than expected.

Your task is to find the needed amplitude levels to create a sound just loud enough to hear with the piezo disk for four available waveform (sine … pulse) for a given set of frequencies.
Make sure to have read and understood the information regarding a noise friendly procedure above!

10.2.3. Find the required amplitudes to generate a sound. Fill the following tabular. If you are not able to hear a sound, insert the max value of the oscilloscopes function generator: 12 Vpp

Frequency

Sine (Vpp)

Square (Vpp)

Ramp (Vpp)

Pulse (Vpp)

Frequency

Sine (Vpp)

Square (Vpp)

Ramp (Vpp)

Pulse (Vpp)

200 Hz

500 Hz

700 Hz

10.2.4. Take a closer look at those values. You will find a Vips question regarding your findings with graphs guiding through the question. ( save in Vips after the lab)

Please don’t forget to switch the probe back to 10:1 if you want to use this setting. Otherwise make sure the probe settings on the oscilloscope are set to 1:1 as well.

10.3 Interfacing a Piezoelectric sensor with the Arduino and switching on an LED by using a piezoelectric disk

In this experiment, we want to connect an LED with a piezoelectric disk and change the mechanical energy to electrical energy, and switch an LED on.

Materials: one piezoelectric disk, One 1 Mega ohm resistor, one breadboard, one Arduino, one LED, 6 jumper wires

Fig. 5 Materials needed for switching an LED on by piezoelectric sensor



You can connect the piezoelectric disk in the following way to connect it to the breadboard easier.

Fig. 6 All connections from piezoelectric sensor to the Arduino and LED

Put the LED and 1 Mega ohm resistor on the breadboard. Then follow these steps:

a. Connect the positive pin of LED (longer terminal) to Pin 4 of Arduino.

b. Connect the other terminal to GND of Arduino.

c. Connect the positive output of the piezoelectric disk to one end of the resistor, and connect the other end of the resistor to the A0 port of Arduino.

d. Connect the other terminal of the piezoelectric disk to the GND of Arduino.

Fig. 7 General setup



Run the following code in the Arduino IDE:

int led=4; int sensor=A0; int threshold=1000; unsigned long start=0; void setup(){ pinMode(4,OUTPUT); pinMode(A0,INPUT); Serial.begin(9600); start = micros(); } void loop(){ int value=analogRead(sensor); if (value>=threshold){ digitalWrite(led,HIGH); start = micros(); }else{ digitalWrite(led,LOW); } delay(20); Serial.print(value); Serial.print(" time passed: "); Serial.print((micros()-start)/1e6); Serial.println("s"); }

 When you run this code, you will see that by pushing the piezoelectric disk, the LED will be switched on and off. You can change its status according to your pushing time. 


Move to a force test stand used in experiment 4 (or get one to your place) if everything works according to your expectations. The positioning of the piezo disk in the test stand is shown in figure 10.

10.3.1 Push the sensor by using the test stand for one second. Find the approximate Arduino maximum output from the serial monitor between second 3 to 4. (you can turn off and on auto scroll and times in serial monitor) (:floppy_disk: save in app in the lab)



10.4 Making a Knock Sensor:

In this experiment, we use a piezoelectric sensor as a switching button. This “knock” sensor It reads an analog pin and compares the result to a set threshold. You can use the previous circuit and run the following code on the Arduino. If the result is greater than the threshold, it writes "knock" to the serial port, and toggles the LED on Pin 4. If not, it only shows the sensor output. Give it a few taps to see how it works. Don’t forget to switch on the timestamp for the following task (or implement the digital one from the code above).

const int ledPin = 4; // LED connected to digital pin 4 const int knockSensor = A0; // the piezo is connected to analog pin A0 const int threshold = 400; // threshold value to decide when the detected sound is a knock or not // these variables will change: int sensorReading = 0; // variable to store the value read from the sensor pin int ledState = LOW; // variable used to store the last LED status, to toggle the light void setup() { pinMode(ledPin, OUTPUT); // declare the ledPin as as OUTPUT Serial.begin(9600); // use the serial port } void loop() {// read the sensor and store it in the variable sensorReading: sensorReading = analogRead(knockSensor);// if the sensor reading is greater than the threshold: if (sensorReading >= threshold) {// toggle the status of the ledPin: ledState = !ledState;// update the LED pin itself: digitalWrite(ledPin, ledState);// send the string "Knock!" back to the computer, followed by newline Serial.print("Knock!"); } delay(100); // delay to avoid overloading the serial port buffer Serial.println(sensorReading); }



10.4.1 Push the sensor with the test stand for one second and find the Arduino maximum output two seconds after the threshold has been reached. The amount will be written on the serial monitor beside "knocked". ( save in app in the lab)

 

10.4.2 Set the threshold (third line of code) as double as the previous amount and repeat 10.4.1. ( save in app in the lab)

10.5 Some thoughts on piezoelectric sensors: (Vips only, you finished the lab)

You got to know some behaviors of piezoelectric discs as sensors and as actors.

10.5.1 Reconsider: What is the main task of a piezoelectric sensor? ( save in Vips after the lab)

10.5.2 Reconsider: What is the energy conversion in a piezoelectric sensor? ( save in Vips after the lab)

7.      Evaluation of Experiment Results

App

 

VIPS

The following values should be entered to Vips in Stud.ip. Please note that only 30 minutes are available for entering values in Vips, after which the Vips entry is automatically terminated. The test is only to hand in the final values, so be prepared and have all values ready and at hand!

  • Matriculation number

  • Please enter the maximum voltage you recorded when loading the piezo disk covered in a cloth with your index finger.
    unit: V
    relevant section: 10.1.1

  • Please enter the maximum voltage (absolute value) you recorded when unloading the piezo disk covered in a cloth with your index finger.
    unit: V
    relevant section: 10.1.1

  • You observed different responses on the oscilloscope while loading and unloading the piezo disk. You probably noticed differences in voltage levels. What could be a reason behind that?
    select one from:

    • The measurement is probably wrong. (Human factor)

    • The rate with which the sensor load changed was different in both directions. (Human factor)

    • The sensors sensitivity is different in z and -z direction. (Sensor fundamentals)

relevant section: 10.1.1

  • Give the accumulated charge harvested by applying pressure with a finger onto a piezo disc (add absolute values of accumulated charges during positive and negative voltage levels). Use the provided .mat-file to derive the values!
    unit: C
    relevant section: 10.1.3

  • Give the initial main direction of deflection of the signal when the piezo disk picks up the air pressure wave from the sound you make.

    • positive

    • negative

relevant section: 10.2.1

  • While finding the minimum required voltages for different wave forms you noticed that different wave forms require different minimum voltages for the same frequency. What could be the reason? Analyze the given material (graphs and spectra). Why is an attenuation with a rectangular wave louder than with a sine wave at the same signal amplitude?

 

Clemson, Philip & Stefanovska, Aneta. (2014). Discerning non-autonomous dynamics.
Physics Reports. 10.1016/j.physrep.2014.04.001.
License: CC BY 4.0

 

  • Sine waves, with a single dominant frequency, distribute their energy more uniformly. In contrast, rectangular waves, rich in harmonics, experience a compression effect during attenuation, causing certain harmonics to remain below the auditory threshold. This compression amplifies specific frequencies, requiring higher voltages for an equivalent perceived loudness.

  • The rectangular wave consists of an infinite amount of sine waves. Therefore it contains audio waves at higher frequencies than the ‘desired’ frequency. As seen by the ‘threshold of hearing’ humans can hear higher frequencies better. Thus a rectangular sound wave is better heard than a sine wave.

relevant section: 10.2.4

  • Which one is the main task of a piezoelectric sensor?

    • Providing a voltage

    • Sensing pulse and movement

    • Receiving and saving electrical energy

    • None of the answers

relevant section: 10.5.1

  • What is the main energy conversion in a piezoelectric sensor?

    • Electrical energy to mechanical energy

    • Electrical energy to light energy

    • Mechanical energy to electrical energy

    • Mechanical energy to light energy

relevant section: 10.5.2

 

Institut für Mechatronik im Maschinenbau (iMEK), Eißendorfer Straße 38, 21073 Hamburg