# Systematic Development of a Wireless Sensor Network for Piezo-Based Sensing

Authors: Jian Chen; Peng Li; Gangbing Song; Yu Tan; Yongjun Zheng; Yu Han
Journal: Journal of Sensors
 (2018)

---

## Abstract

A low-power wireless sensor/actuator network was specially developed and optimized for piezoceramic transducer-based active sensing applications. Wireless sensor network promises increased system flexibility, lower system cost, and increased robustness through decentralization. Piezoceramic signal conditioning circuit, actuating circuit, power management, and wireless microcontroller were integrated in the hardware design. IEEE 802.15.4 wireless stack protocol was implemented on the hardware, and user input/output management together with a shell provided easier debugging and configuring interface. The designed system provides a low-power wireless solution towards many applications such as wireless structural health monitoring and wireless structural vibration control.


---

## Body

## 1. Introduction

During the last two decades, a large amount of research work has focused on the wireless sensor networks (WSNs) and its potential application due to the increased flexibility and lower costs they promise to provide compared with wired installations [1–3]. Among them, many efforts have been made on the design and development of wireless sensor network platforms. The design of a WSN is highly system oriented. The physical and logical structure of the system together with other environmental requirements constrains the design of the wireless network and the wireless sensor devices [4]. The diverse constraints from different applications make it necessary to have a platform-based development approach where much of the components can be reused.On the hardware side, many companies and universities have proposed their WSN platforms. From the power consumption and system performance point of view, current sensor network platforms fall into one of the two main categories: low-power consumption, application-specific platforms and high-power consumption, full-featured high-performance platforms. The former generally consists of a power-efficient microprocessor and a few application-specific resources, while the latter generally has a general purpose processor and a full complement of resources available via a general-purpose input/output (GPIO) interface [5]. The best known low-power system is the open-source hardware platform, the MICA series [6], designed by UC Berkeley [7] and manufactured by Crossbow [8]. MICA combined sensing, communication, and computing into a complete architecture, while consuming only a fraction of a watt of power. In the MICA platform, Atmel’s eight-bit AVR microprocessor [9] was used as the central processing unit, and Texas Instrument’s 2.4 GHz wireless transceiver [10, 11] was used as the wireless component. Different extension sensor boards can be connected to the MICA platform to realize the sensing of light, temperature, acceleration, or acoustic. Another popular sensor node developed also by UC Berkeley is the Telos. Telos used TI’s 16-bit microcontroller MPS430 as a CPU and TI’s CC2420 radio for wireless communication. Compared with Mica series, Telos boasts better performance on both power consumption and computation capacity [12].On the high-performance side, Yale University designed the XYZ platform with an ARM7TDMI CPU and the TI CC2420 wireless transceiver [13]. The ARM core processor provided much larger RAM and much higher system performance; however, the power consumption was also greater. Another well-known platform is the Imote2 platform from Intel [14]. With the XScale PXA271 processor, Imote2 can run up to several hundred MHz and can afford complex processing algorithms. However, the power consumption was too much in a high-speed mode that it was not suitable for long-term battery-powered monitoring applications. There are some similar hardware platforms from several different companies: Ember Inc. [15], Dust Inc. [16], and Sentilla [17, 18], to name a few. Sandia National Lab proposed a modular platform, the MASS [5]. Instead of the traditional architecture where the resources are controlled by a single microcontroller, each board of MASS had its own specific processing unit. Communication between the modules was handled by the Inter-Integrated Circuit (I2C) bus. This design technique was very modular for both software and hardware and is a simple architecture for lab experiments. However, the induced complexities from the multiple processing units impose a large amount of coding overhead for a simple sensor node, which makes it unfeasible for real application.It should be noted that the above short review is just partial and does not include all available solutions. Although many WSN platforms have been produced, most platforms target general purpose applications and are not optimized for specific applications. There is not much work on a WSN platform optimized for a piezoceramic-based sensor network. Piezo-based active sensing WSN has special requirements, such as relatively high sampling rate (at a few thousand Hz), incorporation of an amplifier for the piezoceramic element for actuation, and low energy consumption to realize active sensing. Moreover, a low-power cost design is needed for the battery-based WSN. In this paper, a wireless network was specially designed and optimized for piezoceramic transducers, and a platform was used to realize impact detection, active sensing for structural health monitoring (SHM) [2] and wireless structural vibration control [3].


## 2. Hardware Design

Designs of the wireless coordinator and the wireless sensor were presented for piezo-based wireless sensing. The functions of the wireless coordinator include building and managing the wireless network, controlling the performance of all the wireless sensor nodes, realizing the routing of the information, and transferring data from WSN to the wired station. The wireless sensor is used to measure the impacts, record the vibration, perform data acquisition, and transfer the data to a wireless coordinator.The wireless coordinator is composed of four parts: the sensing unit, the actuation unit, the wireless microcontroller, and the power management module. The wireless sensor nodes have a similar structure as the wireless coordinator, except for the simplified power management module and the elimination of the actuation unit to reduce the power consumption. Figure1 illustrates the architecture of the wireless sensor nodes (Figure 1(a)) and wireless coordinator (Figure 1(b)). Details of the wireless sensing unit and wireless coordinator will be presented in the following subsections.Figure 1
Architecture of wireless sensor and wireless coordinator.
(a)
Wireless sensor
(b)
Wireless coordinator


