Hardware
The STABILO Digipen is a sensor-enhanced ballpoint pen with internal data processing capabilities. Its Bluetooth module enables live streaming sensor data to a connected device. The pen’s internal power source lasts at least 17 hours and is recharcheable via micro USB. Its diameter is 15mm, its overall length is 167mm and it weighs 25g which, along with its ergonomic soft-touch grip zone, makes it comfortable and easy-to-use.
Each Digipen is equipped with five sensors.
- Front accelerometer (STM LSM6DSL)
- Gyroscope (STM LSM6DSL)
- Rear accelerometer (Freescale MMA8451Q)
- Magnetometer (ALPS HSCDTD008A)
- Force sensor (ALPS HSFPAR003A)
Sensor Data
The sensors’ raw data stream is provided in the files called sensor_data.csv
. Each file consists of 15 columns:
- Millis: The timestamp when the data were processed on the tablet computer that the pen was connected to during recording
- Acc1 X, Acc1 Y, Acc1 Z: The values of the front accelerometer in three dimensions
- Acc2 X, Acc2 Y, Acc2 Z: The values of the rear accelerometer in three dimensions
- Gyro X, Gyro Y, Gyro Z: The gyroscope values in three dimensions
- Mag X, Mag Y, Mag Z: The magnetometer values in three dimensions
- Force: The force with which the pen tip touches the surface
- Time: A sample counter
Scaling and Bias Correction
Each person’s sensor_data.csv
file contains raw data as they are transmitted from the sensors of the pen.
In this section, you are provided with each of the sensors’ raw ranges and what SI-units these values correspond to. With this information and (optionally) with the data obtained from the short calibration routine, the raw values can be scaled and their bias can be removed.
si_value_without_bias = (( raw_value - bias ) / ( max_raw_range / max_si )) / measured_scaling
Accelerometer 1 (front):
max_raw_range = 32768
max_si = 2 g
Accelerometer 2 (rear):
max_raw_range = 8192
max_si = 2 g
Gyroscope:
max_raw_range = 32768
max_si = 1000 °/s
Magnetometer:
max_raw_range = 8192
max_si = 2.4 mT
Force Sensor:
max_raw_range = 4096
max_si = 5.32 N
Example
Let’s try this calculation for two sample values:
Magnetometer:
Mag X = -644
(fromsensor_data.csv
)bmx = -342
(fromcalibration.txt
)smx = 0.98822975
(fromcalibration.txt
)
→ ((-644 - (-342)) / (8192/2.4)) / 0.98822975 = -0.08974947210881715
[mT]
Accelerometer:
Acc1 X = -6590.0
(fromsensor_data.csv
)bmx
does not exist →0
smx
does not exist →1
→ ((-6590.0 - 0) / (32768/2)) / 1 = -0.4022216796875
[g]
How to use the pen