SENSOR MAESTROS SFM2 User manual

www.sensormaestros.com
1 | P a g e
User Manual V1.0.3
Sensor Fusion Module User Manual
The SFM2 is the smallest form-factor and lowest
power wireless 9 DOF Sensor Fusion Module with
optional Pressure, Temperature and Humidty sensors.
The SFM2 offers both a Bluetooth Low Energy and a
USB/COM port interface. The SFM2 provides an
extremely flexible BLE and USB interfaces and allows
complete customization of sensor output streams and
sensor configurations. The SFM2 can easily be worn
using the Velcro strap ran through slot in the bottom
of the enclosure.
Shown with Black Enclosure. For other color options please inquire
Product Highlights
➢40.9 x 28 x 14.3mm (1.61” x 1.10 x 0.563”) Form Factor
➢Wearable: Enclosure has slot for Velcro strap.
➢USB and BLE Interfaces: Connect up to 5 SFM2’s running 208Hz Fusion ODR and Quaternion data with newer
iOS and Android Devices. High ODR Rates possible depending on mobile device performance.
➢Field Updatable using ‘Over the Air’ update
➢9 DOF: 3-Axis Gyro, Accel, Mag
❖with Pressure, Temp, and Humidity Sensors
➢Up to 833Hz Sensor Fusion Operation. Multiple Streams can be enabled at same time.
❖Tared & Un-Tared Quaternion Output
❖Fusion Compass Heading and Tilt Output
❖Fusion Linear Acceleration Output
❖Fusion Euler Angle Output
➢Sensor Fusion Output via BLE or USB Interface
❖833, 417, 208, 104, 52, 26Hz ODR Rate Selections
➢Raw Sensor Output availability for all sensors. Accel/Gyro Max ODR = 1667Hz
➢USB(1Mbps) and BLE Interfaces(DLE and 2Mb PHY capability)
➢iOS and Android apps for sensor and data output configuration.
➢USB/COM command set for sensor and data output configuration.
➢Python API Library to quickly and easily get application up and running
➢TARE function to zero orientation for quaternion output.
➢GLOBAL REFERENCE enable/disable command
➢TIMESTAMP sensor data with 25us resolution with improved accuracy using RTC synchronization
➢Timestamp-timestamp delta accuracy ± 1µs for data logs
➢Multi-Mode Time Synchronization to time synchronized multiple SFM2’s used simultaneously with Average
Standard Deviation between timestamps of multiple SFM2’s typical <10ms
➢Rechargable Battery (130mAh)
❖~73hour battery life with Quaternion output @ 26Hz using BLE interface
❖~47hour battery life with Quaternion output @ 104Hz using BLE interface
❖~30hour battery life with Quaternion output @417Hz using BLE interface
➢Individual Control of each sensor output to be included in Data Stream
❖Sensors and Sensor Fusion can be completely customized including Sensor Filters.
➢Custom OEM/Logo Enclosure available
➢Example Application Software

www.sensormaestros.com
2 | P a g e
User Manual V1.0.3
Table of Contents
PRODUCT HIGHLIGHTS............................................................................................................................................................1
TABLE OF CONTENTS ...............................................................................................................................................................2
CUSTOM DEVELOPMENT AND OEM SOLUTIONS .................................................................................................................5
FUTURE OPTIONS......................................................................................................................................................................5
SFM2 HARDWARE DESCRIPTION...........................................................................................................................................6
ACCEL/GYRO/SENSOR FUSION SPECIFICATIONS................................................................................................................7
MAGNETOMETER SPECIFICATIONS.......................................................................................................................................8
PRESSURE SENSOR SPECIFICATIONS.....................................................................................................................................9
RELATIVE HUMIDITY SENSOR SPECIFICATIONS.................................................................................................................9
TEMPERATURE SENSOR SPECIFICATIONS ...........................................................................................................................9
LED OPERATION DESCRIPTION........................................................................................................................................... 10
BLE OPERATION..................................................................................................................................................................... 10
SFM2 FIRMWARE UPDATE ................................................................................................................................................... 10
SENSOR FUSION...................................................................................................................................................................... 11
14.1 COORDINATE SYSTEMS .................................................................................................................................................................11
14.2 TARE QUATERNION......................................................................................................................................................................12
14.3 HEADTARE .................................................................................................................................................................................12
14.4 GLOBAL REFERENCE .....................................................................................................................................................................12
MANUAL CALIBRATION......................................................................................................................................................... 13
15.1.1 Calibration Steps ............................................................................................................................................................14
15.1.2 Calibration Notes ...........................................................................................................................................................15
TIMESTAMPS........................................................................................................................................................................... 15
16.1 SENSR-LOGR TIMESTAMPS .........................................................................................................................................................16
16.2 USB/COM PORT TIMESTAMPS .....................................................................................................................................................17
SYNCHRONIZE MULTIPLE SFM2’S....................................................................................................................................... 18
BINARY FRAME MODE........................................................................................................................................................... 18
18.1 BINARY FRAME FORMAT...............................................................................................................................................................18
18.2 START BYTE ................................................................................................................................................................................18
18.3 DATA DESCRIPTION ......................................................................................................................................................................18
18.4 TIMESTAMP................................................................................................................................................................................19
18.5 DATA ........................................................................................................................................................................................19
18.6 END BYTE...................................................................................................................................................................................19
EXAMPLES................................................................................................................................................................................ 20
19.1 SFQT+SFLA@104HZ................................................................................................................................................................20
19.2 AD@208HZ +GD@104HZ........................................................................................................................................................20
MOBILE APP ............................................................................................................................................................................ 21
20.1 SCANNER ...................................................................................................................................................................................22
20.2 CHANGE NAME...........................................................................................................................................................................22
20.3 HOME .......................................................................................................................................................................................22
20.3.1 Home: 3D View ..............................................................................................................................................................23
20.3.2 Home: Throughput.........................................................................................................................................................24
20.3.3 Home: Self-Test..............................................................................................................................................................24

