Features
This is an advanced Android life-logging app to be used in a research project at the University of New South Wales. It logs data from the Android device internal sensors, takes photos, records voice and communicates with an Arduino board through Bluetooth serial.
LOGGING:
Data logging at specific regular intervals (for instance every 5,10,20,30 seconds). The data to be logged is a following (details below):
Time stamp (date, time).
Device internal sensors:
Accelerometer XYZ
Orientation XYZ
Location (longitude, latitude)
Temperature
Barometer
Ambient light
External sensors.
Photo from device camera.
Voice recording from device microphone.
External sensors:
These readings are provided by an Arduino board, paired with the Android device through Bluetooth serial connection. The Arduino provides the Android app on request sensor values (either as int or float). Sensors are a Galvanic Skin Response and Heart Rate. These values need to be logged within the same interval and stored with the other data. The Arduino, Bluetooth and sensors are supplied. A serial communication protocol needs to be defined.
Photos:
Within the same interval, the device takes a still image with its rear camera. The camera should be in automatic mode (exposure). The file name is based on the timestamp and logged with the other data. Photos should be taken if the accelerometer readings are low to prevent too much motion blur. This might mean that time the data set is logged might be slightly off its regular interval, by a second or two if the accelerometer reading indicate too much motion. The accelerometer threshold is to be set in preferences.
Voice Recording:
If the microphone level indicates someone is speaking into the mic, a new voice recording is started automatically. After the level drops, recoding stops. The recording format is flexible. The file name is based on the timestamp, and an entry is made into the data log. The mic level threshold is to be set in preferences.
Data exchange:
The data log can be exported as a CSV text file, to be transferred to a computer for further processing.
Example log:
date,time,latitude,longitude,accelX,accelY,accelZ,orientX,orientY,orientZ,temp,barom,light,Arduino1,Arduino2,photoFile,VoiceFile
11-04-2014,14:35:12,151.175522804,-33.8666027757,0.120,-0.965,-0.044,85.641,-91.54,318.98,23.5,200,0.12345,0,12345,[login to view URL],[login to view URL]
…
Photos and voice recording files can be transferred through USB to a computer.
App interface:
A text filed to enter a name and start/stop button for data logging. If logging is stopped, the CSV is exported and stored on either internal memory or SD card. The CSV foe name is based on date and name.
Visual flags to indicate the availability of sensor data, including Arduino bluetooth and location (GPS fix).
Preference settings for interval (5,10,20,30 sec), accelerometer threshold for photo taking, microphonene level threshold for voice recording. Theses preferences should be stored until changed.
Other:
The target platform is a Google Nexus 5 phone, other models are possible as well. A data logging session might take up to an hour, during that time the Android device can't go into sleep mode. The device will be supplied with a high capacity external battery to support extended running times.
References:
Android and Arduino
There are a number of projects out there using Arduino and Bluetooth to communicate with Android devices. Some are open source.
Amarino [login to view URL]
Sensoduino [login to view URL]
Senseview [login to view URL]
ArduDroid [login to view URL]
Android Arduino Bluetooth connection [login to view URL]
Blue Serial [login to view URL]