• Ei tuloksia

Application of Piezo Electronic Sensor in Jump Counting

N/A
N/A
Info
Lataa
Protected

Academic year: 2022

Jaa "Application of Piezo Electronic Sensor in Jump Counting"

Copied!
48
0
0

Kokoteksti

(1)

Thinh Ha

Application of Piezo Electronic Sensor in Jump Counting

Metropolia University of Applied Sciences Bachelor of Engineering

Electronics

Bachelor’s Thesis 1 March 2021

(2)

Abstract

Author: Thinh Ha

Title: Application of Piezo Electronic Sensor in Jump Counting Number of Pages: 14 pages + 1 appendices

Date: 1 March 2021

Degree: Bachelor of Engineering

Degree Programme: Electronics Professional Major: Senior Lecturer Supervisors: Anssi Ikonen

The aim of the project was to design and test a prototype of a system that can be attached to a trampoline to sense impacts caused by jump movement. The system will detect the movement and store the number of jumps to a counter, which value is sent to a mobile application.

The system is comprised of the following main components: piezo electronic sensor, a filter circuit which is used to modify the raw signal from the piezo sensor, a microcontroller which will detect the jump movement from the sensor signal and send the number of jumps to a mobile application.

The main goal of the project was to extract the correct number of jumps when attached to the trampoline. Several prototypes was designed and tested in order to evaluate the performance of the difference types of filter circuits and position of the sensor. The final system designed was able to successfully detect jump movement and number of jumps in a specific test scenario. However, in the future the performance of the system could be improved smart motion detection algorithm, efficient power management and versatile internet connectivity.

Keywords: Piezo electronic sensor

(3)

Contents

List of Abbreviations 5

1 Introduction 1

2 Piezo Electronic Sensor 2

2.1 Historical Background 2

2.2 Dielectric Polarization And Piezoelectric Effect 2

2.3 Piezo-Electronic Sensors 4

2.4 Introduction To Poly-Vinylidene Fluoride 5

2.5 Modelling Theory 8

2.5.1 Charge Mode Configuration 8

2.5.2 Voltage Mode Configuration 9

3 Hardware and Software Tools 10

3.1 Piezo Electronic Sensor Minisense 100 10

3.2 Particle Photon Microcontroller 14

3.3 Operational Amplifier LM358 14

3.4 Pads logic and Pads layout 15

3.5 Particle Web IDE 15

3.6 Blynk 16

4 Physical implementation of the device 17

4.1 Jump Counter Device 17

4.2 Piezoelectric Sensor 17

4.3 Design Architecture And Measurement Method 19

4.4 Circuit designing 20

4.4.1 Raw Piezo Electronic Signal 20

4.4.2 Pre-Amplifier Module 21

4.4.3 Sallen-Key low pass filter 23

4.4.4 Offset control and final gain 25

4.5 Software Implementation 27

4.6 Pulse Peak Detection 28

5 Testing 30

6 Limitation and future possibilities 32

(4)

7 Conclusion 33

References 34

List of Figure 1

Main code 3

Schematic of the circuit 6

PCB layout of the circuit 7

(5)

List of Abbreviations

OP AMP: Operational amplifier, high impedance electronic component, mainly use to amplify weak signals

PVDF: Poly-Vinylidene Fluoride SMDs: Surface Mounted Devices IoT: Internet of Thing

PCB: Printed Circuit Board

(6)

1 Introduction

Shock and vibration take part in an important role in electronic and electromechanical system. They can shorten the life of electronic system since delicate leads and bond tend to be applied by strain and stress during the frequent use, in which lack of could result in a system failure. Therefore, the technology of measuring motion, vibration and shock is always priority considered in designing and manufacturing process of almost all electronic system. This technology has been mandatorily required in multiple technology sectors such as automation, aerospace, consumer electronics.

The aim of this thesis work was to learn more about one of the most popular shock and vibration sensing technology these days, the piezoelectric sensor. A deep literature study was made about the general principle of the sensor, I have compared and verified of learning thing with a commercial sensor by designing and prototyping a simple application of the sensor. I conclude the thesis with a set of measurement and result of the prototype as well as my personal discuss about this technology and their use in electronic aspect.

(7)

2 Piezo Electronic Sensor

2.1 Historical Background

Piezo electronic is the property of a material that can gain a certain electrical charge due to the deformation. The prefix ‘piezo’ come from the Greek, that mean

“to press” or “to squeeze”. This phenomenon was first discovered by the brothers Pierre and Jacques Curie. They found that in certain crystal such as tourmaline, topaz, quartz, electrical charges are created on the surface when applied with a mechanical force to the crystal. In the following year, Gabriel Lipmann discovered the inverse piezo electronic effect, this was soon to be confirmed by the Curie brother by the same year. However, until the 1950s, by the discovered of new material with better properties, included Barium Titanate, Zirconate Titanate, manufacturers began to apply the new material in sensing applications [1] [2].

2.2 Dielectric Polarization And Piezoelectric Effect

The polarization of a material is the state when negative charges and positive charges of the material are displaced from another. This usually achieved by induce the material with an electric field. However, some material with a permanent polar structurer can also gain the same polarization states from a mechanical deform. That is the piezoelectric effect of a material, which can be explained in the figure 1 (a).

(8)

Figure 1. Piezo electronic effect explained (a) At rest turbed molecule (b) Material under external force (c) Polarization effects under external force (d) Neutralized current induce by the external force [3].