www.sensormaestros.com
3 | P a g e
User Manual V1.0.3
20.4 CONFIG .....................................................................................................................................................................................25
20.4.1 Config: Data Rates .........................................................................................................................................................25
20.4.2 Config: Data Streams ..................................................................................................................................................... 26
20.4.3 Config: Reference........................................................................................................................................................... 26
20.4.4 Config: Temperature/Humidity......................................................................................................................................26
20.4.5 Config: Altitude/Pressure............................................................................................................................................... 27
20.4.6 Config: Calibration ......................................................................................................................................................... 27
20.4.7 Config: Accelerometer....................................................................................................................................................28
20.4.8 Config: Gyroscope.......................................................................................................................................................... 28
20.4.9 Config: Magnetometer .................................................................................................................................................. 29
20.4.10 Config: Kalman Filter Parameters ..................................................................................................................................29
20.4.11 Config: Name Change .................................................................................................................................................... 30
20.4.12 Config: Default Settings ................................................................................................................................................. 30
20.5 STATS........................................................................................................................................................................................30
20.5.1 Data Streams ................................................................................................................................................................. 31
20.5.2 BLE Stats ........................................................................................................................................................................32
20.5.3 Serial Port Stats.............................................................................................................................................................. 32
20.5.4 Calibration .....................................................................................................................................................................32
20.5.5 Statistics......................................................................................................................................................................... 33
20.5.6 Connection Params........................................................................................................................................................33
20.6 TIME.........................................................................................................................................................................................34
20.7 LOG..........................................................................................................................................................................................34
20.7.1 Start Logging..................................................................................................................................................................34
20.7.2 View/Explore/Garph Log Files........................................................................................................................................35
20.7.3 Share Log File(store remotely) .......................................................................................................................................36
20.8 MULTI MODE(MULTIPLE SFM2’S) .................................................................................................................................................37
20.8.1 Multi Mode: Config ........................................................................................................................................................37
20.8.2 Multi Mode: Stats .......................................................................................................................................................... 38
20.8.3 Multi Mode: Time Synchronization ................................................................................................................................ 39
SFM2 BLE SERVICES AND CHARACTERISTICS................................................................................................................... 41
21.1 SFM2 BLE CHARACTERISTIC MAP..................................................................................................................................................41
21.2 DATA STREAM CHARACTERISTICS....................................................................................................................................................42
21.2.1 Data Stream 0x0101 ...................................................................................................................................................... 42
21.2.2 Data Stream Settings 0x0102 ........................................................................................................................................42
21.3 SENSOR FUSION SETTINGS 0X0122.................................................................................................................................................44
21.3.1 Data Rate .......................................................................................................................................................................44
21.3.2 Fusion ODR Output Divider ............................................................................................................................................44
21.4 REFERENCE SETTINGS 0X0128.......................................................................................................................................................44
21.5 ACCELEROMETER SETTINGS 0X0201...............................................................................................................................................45
21.5.1 Accelerometer Full Scale ................................................................................................................................................ 45
21.5.2 Accelerometer Filter Configuration................................................................................................................................45
21.5.3 Accelerometer Power Mode ..........................................................................................................................................46
21.5.4 Self-Test Configuration .................................................................................................................................................. 46
21.6 GYROSCOPE SETTINGS 0X0202......................................................................................................................................................46
21.6.1 Gyroscope Full Scale....................................................................................................................................................... 46
21.6.2 Gryoscope LPF1 Configuration .......................................................................................................................................46
21.6.3 Gryoscope HPF Configuration ........................................................................................................................................ 47
21.7 MAGNETOMETER SETTINGS 0X0203 ..............................................................................................................................................47

www.sensormaestros.com
4 | P a g e
User Manual V1.0.3
21.8 SF KALMAN SETTINGS 0X0204......................................................................................................................................................47
21.9 CALIBRATION SETTINGS 0X0207....................................................................................................................................................47
21.9.1 Magnetometer Calibration Auto Storage Mode ............................................................................................................47
21.9.2 Magnetometer Calibration Type....................................................................................................................................48
21.10 ENVIRONMENTAL SENSOR SETTINGS 0X0310...............................................................................................................................48
21.10.1 Pressure Data Rate ........................................................................................................................................................48
21.10.2 Temp/Humidity Sample Mode .......................................................................................................................................48
21.10.3 Altitude Tare 0x0311......................................................................................................................................................49
21.11 STORAGE CHARACTERISTICS ......................................................................................................................................................49
21.11.1 Settings Storage 0x0134 ................................................................................................................................................49
21.11.2 Calibration Storage 0x0135 ...........................................................................................................................................49
21.12 TIME CHARACTERISTICS............................................................................................................................................................49
21.12.1 Time 0x0131................................................................................................................................................................... 49
21.12.2 Time Offset 0x0132........................................................................................................................................................49
21.12.3 Time Trim 0x0142 ..........................................................................................................................................................50
21.12.4 Time Notify Interval 0x0143...........................................................................................................................................50
21.13 OTHER CHARACTERISTICS..........................................................................................................................................................50
21.13.1 Tare 0x0129 ................................................................................................................................................................... 50
21.13.2 Name 0x0133.................................................................................................................................................................50
21.13.3 Stats 0x0137 .................................................................................................................................................................. 50
21.13.4 Connection Parameters 0x0138.....................................................................................................................................51
21.13.5 Calibration 0x0206......................................................................................................................................................... 51
21.13.6 Self-Test 0x0208.............................................................................................................................................................51
21.13.7 SF Kalman Settings 0x0204 ............................................................................................................................................ 52
21.13.8 Calibration Settings 0x0207 ...........................................................................................................................................52
USB COMMANDS..................................................................................................................................................................... 53
22.1 TERMINAL WINDOW SETTINGS ......................................................................................................................................................53
22.2 COMMAND FORMAT:...................................................................................................................................................................53
22.3 SPECIAL CHARACTERS: ..................................................................................................................................................................54
22.4 METAVARIABLES: ........................................................................................................................................................................54
22.5 DATA TYPES:...............................................................................................................................................................................54
22.6 SYSTEM COMMANDS: ..................................................................................................................................................................54
22.7 MOTION SENSOR CONFIGURATION COMMANDS: ..............................................................................................................................55
22.7.1 Accelerometer Commands.............................................................................................................................................55
22.7.2 Gyroscope Commands ...................................................................................................................................................55
22.7.3 Magnetometer Commands............................................................................................................................................ 55
22.8 ENVIRONMENTAL SENSOR CONFIGURATION COMMANDS:...................................................................................................................55
22.9 SENSOR FUSION COMMANDS: .......................................................................................................................................................56
22.10 TIMESTAMP COMMANDS:.........................................................................................................................................................56
22.11 SYSTEM QUERIES: ...................................................................................................................................................................56
22.12 SENSOR QUERIES: ...................................................................................................................................................................57
22.13 SENSOR FUSION QUERIES .........................................................................................................................................................57
22.14 RESPONSES:...........................................................................................................................................................................57
22.15 DATA STREAM FORMAT: ..........................................................................................................................................................58
PYTHON API LIBRARY........................................................................................................................................................... 59
23.1 PYTHON DOCS (HTML DOCUMENTATION).........................................................................................................................................59
23.2 PYTHON SAMPLES........................................................................................................................................................................60

