THE ANALYSIS OF SENSORY PLATFORM FOR USE IN THE INTERNET OF THINGS

. The main purpose of the work was to analyze sensory platform solutions for use on the Internet of Things. Emphasis was placed on the literature study on Sensor Platforms, Internet of Things, Bluetooth Low Energy Communication Protocol, serial digital and analog interfaces most commonly used in sensory platforms. Analysis of sensory platform solutions was carried out in terms of their functionality and efficiency. The SensorTag CC2650 sensing platform by Texas Instruments, turned out to be the best and has been used to build the hub model. The hub model was based on hardware and software implementation, which resulted in the expansion of the sensor platform with 6 additional analog inputs and a Bluetooth Low Energy data transmission profile. Testing the correctness of the software produced in the laboratory environment has made it possible to determine the correct functioning of the concentrator model.


Introduction
With the dynamic development of various communication technologies, more and more devices have access to the Internet and the ability to interact with it. Considering a global network of various types of intelligent items such as mobile personal devices, smart clothing and sensory platforms interacting with each other via web protocols, we can talk about an ecosystem called the Internet of Things (IoT) [1,2]. Devices that are part of a network are called ''smart things''. Unlike ordinary devices they are able to interact in a communication system in which they have a clearly defined function. These devices usually have built-in memory, communication module, and ability to retrieve and process data. With the development of wireless technology and research into the Internet of Things, communication at any time and place is no longer treated as a true utopia [2,3,4]. In fact, more and more devices can access the network at any time and exchange data with other connected devices [5]. Practical meaning of the Internet Things are possible thanks to assistive technology, such as wireless communication interfaces (BLE) [5,6] and the Internet. Sensory platforms placed in the environment to retrieve specific data that are then sent to one central device for processing. Currently, Internet Stuff is used in many areas such as indoor location, marketing, intelligent homes or telemedicine [2,3].

Analysis of sensory platform solutions with BLE interface
The sensory platform is a microprocessor device equipped with sensors for gathering information from the environment, and a communication medium that transmits this information to a data analysis device. Two of the most popular computational and communication options, sensory platforms on the market, and the most popular for their price, were selected for the project and analyzed. The summary below summarizes the analysis that completed the choice of platform used to implement the concentrator model.

SensorTag sensory platform
The main processor on the SensorTag platform is the 48 MHz 32bit ARM Cotrex M3, which is optimized for use in small embedded systems. It has a list of Thumb-2 commands that contain 16i 32-bit instruction blending, which provides high performance through increased nesting of commands that consume less memory, resulting in faster programs. Using such commands reduced the clock frequency and extended CPU sleep time. This processor is equipped with ARM Cortex SysTick Timer, Nested Vector Interrupt Controller (NVIC), SCB (System Control Block) configuration and control block [7]. Excellent processing performance combined with fast interrupt handling for time-critical applications ensures excellent performance while maintaining very low power consumption. The processor is equipped with a compact JTAG interface with a debugging system with extensive breakpoint and debugging capabilities via power mode. The platform has 128 kB of Flash memory, 8 kB of Cache, 20 kB of SRAM and ROM memory. SensorTag is equipped with a range of peripherals and serial interfaces [7].  [6] It has a counter system in which each 16-or 32-bit GPTM block has two 16-bit counters that can be configured to work independently as counters or event counters, or can work as one 32-bit timer. a Sensor Controller that is responsible for controlling the built-in analog-to-digital converter, comparator and attached sensors [7]. The available converter is 12 bit, allowing sampling at 200 ksaples/s, it has two analog outputs and triggering via peripheral circuits. Built-in low power analog comparator can wake CC26xx and CC13xx from any state. Output comparator can cause interrupt or ADC trigger. The platform has four serial interfaces. Standard UART bus for programmable baud rates up to 3 Mbps. Extensive I2C interface for multi-mode (master, slave), supporting up to 100 kbps and 400 kbps. SensorTag also has an I2S interface that allows CC26xx and CC13xx devices to communicate with external devices such as CODECs DAC / ADC or DSP. The CC26xx and CC13xx only support audio streaming formats such as I2S, RJF, LJF and DSP, and four-wire SPI for bidirectional or master slave communications [7].

