/arimu

ARIMU (ARm use IMU) firmware written for the Open Log Artemis.

Primary LanguageC++MIT LicenseMIT

ARm use IMU FIrmwaRE - ARIMUFire

ARIMU or Arm use IMU is a wearable movement sensor developed by the Biological Learning and Rehabilitation Group at the Department of Bioengineering, Christian Medical College Vellore, India. It is based on the versatile, open-source data logger OpenLog Artemis from SparkFun.

We first describe the device ARIMU, and then provide the details of the current version of the firmware.

ARIMU

Arm Use IMU is essentially the OpenLog Artemis with custom firmware and enclosure. The current version of the device uses only the onboard IMU sensor, RTC, and microSD card logging modules. ARIMU's schematic is shown in the following figure.

The current version of ARIMU uses a 600mAh Lithium Polymer battery. The OpenLog board, the battery, and the switch are placed in a 3D-printed enclosure with holders for straps. The 3D model of the enclosure, its dimensions, and the arrangement of the different components inside the enclosure are shown below.

The 3D model file for the ARIMU enclosure and its components can be found here.

Here is a video of the physical prototype of a fully assembled ARIMU with the straps for donning it around the wrist.

Video Image

ARIMUFire

ARIMU does not use the native firmware that comes with the OpenLog. This was done for three reasons:

  1. To allow the OpenLog to operate in logging or data streaming (via USB serial, BLE or any other wireless protocol through add-on hardware) modes.
  2. To be able to read and set custom device parameters through USB serial.
  3. To be able to read and manage files on the SD card through USB serial.

The custom firmware - ARIMUFire - is implemented to allow for all these features and a few more.

Device parameters

There are several device parameters that are used in the current firmware.

  • Device name: A name can be assigned to individual devices.
  • Subject name: The user to which the device can be assigned; this can be read and set through a USB serial protocol.
  • Max. size of a file: There is a maximum size limit for individual files logged onto the SD card. If the size of the current file exceeds this, the device creates a new file.
  • Date time threshold: A threshold for the datetime is set, and whenever the RTC value goes below this, the device will set an error flag to indicate that the RTC is out of sync.

Data logging

At every loop execution, ARIMUFire logs the RTC timestamp, the three values of the accelerometer, and the three values of the gyroscope. The data is logged in a binary format, which has a header, and the data packets with timestamps, accelerometer, and gyroscope values. Each data packet is 19 bytes long as shown below:

Timestamp (7 bytes) Accelerometer (6 bytes) Gyroscope (6 bytes)
Year Month Day Hour Minute Second 10milsec ax ay az gx gy gz
1 byte 1 byte 1 byte 1 byte 1 byte 1 byte 1 byte 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes 2 bytes

The individual data filenames have the following format: "{Subject name}_data_{File number}.bin"

Device LEDs

There is a red and blue LED on the OpenLog which are used to indicate the mode of operation of the ARIMU:

Mode Red LED Blue LED
RTC error/SD card error Fast blinking Fast blinking
Normal SD logging Off Blinks every
5 sec
Data communication
(via USB serial)
On On