www.sensormaestros.com
5 | P a g e
User Manual V1.0.3
23.3 PYTHON SFM2API’S....................................................................................................................................................................61
23.3.1 sfm2: implementation.................................................................................................................................................... 61
23.3.2 sfm2: interface............................................................................................................................................................... 62
23.3.3 sfm2: Utils ...................................................................................................................................................................... 63
REVISIONS ............................................................................................................................................................................... 63
Custom Development and OEM Solutions
Sensor Maestros can provide customized solutions using the SFM2 as a foundation. Below are
some examples of the common customizable options for the SFM2.
➢Customized Hardware
❖Additional Sensors
•Temperature/Humidity
•Gas: CO2, CO, VOC’s
•PIR
❖Customized Battery options
➢Custom Motion Algorithms
❖Pattern Recognition
❖Machine Learning
❖Vibration Analysis
❖Fitness/Sports Analysis
➢Custom Software Applications
❖iOS
❖Android
❖PC Applications
➢Custom Cloud Applications
➢Custom Enclosure Options
Future Options
➢Compressed Audio Recording Streaming
➢AI / Machine Learning Application Development
➢User Application Flash Memory area to all for User applications to be programmed
directly onto the SFM2
➢SENSR-POD
❖BLE to Cellular Bridge
➢Vibration Analysis
➢Cloud Enablement

www.sensormaestros.com
6 | P a g e
User Manual V1.0.3
SFM2 Hardware Description
The SFM2 is comprised of a 64MHz Cortex M4F BLE SOC, Motion Sensors, and optional Pressure, Relative Humidity and Temperate
Sensors. A block diagram is shown below with further details below.
Figure 1: SFM2 Block Diagram
➢64MHz Cortex M4F MCU
➢9DOF Sensors
❖LSM6DSO –6 Axis Accelerometer/Gyroscope
❖LIS2DML –3 Axis Magnetometer
➢Optional Environmental Sensors
❖LPS22HH –Pressure Sensor
❖ENS210 –Relative Humidity and Temperature Sensor
➢BLE interface to provide easy means for application developers to make use of the SFM2 for developing custom
applications.
➢Example Software provided for BLE Client side for how to interface to the SFM2
❖Example Python 3D Cube application used to interface to the SFM2 from a USB/CDC Connection.
•Python API Library
❖Native C++ Library(coming soon)
➢USB2.0 Support:
❖SFM2 can be controlled/configured from a COM Terminal program using Serial Commands described in USB
Commands and for higher level Python API’s see Python API Library.
❖Sensor Fusion Data can be sent via USB2.0
❖USB provides Battery charging
➢Highly efficient BLE/Characteristic architecture
❖Every Sensor has its own Sample Rate, Full-Scale Range, Data Enable
❖Every Sensor has a Notification Enable

www.sensormaestros.com
7 | P a g e
User Manual V1.0.3
ACCEL/GYRO/SENSOR FUSION Specifications
Symbol
Parameter
Test conditions
Min.
Typ.(1)
Max.
Unit
FS_ODR
Sensor Fusion Output Data Rate
12.5
833
Hz
LA_FS
Linear acceleration measurement range
±2
g
±4
±8
±16
G_FS
Angular rate measurement range
±125
dps
±250
±500
±1000
±2000
LA_So
Linear acceleration sensitivity(2)
FS = ±2 g
0.061
mg/LSB
FS = ±4 g
0.122
FS = ±8 g
0.244
FS = ±16 g
0.488
G_So
Angular rate sensitivity(2)
FS = ±125 dps
4.375
mdps/LSB
FS = ±250 dps
8.75
FS = ±500 dps
17.50
FS = ±1000 dps
35
FS = ±2000 dps
70
LA_SoDr
Linear acceleration sensitivity change vs. temperature(4)
from -40° to +85°
±0.01
%/°C
G_SoDr
Angular rate sensitivity change vs. temperature(4)
from -40° to +85°
±0.007
%/°C
LA_TyOff
Linear acceleration zero-g level offset accuracy(5)
±20
mg
G_TyOff
Angular rate zero-rate level(5)
±1
dps
LA_OffDr
Linear acceleration zero-g level change vs. temperature(4)
±0.1
mg/ °C
G_OffDr
Angular rate typical zero-rate level change vs. temperature(4)
±0.010
dps/°C
Rn
Rate noise density in high-performance mode(6)
3.8
mdps/√Hz
RnRMS
Gyroscope RMS noise in normal/low-power mode(7)
75
mdps
An
Acceleration noise density in high-performance mode(8)
FS = ±2 g
70
µg/√Hz
FS = ±4 g
75
FS = ±8 g
80
FS = ±16 g
110

www.sensormaestros.com
8 | P a g e
User Manual V1.0.3
Symbol
Parameter
Test conditions
Min.
Typ.(1)
Max.
Unit
RMS
Acceleration RMS noise in normal/low-power mode(9) (10)
FS = ±2 g
1.8
mg(RMS)
FS = ±4 g
2.0
FS = ±8 g
2.4
FS = ±16 g
3.0
LA_ODR
Linear acceleration output data rate
12.5
26
52
104
208
416
833
1666
Hz
G_ODR
Angular rate output data rate
12.5
26
52
104
208
416
833
1666
1. Typical specifications are not guaranteed.
2. Sensitivity values after factory calibration test and trimming.
3. Subject to change.
4. Measurements are performed in a uniform temperature setup and they are based on
characterization data in a limited number of samples. Not measured during final test for production.
5. Values after factory calibration test and trimming.
6. Gyroscope rate noise density in high-performance mode is independent of the ODR and FS setting.
7. Gyroscope RMS noise in normal/low-power mode is independent of the ODR and FS setting.
8. Accelerometer noise density in high-performance mode is independent of the ODR.
9. Accelerometer RMS noise in normal/low-power/ultra-low-power mode is independent of the ODR.
10. Noise RMS related to BW = ODR/2.
Magnetometer Specifications
Symbol
Parameter
Test conditions
Min.
Typ.
Max.
Unit
FS
FS
Magnetic dynamic range
±49.152
gauss
So
Sensitivity
-7%
1.5
+7%
mgauss/
LSB
TcyOff
Magnetic Sensor Offset
With offset cancellation
-60
1.5
+60
mgauss
RMS
RMS Noise
High Performance Mode
3
mgauss
(RMS)

www.sensormaestros.com
9 | P a g e
User Manual V1.0.3
Pressure Sensor Specifications
Symbol
Parameter
Test conditions
Min.
Typ.
Max.
Unit
P
FS
Pressure Operating Range
260
1260
hPa
Pbits
Pressure bits of data
-7%
24
+7%
mgauss/
LSB
Psens
Pressure Sensitivity
4096
LSB/hPa
PAccRel
Relative Accuracy over pressure
P = 800-1100 hPa
T = 25°C
±0.025
hPa
PAccT
Absolute accuracy over temperature
Pop, T = -20 to 80°C
±0.5
hPa
ODRPres
Pressure output data rate
1
10
25
75
100
200
Hz
Relative Humidity Sensor Specifications
Symbol
Parameter
Test conditions
Min.
Typ.
Max.
Unit
P
FS
Pressure Operating Range
260
1260
hPa
Pbits
Pressure bits of data
-7%
24
+7%
mgauss/
LSB
Psens
Pressure Sensitivity
4096
LSB/hPa
PAccRel
Relative Accuracy over pressure
P = 800-1100 hPa
T = 25°C
±0.025
hPa
PAccT
Absolute accuracy over temperature
Pop, T = -20 to 80°C
±0.5
hPa
ODRPres
Pressure output data rate
1
10
25
75
100
200
Hz
Temperature Sensor Specifications
Symbol
Parameter
Test conditions
Min.
Typ.
Max.
Unit
P
FS
Pressure Operating Range
260
1260
hPa
Pbits
Pressure bits of data
-7%
24
+7%
mgauss/
LSB
Psens
Pressure Sensitivity
4096
LSB/hPa
PAccRel
Relative Accuracy over pressure
P = 800-1100 hPa
T = 25°C
±0.025
hPa
PAccT
Absolute accuracy over temperature
Pop, T = -20 to 80°C
±0.5
hPa
ODRPres
Pressure output data rate
1
10
25
75
100
200
Hz

www.sensormaestros.com
10 | P a g e
User Manual V1.0.3
LED Operation Description
COLOR
FUNCTION
NOTES
YELLOW
Connected
Will blink twice every ~2.5 seconds to indicate SFM2
is connected to a BLE Client
YELLOW
Advertising
Will blink once every ~1 second to indicate SFM2 is in
advertising mode
RED
Sensor/Sensors Enabled
Connected: Blink twice every ~2.5 seconds
Unconnected: Blink once every ~1 second
This LED is sequenced with the YELLOW LED if a
Sensor is Active/ON.
BLUE
Active Battery Charging
Solid BLUE Led indicates battery is charging via USB.
Table 1: LED Operation
BLE Operation
The SFM2 provides BLE Peripheral(slave) operation and allows any BLE Client(master) to connect to the SFM2. The SFM2 does not
require Bonding. Description of operation is provided below.
1) BLE ADVERTISING: Upon powering the device the SFM2 Performs BLE Advertising and advertises the Device name “SFM2”.
a. YELLOW BLE LED Blinks at ~1 second interval
b. Advertising Interval = 500ms
c. Currently the device does not allow user adjustment of the Advertising Interval.
NOTE: The Device Advertises as a Connectable BLE Peripheral and does not require any Bonding/Secure Pairing.
2) BLE CONNECTED: Once a BLE Client has connected to the SFM2 the device will transition to what is shown below and
allows the BLE Client to read all the Services, Characteristics, and Descriptors to allow an application to be developed.
a. YELLOW BLE LED Blinks at ~2.5 second interval
b. All BLE Services, Characteristics, Descriptors are available to be read from the Client.
c. The SFM2 Max/Min Connection interval is set for Maximum throughput via a BLE Connection. Not all BLE Clients in
particular Mobile Devices will allow for the minimum 7.5ms Connection interval. Sensor Sample Rates and Sensor
Fusion Output Rates should be configured according to the maximum throughput allowed by the Client BLE device.
3) BLE DISCONNECTED: Upon a BLE Client(master) disconnecting from the SFM2 the device will return to the BLE
ADVERTISING mode.
SFM2 Firmware Update
The SFM2 embedded firmware is not available in source code as open source. Licensing can be made available upon requests.
Developers/users of the SFM2 can make use of the USB Commands and/or the BLE Characteristics to configure and retrieve data
from the SFM2. Sensor Maestros can provide design services for customization of the embedded firmware for specific use cases on
a case by case basis. The SFM2 firmware can be updated via a BLE Connection.
The SENSR-LOGR mobile app will automatically detect if there is a new firmware version available for the SFM2. The SENSR LOGR
App can be found in the Apple App Store and on Google Play by searching for Sensor Maestros.
Android: https://play.google.com/store/apps/details?id=sensormaestros.SensorMaestros
iOS: Go to the ‘App Store’ on your mobile device and search for SENSR-LOGR or Sensor Maestros
If the SENSR-LOGR app detects that there is a newer version of firmware it will automatically prompt you to update to the latest
version of firmware. It is HIGHLY RECOMMENDED to update to the newest version of firmware.

www.sensormaestros.com
11 | P a g e
User Manual V1.0.3
Sensor Fusion
The SFM2 provides for 9DOF Sensor Fusion output that can be enabled by the user. The following Sensor Fusion output
streams are provided by the SFM2 and can be individually enabled/disabled using either the BLE or USB interface.
➢Quaternion
➢Tared Quaternion
➢Compass Heading and Tilt
➢Linear Acceleration
➢Euler Angle
Sensor Fusion output rates (ODR) can be selected by the user from 0(Disabled), 12.5, 26, 52, 104, 208, 417, and 833Hz.
The Sensor Fusion ODR(SFOR) can be set to an ODR rate equal to the highest ODR rate of either the GYRO or ACCEL. For example if
417Hz SFOR ODR rate is desired either the ACCEL or GYRO or both should be configured also to 417Hz. For optimum results it is
recommended to set the ACCEL & GYRO ODR rates to 2X the SFOR ODR rate. Technically the SFOR ODR can be greater than the ODR
rate of either the ACCEL or GYRO but not both. This configuration is NOT recommended though. The Magnetometer does not need
to be ODR rate correlated with the Sensor Fusion ODR rate though for any Sensor Fusion ODR rates 104Hz or greater it is highly
recommended to set the Magnetometer to its max value of 104Hz. The MAG ODR rate does have a requirement that the ODR rate
can’t be greater than both the ACCEL and GYRO. An acceptable configuration is shown below though NOT recommended.
ASR = 12.5Hz GSR = 208Hz MSR = 104Hz
14.1 Coordinate Systems
The SFM2 uses two different Coordinate Systems(CS):
•Local Coordinate System(LCS)
•Global Coordinate System(ENU)
The Global Coordinate System is fixed with the external world and it is ENU standard(East—North-Up, acceleration positive) the
same that is used in the Android coordinate system. It means that Global Coordinate System axes are oriented as follows:
➢X is East
➢Y is North
➢Z is Up
The LCS is a rigidly fixed coordinate system affixed to the SFM2 device and by default is as shown below:
Using the ‘TARE’ function this coordinate system can be re-oriented to any position the SFM2 has been moved to and will be
effectively Zero’d at the position it is in prior to using the ‘TARE’ function.
This means that when the SFM2 rotates(changes its orientation) the LCS rotates with it in the exact same manner. All the SFM2
attitude streams except SFQ provide attitude of current LCS provided in ENU. SFQ provides attitude of default LCS given in ENU. The
sensor measurement vectors(acceleration, angular rate, magnetic) and SFLA(Sensor Fusion Linear Acceleration) are by default given
in LCS but can also be given in ENU by enabling GLOBAL REFERENCE by setting GLOBREF = 1.

www.sensormaestros.com
12 | P a g e
User Manual V1.0.3
14.2 Tare Quaternion
The SFM2 variable SFTARE! provides the ability to change the LCS orientation. Executing SFTARE! creates a new LCS that is the same
as ENU in the moment of executing the command. After taring the SFM2 the LCS orientation is exactly the same as ENU so all angles
are zero. This allows you to change the default LCS to any other you want. This is EXTREMELY USEFUL if the SFM2 has been
mounted or moved the user can use the SFTARE! function to re-orient the LCS to this new orientation. This provides an easy means
for the user to always start from a known orientation starting point regardless of the physical orientation of the SFM2.
Example: Attach the SFM2 to some piece of equipment that is stationary during the attachment. The orientation of the SFM2 with
respect to the equipment doesn’t matter. Orient the equipment in such a way that its X axis point East, Y axis points North and Z
axis points Up(the orientation of equipment is the same as ENU). With the SFM2 in a stable position execute the SFTARE! command
or execute this via the Mobile App. Now the SFM2 outputs are given in the new LCS which is the same as the equipment’s
coordinate system.
14.3 Headtare
Sometimes it is not practical to rotate the equipment to match the ENU axes for taring. Then you can ‘TARE’ in any
orientation(making sure the equipment is not tilted) and then manually correct the SFM2 using the Headtare function
(HEADTARETARE=<angle_in_deg>) according to the current equipment heading angle. The angle is measured between the
West-East axis and the equipment axis is in the counter-clockwise manner(looking from above). Headtare allows for a manual
alignment adjustment to the SFM2 in degrees.
14.4 Global Reference
To understand the Global Reference option, please get familiar with the ‘Coordinate Systems’ first being LCS and ENU.
All sensor measurement vectors(acceleration, angular rate, magnetic) and SFLA(Sensor Fusion Linear Acceleration) are by default
given in LCS.
Tracking Acceleration Example: It is useful for example when you want to measure the acceleration of your car. You fix the SFM2
to your car, tare and adjust the heading using headtare if needed. Then all the accelerations related to car acceleration or breaking
appear on the X axis. When the car accelerates there are positive readings on the X axis, when it is braking there are negative
readings on the X axis. It is no matter how the car is oriented in the external world the X axis is always affixed to forward and
backward motion. No matter whether you are driving South-North or East-West the reading are always on the X axis.
In the presented above car example using measurements given in the LCS is the best solution because it gives you exactly what you
want.
The case is completely different when you want to track the trajectory of a ball.
Tracking Trajectory Example: In this case you would put the SFM2 into the ball and affix it in some manner and throw it. Now you
want to draw the flight trajectory. In the simplest form to get the position(relative to the start point)you have to integrate the
acceleration twice. It would be easy if the ball would not be spinning. When the ball(and SFM2) is spinning its LCS axis are changing
orientation all the time so the acceleration measured on the X axis sometimes refers to North-South movement, sometimes
East-West and sometimes Up and Down. It all depends what is the actual SFM2 orientation in the external world at that moment in
time. Calculating trajectory using measurements given in LCS are not easy and require a bit of math.
The trajectory calculation would be GREATLY SIMPLIFIED if the measurement would be given in some external(global) coordinate
system that is fixed NOT with the SFM2/Ball BUT with the external world. This can be achieved using the ‘Global Reference’ option
by setting GLOBREF=1.
When GLOBREF=1 is set all the measurements are given in the ENU. It means that all the acceleration on the X axis corresponds to
East-West movement, on the Y axis to North-South movement and on the Z axis to Up-Down movement no matter what the ball
orientation is. Calculating the trajectory using measurements given in ENU is MUCH EASIER because you don’t need to take the ball
spin into account.
➢When GLOBREF=1 all vector outputs( raw sensor data and SFLA) are represented in the global reference frame and are not
affected if the SFM2 is ‘tared’.