NRF51DK sensory platform
The processor used by Nordic Semiconductor to build the nRF51DK is an ARM Cortex M0 with a mixed number of Thumb-2 commands consisting of mixed 16 and 32 bit instruction sets. These instructions are characterized by high density, which greatly reduces CPU memory requirements, resulting in increased performance and faster performance. The unit is 32-bit optimized for embedded systems, clocked at 48 MHz. The processor has a NVIC interrupt controller and power management system. The platform comes in two variants, 128 kB of Flash and 16 kB of RAM or 256 kB of Flash and 32 kb of RAM. The nRF51 has built-in counter systems that have an interrupt system, distinguishing two counters that can work in 8 or 16-bit mode, and one with 8/16/24/32 bit resolution. Counters count up and down and can work in PWM mode, comparison, overflow, interrupt. On the evolution plate we also find a 10-bit analog-to-digital converter, which has eight analog inputs and an integrated reference voltage. The platform also features the most popular serial interfaces [8]. Standard UART bus with the ability to control flow and programmable transmission rates up to 1 Mbps. The I2C interface, called TWI, offers master mode and two standard data rates of 100 kbps and 400 kbps. The next bus that the manufacturer has installed is a four-wire SPI, offering programmable data transmissions and two modes (master, slave) [8].
The nRF51 evaluation board is a competitive solution due to the availability of the target plate and devices, to which the nRF51 series beacons, popular coin-like beads and so-called. Dongles have the ability to connect to the USB port. It is worth noting the attractive price of this device and the fact that the price of the product is the Keil μVision integrated development environment. nRF51DK is a software develop-ment platform for microprocessor devices from the nRF51 family. When purchasing a Nordic product we receive the nRF51422 microcontroller along with the peripherals described above. The board has suitable leads for convenient construction. System powered by battery or microUSB connector [8]. The unit has a Bluetooth Low Energy module that communicates with the dedicated nRF Master Control Panel application, allowing you to send data between two devices and the nRF Toolbox, where you can program our OTA (Over The Air). The board also includes a set of LEDs, buttons and a built-in programmer [8].

Design of a biophysical signal concentrator in accordance with the principle of the Internet of Things
The project assumptions include the implementation of a biophysical signal concentrator model consisting of a measuring system, a sensory platform equipped with a Bluetooth Low Energy module and a mobile application. In the first stage of the work, a piezoelectric sensor measuring system is implemented, which, due to its characteristics and the low voltage generated at the connectors, requires amplification using an amplifier and an analogue converter to convert the analogue signal to a digital form. The next stage of my work is to create software that enables the transmission of data from the measuring system to the sensor platform via the I2C serial interface, and to stream the received data through the BLE module to the mobile application. The design assumptions also foresee the compatibility of the design with the principle of the Internet of Things, which was initiated by the Machine to Machine (M2M) concept.

Hardware implementation
The sensor used in the project is the Measurement Specialitiest piezoelectric sensor SDT1-028K, chosen for its versatility, which allows the detection of vibration or shock signals. Essential parameters of the piezoelectric sensor film is its acoustic impedance similar to the impedance of water and human tissues, ideal for the measurement of biophysical signals. Another important element in favor of the choice of the Measurement Specialitiest piezoelectric sensor is its flexibility to match it to the measuring surface (human body surface). The sensor can be attached by means of an adhesive at the point of measurement. Due to the characteristics of the sensor, which generates low voltage on its connectors it was necessary to use an amplifier. For this task, a system consisting of six TLV2244 operational amplifiers was selected for simultaneous connection of 6 independent analog sensors. The TLV2244 amplifier consists of 4 gain stages, the task of the system is not only to amplify the signal but also pre-filter through the built-in lowpass filter. The very low current of the power supply and the voltage supply interval consistent with the voltage of the sensing platform used were important criteria for selecting this circuit. The connection of the piezoelectric sensor with the TLV2244 amplifier was made using a harness.
For the amplified signal to reach the sensory platform via the I2C serial interface, it must first be converted from analog to digital. Analog Analog-to-Analog Converter AD7998 from Analog Devices has been selected for this purpose, with 8 analog inputs, an I2C interface and a matching power supply to the SensorTag platform. The Texas Instruments TL431 reference voltage source was connected to provide the best measurement quality for the analog-to-digital converter. The transmitter and the reference voltage source were soldered to the MAJ STAR SO-6 test plate for soldering and bonding, and gold-pins were soldered to the plate to connect the amplifier and make the necessary connections. The test board, thanks to its design, also made it possible to solder the LLS-110 connector to connect the SensorTag output.

Software implementation
The program structure is based on SensorTag and Sen-sorTagStack applications provided by Texas Instruments along with the CC2650 sensory platform. This enabled the use of header files and libraries without the need for additional implementation. The program written consists of sen-sors_AD7998.c and AD7998service.c, as well as sen-sor_AD7998.h and AD7998service.h header files, which contain definitions of functions contained in files with the extension "c" and definitions of the structures used in the program. The code in sensor_AD7998.c performs initialization of the CC2650 (master) sensing platform communication with the slave, via the I2C serial interface. This code also realizes the setting of the mode of operation of the analog-to-digital converter, as well as operations of reading and writing information.

Functional tests
Functional analysis of the concentrator model was carried out in order to meet the design assumptions, namely: energy efficiency of the system, extension of the platform functionality with the biophysical sensor and data transmission from the concentrator model to the mobile application. The tests were carried out with the use of appropriate measuring devices, which were presented in the drawing below with their place of use. In the first stage of testing tests, the functionality of the platform was extended with a biophysical sensor. Due to the selection of the sensor it was necessary to use the amplifier and analog-to-digital converter. The built-in measuring system was connected to the CC2650 sensing platform via the I2C serial interface. I2C interfaces needed to use logic analyzer to view logic states present on SDA and SCL lines. The following figures show the logic states received from the CC2650 sensing platform outputs according to the AD7998 analogue-to-digital converter catalog note, initiating the master connection (CC2650)slave (AD7998), sending configuration log data, and reading data from the registers for storing information. Due to the identical logic states obtained with the logic analyzer, with those shown in the AD7998 catalog, the correctness of the connection was found via the I2C serial interface.  The validation of the connection of the master and slave devices allowed the next stage of the test of the measuring system. This part of the study focused on reading the information collected by the sensor. For this purpose, Sensor Controller Studio from Texas Instruments, supplied with sensory sensor platform SensorTag, was used. It allowed to read data from the sensor in real time after having implemented the code in the program structure. However, due to the noise generated by the use of the neutralizing element model, it was necessary to use a constant-value signal which is readily readable and evidence of correct operation of the measuring system together with the software responsible for its operation. In order to obtain a constant voltage value that can be specified on the pin specified as the output of the sensor, a simple voltage divider was built that was connected to the supply voltage of the concentrator model. The divider made it possible to divide the 3.3 volt system voltage to 2.2 and 1.1 V, which allows the measurement system to function correctly and unambiguously read the results collected by the measuring system. The figures 10 show the graph data obtained when the concentrator model with the voltage divider is connected. Generated graphs made it clear that the measuring system and its software work correctly. The next step in functional testing was to study the connection of the hub model to the mobile device via the Bluetooth Low Energy Module. For this purpose was used free, dedicated mobile application LightBlue Explorer, Punch Through which is installed on a smartphone supporting Bluetooth 4.0. This application allows you to connect the mobile device on which it is installed, with a device that has a Bluetooth Low Energy Module. It has options for reading the UUID, including the device name, and allows you to read the profiles and their characteristics. The first step in the study was to launch a concentrator model that began broadcasting the UUID, which enabled unidirectional communication within the GAP profile with the mobile application. The result of the connection of the concentrator model and mobile device was to get a preview of the device name as shown in the figure 11. The service view obtained with the mobile application enabled the BLE model of the concentrator to report the correct broadcasting of broadcast packets.
Positively completed broadcast packet readings allowed us to move on to the next stage of the test, namely two-way communication within the GATT profile. For this purpose, after starting the mobile application and connecting to the concentrator model via BLE, an attempt was made to read the characteristics and the UUID that was assigned to them. This attempt was successful because after clicking on the available service, the UUID was displayed and the available characteristics for reading the data from the concentrator model. To test the data transfer of connected devices, it was necessary to send a value of "1" from the mobile application interface of the characteristic that started transmitting the data received from the concentrator model through the BLE module. In order to obtain a clear answer confirming the correct operation of the BLE module and its software, the voltage divider has been re-used to measure the constant voltage value and hence the constant level of results. The tests were performed under laboratory conditions to enable lossless transmissions via the BLE interface. The figure 12 shows the measurement of the first value transmitted from the voltage divider. The results of the study described above clearly indicate the correctness of bidirectional communication between the concentrator model and the mobile device as evidenced by the above figures showing the read constant values from the voltage divider outputs. An important step in testing the functionality of the hub model was to test the Bluetooth Low Energy data rate. Due to the use of the model concentrator for measuring biophysical signals, the sampling frequency should be as high as possible due to the rapid variability of the meas-ured parameters. The highest possible frequency obtained during the test was 500 Hz. Such frequency allows the processor to work properly while maintaining data transmission accuracy. Any attempt to increase the frequency resulted in blocking the processor and losing the transmitted samples. The last stage of functional tests of the model made in the project was the issue of energy efficiency. Due to battery power, the choice of such devices as sensory platform, analog-to-digital converter or operational amplifier was driven by the voltage value. In addition, the selected sensor platform CC2650 has a built-in power management system that dramatically improves system energy efficiency. This aspect was also taken into account when writing a program code that turns the measurement system on for the duration of the measurement and then turns it off, which also reduces the power consumption.

Conclusions
The company analyzed two systems: SensorTag from Texas Instruments and nRF51DK from Nordic Semiconductor. The Texas Instruments solution turned out to be better, in favor of a newer generation processor that delivers great performance with very little power consumption. The powerful and technologically advanced processor supports up to 240 interrupts, translating to the greater potential of the sensory platform. Another advantage of the sensory platform is its small size and the ability to work in one year. When choosing a sensory platform, it is guided and supported by its serial and low power levels. Because of the lack of dedicated sensor manufacturers, Sen-sorTag improves the measurement of slow-moving analog signals, and has its own DevPack-based measuring system. Literature study corrected for correct selection of subassemblies consisting of a selfcontained measuring system, a piezoelectric sensor, an acoustic impedance sensor close to the impedance of human tissues to measure biophysical signals with greater efficiency. This sensor generates low-gain connectors that are based on an operational amplifier. Acoded analog is required for digital conversion to this analog-to-digital converter. This transcoded transparent signal through the I2C bus to SensorTag sensing platform. The next step was to create software on the other side of SensorTag, which allows for compatible operation of the measurement order via serial I2C. I2C serial bus, although it is downloading sensory data from the sensor platform, is required for operation and operation from the program page. Undervalued during serial interface configuration, I2C turned out to be a logic analyzer for SCL and data transmission (SDA). Correctly received data with measuring devices using Bluetooth Low Energy modules for mobile use. For this purpose, files are sent to enable the BLE module to send measurement data.