In this demo we present a mobile testbed equipped with sensing devices attached to smartphones of volunteer users broadening the smartphone’s sensing capabilities by adding external environmental sensors. The provided hardware allows for realization of complex experimental scenarios involving participatory and crowd-sensing applications. For this purpose we also extended the OMF framework used on NITOS to support experimentation with the new mobile testbed resources and ease the workflow of experimentation-driven research.

Mobile Sensing Testbed

Figure 1: Mobile Sensing Testbed Architecture

To augment the sensing capabilities of commercial smartphones we developed a small-sized, low-cost embedded device that can be interfaced with external sensors and can feed the collected measurements into Android platforms through a USB connection. Due to its low profile it can be placed beneath the back cover of conventional smartphones, as illustrated in Figure 2, while being powered by the smartphone's supply through the same USB connection.

Sensing Device

 Figure 2: Developed Sensing Device Deployed Beneath the back cover of a Smart-phone

Our prototype device is based on Arduino-like modules since Arduino follows an open approach, providing a vast number of software libraries and hardware modules.

The device features a 32-bit ARM microprocessor with 128KB of flash and 2KB of EEPROM memory. It hosts several I/O pins, 3 UART ports and one SPI bus. It operates at 3.3V, while supporting a dynamic core frequency scaling up to 96 MHz. Currently, our implementation integrates the sht11 temperature & humidity module, and a light-intensity sensor, all placed on the smartphone's back cover. The device operates at 3.3V, produced by the internal ARM's regulator, which also provides up to 100mA to the rest of the peripherals. Thus, we didn't place any external regulator, as that would result in a higher power consumption. Moreover, in order to activate communication with the host Android, we used a serial bus at 9600 baud rate realized over the USB connection. The firmware on the microprocessor is responsible for the entire device's operation. Briefly, the microprocessor gathers data from the sensors and logs them locally on its EEPROM. In turn, the data are forwarded to the host smartphone whenever requested by the Android application. Between each measurement cycle, the microprocessor saves energy by setting itself and the rest peripherals in deep sleep mode. They are awakened by an internal timer that can be configured to fire after up to 65 seconds. Our firmware is custom developed, written in Arduino language and flashed into the device through the teensy loader. Notably, the device can be further extended to support additional sensing modules, broadening its scope of environmental monitoring.

Android Application

Figure 3: Developed Android Application

Regarding the remote control of Android smartphones, a dedicated Resource Controller (RC) has been developed so that experimenters could launch any application they desire or configure the phone according to their needs, through experiment descriptions provided to the EC. The RC is capable of dealing with intermittent connectivity when users are not in range of a WiFi AP and the connection between the EC and RC is lost. The supported actions of the RC include starting/stopping another Android application, configuring the WiFi interface of the phone and executing Android shell commands. The RC application runs as a background service, which does not hinder the normal usage of the phone by the volunteers during the day. An accompanying application which was developed for the purposes of acquiring measurements from the phone is provided to the experimenters of the NITOS testbed. The purpose of this application is to communicate with the external device attached to the phone, which features various environmental sensors. In more detail, a serial communication is established with the external device through the USB port of the phone and requests for measurements are sent to the device which returns the results back to the application. For implementing the serial communication over the USB port of the phone, the corresponding Android library has been used. The App interacts with the RC in order to offload the gathered measurements to a database with the aid of OML. During periods of connectivity disruptions, the measurements are cached until the connection is restored.

In the matter of the smartphone sensing device, we observed that it requires approximately 320 ms to awake and perform a full measurement cycle (mainly due to the long time required to acquire measurements from the sht11 module). Based on this finding and also considering an experiment with a sensing interval of 1 minute, we estimated that the device consumes approximately 2.67 mAh from the smartphone's battery per day.

Google Map

Figure 4: Developed Android Application

All the acquired data are available to the user and can be depicted on Google maps, using the Google Maps API. Figure 4 shows an indicative experiment conducted around NITlab premises in Volos, Greece.

Related paper

You can also download the relevant paper accepted in EuCNC 2015:

Gathering_environmental_measurements_EuCNC

Demonstration