www.sensormaestros.com
13 | P a g e
User Manual V1.0.3
➢When GLOBREF=0 and the device is ‘tared’ all vector outputs are rotated to match the new orientation. This means that
after taring the SFM2 the Accelerometer output AD should always read approximately x=0, y=0, z=1, until the orientation is
changed.
Manual Calibration
The SFM2 is provided with factory calibration. In general it is not recommended to perform a full re-calibration however there may
be some cases where this may be necessary. Also it should be noted that with ‘Updating enabled’ and ‘Auto storage mode’ enabled
the SFM2 will continuously look for a better calibration than what is currently being used. If a better calibration set of parameters is
found as may be the case if the SFM2 has been mounted to a particular object those new parameters will be used in place of the
prior calibration values.
To determine if the SFM2 already has had a calibration performed go to the Stats->Calibration section. If it is blank as shown below
a manual calibration will need to be performed as there is no calibration values currently stored in the SFM2.
No Calibration Parameters stored in SFM2 Typical Config Values for performing a manual calibration.

www.sensormaestros.com
14 | P a g e
User Manual V1.0.3
15.1.1 Calibration Steps
1) STEP 1: Recommended Manual process is to hold the SFM2 away from any large metal objects as metallic objects will
affect the magnetic calibration process.
2) STEP 2: Hold the SFM2 in open air and rotate/roll the SFM2 around its X axis multiple times trying to keep the rotations
smooth and at a consistent speed.
3) STEP 3: Do this while you are viewing the Stats->Calibration view so you can see the Calibration parameters and Error being
updated in real time.
4) STEP 4: After you see the initial calibration values appear starting with 4 element values continue the same rotation and
you should soon see the Calibration values update to the 7 Element values as shown below…
5) After seeing the Calibration values update to 7 Element values now angle the SFM2 slightly so it is pointing either slightly up
or slightly down. NOTE: The strap can be ignored in the picture below.
6) You will typically see the Calibration values update again to 10 element values after angling the SFM2 while still rotating it
around the X axis. Now angle the SFM2 in the opposite direction you had it in STEP 4: to see if the ‘Mag calibration error’
value improves. We are looking for 10 Element Calibration with ‘Mag Calibration Error’ < 3%.

www.sensormaestros.com
15 | P a g e
User Manual V1.0.3
7) If the 10 element calibration shows a ‘Mag calibration error’ < 3% then you can go to Config-Calibration and select the ‘Save
Calibration’ button. This will store the current calibration values in Non-Volatile memory so that these values will be used
the next time the SFM2 is powered on.
15.1.2 Calibration Notes
1) It can happen that the 4 element values show a Mag Cal error that is less than the 7 element or 10 element. There are
fewer elements taken into account but this is still not as good as a 10 element calibration.
2) If after you perform the Calibration the ‘Mag calibration error’ shows an error > 3% it is recommended to go to
Config->Calibration and click the ‘Clear Storage’ button to ensure any prior Calibration values are cleared from memory.
Power cycle the SFM2 and perform the calibration again.
3) Calibration can be performed with NO Data Streams active. The motion sensors should be configured for ODR rates that
are suitable for the application.
Timestamps
Timestamps are crucial to being able to accurately analyze data. The SFM2 and the SENSR-LOGR app provide methods to allow for
highly accurate, consistent timestamps to be provided in data streams that would be logged whether using the BLE or USB interface.
The default timestamp clocks are defined below.
ClockSource
Tick
Accuracy
Enabled
LSM6DSx
25us
Poor
ALWAYS ON
RTC
30.518us
High
TSDE = 1 & BLE Interface

www.sensormaestros.com
16 | P a g e
User Manual V1.0.3
SENSR-LOGR app by default sets TSDE=1 upon connection to a SFM2. From the USB Interface this can be enabled/disabled
however. If a user desires to develop their own mobile app it is highly recommended to ALWAYS set TSDE=1 to allow for providing
for accurate timestamps.
An example of RTC output in the binary stream is shown below which could apply for BLE or USB connection.
Suppose that AD stream is enabled @208Hz rate and TS data is turned on.
We receive the following binary frames:
Frame idx
Samples
LSM6DSx clock (25us tick)
1
AD
100000
2
AD
100192 ( Sample Delta: 192 ticks * 25us = 4.8ms or 208Hz)
3
AD + TS = 630
100384
4
AD
100576
5
AD
100768
6
AD
100960
7
AD + TS = 1260
101152
8
AD
101344
9
AD
101536
10
AD
101728
11
AD + TS = 1890
101920
The SENSR-LOGR app then uses the TS data to calculate the RTC timestamps corresponding to the remaining AD samples. The
timestamps shown in LOG file from the SENSR-LOGR app are already calculated to an actual time value versus being displayed in
LSM6DSx ‘ticks’.
NOTE: This timestamp synchronization is completely different than synchronizing multiple SFM2’s to each other. Synchronizing
multiple SFM2’s does leverage the highly accurate 32.768kHz clock but there are several additional items that are monitored and
adjusted if necessary to synchronize multiple SFM2’s.
16.1 SENSR-LOGR timestamps
Timestamps shown in Log files from logging Data from a SFM2 or multiple SFM2’s are already converted to an actual time value out
to 7 decimal points. If you are using the SENSR-LOGR app it will automatically adjust individual LSM6DSx timestamps if needed by
utilizing the RTC time that is output in the binary frames which is highly accurate and provides a reference clock to make minor
adjustments in the LSM6DSx timestamp which is output in an Integer value.
Example of a LOG file using the SENSR-LOGR app with SFQT @833Hz which is one of the fastest sampling rates available on the SFM2
for Sensor Fusion outputs. Raw Accelerometer and Gyroscope data can be output as high as 1667Hz.
NOTE: Timestamp Deltas = 1.2268ms and 1.2269ms translating to ~815Hz output rate. The exact output rate can vary slightly but it
will be consistent and the timestamps using the SENSR-LOGR app will be very accurate.
Time [s]
W
X
Y
Z
Delta (µs)
1992.2697675
0.42324
0.07057
-0.04128
0.90232
1992.2709943
0.42172
0.06684
-0.03926
0.90340
1226.800
1992.2722212
0.41955
0.06162
-0.03637
0.90491
1226.900
1992.2734480
0.41857
0.05992
-0.03616
0.90548
1226.800
1992.2746749
0.41550
0.05734
-0.03538
0.90710
1226.900
1992.2759017
0.41486
0.05676
-0.03358
0.90749
1226.800
1992.2771285
0.41432
0.05564
-0.03172
0.90788
1226.800

www.sensormaestros.com
17 | P a g e
User Manual V1.0.3
1992.2783554
0.41513
0.05741
-0.03185
0.90739
1226.900
1992.2795822
0.41694
0.06068
-0.03216
0.90634
1226.800
1992.2808091
0.41911
0.06434
-0.03223
0.90508
1226.900
1992.2820359
0.42085
0.06716
-0.03211
0.90407
1226.800
1992.2832627
0.42198
0.06913
-0.03226
0.90339
1226.800
1992.2844896
0.42384
0.07217
-0.03278
0.90226
1226.900
1992.2857164
0.42410
0.07223
-0.03248
0.90215
1226.800
1992.2869432
0.42549
0.07499
-0.03336
0.90123
1226.800
1992.2881701
0.42568
0.07555
-0.03383
0.90108
1226.900
1992.2893969
0.42532
0.07473
-0.03351
0.90133
1226.800
1992.2906238
0.42448
0.07269
-0.03252
0.90193
1226.900
1992.2918506
0.42362
0.07063
-0.03150
0.90253
1226.800
STD Deviation 20 Deltas(µs)
0.050
16.2 USB/COM Port Timestamps
USB/COM port timestamps are output in a LSM6DSx tick format. An example of the COM port output on a terminal window such as
Putty is shown below. Example of COM Port output for 833Hz TSDE=1 Non-Binary mode.
SFQT:5.3619534E-1,-3.3474213E-1,-3.8904034E-2,-7.73905E-1@393955
SFQT:5.361946E-1,-3.347494E-1,-3.8905397E-2,-7.739021E-1@394003
SFQT:5.3619564E-1,-3.3475372E-1,-3.8908757E-2,-7.738995E-1@394051
SFQT:5.3619516E-1,-3.3475843E-1,-3.890932E-2,-7.738977E-1@394099
SFQT:5.361955E-1,-3.3476514E-1,-3.8911525E-2,-7.7389455E-1@394147
SFQT:5.361958E-1,-3.3476412E-1,-3.8911685E-2,-7.738947E-1@394195
SFQT:5.3619444E-1,-3.3477426E-1,-3.89153E-2,-7.7389115E-1@394243
SFQT:5.361948E-1,-3.347757E-1,-3.891803E-2,-7.7389E-1@394291
SFQT:5.361951E-1,-3.3477685E-1,-3.8917627E-2,-7.738895E-1@394339
SFQT:5.3619426E-1,-3.347772E-1,-3.891741E-2,-7.738899E-1@394387
SFQT:5.361937E-1,-3.3477232E-1,-3.8916305E-2,-7.7389234E-1@394435
SFQT:5.3619385E-1,-3.3476683E-1,-3.8914517E-2,-7.7389467E-1@394483
SFQT:5.361941E-1,-3.34764E-1,-3.8915258E-2,-7.738958E-1@394531
SFQT:5.361934E-1,-3.3475825E-1,-3.8915522E-2,-7.7389866E-1@394579
SFQT:5.361922E-1,-3.3475316E-1,-3.891633E-2,-7.739017E-1@394627
SFQT:5.361896E-1,-3.3475327E-1,-3.8911823E-2,-7.739036E-1@394675
SFQT:5.3618896E-1,-3.347374E-1,-3.8905088E-2,-7.7391136E-1@394723
SFQT:5.361908E-1,-3.3471256E-1,-3.8902704E-2,-7.739209E-1@394771
If the data was to be sorted for the first 5 values preceeding the samples shown above it would look like this…
Note: Timestamp Delta = 48ticks => 48 * 25us = 1.2ms or a 833Hz ODR rate.
Time
W
X
Y
Z
Delta(25µs tick)
393715
5.03E-01
-3.39E-01
-2.55E-02
-7.94E-01
393763
5.03E-01
-3.39E-01
-2.55E-02
-7.94E-01
48
393811
5.03E-01
-3.39E-01
-2.55E-02
-7.94E-01
48
393859
5.03E-01
-3.39E-01
-2.55E-02
-7.94E-01
48
393907
5.03E-01
-3.39E-01
-2.55E-02
-7.94E-01
48

www.sensormaestros.com
18 | P a g e
User Manual V1.0.3
Synchronize Multiple SFM2’s
The SFM2 allows for multiple SFM2’s to be synchronized together to allow multiple SFM2’s to be used with either the BLE or the
USB/COM port interfaces. It is very useful to be able to have multiple SFM2’s operating at the same time simultaneously connected
via the BLE or the USB interfaces to monitor multiple locations of a person or object. The only way this is useful though is if the data
that is logged by each SFM2 is synchronized in time. The SENSR-LOGR app provides an easy means to allow a user to do this using
the ‘Synchronization’ feature in the ‘Time’ view in the SENSR-LOGR app. This is further described in Multi Mode: Time
Synchronization. For USB operation there is an example Python script in the sfm2_python_lib_0_7/examples folder called
‘testing_time_synchronization.py’ that provides an example of this using the USB interface.
Binary Frame Mode
The binary frame mode provides a means for optimizing the throughput of the BLE and USB interfaces by packing sensor data and
optionally RTC timestamp data in binary frames that can be decoded on either the BLE Client/SENSR-LOGR or USB Application side.
For the case of the BLE interface the Binary Frames are sent using the Data Stream 0x0101 Characteristic.
NOTE: The BLE interface ALWAYS operates in Binary Frame mode whereas the USB/COM Port interface can operate either in ASCII
or Binary Frame mode. To enable Binary Frame Mode using the USB/COM port interface the BINMODE=1 command should be used.
18.1 Binary Frame Format
Start by
t
e
0x
FA
Data
description
Timestamp
Da
t
a
End by
t
e
0x
FB
1 byte
2 bytes
4 bytes
Variable length
1 byte
18.2 Start byte
Asingle byte used as a frame delimiter. It’s value is fixed: 0xFA.
18.3 Data description
Indicates what sample types are contained in the frame. The field consists of 16 bits, where
each bit indicates if it’s corresponding sample type is contained in the frame.
Bit
Sample Type
0
AD - Accelerometer
1
GD –Gyroscope
2
MD –Magnetometer
3
SFQ –Sensor Fusion Un-Tared Quaternion
4
SFQT –Sensor Fusion Tared Quaternion
5
SFLA –Sensor Fusion Linear Acceleration
6
SFEA –Sensor Fusion Euler Angles
7
SFCHT –Sensor Fusion Heading
8
SFM –Sensor Fusion Calibrated Magnetometer
9
PD –Pressure
10
ALT –Altitude
11
TD –Temperature
12
HD –Humidity
13
TS –Time Synch
14-15
Reserved for future use

www.sensormaestros.com
19 | P a g e
User Manual V1.0.3
18.4 Timestamp
Contains a single UInt32 value denoting time in 25us resolution. All samples contained in the frame share
the same timestamp.
NOTE: When TSDE=1 the highly accurate RTC time is included in the ‘Data’ frame. This timestamp
is the LSM6DSx time tick.
18.5 Data
Contains measurement sample data.
Sample type
Size
Content
AD - accelerometer
12 bytes
Vector of 3 floats
GD - gyroscope
12 bytes
Vector of 3 floats
MD - magnetometer
12 bytes
Vector of 3 floats
SFQ - Sensor Fusion untared quaternion
16 bytes
Quaternion of 4 floats
SFQT - Sensor Fusion quaternion
16 bytes
Quaternion of 4 floats
SFLA - Sensor Fusion Linear
acceleration
12 bytes
Vector of 3 floats
SFEA- Sensor Fusion EulerAngles
12 bytes
3 floats: Roll, Pitch, Yaw
SFCHT - Sensor Fusion Heading
8 bytes
2 floats: Heading, Tilt
SFM - Sensor Fusion calibrated
magnetometer
12 bytes
Vector of 3 floats
PD –Pressure
4 bytes
Single float value, in hPa
ALT - Altitude
4 bytes
Single float value, in meters
TD –Temperature
4 bytes
Single float value, in Celsius
HD –Humidity
4 bytes
Single float value, in %
TS –Time Synch
4 bytes
Two uint32 values
1) RTC time in RTC ticks(see TIME
command)
2) Configuration index, incremented each
time the RTC is set, either with the TIME
or TOFFSET commands.
NOTE: If a frame contains more than one sample,the samples are packed one after
another in the order as they appear in the table above.
18.6 End byte
Asingle byte used as a frame delimiter. It’s value is fixed: 0xFB.

www.sensormaestros.com
20 | P a g e
User Manual V1.0.3
18.7 Examples
18.7.1 SFQT+SFLA@104Hz
Each data frame contains two samples, one for SFQT, one forSFLA. They always share a common
timestamp.
Field
Start byte
Data
description
Timestamp
Da
t
a
End byte
SFQT
SFLA
Value
0xFA
0x30*
4 bytes
16 bytes
12 bytes
0xFB
*0x30 = 0b0000 0000 0011 0000. With ones at 4th and 5th positions (zero-indexed),
corresponding to SFQT and SFLA.
18.7.2 AD@208Hz + GD@104Hz
There are twice as many AD samples as there are GD. This means thatAD samples are present in
every frame, and GD samples in every other frame.
Frame 1 (AD+GD):
Field
Start byte
Data
description
Timestamp
Da
t
a
End byte
A
D
G
D
Value
0xFA
0x03*
4 bytes
12 bytes
12 bytes
0xFB
*0x03 = 0b0000 0000 0000 0011. With ones at 0th and 1st positions (zero-indexed),
corresponding to AD and GD.
Frame 2 (AD):
Field
Start
byte
Data
description
Timestamp
Da
t
a
End byte
A
D
Value
0xFA
0x01*
4 bytes
12 bytes
0xFB
*0x01 = 0b0000 0000 0000 0001. With a single one at 0th position (zero-indexed),
corresponding to AD.
Frame 1 and 2 come alternately, one after the other.
Other manuals for SFM2
1
Table of contents