### 2.1. Sensing Unit

The sensing unit is comprised of two parts: the impact detection circuit and the signal conditioning circuit. The principle behind piezomaterial-based sensing is piezoelectricity, where electrical charges are generated from the force exerted on the piezoelectric sensor. The function of the sensing unit is to sense and regulate the charge signal to an appropriate voltage signal which can be sampled by the analogue to digital (ADC) converter in the microcontroller system. The piezoelectric sensing circuit is different from ordinary signal conditioning circuits as the piezoelectric sensor is a capacitive load and has a large output resistance. A low-power piezo-sensing unit has specially been designed for the piezomaterial-based wireless sensor network.


#### 2.1.1. Signal Conditioning Circuit

The amplitude of the charge and therefore the current generated by piezoelectric sensor are proportional to the magnitude of the vibration on it. The piezoelectric sensor is often used to measure dynamic signals, such as vibrations; therefore, this design does not require the circuit to hold the charge and the charge leakage will not be an issue. There are several ways to measure the charge signal. One common method is to use the integration circuit to convert charge into current and then to a voltage signal. This method can solve the problem of the high-impedance feature of a piezoelectric sensor. However, it causes another major problem, namely, the saturation of the decoupling capacitor in the circuit. This requires the circuit parameters to be tuned for a certain range of inputs. If the amount of charge has dramatic changes, such as in our case, it is not suitable to use the integration circuit. To optimize the signal conditioning for PZT, the method of using a large resistor to transform the charge signal to the voltage signal is adopted in this design. Although the impedance of the piezoelectric sensor is large, it does not affect the charge converted to voltage on the large resistor. And with a proper selection of an op-amp, this circuit works much better than the integration circuit. The tradeoff in this design is that a high-value resistor could produce a larger signal and small noises can be easily amplified through high-value resistors. Experimental results show that a 1 M resistor is the best choice for usage.In Figure2, J4 is the connector to the piezoceramic transducer, and C12 (the negative capacitor is included in the charge pump circuit) eliminates the DC value from the PZT while the 1 M ohm resistor R10 converts the charge signal to a voltage signal. Resistor R2 is an optional resistor which can be tuned to match different load requirements. Op-amp UO1A is employed to amplify the voltage with its gain adjustable by resister RA1. The gain of this stage can be represented as
(1)Gain=R11+RA1R11.Figure 2
First-stage amplifying circuit.The signal generated by the piezoceramic material is bipolar; however, the ADC on the microcontroller is singularly polar. The first-stage op-amp only scaled the signal into a proper range, and an additional op-amp is needed to add offset to the signal. Figure3 shows the offset circuit.Figure 3
Offset amplifying circuit.This circuit further amplifies the input signal and adds a 1.25 volts offset to the output, so the output can be a range from 0 to 2.5 volts. The input-output relation can be represented as(2)V2=1+R13R12−R13R12V1=1.25−R13R12V1.The last part of the signal conditioning circuit is a sallen-key low pass filter for the anti-aliasing purpose required by ADC sampling, as shown in Figure4. The default sampling speed is 250 Hz, and the R5 is an adjustable resistor. The cutoff frequency is represented by
(3)fc=12πR5R6C5C6≈500Hz,when R5 is 10 K. The larger the value of R5, the lower the cutoff frequency is. SHDN (shutdown) is a power down control logic input that provides a way to shut the circuit down when not in use. The antialiasing low pass filter is very important in digital signal processing since the frequency above the Nyquist frequency is folded back into the low-frequency range. High-frequency noise is commonly seen in the microcontroller system due to the high speed switching happening in the digital circuit. These frequencies are mostly blocked by the antialiasing. The antialiasing filter used before the ADC sampler will attenuate the high frequencies larger than the Nyquist frequency and keeps the aliasing devices from being sampled.Figure 4
Sallen-key low pass filter.


#### 2.1.2. Impact Detection Circuit

The purpose of the impact detection circuit is to sense the impact on the piezoelectric sensor and generate an interrupt signal to the microcontroller to inform the impact event. This feature can be very useful for low-power battery-based monitoring systems, where the interruption is used as a wake-up signal for the microcontroller. The threshold of the impact is configurable in the signal conditioning circuit by changing the resistance of the op-amp circuit. Figure5 shows the impact detection circuit.Figure 5
Impact detection circuit.The impact detection circuit takes the output from the first-stage amplifier, and the RC circuit and the diode are mainly peak detectors.


### 2.2. Actuation Unit

The piezoceramic material will generate an electric charge when it is subjected to a stress or strain (the direct piezoelectric effect); the piezoceramic material will also mechanically stress or strain when an electric field is applied to the piezoelectric material in its poled direction (the converse piezoelectric effect). The piezoelectricity property of piezoelectric material enables the active sensing ability, which allows a piezoelectric material to act as either a sensor or an actuator for structural health monitoring purposes, reducing the number of transducers and the system complexity. Thus, the actuation unit is used to generate an actuation signal for control and excitations. For example, in the structural health monitoring applications, a swept sine signal produced by the actuation unit can be used as the excitation source owing to the active sensing property and generates vibration waves to propagate inside a structure. The health state is evaluated from the vibration response.A lower power MAX504 is utilized. The 10-bit digital to analog converter Max504 is powered by a single +5 volts; thus, the digital logic one on the SPI bus is also 5 volts. However, the microcontroller operates in the 3.3-volt range. Therefore, a 22-ohm serial resistor is put on the SPI bus to protect the microcontroller from being damaged. Figure6 illustrates the DAC circuit.Figure 6
DAC circuit.The output range can be configured to be 0 to 2.048 volts or 0 to 4.096 volts. The range of 0 to 2.048 volts is used in the design, and it can work with another amplifying circuit to adjust the voltage to −10 to +10 volts. The output from the DAC is discrete, inducing high-frequency signal. A low-pass filter is employed to eliminate these high frequencies generated by the DAC changes. Figure7 shows the amplifying and the low pass filter circuit. Utilizing the 2.048-volt voltage reference Vref from MAX504, op-amp U03A changes the actuation signal from a single polar (0- to 2.048-volt range) to a bipolar (−2.048- to +2.048-volt range). The input-output relationship is shown in
(4)Vda=2Vout−Vref.Figure 7
DAC amplifying and filtering circuit.The op-amp U03B is used to amplifyVda five times, so that it reaches the −10- to 10-volt range. The low pass filter U02B is a sallen-key low pass filter, which is the same as the antialiasing filter in the sensing unit.


### 2.3. Power Management Unit

A power management unit directly determines performances of power saving. The WSN targeting piezo-based application needs dual voltage supplies to complete the sensing and actuating tasks. Several voltage regulators are used to adjust the battery voltage to ideal values. During voltage conversion, an efficient circuit is able to optimize the power efficiency to a maximum level.Figure8 illustrates the optimized power management units of the wireless coordinator (left) and the wireless sensor (right). And Figure 9 shows the circuit design of the power system.Figure 8
Power system design for the wireless coordinator and sensor.Figure 9
Power system circuit design.The 78XXSR is the switching power supply that regulates 9Volts to 5Volts for DAC, U2 is the charge pump that generates the negative power supply, and U3 is the LDO (Low-dropout regulator) that provides clean power supply to the MCU (Microcontroller Unit).


### 2.4. Wireless Microcontroller

The wireless coordinator is the key device of the whole system. Figure10 shows the system block diagram of the JN5139 microcontroller. The microcontroller consists of four parts: the RISC CPU core with memory, different on-chip peripherals, 2.4 GHz radio components, and the power management.Figure 10
System block diagram for JN5139.The piezoceramic-based active sensing WSN differs from other WSNs in that a higher sampling rate, computational power, and lower power cost are needed. The JN5139 microcontroller is a good solution. The JN5139 component can work at 32 MHz and transfer 32 MIPS. In order to substantially increase the battery life, three working modes operated by the JN5139 guarantee that the power cost of the whole system is constrained.


### 2.5. Fabricated Hardware System

Photos of the wireless coordinator are shown in Figures11 and 12. Figure 11 offers a top view, while Figure 12 provides a bottom view. Note that the DAC, the microcontroller, and part of the power management are placed on the top of the PCB, while the MCU peripheral, the BNC connector, and the rest of the power management are placed on the bottom. The universal asynchronous receiver/transmitter (UART) connector is placed on the side of the PCB.Figure 11
Photo of the hardware PCB (front view).Figure 12
Photo of the hardware PCB (rear view).Figure13 shows the performance comparison between Crossbow Imote2, MICA, Telos, and the designed Jennic WSN system. Although the Imote2 provides a much higher speed and more resources, both the price and the power consumption are higher, which disqualify it in large-scale SHM applications. The MICA has relatively low power consumption and a lower cost; however, the limited RAM size and low speed make it impossible to meet the high sampling rate requirement from the PZT-based applications. Although Telos has a higher speed, the limited RAM size is an issue. The designed Jennic WSN platform provides specially designed piezo signal conditioning circuit and low power actuating DAC circuit. In addition, the power management unit provides a high efficient bipolar power supply that is needed in piezo-based sensing. It can be seen that compared with other commercially available WSN platforms, the designed Jennic WSN system is optimized for piezoceramic transducer-based applications because it provides a relatively high sampling frequency, low power consumption, large RAM for data storage, and abundant on-chip resources.Figure 13
Comparison of Crossbow Imote2, MICA, and the designed Jennic system.


## 2.1. Sensing Unit

The sensing unit is comprised of two parts: the impact detection circuit and the signal conditioning circuit. The principle behind piezomaterial-based sensing is piezoelectricity, where electrical charges are generated from the force exerted on the piezoelectric sensor. The function of the sensing unit is to sense and regulate the charge signal to an appropriate voltage signal which can be sampled by the analogue to digital (ADC) converter in the microcontroller system. The piezoelectric sensing circuit is different from ordinary signal conditioning circuits as the piezoelectric sensor is a capacitive load and has a large output resistance. A low-power piezo-sensing unit has specially been designed for the piezomaterial-based wireless sensor network.


### 2.1.1. Signal Conditioning Circuit

The amplitude of the charge and therefore the current generated by piezoelectric sensor are proportional to the magnitude of the vibration on it. The piezoelectric sensor is often used to measure dynamic signals, such as vibrations; therefore, this design does not require the circuit to hold the charge and the charge leakage will not be an issue. There are several ways to measure the charge signal. One common method is to use the integration circuit to convert charge into current and then to a voltage signal. This method can solve the problem of the high-impedance feature of a piezoelectric sensor. However, it causes another major problem, namely, the saturation of the decoupling capacitor in the circuit. This requires the circuit parameters to be tuned for a certain range of inputs. If the amount of charge has dramatic changes, such as in our case, it is not suitable to use the integration circuit. To optimize the signal conditioning for PZT, the method of using a large resistor to transform the charge signal to the voltage signal is adopted in this design. Although the impedance of the piezoelectric sensor is large, it does not affect the charge converted to voltage on the large resistor. And with a proper selection of an op-amp, this circuit works much better than the integration circuit. The tradeoff in this design is that a high-value resistor could produce a larger signal and small noises can be easily amplified through high-value resistors. Experimental results show that a 1 M resistor is the best choice for usage.In Figure2, J4 is the connector to the piezoceramic transducer, and C12 (the negative capacitor is included in the charge pump circuit) eliminates the DC value from the PZT while the 1 M ohm resistor R10 converts the charge signal to a voltage signal. Resistor R2 is an optional resistor which can be tuned to match different load requirements. Op-amp UO1A is employed to amplify the voltage with its gain adjustable by resister RA1. The gain of this stage can be represented as
(1)Gain=R11+RA1R11.Figure 2
First-stage amplifying circuit.The signal generated by the piezoceramic material is bipolar; however, the ADC on the microcontroller is singularly polar. The first-stage op-amp only scaled the signal into a proper range, and an additional op-amp is needed to add offset to the signal. Figure3 shows the offset circuit.Figure 3
Offset amplifying circuit.This circuit further amplifies the input signal and adds a 1.25 volts offset to the output, so the output can be a range from 0 to 2.5 volts. The input-output relation can be represented as(2)V2=1+R13R12−R13R12V1=1.25−R13R12V1.The last part of the signal conditioning circuit is a sallen-key low pass filter for the anti-aliasing purpose required by ADC sampling, as shown in Figure4. The default sampling speed is 250 Hz, and the R5 is an adjustable resistor. The cutoff frequency is represented by
(3)fc=12πR5R6C5C6≈500Hz,when R5 is 10 K. The larger the value of R5, the lower the cutoff frequency is. SHDN (shutdown) is a power down control logic input that provides a way to shut the circuit down when not in use. The antialiasing low pass filter is very important in digital signal processing since the frequency above the Nyquist frequency is folded back into the low-frequency range. High-frequency noise is commonly seen in the microcontroller system due to the high speed switching happening in the digital circuit. These frequencies are mostly blocked by the antialiasing. The antialiasing filter used before the ADC sampler will attenuate the high frequencies larger than the Nyquist frequency and keeps the aliasing devices from being sampled.Figure 4
Sallen-key low pass filter.


### 2.1.2. Impact Detection Circuit

The purpose of the impact detection circuit is to sense the impact on the piezoelectric sensor and generate an interrupt signal to the microcontroller to inform the impact event. This feature can be very useful for low-power battery-based monitoring systems, where the interruption is used as a wake-up signal for the microcontroller. The threshold of the impact is configurable in the signal conditioning circuit by changing the resistance of the op-amp circuit. Figure5 shows the impact detection circuit.Figure 5
Impact detection circuit.The impact detection circuit takes the output from the first-stage amplifier, and the RC circuit and the diode are mainly peak detectors.


## 2.1.1. Signal Conditioning Circuit

The amplitude of the charge and therefore the current generated by piezoelectric sensor are proportional to the magnitude of the vibration on it. The piezoelectric sensor is often used to measure dynamic signals, such as vibrations; therefore, this design does not require the circuit to hold the charge and the charge leakage will not be an issue. There are several ways to measure the charge signal. One common method is to use the integration circuit to convert charge into current and then to a voltage signal. This method can solve the problem of the high-impedance feature of a piezoelectric sensor. However, it causes another major problem, namely, the saturation of the decoupling capacitor in the circuit. This requires the circuit parameters to be tuned for a certain range of inputs. If the amount of charge has dramatic changes, such as in our case, it is not suitable to use the integration circuit. To optimize the signal conditioning for PZT, the method of using a large resistor to transform the charge signal to the voltage signal is adopted in this design. Although the impedance of the piezoelectric sensor is large, it does not affect the charge converted to voltage on the large resistor. And with a proper selection of an op-amp, this circuit works much better than the integration circuit. The tradeoff in this design is that a high-value resistor could produce a larger signal and small noises can be easily amplified through high-value resistors. Experimental results show that a 1 M resistor is the best choice for usage.In Figure2, J4 is the connector to the piezoceramic transducer, and C12 (the negative capacitor is included in the charge pump circuit) eliminates the DC value from the PZT while the 1 M ohm resistor R10 converts the charge signal to a voltage signal. Resistor R2 is an optional resistor which can be tuned to match different load requirements. Op-amp UO1A is employed to amplify the voltage with its gain adjustable by resister RA1. The gain of this stage can be represented as
(1)Gain=R11+RA1R11.Figure 2
First-stage amplifying circuit.The signal generated by the piezoceramic material is bipolar; however, the ADC on the microcontroller is singularly polar. The first-stage op-amp only scaled the signal into a proper range, and an additional op-amp is needed to add offset to the signal. Figure3 shows the offset circuit.Figure 3
Offset amplifying circuit.This circuit further amplifies the input signal and adds a 1.25 volts offset to the output, so the output can be a range from 0 to 2.5 volts. The input-output relation can be represented as(2)V2=1+R13R12−R13R12V1=1.25−R13R12V1.The last part of the signal conditioning circuit is a sallen-key low pass filter for the anti-aliasing purpose required by ADC sampling, as shown in Figure4. The default sampling speed is 250 Hz, and the R5 is an adjustable resistor. The cutoff frequency is represented by
(3)fc=12πR5R6C5C6≈500Hz,when R5 is 10 K. The larger the value of R5, the lower the cutoff frequency is. SHDN (shutdown) is a power down control logic input that provides a way to shut the circuit down when not in use. The antialiasing low pass filter is very important in digital signal processing since the frequency above the Nyquist frequency is folded back into the low-frequency range. High-frequency noise is commonly seen in the microcontroller system due to the high speed switching happening in the digital circuit. These frequencies are mostly blocked by the antialiasing. The antialiasing filter used before the ADC sampler will attenuate the high frequencies larger than the Nyquist frequency and keeps the aliasing devices from being sampled.Figure 4
Sallen-key low pass filter.


## 2.1.2. Impact Detection Circuit

The purpose of the impact detection circuit is to sense the impact on the piezoelectric sensor and generate an interrupt signal to the microcontroller to inform the impact event. This feature can be very useful for low-power battery-based monitoring systems, where the interruption is used as a wake-up signal for the microcontroller. The threshold of the impact is configurable in the signal conditioning circuit by changing the resistance of the op-amp circuit. Figure5 shows the impact detection circuit.Figure 5
Impact detection circuit.The impact detection circuit takes the output from the first-stage amplifier, and the RC circuit and the diode are mainly peak detectors.


## 2.2. Actuation Unit

The piezoceramic material will generate an electric charge when it is subjected to a stress or strain (the direct piezoelectric effect); the piezoceramic material will also mechanically stress or strain when an electric field is applied to the piezoelectric material in its poled direction (the converse piezoelectric effect). The piezoelectricity property of piezoelectric material enables the active sensing ability, which allows a piezoelectric material to act as either a sensor or an actuator for structural health monitoring purposes, reducing the number of transducers and the system complexity. Thus, the actuation unit is used to generate an actuation signal for control and excitations. For example, in the structural health monitoring applications, a swept sine signal produced by the actuation unit can be used as the excitation source owing to the active sensing property and generates vibration waves to propagate inside a structure. The health state is evaluated from the vibration response.A lower power MAX504 is utilized. The 10-bit digital to analog converter Max504 is powered by a single +5 volts; thus, the digital logic one on the SPI bus is also 5 volts. However, the microcontroller operates in the 3.3-volt range. Therefore, a 22-ohm serial resistor is put on the SPI bus to protect the microcontroller from being damaged. Figure6 illustrates the DAC circuit.Figure 6
DAC circuit.The output range can be configured to be 0 to 2.048 volts or 0 to 4.096 volts. The range of 0 to 2.048 volts is used in the design, and it can work with another amplifying circuit to adjust the voltage to −10 to +10 volts. The output from the DAC is discrete, inducing high-frequency signal. A low-pass filter is employed to eliminate these high frequencies generated by the DAC changes. Figure7 shows the amplifying and the low pass filter circuit. Utilizing the 2.048-volt voltage reference Vref from MAX504, op-amp U03A changes the actuation signal from a single polar (0- to 2.048-volt range) to a bipolar (−2.048- to +2.048-volt range). The input-output relationship is shown in
(4)Vda=2Vout−Vref.Figure 7
DAC amplifying and filtering circuit.The op-amp U03B is used to amplifyVda five times, so that it reaches the −10- to 10-volt range. The low pass filter U02B is a sallen-key low pass filter, which is the same as the antialiasing filter in the sensing unit.


## 2.3. Power Management Unit

A power management unit directly determines performances of power saving. The WSN targeting piezo-based application needs dual voltage supplies to complete the sensing and actuating tasks. Several voltage regulators are used to adjust the battery voltage to ideal values. During voltage conversion, an efficient circuit is able to optimize the power efficiency to a maximum level.Figure8 illustrates the optimized power management units of the wireless coordinator (left) and the wireless sensor (right). And Figure 9 shows the circuit design of the power system.Figure 8
Power system design for the wireless coordinator and sensor.Figure 9
Power system circuit design.The 78XXSR is the switching power supply that regulates 9Volts to 5Volts for DAC, U2 is the charge pump that generates the negative power supply, and U3 is the LDO (Low-dropout regulator) that provides clean power supply to the MCU (Microcontroller Unit).


## 2.4. Wireless Microcontroller

The wireless coordinator is the key device of the whole system. Figure10 shows the system block diagram of the JN5139 microcontroller. The microcontroller consists of four parts: the RISC CPU core with memory, different on-chip peripherals, 2.4 GHz radio components, and the power management.Figure 10
System block diagram for JN5139.The piezoceramic-based active sensing WSN differs from other WSNs in that a higher sampling rate, computational power, and lower power cost are needed. The JN5139 microcontroller is a good solution. The JN5139 component can work at 32 MHz and transfer 32 MIPS. In order to substantially increase the battery life, three working modes operated by the JN5139 guarantee that the power cost of the whole system is constrained.


## 2.5. Fabricated Hardware System

Photos of the wireless coordinator are shown in Figures11 and 12. Figure 11 offers a top view, while Figure 12 provides a bottom view. Note that the DAC, the microcontroller, and part of the power management are placed on the top of the PCB, while the MCU peripheral, the BNC connector, and the rest of the power management are placed on the bottom. The universal asynchronous receiver/transmitter (UART) connector is placed on the side of the PCB.Figure 11
Photo of the hardware PCB (front view).Figure 12
Photo of the hardware PCB (rear view).Figure13 shows the performance comparison between Crossbow Imote2, MICA, Telos, and the designed Jennic WSN system. Although the Imote2 provides a much higher speed and more resources, both the price and the power consumption are higher, which disqualify it in large-scale SHM applications. The MICA has relatively low power consumption and a lower cost; however, the limited RAM size and low speed make it impossible to meet the high sampling rate requirement from the PZT-based applications. Although Telos has a higher speed, the limited RAM size is an issue. The designed Jennic WSN platform provides specially designed piezo signal conditioning circuit and low power actuating DAC circuit. In addition, the power management unit provides a high efficient bipolar power supply that is needed in piezo-based sensing. It can be seen that compared with other commercially available WSN platforms, the designed Jennic WSN system is optimized for piezoceramic transducer-based applications because it provides a relatively high sampling frequency, low power consumption, large RAM for data storage, and abundant on-chip resources.Figure 13
Comparison of Crossbow Imote2, MICA, and the designed Jennic system.


## 3. Embedded Software Platform Design

Together with the hardware system, the embedded software system provides a platform for different wireless applications. The software platform has the following functions: managing access to hardware peripherals, handling various interrupt requests, realizing wireless sensor network software stack, performing user inputs and outputs, and providing services to the application layer. Those functions can be categorized into several different layers. Figure14 illustrates the software platform of the system.Figure 14
Software architecture.


### 3.1. Hardware Abstraction Layer (HAL)

The management of the hardware peripherals is realized through drivers. Hardware drivers include timer drivers, ADC drivers, Serial Peripheral Interface (SPI) bus drivers, DAC drivers, radio drivers, GPIO drivers, and UART drivers. A timer driver provides counting and timing services to both the wireless stack and other applications. An ADC driver realizes the control and reading of ADC on the microcontroller. A SPI bus driver and a DAC driver together realize the function of sending out a voltage. A radio driver is responsible for handling input wireless packages and sending wireless messages out. A GPIO driver enables applications to read and write a logic level on a GPIO pin. A UART supplies function interfaces such as sending and receiving characters. The interrupts are handled in the interrupt service routines (ISR). This layer works closely with the hardware driver layer to produce different requests in the application layer. The driver layer together with the ISR layer forms the so-called HAL.


### 3.2. User Input/Output Layer

The user input/output was designed through the UART. A shell program was constructed, so that both system debugging and system configuration can be realized.The shell program utilizes the UART driver and retrieves and parses the user input from the UART serial register. The input character is then either appended to the end of the shell buffer or recognized as a function key, such as “backspace,” “delete,” or “tab.” For the latter case, the corresponding operation is performed and determined by the input function key. “Delete” will trigger the pointer and counter of the shell buffer to reduce by one. “Tab” will send out a tab key through the UART to the console; however, it has no effect on the shell buffer. “Enter” is the flag indicating an input is completed. Figure15 shows the flow chart for the shell processing.Figure 15
Flow chart for shell processing.The shell on the UART is used to test and configure the system functions and manage the wireless network. In fact, by operating and using shell commands through a computer with any serial-port debugging program, such as Putty, any process can be coded. Figure16 shows a snapshot of the shell running with Putty. In the figure, the “help” command prints out all the registered commands in the system.Figure 16
Snapshot of shell on Putty.


### 3.3. Wireless Sensor Network Stack

The wireless sensor network stack is a critical software component for WSN applications. The JN5139 wireless microcontroller integrated a wireless transceiver that is fully compatible with 2.4 GHz IEEE 802.15.4 protocol, and the network protocol used in the system is based on IEEE 802.15.4. The network stack is organized into three layers as shown in Figure17. A MAC sublayer and an LLC sublayer together constitute the data link layer.Figure 17
802.15.4 network stack.The physical (PHY) layer interacts directly with the radio driver and handles physical transmission as well as data bit exchanging. It realizes functions such as channel assessment, bit modulation, packet synchronization, and radio control. The media access control (MAC) layer provides services for associating and disassociating, beacon generation, guaranteed timeslot generation management, and access control to shared channels.


### 3.4. Network Topology

IEEE 802.15.4 supports the following types of network topologies: the star topology, the tree topology, and the mesh topology. The tree topology is configured as a single central PAN coordinator surrounded by many other sensor nodes. Each of these nodes can communicate only with the PAN coordinator. Therefore, in order for one node to send a message to another node, the message must be relayed through the PAN coordinator. The advantage of this is the simplicity of the configuration and management, whereas the disadvantage is the limited communication range and the lack of an alternative route in case of the breakdown of one path. Figure18 illustrates the star topology.Figure 18
Star topology.The tree topology is based on the parent and child structure and has more additional nodes—router nodes—in the system. Still, there is only one PAN coordinator in the system, and all end nodes and router nodes have a parent. Each node can only communicate with its children or parent. The tree topology is more advanced than the start topology since it can cover a much larger area; however, the management is also more complex. Figure19 illustrates the tree topology.Figure 19
Tree topology.A similar network topology is the mesh topology, where communication rules are more flexible in that router nodes within the range of each other can communicate directly. The advantage of the mesh topology is the increased alternative routes. Higher robustness can be achieved in a mesh topology, since one broken route can easily be replaced by another. Figure20 shows the mesh topology.Figure 20
Mesh topology.


### 3.5. Message Propagation

Message propagates through the sensor network depending on the network topology adopted. For star topology, both of the addresses will be the PAN coordinator. For tree topology, the next hop address is the parent of the sending node. For mesh topology, the next hop address will be the first node if the target node is out of range.The implementation of one specific topology is determined by the program on the router nodes and the PAN coordinator. It is realized in the data link and the network layer. Star topology is the simplest implementation and do not require a network layer. Under this topology, the PAN coordinator maintains an end node table and manages the joining and detaching of each sensor node. There is no routing table in this case, since every route is just the direct path to the coordinator. Sensor nodes only need to know the network address of the PAN coordinator, which appears in the input source address and output destination addresses.For tree and mesh topologies, a routing table is maintained in each router node. Either a fixed routing scheme or a route discovery process is needed in the network layer for building the routing table. The fixed routing topology is much more rigid and is only suitable for situations where sensor positions are fixed. Route discovery strategy provides a more flexible configuration. During the route discovery, one router broadcasts the source address of the initiating end node, which contains the destination network address of the targeting end node.


## 3.1. Hardware Abstraction Layer (HAL)

The management of the hardware peripherals is realized through drivers. Hardware drivers include timer drivers, ADC drivers, Serial Peripheral Interface (SPI) bus drivers, DAC drivers, radio drivers, GPIO drivers, and UART drivers. A timer driver provides counting and timing services to both the wireless stack and other applications. An ADC driver realizes the control and reading of ADC on the microcontroller. A SPI bus driver and a DAC driver together realize the function of sending out a voltage. A radio driver is responsible for handling input wireless packages and sending wireless messages out. A GPIO driver enables applications to read and write a logic level on a GPIO pin. A UART supplies function interfaces such as sending and receiving characters. The interrupts are handled in the interrupt service routines (ISR). This layer works closely with the hardware driver layer to produce different requests in the application layer. The driver layer together with the ISR layer forms the so-called HAL.


## 3.2. User Input/Output Layer

The user input/output was designed through the UART. A shell program was constructed, so that both system debugging and system configuration can be realized.The shell program utilizes the UART driver and retrieves and parses the user input from the UART serial register. The input character is then either appended to the end of the shell buffer or recognized as a function key, such as “backspace,” “delete,” or “tab.” For the latter case, the corresponding operation is performed and determined by the input function key. “Delete” will trigger the pointer and counter of the shell buffer to reduce by one. “Tab” will send out a tab key through the UART to the console; however, it has no effect on the shell buffer. “Enter” is the flag indicating an input is completed. Figure15 shows the flow chart for the shell processing.Figure 15
Flow chart for shell processing.The shell on the UART is used to test and configure the system functions and manage the wireless network. In fact, by operating and using shell commands through a computer with any serial-port debugging program, such as Putty, any process can be coded. Figure16 shows a snapshot of the shell running with Putty. In the figure, the “help” command prints out all the registered commands in the system.Figure 16
Snapshot of shell on Putty.


## 3.3. Wireless Sensor Network Stack

The wireless sensor network stack is a critical software component for WSN applications. The JN5139 wireless microcontroller integrated a wireless transceiver that is fully compatible with 2.4 GHz IEEE 802.15.4 protocol, and the network protocol used in the system is based on IEEE 802.15.4. The network stack is organized into three layers as shown in Figure17. A MAC sublayer and an LLC sublayer together constitute the data link layer.Figure 17
802.15.4 network stack.The physical (PHY) layer interacts directly with the radio driver and handles physical transmission as well as data bit exchanging. It realizes functions such as channel assessment, bit modulation, packet synchronization, and radio control. The media access control (MAC) layer provides services for associating and disassociating, beacon generation, guaranteed timeslot generation management, and access control to shared channels.


## 3.4. Network Topology

IEEE 802.15.4 supports the following types of network topologies: the star topology, the tree topology, and the mesh topology. The tree topology is configured as a single central PAN coordinator surrounded by many other sensor nodes. Each of these nodes can communicate only with the PAN coordinator. Therefore, in order for one node to send a message to another node, the message must be relayed through the PAN coordinator. The advantage of this is the simplicity of the configuration and management, whereas the disadvantage is the limited communication range and the lack of an alternative route in case of the breakdown of one path. Figure18 illustrates the star topology.Figure 18
Star topology.The tree topology is based on the parent and child structure and has more additional nodes—router nodes—in the system. Still, there is only one PAN coordinator in the system, and all end nodes and router nodes have a parent. Each node can only communicate with its children or parent. The tree topology is more advanced than the start topology since it can cover a much larger area; however, the management is also more complex. Figure19 illustrates the tree topology.Figure 19
Tree topology.A similar network topology is the mesh topology, where communication rules are more flexible in that router nodes within the range of each other can communicate directly. The advantage of the mesh topology is the increased alternative routes. Higher robustness can be achieved in a mesh topology, since one broken route can easily be replaced by another. Figure20 shows the mesh topology.Figure 20
Mesh topology.


## 3.5. Message Propagation

Message propagates through the sensor network depending on the network topology adopted. For star topology, both of the addresses will be the PAN coordinator. For tree topology, the next hop address is the parent of the sending node. For mesh topology, the next hop address will be the first node if the target node is out of range.The implementation of one specific topology is determined by the program on the router nodes and the PAN coordinator. It is realized in the data link and the network layer. Star topology is the simplest implementation and do not require a network layer. Under this topology, the PAN coordinator maintains an end node table and manages the joining and detaching of each sensor node. There is no routing table in this case, since every route is just the direct path to the coordinator. Sensor nodes only need to know the network address of the PAN coordinator, which appears in the input source address and output destination addresses.For tree and mesh topologies, a routing table is maintained in each router node. Either a fixed routing scheme or a route discovery process is needed in the network layer for building the routing table. The fixed routing topology is much more rigid and is only suitable for situations where sensor positions are fixed. Route discovery strategy provides a more flexible configuration. During the route discovery, one router broadcasts the source address of the initiating end node, which contains the destination network address of the targeting end node.


## 4. Conclusions

In this paper, a piezoceramic-based wireless embedded system has been designed and tested. The hardware system was composed of four parts: signal conditioning, actuating, power management, and wireless microcontroller. The software platform system consisted of a HAL layer, a network stack layer, and a user input/output management layer. The shell provided easier debugging and configuration interface to the users. The network stack was based on the IEEE 802.15.4 protocol. With the hardware and software platforms ready, different SHM and control applications can be developed on the system.



---

*Source: 9315364-2018-08-16.xml*