At rest, the dipoles are perfectly balanced since the positive charge cancels out the negative one due to the symmetrical arrangement of the crystal structure as Figure 1 a. As seen in Figure 1 b, if some external force, squeeze, or stretch, for example, is applied that causes the deform of the structure, the symmetry structure is lost. Some atoms are clumped together, while others are scattered which will then create net electrical charges. This phenomenon forms in the whole structure of the material, create a temporary polarization that can be seen in Figure 1 c. The effects can be seen from transverse, longitudinal, or shear forces depend on the structure of the material. In figure 1 d, two metal electro nodes are attached to two positive side of the polarization directions, and then short circuiting each other with conductor. The deform of the material will deposit opposite charges on the surface of each electro nodes. The free charge will flow through the conductor in order to neutralized the polarization of the material.

(9)

2.3 Piezo-Electronic Sensors

Piezoelectric sensors are usually classified by the kinds of material they are made from. There are three kind of materials as ceramic, crystal or polymeric. Some commercially available piezo-electronic sensor is shown in Figure 2.

Figure 2. Common commercial piezo electronic sensors (a) Buzzer and transducer ceramic type (b) Pressure sensor using piezo electronic crystal [4]

(c) Polymeric type [5].

Single crystal piezoelectronic is often seen in pressure transducers application.

The most common single crystal material sensor is lead magnesium niobate-lead titanate crystal family. They have an extremelly high sensitivity due to its high piezoelectric coefficient, very broad bandwidth. Ceramic Piezo Electric has good sensitivity, less stable compares to the single-crystal one but they are very cheap.

The most common material of ceramic sensors are Lead Zirconate Titanate, Barium Titanate and Lead Titanate. They are popular due to its low cost and acceptable sensitivy. However, they are generally brittle, not durable and have a narrow working temperature. Polymer Piezo Electronic offer even higher sensitivy, also offer a excellent physcial properties such as high strength, high impact resistance, durable, low density and flexiable [6].

(10)

2.4 Introduction To Poly-Vinylidene Fluoride

In 1969, Heiji Kawai found that the PVDF material could gain and remain a high Piezo-, Pyro- and Ferro-electric properties after a polarization process with high temperature and pressure [7]. After this breakthrough, more and more

researches have been conducted to discover more about PVDF material and its application.

Poly-Vinylidene fluoride is a linear polymer chain made of multiple identical monomers. The material is mainly produced by the free radical polymerization process of gaseous Vinylidene Fluoride. There are approximately 2000 monomers tied together in a chain, the length is 0.5 um [8] and the weight is about 100000 g/Mol [9]. Each monomer has the chemical formula is CH2CF2, and different phase structure formulas can be seen in Figure 3.

Figure 3. Structure formula of CH2CF2.

PVDF has three main conformations: α-, β- and γ-phase [10]. In each monomer structure, the side with two fluorine atoms is highly negatively charged while the side with two hydrogen atoms is oppositely positively charged. However, the structure direction arrangement of Fluoride and Hydrogen atoms made the polar properties of each phase different. In the α-phase, each charge has a different atoms group that is pointed in the opposing directions, the charges cancel out result in a non-polar structure. In the β- phase, each charge only has one orientation, the negative and positive charges point opposite directions, resulting in a dipole molecular. The direction of the dipole is perpendicular to the molecular axis. Therefore, PVDF in β- phase has a permanent dipole structure and this is

(11)

the only structure that can be used as a piece of electronic material. The other polymorphs, γ-phase, and δ-phase are slightly polar and show a much weaker piece electronic effect than the β- phase.

Figure 4. Structure conformation of PVDF (a) α-phase (b) β- phase (c) γ-phase [2].

PVDF has a high piezoelectric property, that is the ability to produce an electrical charge in response to structures deform caused by an external mechanical force. The sensor used in this paper is made of a thin film PVDF and the piezoelectric equation [11] can be express below:

[ 𝐷31 𝐷32 𝐷33

] = [

0 0 0

0 0 0

𝑑31 𝑑32 𝑑33

0 𝑑15 0

𝑑24 0 0

0 0 0

] ∗ [

𝑇1 𝑇2 𝑇3 𝑇4 𝑇5 𝑇6]

(1)

(12)

In the equation, denote the symbol Xij that ‘I’ refers to measurement direction and

‘j’ is the external mechanical direction. The directions of the piezo film can be shown in Figure 5.

Figure 5. Direction of PVDF film sensor [12].

D31, D32 and D33 are electrical displacement in directions 1, 2 and 3; d31, d32 and d33 are the piezoelectric coefficient in directions 1, 2, and 3; d24 and d15 are piezoelectric coefficients in shearing strain directions 1 and 2. However, the shearing coefficients are much smaller than the strain coefficients and thus can be neglected. T1, T2 and T3 are tensile stress in directions 1, 2, and 3; T4, T5 and T6 are shear stress in directions 1,2 and 3 [13]. The output charge can be calculated based on the electrode area A as equation (2)

𝑄 = (𝑑31∗ 𝑇1+ 𝑑32∗ 𝑇2+ 𝑑33∗ 𝑇3) ∗ 𝐴 (2) 𝑄 = 𝑑31∗ 𝑇1∗ 𝐴 (3)

The sensor used in this paper is a thin film, it is nearly impossible to deform the sensor in directions 3 (thickness directions), which means T3 is 0. One end of the film is horizontally connected to a hard PCB board. This board strengthens the film in directions 2, thus made the deform in this directions can be

neglected, T2 is 0. Therefore, the equation () can be approximately calculated by the equation (3). The piezoelectric coefficient is now approximately equal

