Suggest Edit

Diurnyx User Guide

Version 0.1.0 - Last updated: 2026-04-21

Note: Diurnyx is intended for research use only and is not a medical device. Recorded data is not suitable for diagnostic or clinical use.

Diurnyx is a USB-C powered system for measuring and recording sleep-related biosignals. It acquires data from connected sensors and stores recordings as EDF (European Data Format) files on an SD card.

A typical workflow is:

  1. Prepare an SD card with a valid configuration
  2. Power the device via USB-C
  3. Start a recording with a short button press
  4. Stop the recording with a long press
  5. Remove the SD card and copy the EDF file or files

Each recording session is saved as a separate EDF file.


System Overview

Diurnyx includes:

During operation, the device:


Requirements

Before use, make sure you have:

Recorded files are written to:

/DATA/

If the DATA directory does not already exist, the device creates it automatically.


SD Card Preparation

Required card structure

The SD card must contain:

A typical card layout looks like this:

SD_CARD/
├── config.json
└── DATA/
    └── 20260421_143015.edf

Before the first recording, the card may contain only:

SD_CARD/
└── config.json

Notes

If there is any doubt about the card format, reformat it using standard FAT settings and then copy config.json back to the root directory.


Configuration

Diurnyx is configured using a config.json file located in the root directory of the SD card.

Configuration Schema

The full configuration structure is documented in the generated API documentation:

View configuration schema documentation

Example Configurations

A collection of sample configuration files is available to help you get started:

Browse sample configurations

These examples demonstrate typical setups for different sensor combinations and use cases. You can copy and modify them as needed.


Controls

Diurnyx uses a single button.

While idle

While recording


Starting a Recording

  1. Insert the SD card
  2. Power the device via USB-C
  3. Wait for the device to become idle
  4. Short-press the button

When recording starts, the device:

If any of these steps fail, recording will not start.


Stopping a Recording

To stop a recording, long-press the button while recording is active.

The device then finalizes and closes the EDF file before returning to idle.

Do not remove power or remove the SD card until recording has fully stopped.


Recorded Files

Recordings are stored in:

/DATA/

Each recording session is written as a separate EDF file.

File names are based on the recording start time using the device clock:

YYYYMMDD_HHMMSS.edf

Example:

20260421_143015.edf

The timestamp used for the filename is derived from the internal real-time clock. If a timezone is configured, local time is used for file naming and EDF metadata.


Timekeeping

Diurnyx uses its internal real-time clock for timestamps.

This affects:

If configured, a timezone offset is applied when generating the recording timestamp.

The device may also update its real-time clock from the SD card configuration file timestamp when appropriate, for example if the stored file timestamp is newer than the current real-time clock value or if a clock reset is requested in configuration.


USB Logging

Diurnyx provides USB logging over a virtual COM port using USB CDC-ACM.

When connected to a host computer, the device can appear as a serial port for development and troubleshooting. Log output may include:

The logs are timestamped and intended for development, testing, and troubleshooting. They should not be treated as validated diagnostics.

A serial terminal program such as minicom, screen, or PuTTY can be used to monitor the log output.


Firmware Update (DFU)

Diurnyx supports firmware update over USB using Device Firmware Upgrade.

DFU behavior

The firmware exposes a USB Device Firmware Upgrade interface. When Device Firmware Upgrade mode is requested by the host, the device resets into the STM32 system read-only memory bootloader.

After that reset:

Notes


Troubleshooting

Recording does not start

Check the following:

Recording starts but no useful data is captured

Check the following:

Timestamps look wrong

Check the following: