Testing a WeSU in everyday life
In this article, we will use a WeSU in some daily common scenarios. In this way, we will propose some case of use of wearable device, testing also its mechanical robustness and its sensitivity.
For our tests we will use the remote data capture feature provided by the smartphone app: this is very useful because it allows to save data and send them to an email address allowing offline post processing. Before starting each test, we need to pair WeSU and our smartphone using bluetooth: launch the application (ST WeSU) then click on START SCANNING (see Fig. 1).
If the procedure will be successful the WeSU will appears in the list of detected Bluetooth nodes near a black double check mark. To start recording data, we have to click on START LOGGING.
The application creates a separate log file for each of the measured data: Pressure, Temperature, Gyroscope, Accelerometer, Pedometer, Battery Level, Magnetometer, MEMS sensor fusion data.
The various measurements allow us to perform tests in several real life applications. Following the descriptions of the tests listed below you can replicate them or just take inspiration to make your own application.
Managing gathered data
In our experiments we will gather a lot of data which must be interpreted and thus commented. To do this, it is a good idea to use a spreadsheet program like Excel or Libre Office Calc. In this paragraph, we will see how to import data and how the spreedsheet provided by our WeSU is organised. Starting from them we will also create some charts. If you are already familiar with that just jump to the chapter three.
Importing from spreedsheet
Importing data in Excel
It is possible to import data in an Excel using the following procedure:
- Click File->Open in the menu, choosing All file types and select the csv file;
- Select the first column, click the tab named Data and select the option Text to Columns;
- In the window named Convert Text to Columns Wizard, choose Bordered data and click Next;
- In the next window choose the comma as data delimiter and and click Next;
- Finally choose the general data format and proceed.
Importing data in Libre Office Calc
It is possible to import data in an LibreOffice Calc using the following import procedure:
- Open the csv with LibreOffice Calc;
- In the newly opened windows choose comma as separator and click ok.
Once you have imported data into the spreadsheet you will see table having at least 5 columns. The columns are organised in this way:
- HostTimestamp, which is the time counted since the beginning of log expressed in ms;
- NodeName, which is the name of the WeSU connected to the App through Bluetooth (in our case is 3CB08C);
- NodeTimestamp, which is the systick of WeSU;
- RawData, which is the raw data read from MEMS;
- Temp (°C), which is the temperature values expressed in Celsius degrees.
Note that if we are going to measure more data we would see some additional columns.
To quickly analyse the data acquired we are going to create a graph, plotting HostTimestamp on the x-axis and Temp (°C) on the y-axis. To make the graph we have to:
- move one of the column in order to have the two interested column in a columns side by side;
- replace the decimal point with a comma just using the “Search and replace” function (note that this step depends on your international setting in the control panel).
- Select both columns and choose the line XY graph, the first column will be used for the values of the x-axis and the second one for the values of the y-axis.
If you have done everything right, you will get a graph like the one shown in the figure 3.
Heat under control
In our first test we will control the temperature, simulating how to control the cold chain for food preservation. As said, we will get data through the control Application on the smartphone. So, we will simulate an unwanted thermal shock raising the temperature of the environment. To do this we will:
- use a normal household freezer to take WeSU at a temperature below 0° C;
- use an hair dryer to raise up the WeSU measured temp in a short range time: this will simulate the thermal shock;
- re-use the freezer to simulate the reverse to the normal situation.
This measurement could be used to detect a failure and consequently an irreparable alteration of the food. Another scenario could be the monitoring of kids or pets: with some changes in the code of the microcontroller, this feature could also be used to automatically trigger an alarm when the temperature exceeds a preset threshold.
WeSU has several chip which can operate in different condition. Before to start we should take a look to their reference manual to figure out the effective temperature operating range of the WeSU. Reading, we can figure out that:
- The magnetic sensor (LIS3MDL) and the inertial module (LSM6DS3) can operate over a temperature range from -40° to +85° C.
- The pressure sensor (LPS25HB) can operate in a range from -30° to +105° C.
- The gas gauge (STC3115) has an internal temperature sensor which works in range from -40° C to +125° C having a resolution of 1°C.
Crossing these notes, it should be clear we can operate in a range from -30° C to + 85° C. We should notice that a normal household freezer usually reaches an average temperature of -18° C. Before to start the measurement, we will wait that WeSU measurement is stable to the environment temperature (in our case -8° C).
During measurement, remember to keep open the door of the freezer: freezers often have a metal surface which act as a Faraday cage. This can jam the Bluetooth signal.
Remember that the application ST WeSU will sent us a file cvs (comma-separated values spreadsheet) when stop the data logi (for more info take a look to Review of WeSU: a development board for wearable applications).
Starting from data gathered we have created a chart using the previous explained method: we can clearly notice a temperature peak. This peak could be revealed through software and consequently software can implement countermeasures.
Note that, we can use the data and post process it to achieve more information:as example we can calculate additional parameters like the slope, the mean or the minimum and maximum.
A bike ride to collect pressure data
In the second test, we will evaluate the accuracy of the barometer of WeSU collecting the environment pressure during a bike ride and compare the result with altitude retrieved on the internet. There are several websites to calculates the map total ascension, starting from a selected route, as example Sport Route Planner. It also allow to create a graph of this parameter along an estimated travel time.
The barometer sensor (LPS25HB) has a range of 260 hPa up to 1260 hPa, with a sensitivity in high resolution of 0.01 hPa. To properly stimulate it, before start the test we suggest to plan a route with a series of climbs and descents.
Remember to save the altitude graph generated for our planned route. We need it for the following steps of the test.
In our case the altitude graph associated to our planned route is shown in the following image:
Before to start the ride we have placed the WeSU in a small bag attached to the bike handlebar.
Back home from our test ride, we have import the barometric data to the spreadsheet and plotted the collected data on a graph obtaining the Fig.5.
To obtain the altitude values we use the formula to find the atmospheric pressure at a given altitude calculating it’s inverse:
Note to calculate the altitude with the spreadsheet
To calculate the altitude values we have to apply the previous inverse formula to the our pressure data. Doing that, we should pay attention to some details.
- The collected pressure data are expressed in millibars instead the pressure in the formula is expressed in Pascal. Since 1 mbar = 1hPa = 100 Pa, we need to multiply each pressure value for the factor 100.
- The air pressure at altitude of 10 km is 26436 Pa, so to verify the correction of the inverse formula we can insert this value in our spreadsheet to perform a check. If there aren’t syntax errors, the output must be 10000 meters.
- In case of syntax error pay attention to parenthesis.
Using WeSU as a personal trainer
Another nice test consist to insert the WeSU into a punching bag to monitor the frequency and intensity of hits during a training session. We have record some different sequences of hits and tried to determine each sequence, analyzing the graph of the collected accelerations .
The inertial module (LSM6DS3) is able to sense a range of accelerations from ± 2g to ± 16 g. It has 3 degrees of freedom, to detect the acceleration along x, y and z axes, but we only use the accelerations along x. We have record 3 different sequences of hits during a 2-minute workout:
- The first sequence is made by low intensity hits;
- The second one is made by hits at higher intensity. The third sequence is made by hits at the maximum intensity;
- The final sequence is made by random hits.
If we have no way to open the punching bag we can attach the WeSU on the bottom with a fabric tape. We can also use a large sofa pillow.
From the graph of the collected data we clearly see the acceleration peaks: this correspond to the intensity of the hits on the punching bag. Instead the time distance between the peaks corresponds to training frequency. In the last part of the graph we easily distinguish the hits of the three previous sequences, as we can see in the next figure.
So the WeSU can be used to monitor the improvements of the training in any combat sport that requires kicks or punches.
No fear of water: another test to try
For the last test we suggest to use the WeSU to monitor of data during a swimming session, inspiring to XMetrics, a monitor for the activities of the swimmers. This device has the same sensors of the WeSU and report the collected data in a dedicated application.
To make this test we need a waterproof case for the WeSU. We could use some freezer bags, and use more than one like a matriosca dolls. After the sealing we can it inside the swimming cap and start a training session. The collected data can then be elaborate with a dedicated software and be used to evaluate the executed performance.
If you try this test, you have to avoid interrupting the bluetooth connection between WeSU and your smartphone. So we suggest to swim near the edge of the pool with someone on ground holding the phone and follows our movements.
The WeSU platform, in his evaluation form is already suitable for very useful and practical applications, that have nothing to envy with that devices specifically designed for these purposes. The chance to edit code and act on it can completely change our perspectives opening an entire world of possible applications. Indeed, you could create the specific firmware for the wearable application and WeSU is a cheap way to test it before to create a dedicated hardware. Now is your turn: unleash your imagination.