(13)

d-31, the higher the constant the stronger the piezo electronic effect of the material.

2.5 Modelling Theory

In the simplest form, a piezoelectric sensor can be modelled as a charge source parallel with a shunt capacitor and resistor [14]. However, the piezoelectric operation is unique and depends on multiple conditions. Therefore, in actual design and modelling, sensors are modelled in either two modes, charge mode configuration or voltage mode configuration.

2.5.1 Charge Mode Configuration

Charge mode configuration is typically used when the electronics are connected far from the sensor, the configuration is shown in Figure 6. In this mode the amplifier must have a low bias input current since it does not charge or discharge the gain capacitor. A typical CMOS operational amplifier is recommended since it has a very low input current. Since the long distance between sensor and amplifier, the capacitance effect of long cable is considered as CC, any charge created by the sensor will charge the cable capacitor and thus create a voltage between amplifier input. Since the amplifier has a very high gain, this voltage is nulled by the sourcing and creates the same amount of charge to the feedback capacitor and resistor. Measuring this will result in a high accuracy charge change from the sensor.

(14)

Figure 6. Charge mode configuration [15].

2.5.2 Voltage Mode Configuration

Voltage mode is generally used when the sensor is placed close to the

amplifier, input charge is presented directed to high impedance input and then amplified by the op-amp. The basic configuration is described in Figure 7. The gain, in this case, can be adjusted by input and feedback resistor. The output voltage can be calculated by equation (4) [15]. The capacitance of the cable CC affects the actual gain of the op amplifier, and it must be as small as possible to minimize its effect. Therefore, in practice the sensor needs to be placed as close as possible to the operational amplifier.

𝑉𝑜𝑢𝑡 = 𝑄𝑠

𝐶𝑠+ 𝐶𝑐∗ (1 +𝑅𝑓

𝑅𝑔) (4)

One advantage of this configuration is that it provides a natural passband frequency response. The low-pass and high pass cutoff frequency can be defined by this equation (5) and (6) [15]. Resistor R is used to correct biases in the Op-amp. Since this sensor application only measures real human jumps on a trampoline, which are in the low-frequency range, we need to get the lowest

(15)

natural high pass threshold. One solution is to increase the value of resistor R to be as high as possible, typically in the mega ohm range.

𝑓𝐻𝑃 = 1

2𝜋 ∗𝑅𝑆∗𝑅

𝑅𝑆+𝑅∗ (𝐶𝑠+ 𝐶𝑐) (5)

𝑓𝐿𝑃 = 1

2𝜋 ∗ 𝑅𝑓∗ 𝐶𝑓 (6)

Figure 7. Voltage mode configuration [15].

3 Hardware and Software Tools

3.1 Piezo Electronic Sensor Minisense 100

The Minisense 100 is a piezo electronic vibration sensor manufactured by Measurement Specialties. The sensor is made from PVDF material, into a thin film that is flexible and durable. One end of the sensor is attached to a mass; the purpose was to increase the sensitivity when operates at low frequencies. The active sensing film is coated with a radio frequency interference and electromagnetic interference rejection layer. The sensor has a dynamic range and excellent linearity response property. The sensor is small, lightweight with only 0.5 gram, and can be operated between -20C to 60C (Specialties, 2019), thus can be used in various applications e.g. load balancing, motion sensor,

(16)

tamper detection, impact sensing. Figure 5. also indicates the Minisense 100 sensor used in this module.

In general, the sensor performs as a cantilever-beam accelerometer as shown in Figure 8. The sensor is usually mounted in a way that the area of the thin film is perpendicular to the measurement axis. When an acceleration is applied to the system, the vertical plane of the beam is bending due to the inertia of the mass of the end of the film. This strain creates a piezo electronic effect on the beam, which results in a voltage charge that can be measured across the output pin.

Figure 8. Minisense100 bending due to the vibration [12].

In the situation of the sensor is mounted off-axis of the desired above, that is horizontally rotated through the length of the film in the x-axis or vertically around its centre in the y-axis. The sensitivity of the sensor follows a cosine law with the same relation in either rotation axis. A 90 degrees’ rotation in either plane will theoretically result in a zero sensitivity, at 30 degrees the sensitivity change is - 1.25dB (87% of original), and at 60 degrees, the sensitivity is only half of the maximum (-6 dB or 50%) [12].

(17)

Figure 9. Off axis response of the sensor (a) Off axis direction (b) cosine low relation of the off-axis rotation and sensitivity [12].

The sensors are designed to withstand high shock overload and can be operated in continuous or high impact. The sensor purposely design to work in low- frequency range, which an upper limit frequency of 42 Hz [12]. The voltage sensitivity of the open circuit sensor is 1.1 V/g when operating below the resonant frequency of 75Hz. The voltage sensitivity at resonance frequency is significantly higher, which can go up to 6V/g [12]. Therefore, in practical application, high- frequency impacts that is potentially induced by resonance could distort the measurement and an external filter is required to remove this response. One of the main advantages of the Minisense 100 is its excellent linearity performance.

Figure 10 shows the linearity relationship between the charge output and the applied acceleration input, the linearity is less than 1% provided by the manufacturer.

(18)

Figure 10. Frequency response and linearity of Minisense 100 [12].

The Minisense 100 can be modeled as a voltage source serially connected with an active capacitor. The voltage output is linearly proportional with the applied acceleration when operated at a low-frequency range. According to the manufacturer, Minisen100 has an internal capacitance C0 of approximately 244 pF. Any external resistance connected with the sensor will form a high-pass filter.

The cut off frequency of this high pass filter can be simply calculated by the equation

𝑓𝑐 = 1

2𝜋𝑅𝐶𝑜 (7)

Figure 11. PVDF sensor model in series with load resistor R.

Figure 11 shows the relation between the lower limiting frequency or cut-off frequency with different load resistance connections. In order to work with low

(19)

frequency, a direct connection with a high impedance component is recommended. In our specific design of measuring an actual human jump, the sensor needs to work in the frequency range between 0.25 Hz to 4 Hz, therefore the proposed solution is to connect the sensor direct with an operational amplifier, which has a high input impedance.

Figure 12. Relation between load impedance and the lower limit of working frequency [12].

3.2 Particle Photon Microcontroller

The photon is a low-cost IoT microcontroller provided by Particle. The board is powered with a combination of Broadcom BCM43362 Wi-Fi chip, provides standard 802.11b/g/n Wi-Fi connection, and STM32 120Mhz ARM Cortex M3 microcontroller [16]. The photon offers all fundamental features of a microcontroller in addition to free access to the Particle cloud. This enables the application to extend it physical limit to connect over-the-air with other projects, software app. There are three main functions of the photon in this application:

converting the filter analog signal to digital, implementing the peak detection algorithm to detect jump motion and sending the jump count on air to Blynk software on phone.

3.3 Operational Amplifier LM358

In order to minimize the high-pass filter effect of the internal capacitance, the sensor needs to first connect with a high impedance component, ideally an operational amplifier. In this paper, our module uses LM358 for different circuit purposes. The chosen Op-amp has a low input bias current (45 nA), high input

(20)

impedance (1 GΩ) and a rail to rail power supply feature [17]. This electrical characteristic allows the sensor to work in our desired frequency range In our module, the Op amp is served in the signal amplifier circuit, offset controller circuit, and active low pass filter circuit. The LM358n package comes with two independent Op-amp thus we need to have at least two devices embedded in the module [18].

3.4 Pads logic and Pads layout

These are the two main PCB design software used in this projects. PADS Logics is an easy to use software that allow user to build schematics of a circuit. PADS Layout Is a linked software, is used to create the ready to print PCB layout from the PADS Logics schematics.

3.5 Particle Web IDE

Particle Device cloud is cloud service provided by the Particle, this cloud enables Particle device to communicate on-air securely and effortlessly. Each device has a specific RSA public-private key pairs to ensure that the cloud is communicated with the right device. The Particle cloud connection uses constrained application protocol; sessions are securely encrypted using DTLS over UDP or AES over TCP depend on the device.

The Particle Web IDE is a software development application running in web browser. It communicates with the device through Particle Device cloud and thus no direct port connection is needed.

In order to use Web IDE feature, initial setups are required. Firstly, user have to register a free account of the Particle cloud through mobile app or the main web IDE. The device then has to be initialized through that Particle App account in order to set up a default Wi-Fi connection and registered to the user account.

After the setup, the device has an ownership connection with the specific account.

(21)

User can create, compile and embedded application directly to the specific device, as long as it is connected to an internet available Wi-Fi. Particle Web IDE also has a strong supported community library hosted on GitHub that can simply include in any application.

3.6 Blynk

One of the feature of the system developed in this project is to transmit the jump count into a mobile application. After some research of available solutions, Blynk is chosen due to its efficiency, simplicity and low cost. Blynk is an Internet of Things platform that can establish communication between smartphone and hardware devices through its own server. There are three majors’ components in this platform:

 Blynk App is a mobile phone application that can help users to create their own user interfaces from the provided widgets.

 Blynk Server is a private, local server operated by Blynk. Hardware devices and smartphone apps are communicated through this server.

 Blynk Libraries are available in multiple device platforms, included Particle Web IDE. This library enables the hardware part to connect to the cloud and communicate with the Blynk App. The library required a key that is specific to each user, which helps the cloud to distinguish each device.

(22)

Figure 13. Three major components of Blynk flatform [19].

4 Physical implementation of the device

4.1 Jump Counter Device

The purpose of the project was to create a device that can be attached to a trampoline, and count the quantity of jump as well as indicate that amount to a smartphone when someone is jumping on the trampoline. The circuit is based on the application of the piezo electronic sensor. Even though the piezo electronic sensor generates a very low energy signal, it could potentially result in a high voltage swing. Therefore, a high impedance amplifier is a must, in order to draw significant current into it and convert the initial signal into a stable voltage signal.

Since the target of the device was to count the number of the human jumps, which is generally low frequency, a suitable low pass filter needs to be implemented.

And then offset control is needed to broaden the signal range and thus increase the resolution of the measurement.

4.2 Piezoelectric Sensor

First, let’s take a look at the frequency response of a typical piezo electronic sensor. Depend on the type of the piezoelectric sensor, the resonant frequency

(23)

can be varied. In most piezo electronic applications, the electronic device has to remove the resonance frequency, which can call spark and do harm to the device.

This can be done by implementing a suitable low pass filter. The measurement value of application falls into the low-frequency range, typically equal to nature human jump frequency, from observation, that is around 0.25Hz to 4 Hz.

Figure 14. Ideal frequency response of testing piezo electronic sensor before and after signal processing [20].

Based on preliminary observation of a trampoline when being used, it can be estimated that jumps on a trampoline have a high impact and low frequency.

Next, the device has to be small enough to not affect the functioning of the trampoline. To satisfy those conditions, a suitable piezo electronic sensor with a resonance frequency of 75Hz and size of 3.0 mm x 15.0 mm was chosen. One end of the film is attached to a metal ring that enables a free swing when there is an external impact. Another end of the film is attached firmly to a printed wired mini circuit board, which can be soldered to the application digital board. The resonance frequency is provided by the manufacture is approximately 75 Hz and thus in our purpose of measure the human jump. Figure 15 shows the picture of the sensor we use. The length of the film and mass of the swing ring is determined to generate a desired resonance frequency of 75Hz.

(24)

Figure 15. Chosen piezo electronic sensor for prototyping.

4.3 Design Architecture And Measurement Method

The device is comprised of two part: the physical module that process the raw signal into a smoother and easy to detect peak and the software is in charge of translating the analog signal into digital data, process that data to detect peak and then send the peak data to smartphone application. The overall architecture of the module is indicated in Figure 16.

Figure 16. Signal processing flow

(25)

Particle photon offer five 12-bit resolution ADC pins, and also the serial communication. In order to testify the working of each module, the output of each step is connected to pin A0 and then measurement is made. Photon will first convert the voltage signal to the 12-bit value correspond to the scale of 0-5V.

Then a code in implement to reverse that data back into voltage value. The convert equation is express as equation below.

𝑉𝑜𝑙𝑡𝑎𝑔𝑒 = 𝑑𝑎𝑡𝑎

4096∗ 5 [𝑉]

The voltage data will be sent to Arduino Serial Plotter app through a serial connection. The result is a real time graph of the output voltage. The graph can be analysed to assess the performance of each module.

4.4 Circuit designing

4.4.1 Raw Piezo Electronic Signal

Minisense 100 is directly connected to pin A0 of Photon. Then the signal is generated by finger tapping to the surface of the breadboard. This set up will give us a general observation of the working sensor. The breadboard setup and the result graph generated by tapping the surface is shown in Figure 17.

(26)

(a)

(b)

Figure 17. Directly connected setup (a) setup on breadboard (b) raw signal graph

4.4.2 Pre-Amplifier Module

The sensor signal will go through a non-inverting amplifier. Connecting a load directly to the sensor will form a high pass filter with the internal capacitance of the sensor. Since the MiniSense 100 behaves electrically as an active capacitor, As showing in Figure 12, the sensor has a high impedance of 650M at 1Hz.

Therefore, in order to collect the most of the charge output from the sensor, a high gain operational amplifier is ideal since its input is a virtual ground to the

(27)

sensor. The piezoelectric sensor is placed close to the high impedance amplifier, the possible capacitance effect of interface cable (Cc) between them is generally really low, typically less than 0.5pF for 5 mm mounted coper path. Because of that, the voltage mode configuration was chosen due to its simplicity. Resistor RBIAS provides a bias path for the input amplifier, this resistor is required to be as high as possible. From the datasheet of the piezoelectric, a measurement of QS is around 0.35 pC/G The set up, equivalent circuit and the graph of the processed signal can be seen from Figure 18.

(a)

(b)

(28)

(c)

Figure 18. Setup with pre-amplifier and equivalent circuit (a) Breadboard setup (b) equivalent circuit (c) processed signal

4.4.3 Sallen-Key low pass filter

Since the use of LM358 as high impedance amplifier, a recommended value of bias resistor of 10M Ohm is used [18]. The amplifier uses 5V rail to rail power, thus the output will swing between 0V to 5V. After going through a high impedance amplifier, the signal needs to filter out all of the unnecessary high frequency. Second-order Sallen-Key low pass filter was chosen because of its stable and high slew rate. The value of the capacitor needs to be small but not too much to avoid build-up high voltage differences that can disturb the signal.

Therefore, an 8.2 nF capacitance was chosen and then we can calculate resistor value through equation (4), with fc=15Hz.

𝑓𝑐 = 1

2𝜋√𝑅1𝑅2𝐶1𝐶2 (4)

(29)

Figure 19. Sallen-Key low pass filter

The combination circuit with two modules: the pre-amplifier and the Sallen-key low pass filter is set up on breadboard and the output signal is collected and graph. The set up and the graph of the processed signal can be found in Figure 20.

(30)

(a)

(b)

Figure 20. Pre amplifier with low pass filter combination (a) the set up (b) the graph of the processed signal

4.4.4 Offset control and final gain

The filtered signal will go through an offset control circuit; the purpose was to adjust the minimum value of the signal to the desired stage of 0 [V]. This will enable the output signal to swing in the range of 0V – 5V. After that, a final gain step is implemented to amplify the signal to a suitable and readable range. After a few tests of the impact, a gain of 20 dB was chosen. The final circuit and output signal result are shown in Figure 21.

(31)

(a)

(b)

(c)

Figure 21. Offset control and final gain circuit (a) the bread board set up (b) equivalent circuit of the offset and final gain circuit only (c) the signal after processed through three module.

(32)

4.5 Software Implementation

The system developed in this project uses Photon as a micro-controller unit to serve as an analog to digital converter as well as a wireless communication module. The filtered signal is connected to one analog pin A0 of the Photon. The ADC module of Photon receives the filtered signal in a range of 0V - 5V and converts it to a 12-bit digital signal with a sampling frequency of 100Hz. A program embedded in Photon also implements a Pulse peak detector algorithm to detect jumps in real-time. The software is built from Particle Web IDE.

And then the jump count data will be transmitted through wireless connection to a Blynk app on a mobile phone and indicate the jump in real-time. In order to use the Blynk app, the library of Blynk need to be included in the project. After the registration, each device is assigned with an authentication keys. By implement that key into the project source code, the Blynk cloud could be able to let the software to communicate with the right device. The implement code can be seen below:

#include <blynk.h> #include library

char auth[] = "Aw7kXSv1glByw-AROxoQwcWnOII9i-rC"; #authentication key

Blynk.begin(auth); #first time set up

Blynk.run(); #inside loop run

The jump count data is send to the Blynk app through a virtual port V1, that can be done directly inside loop. A reset button and also sensitive adjust is add to the blynk application, the user can use that to reset the jump count and adjust the sensitivity of the pulse peak detection algorithm. The code of sending and receiving of the Blynk can be seen below:

(33)

BLYNK_WRITE(V0){ // This function gets called when sensity value is adjust in the app

sensity = param.asInt();

}

Blynk.virtualWrite(V1,jumpcount); #assign the jump count to virtual port V1

4.6 Pulse Peak Detection

Each jump on the trampoline always results in an abnormal high impact force on the surface. In real-time measuring, each jump is represented by a peak. The purpose of the pulse peak detection algorithm is to detect those peaks which a specific delay that matches the human jump frequency. The algorithm considers a signal value as a valid peak if and only if it could satisfy three conditions:

 That signal value is higher than a number of standard deviations away from some moving average value.

 That signal value is higher than both the previous value and the next value.

 That signal is not within 300ms after and before another valid peak.

In real-time measurement, the algorithm takes 10 latest consecutive signals to compute the standard deviation and average value. The threshold is updated as the sum of average value and a factor multiply of standard deviation. That factor is a fixed value, indicates the signal power difference between human-made impact and when human is in air. After multiple testing of the device with multiple jump scenarios, a factor of 3.5 was chosen.

When the new signal vale is inserted into the set, the algorithm will recalculate the mean, standard deviation, and threshold. However, after a valid peak is detected, if that peak signal value is also inserted into the set, the new standard deviation and mean can be significantly higher which will result in a much higher threshold. This could potentially cause a situation when the new valid peak is smaller than the abnormal high threshold. Therefore, whenever a valid peak is detected, the signal value is multiplied by an influencing factor, to reduce the effect of that peak to the mean value. In testing with the real jumps, a peak signal

(34)

has a value that is roughly three times higher than the mean, thus a suitable influence of 0.33 was chosen.

When a new signal is read, the previous signal will be tested with the algorithm process. After every valid peak is detected, a simple timer is implemented to eliminate all other peaks which occur within 300ms. The pseudo code for the algorithm is shown from the appendix 5.

Figure 22. Pulse peak algorithm diagram

(35)

5 Testing

After building the working prototype, a premier test is carried out to evaluate the actual work. A small gym trampoline with a diameter of roughly 1 meter is used to test. The device is attached to the reel of the trampoline and real-time data is collected through a serial connection to the PC. The jump is arranged as naturally as possible and in different poses for a non-stop jump of 10 seconds. The test carries out three times with different people of different weights. The number of jump and timing is simply counted visually since the speed is slow and quite obvious to observe. Figure 23 shown the implemented prototype and testing setting with a one-person trampoline.

Figure 23. Prototype with the size of 3cm x 6cm

A sample result is shown in Figure 24, data is collected at 100Hz, the window size is 500 samples, resulting in 5 seconds of data. The algorithm detected for peaks at the given time result a correct number of jumps in testing.

(36)

Figure 24. Testing result sample

The purple line indicates the real time signal collected from the hardware part.

The red line shown the detected jump.

(37)

6 Limitation and future possibilities

The algorithm of peak detecting has some limitations. The use of a simple timer delay mechanism is to avoid detecting multiple peaks in a short duration.

However, this delay lowers the operation frequency of the device. The device is unable to correctly detect jump in some circumstances e.g. small jump, resonance of the trampoline. The jump detection would be improved by using a neural network algorithm.

The low-frequency operation of the current device is suitable for multiple applications. The new signal processing algorithm can be embedded into the software in order to detect the graph's different features in different uses. For example, the device can be used to detected washing machine load imbalance;

tracking vehicle motion.

Modification of the filter circuit would enable the working in different scenarios. A biomedical device could potentially be developed by improving the circuit size and filter properties. For example, increasing the final gain would enable the device to sense tiny signals of the blood pulse or heart rate. Implementation of SMDs would significantly reduce the size, would also help develop a comfortable in-ear or wrist band device.

(38)

7 Conclusion

The goal of this project was to design a piezo electronic sensor device that can count the number of jumps on a trampoline. In order to achieve the goal, deep research of the related sensor has been conducted and a proposed working circuit is implemented. To conclude the goal, the device needs to correctly detect the jump based on the signal received from the hardware circuit.

There are various difficulties during the project, mainly in designing a working circuit and calibrating the suitable components' value. As a result of this project, a prototype of the system was developed and tested to function as specified.

However, there is still a variety of aspects of the device that needs an improvement. The detection is not perfect and thus requires a better algorithm, the device has a limited working frequency. In the end, the testing on the gym trampoline provided very promising results, thus the prime goal was partially achieved.

(39)

References

1 Aiguo Song; Yezhen Han; Haihua Hu; Jianqing Li, 2014. IEEE

Transactions on Instrumentation and Measurement. A Novel Texture Sensor for Fabric Texture Measurement and Classification, 63(7), pp.

1739 - 1747.

2 Azoderimo, 2019. Piezo Film Sensor, Vibration, LDT Series. [Online]

Available at:

https://www.azoderimo.com/index.php?main_page=product_info&produc ts_id=156240

[Accessed 9 8 2021].

3 Bartolome, E., 2010. Signal conditioning for piezoelectric sensors, Texas:

Texas Instruments Incorporated.

4 Blynk, 2020. How Blynk Works. [Online]

Available at: https://docs.blynk.cc/

[Accessed 9 8 2021].

5 Blynk, n.d. Intro How Blynk Works. [Online]

Available at: https://docs.blynk.cc/

[Accessed 28 5 2021].

6 Electrokit, 2017. Vibration sensor piezo right-angle. [Online]

Available at: https://www.electrokit.com/en/product/vibration-sensor- piezo-right-angle/

7 GH, H., 1991. Buchanan RC Piezoelectric and electro-optic ceramics in ceramic materials for electronics 2nd edition. New York: Marcel Dekker.

(40)

8 Instruments, T., 2014. Datasheet for LMx58-N Low-Power, Dual- Operational Amplifiers. Texas: Texas Instruments.

9 Instruments, T., 2021. LM358 Dual standard operational amplifier.

[Online]

Available at: https://www.ti.com/product/LM358

10 Jaffe B, Jaffe H, Cook WR, 1971. Piezoelectric ceramics 1st Ed..

London: Academic Press.

11 Karki, J., 2000. Voltage Mode Amplifier. In: Signal Conditioning Piezoelectric Sensors. s.l.:s.n., p. 2.

12 Kawai, H., 1969. The Piezoelectricity of Poly (vinylidene Fluoride).

Japanese Journal of Applied Physics, Volume 8, p. 975.

13 Liu, Huicong; Zhong, Junwen; Lee, Chengkuo; Lee, Seung-Wuk; Lin, Liwei, 2018. A comprehensive review on piezoelectric energy harvesting technology: Materials, mechanisms, and applications. s.l.:Applied

Physics Reviews.

14 M. G. Broadhurst, G. T. Davis, 1980. Electrets. Berlin: Springer-Verlag.

15 Mohammadi B., Yousefi A.A., Bellah S.M, 2007. Effect of tensile strain rate and elongation on crystalline structure and piezoelectric properties of PVDF thin films. In: Polymer testing. s.l.:s.n., pp. 42-50.

16 One, S., 2016. DAC series piezoelectric pressure sensors. [Online]

Available at: https://www.sensorsone.com/dac-series-piezoelectric- pressure-sensors/

[Accessed 9 8 2021].

(41)

17 PARTICLE, 2019. PARTICLE PHOTON: WI-FI. [Online]

Available at: https://docs.particle.io/photon/

[Accessed 28 5 2021].

18 Ping Yu , Weiting Liu , Chunxin Gu , Xiaoying Cheng , Xin Fu , 2016.

Flexible Piezoelectric Tactile Sensor Array for Dynamic Three-Axis Force Measurement. Sensors , 16(6), p. 819.

19 R.S. Dahiya, M. Valle, 2013. Fundamentals of Piezoelectricity. In:

Robotic Tactile Sensing. s.l.:s.n., pp. 199-200.

20 Robert Littrell, Ronald Gagnon, n.d. Frequency response of a piezoelectric MEMS. In: PIEZOELECTRIC MEMS MICROPHONE NOISE SOURCES. s.l.:s.n., p. 260.

21 Salimi, A., & Yousefi, A. A., 2003. Analysis method: FTIR studies of β- phase crystal formation in stretched PVDF films. In: Polymer

international. s.l.:s.n., pp. 699-704.

22 Specialties, M., 2019. Datasheet for MiniSense 100 Vibration Sensor.

s.l.:Measurement Specialties.

(42)

List of Figure

Figure 1. Piezo electronic effect explained (a) At rest turbed molecule (b) Material under external force (c) Polarization effects under external force (d) Neutralized

current induce by the external force (R.S. Dahiya, M. Valle, 2013) ... 3

Figure 2. Common commercial piezo electronic sensors (a) Buzzer and transducer ceramic type (b) Pressure sensor using piezo electronic crystal (One, 2016) (c) Polymeric type (Azoderimo, 2019). ... 4

Figure 3. Structure formula of CH2CF2 ... 5

Figure 4. Structure conformation of PVDF (a) α-phase (b) β- phase (c) γ-phase (GH, 1991) ... 6

Figure 5. Direction of PVDF film sensor (Specialties, 2019) ... 7

Figure 6. Charge mode configuration (Karki, 2000) ... 9

Figure 7. Voltage mode configuration (Karki, 2000) ... 10

Figure 8. Minisense100 bending due to the vibration (Specialties, 2019) ... 11

Figure 9. Off axis response of the sensor (a) Off axis direction (b) cosine low relation of the off-axis rotation and sensitivity (Specialties, 2019). ... 12

Figure 10. Frequency response and linearity of Minisense 100 (Specialties, 2019) ... 13

Figure 11. PVDF sensor model in series with load resistor R ... 13

Figure 12. Relation between load impedance and the lower limit of working frequency (Specialties, 2019) ... 14

Figure 13. Three major components of Blynk flatform (Blynk, 2020). ... 17

Figure 14. Ideal frequency response of testing piezo electronic sensor before and after signal processing (Robert Littrell, Ronald Gagnon, n.d.) ... 18

Figure 15. Chosen piezo electronic sensor for prototyping. ... 19

Figure 16. Signal processing flow ... 19

Figure 17. Directly connected setup (a) setup on breadboard (b) raw signal graph ... 21

Figure 18. Setup with pre-amplifier and equivalent circuit (a) Breadboard setup (b) equivalent circuit (c) processed signal ... 23

Figure 19. Sallen-Key low pass filter ... 24

(43)

Figure 20. Pre amplifier with low pass filter combination (a) the set up (b) the

graph of the processed signal ... 25

Figure 21. Offset control and final gain circuit (a) the bread board set up (b) equivalent circuit of the offset and final gain circuit only (c) the signal after processed through three module. ... 26

Figure 22. Pulse peak algorithm diagram ... 29

Figure 23. Prototype with the size of 3cm x 6cm ... 30

Figure 24. Testing result sample ... 31

(44)

Main code

#include <blynk.h>

#define BLYNK_PRINT Serial

#include <blynk.h>

#include <math.h>

char auth[] = "Aw7kXSv1glByw-AROxoQwcWnOII9i-rC";

int led = D7;

int timer = 0;

int analogPin = A0;

float past_value=0;

float curr_value = 0;

float next_value = 0;

int data_length = 10;

float data_list[10];

float curr_mean = 0;

float curr_std = 0;

float threshold = 0;

float influence = 0.75;

int sensity = 100;

int delayms = 200; //appriximate 600ms int jumpcount = 0;

float mean(float data[], int len); //calculate the average value of most recent 10 samples data

float mean(float data[], int len){

float sum = 0.0, mean = 0.0;

int i;

for(i=0; i<len; ++i) { sum += data[i];

}

mean = sum/len;

return mean;

}

float stdd(float data[],float mean, int len); //calculate the standard deviation value of working data series

float stdd(float data[],float mean, int len){

float standardDeviation = 0.0;

int i;

for(i=0; i<len; ++i) {

standardDeviation += pow(data[i] - mean, 2);

}

return sqrt(standardDeviation/len);

}

void insert(float data[], float value, int len); //insert new data to the working data series

void insert(float data[], float value, int len){

int i;

for(i=0;i<len-1;i++){

data[i]=data[i+1];

}

data[len-1]=value;

}

int ispeak(float past_point, float current_point, float next_point, float threshold); //check if this is peak

(45)

int ispeak(float past_point, float current_point, float next_point, float threshold)

{ if

((current_point>=past_point)&&(current_point>=next_point)&&(current_point>thre shold)){

return 1;

} else

return 0;

}

BLYNK_WRITE(V0){ // This function gets called when sensity value is adjust in the app

sensity = param.asInt();

}

void setup() {

Serial.begin(9600);

Blynk.begin(auth);

//initialize the first 10 sample signal int i;

for(i=0;i<data_length;i++){

data_list[i] = analogRead(A0); //read from pin A0 }

past_value = data_list[data_length-2];

curr_value = data_list[data_length-1];

curr_mean = mean(data_list,data_length);

curr_std = stdd(data_list,curr_mean,data_length);

//led signal indicates finish setup pinMode(led, OUTPUT);

digitalWrite(led, HIGH);

delay(1000);

digitalWrite(led, LOW);

delay(1000);

}

void loop() {

next_value = analogRead(A0); //read from pin A0

//printout serial data

Serial.print(next_value/4095*5);

Serial.print(",");

Serial.print(threshold/4095*5);

Serial.print(",");

Serial.print(delayms/4095*5);

Serial.print(",");

threshold = curr_mean + curr_std+sensity;

if (ispeak(past_value,curr_value,next_value,threshold)==1){

if(timer == 0){

jumpcount++;

Blynk.virtualWrite(V1,jumpcount);

timer =1;

}

curr_value = curr_value * influence;

}

if (timer == 1){

(46)

Serial.println(1);

timer++;

}

else if ((timer>1)&&(timer<delayms)){

Serial.println(-1);

timer ++;

}

else if (timer == delayms){

Serial.println(-1);

timer = 0;

} else

Serial.println(-1);

insert(data_list,next_value,data_length);

curr_mean = mean(data_list,data_length);

curr_std = stdd(data_list,curr_mean,data_length);

past_value = curr_value;

curr_value = next_value;

delay(1);

if(digitalRead(D7)==HIGH){

jumpcount = 0;

Blynk.virtualWrite(V1,jumpcount);

}

Blynk.run();

}

(47)

Schematic of the circuit

(48)

PCB layout of the circuit

Viittaukset

LIITTYVÄT TIEDOSTOT

to develop a PVDF sensor prototype to measure the normal and shear stress components of the applied pressure,.. to implement a PVDF sensor with printed electrodes for normal and

Vuonna 1996 oli ONTIKAan kirjautunut Jyväskylässä sekä Jyväskylän maalaiskunnassa yhteensä 40 rakennuspaloa, joihin oli osallistunut 151 palo- ja pelastustoimen operatii-

In theory, we have defined the dot chart system coordinates as Figure 4.1a, the pinhole camera geometric model that the image plane on the sensor, sensor center is aligned with

Thus, in the measurement of the sensor sensitivity, the electrodes were located on the top and the bottom of the sensor material and the film was excited with

Fig. 7 shows the sensor sensitivity as a function of temperature. Again, similar markings are used as in Fig. The changes in sensor sensitivities due to the changing

In this measurement, two sensors (labeled as Sensor A and Sensor B in Table 2) with different resonance frequencies were used to study the impact of the operation frequency on

As for linear configuration model, the difference of backscattered power between the reference tag and sensor tag (∆P) was proportional to the sensor elongation, which

the aid of the obtained response, the current signal from the sensor can be converted to a number or mass concentration value, if the flow velocity and properties of the