SparkFun DataLogger IoT - 9D - Initial Setup

is a great datalogger tool that comes with the pre-programmed firmware that allows you to collect board sensor data into a file into an internal SD card. This SparkFun DataLogger IoT - 9DoF already has a ESP32-WROOM-32E-N4 Espressif Systems Xtensa dual-core 32-bit LX6 microprocessor, also a MAX17048 micropower current fuel gauge for lithium-ion (Li+) batteries, an ST ISM330 accelerometer/gyro inertial module and also a High Performance 3-axis Magnetic Sensor.. This portable SparkFun DataLogger IoT - 9DoF allows you to record readings from many supported devices which are automatically sensed via Qwiic using these cables. Data can be time-stamped when the time is synced to different options like NTP, GNSS, or RTC. This device can be powered from a Littium Ion battery like this one. Also the SparkFun DataLogger IoT - 9DoF can send its data wirelessly to a preferred Internet of Things (IoT) service.

Initial Setup

As a first test, first format the SD Card for FAT32 format, then insert it into the SparkFun DataLogger IoT - 9DoF.

Then simply plug the usb power port and let it collect data from its internal sensors.

After the unit is left operating for a couple seconds, it can be turned off and the SD card can be read from another computer. Here is an example of the default file in the SD card that is being collected opened from Excel or another editor,

MAX17048.Voltage (V) MAX17048.State Of Charge (%) MAX17048.Change Rate (%/hr) ISM330.Accel X (milli-g) ISM330.Accel Y (milli-g) ISM330.Accel Z (milli-g) ISM330.Gyro X (milli-dps) ISM330.Gyro Y (milli-dps) ISM330.Gyro Z (milli-dps) ISM330.Temperature (C) MMC5983.X Field (Gauss) MMC5983.Y Field (Gauss) MMC5983.Z Field (Gauss) MMC5983.Temperature (C)
4.347 121.547 -4.16 -382.348 127.856 917.196 367.5 612.5 35 24.324 0.11554 0.05505 0.73462 26
4.349 121.547 -4.16 -370.392 124.684 922.564 122.5 -385 122.5 24.605 0.10474 0.05817 0.73895 26
4.349 121.547 -3.12 -362.584 122.366 926.468 105 -140 157.5 24.898 0.09882 0.0589 0.74225 27
4.35 121.547 -3.12 -356.728 120.78 928.786 70 -402.5 192.5 25.172 0.09381 0.06018 0.74408 27

The previous table shows the voltage, state of charge, charge rate parameters of the MAX17048, the XYZ data from the accelerometer, XYZ data from the gyroscope from the ST ISM330 sensor, the XYZ data from the magnetometer MMC5983 sensor and the temperature.

Setup Datalogger via Terminal Menu (Data Collection Rate)

In order to setup the SparkFun DataLogger IoT - 9DoF the device is connected to the USB cable and the host computer. The program minicom can be used to access the SparkFun DataLogger IoT - 9DoF internal parameters,

minicom -D /dev/ttyUSB0 -b 115200 -7

Please press the reset button located next to the USB connector on the board. The main configuration menu will display after pressing ENTER in the minicom terminal (If the dataloger is left without ENTER it will display to the user the datalogging data to USB minicom terminal, if that needs to be interrupted to go back to the configuration menu press ENTER anytime)


rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13924
ho 0 tail 12 room 4
load:0x40080400,len:3600
entry 0x400805f0

SparkFun DataLogger IoT - 9DoF   (c) 2023 SparkFun Electronics
Version: 01.00.04  - build 0000bb

Device ID: SFD1B805D422C930
Time: 1970-01-01T00:04:52
Uptime: 0 days, 00:04:52.666

Settings for: /SparkFun DataLogger IoT - 9DoF

         1)  Settings - System settings and operations
         2)  Devices Settings - Settings for connected devices

         x)  Exit

Select Option:  

If the data logging rate needs to be changed to once per second, then press 1 for Settings - System settings and operations and the next menu will display,

Settings for: /SparkFun DataLogger IoT - 9DoF/Settings


    General
         1)  Application Settings - Main Application Settings
         2)  Save Settings - Save, Restore and Reset System settings.
         3)  Time Sources - Manage time reference sources

    Network
         4)  WiFi Network - WiFi network connection for the system
         5)  NTP Client - NTP Time Sync Client

    Logging
         6)  Logger - Data logging action
         7)  Logging Timer - Set the internal between log entries
         8)  Data File - Output file rotation manager

    IoT Services
         9)  MQTT Client - A generic MQTT Client
        10)  MQTT Secure Client - A secure MQTT client
        11)  AWS IoT - Connect to an AWS Iot Thing
        12)  ThingSpeak MQTT - Connection to ThingSpeak
        13)  Azure IoT - Connection to Azure IoT
        14)  HTTP IoT - An HTTP IoT data connector
        15)  MachineChat - Connection to MachineChat

    Advanced
        16)  System Update - Device Reset and Firmware Update Options

         b)  Back

Press 7 for Logging Timer - Set the internal between log entries



Settings for: /SparkFun DataLogger IoT - 9DoF/Settings/Logging Timer

Settings:
         1)  Interval - The timer interval in milliseconds

         b)  Back

Select 1 Interval - The timer interval in milliseconds and enter 1000 ms = 1 second displayed below,


Settings for: /SparkFun DataLogger IoT - 9DoF/Settings/Logging Timer/Interval

        Edit the value of `Interval` - data type <integer>

        When complete, press <Return> to accept, <ESC> to discard

        Interval = 1000

        [The value of Interval was updated]

Navigate back to the main menu by selecting b the back option and doing it twice to go back in this case, and then x to exit and save the system settings, and it will automatically start collecting data at the new rate of 1 data log per second as shown below,

Settings for: /SparkFun DataLogger IoT - 9DoF

         1)  Settings - System settings and operations
         2)  Devices Settings - Settings for connected devices

         x)  Exit

Select Option: Exit


End Settings
[I] Saving System Settings.
4.350,121.074,322.608,-65.636,-60.024,1001.986,-105.000,-402.500,105.000,26.449,-0.41473,-0.01465,0.63361,30
4.351,121.074,322.608,-65.758,-60.146,1002.230,262.500,-70.000,175.000,26.484,-0.41473,-0.01477,0.63361,30
4.350,121.074,322.608,-66.124,-60.146,1002.352,140.000,-175.000,210.000,26.473,-0.41473,-0.01465,0.63379,30
4.350,121.074,322.608,-66.002,-60.024,1002.108,87.500,-262.500,192.500,26.473,-0.41492,-0.01471,0.63385,30
4.350,121.074,322.608,-66.002,-60.146,1002.596,192.500,-210.000,227.500,26.473,-0.41486,-0.01465,0.63379,30
4.351,121.074,322.608,-66.124,-60.024,1003.084,332.500,-192.500,192.500,26.508,-0.41382,-0.01404,0.63336,3

Other system settings can be configured as needed like sleep modes (Wake intervals, Sleep intervals) and the SD Card data format from the terminal.

Setup Datalogger via Terminal Menu (Connection to WiFi, NTP, Data Collection Timestamp)

In order to connect the SparkFun DataLogger IoT - 9DoF to the internet via miniterm from the main menu select 1) Settings - System settings and operations,


Settings for: /SparkFun DataLogger IoT - 9DoF

         1)  Settings - System settings and operations
         2)  Devices Settings - Settings for connected devices

         x)  Exit

Select Option: 

then select 4 WiFi Network - WiFi network connection for the system in the next menu,



Settings for: /SparkFun DataLogger IoT - 9DoF/Settings


    General
         1)  Application Settings - Main Application Settings
         2)  Save Settings - Save, Restore and Reset System settings.
         3)  Time Sources - Manage time reference sources

    Network
         4)  WiFi Network - WiFi network connection for the system
         5)  NTP Client - NTP Time Sync Client

    Logging
         6)  Logger - Data logging action
         7)  Logging Timer - Set the internal between log entries
         8)  Data File - Output file rotation manager

    IoT Services
         9)  MQTT Client - A generic MQTT Client
        10)  MQTT Secure Client - A secure MQTT client
        11)  AWS IoT - Connect to an AWS Iot Thing
        12)  ThingSpeak MQTT - Connection to ThingSpeak
        13)  Azure IoT - Connection to Azure IoT
        14)  HTTP IoT - An HTTP IoT data connector
        15)  MachineChat - Connection to MachineChat

    Advanced
        16)  System Update - Device Reset and Firmware Update Options

         b)  Back

Select Option: 

Make sure that the WiFi Network connection in selection 1 is enabled and then Select 2 Network Name - The SSID of the WiFi network to setup the name of the WiFi Network and also Select 3 Password - The Password to connect to the WiFi network shown below,


Settings for: /SparkFun DataLogger IoT - 9DoF/Settings/WiFi Network

Settings:
         1)  Enabled - Enable or Disable the WiFi Network connection
         2)  Network Name - The SSID of the WiFi network
         3)  Password - The Password to connect to the WiFi network
         4)  Network 2 Name - Alternative network 2 SSID
         5)  Network 2 Password - Alternative network 2 Password
         6)  Network 3 Name - Alternative network 3 SSID
         7)  Network 3 Password - Alternative network 3 Password
         8)  Network 4 Name - Alternative network 4 SSID
         9)  Network 4 Password - Alternative network 4 Password

         b)  Back

Select Option: 

Once that WiFi Connection to the Network is complete, select 5 to enable the NTP in the menu, select 3 Time Sources - Manage time reference sources then select 1 Reference Clock - The current reference clock source, then select 2 NTP Client. Then go back to the main menu, and select 6 Logger - Data logging action, select 1 Timestamp Mode - Enable timestamp output and set the format of a log entry timestamp, select the desired format for the timestamp from the menu (for example 5 which is Date Time = 4 format)


Settings for: /SparkFun DataLogger IoT - 9DoF/Settings


    General
         1)  Application Settings - Main Application Settings
         2)  Save Settings - Save, Restore and Reset System settings.
         3)  Time Sources - Manage time reference sources

    Network
         4)  WiFi Network - WiFi network connection for the system
         5)  NTP Client - NTP Time Sync Client

    Logging
         6)  Logger - Data logging action
         7)  Logging Timer - Set the internal between log entries
         8)  Data File - Output file rotation manager

    IoT Services
         9)  MQTT Client - A generic MQTT Client
        10)  MQTT Secure Client - A secure MQTT client
        11)  AWS IoT - Connect to an AWS Iot Thing
        12)  ThingSpeak MQTT - Connection to ThingSpeak
        13)  Azure IoT - Connection to Azure IoT
        14)  HTTP IoT - An HTTP IoT data connector
        15)  MachineChat - Connection to MachineChat

    Advanced
        16)  System Update - Device Reset and Firmware Update Options

         b)  Back

Select Option:

Settings for: /SparkFun DataLogger IoT - 9DoF/Settings/Logger

Settings:
         1)  Timestamp Mode - Enable timestamp output and set the format of a log entry timestamp
         2)  Sample Numbering - An incremental count of the current log entry
         3)  Numbering Increment - Increment amount for Sample Numbering

    Output
         4)  SD Card Format - Enable and set the output format
         5)  Serial Console Format - Enable and set the output format

Functions:
         6)  Reset Sample Counter - Reset the sample number counter to the provided value

         b)  Back

Select Option:

Settings for: /SparkFun DataLogger IoT - 9DoF/Settings/Logger/Timestamp Mode

Current Value of `Timestamp Mode` =  0

Select from the following values:

         1)  No Timestamp = 0
         2)  Milliseconds since program start = 1
         3)  Seconds since Epoch = 2
         4)  Date Time - USA Date format = 3
         5)  Date Time = 4
         6)  ISO8601 Timestamp = 5
         7)  ISO8601 Timestamp with Time Zone = 6

         b)  Back

Select Option:

then go back to the main menu by selecting b as many times as needed then select x from the main menu to confirm the settings, and now it will include the date of the datalogger events with the previously defined timestamp format,


Settings for: /SparkFun DataLogger IoT - 9DoF

         1)  Settings - System settings and operations
         2)  Devices Settings - Settings for connected devices

         x)  Exit

Select Option: Exit

End Settings
[I] Saving System Settings.

General.Time,MAX17048.Voltage (V),MAX17048.State Of Charge (%),MAX17048.Change Rate (%/hr),ISM330.Accel X (milli-g),ISM330.Accel Y (milli-g),ISM330.Accel Z (milli-g),ISM330.Gyro X (milli-dps),ISM330.Gyro Y (milli-dps),ISM330.Gyro Z (mill)
07-10-2025 11:35:03,4.352,120.758,0.000,35.868,-10.858,1004.792,227.500,-122.500,192.500,27.922,-0.12402,0.38324,0.56531,30
07-10-2025 11:35:03,4.352,120.758,0.000,35.868,-10.736,1004.792,87.500,-175.000,175.000,27.867,-0.12085,0.38300,0.56128,30
07-10-2025 11:35:03,4.352,120.758,0.000,35.868,-10.614,1004.670,105.000,-122.500,227.500,27.875,-0.12201,0.38293,0.56195,30
07-10-2025 11:35:03,4.352,120.758,0.000,35.868,-10.858,1004.792,245.000,-70.000,227.500,27.867,-0.12354,0.38275,0.56415,30
07-10-2025 11:35:03,4.352,120.758,0.000,35.868,-10.614,1004.670,192.500,-52.500,227.500,27.902,-0.12439,0.38257,0.56555,30
07-10-2025 11:35:04,4.352,120.758,0.000,35.868,-10.736,1004.914,157.500,-122.500,245.000,27.875,-0.12439,0.38239,0.56592,30
07-10-2025 11:35:04,4.352,120.758,0.000,35.624,-10.736,1004.792,17.500,-280.000,227.500,27.891,-0.12469,0.38287,0.56641,31
07-10-2025 11:35:04,4.352,120.758,0.000,35.990,-10.736,1004.670,70.000,-157.500,105.000,27.859,-0.12476,0.38293,0.56543,31
07-10-2025 11:35:04,4.352,120.758,0.000,35.868,-10.858,1004.914,297.500,-70.000,210.000,27.852,-0.12445,0.38287,0.56592,31
07-10-2025 11:35:04,4.352,120.758,0.000,35.868,-10.858,1005.036,577.500,0.000,210.000,27.859,-0.12482,0.38226,0.56622,31
07-10-2025 11:35:05,4.352,120.758,0.000,36.356,-10.126,1004.426,192.500,0.000,245.000,27.844,-0.12469,0.38171,0.56628,31
07-10-2025 11:35:05,4.352,120.758,0.000,36.356,-10.126,1005.036,-140.000,-560.000,175.000,27.902,-0.12476,0.38177,0.56635,31

.................

Now as shown above, the SparkFun DataLogger IoT - 9DoF will display the correct date, time from the internet time server and corresponding data for the collection event.

Setup Datalogger via Terminal Menu (Firmware upgrade)

Follow the menu steps shown below to perform a firmware upgrade for the data logger



Settings for: /SparkFun DataLogger IoT - 9DoF/Settings


    General
         1)  Application Settings - Main Application Settings
         2)  Save Settings - Save, Restore and Reset System settings.
         3)  Time Sources - Manage time reference sources

    Network
         4)  WiFi Network - WiFi network connection for the system
         5)  NTP Client - NTP Time Sync Client

    Logging
         6)  Logger - Data logging action
         7)  Logging Timer - Set the internal between log entries
         8)  Data File - Output file rotation manager

    IoT Services
         9)  MQTT Client - A generic MQTT Client
        10)  MQTT Secure Client - A secure MQTT client
        11)  AWS IoT - Connect to an AWS Iot Thing
        12)  ThingSpeak MQTT - Connection to ThingSpeak
        13)  Azure IoT - Connection to Azure IoT
        14)  HTTP IoT - An HTTP IoT data connector
        15)  MachineChat - Connection to MachineChat

    Advanced
        16)  System Update - Device Reset and Firmware Update Options

         b)  Back

Select Option: 16


Settings for: /SparkFun DataLogger IoT - 9DoF/Settings/System Update


Functions:
         1)  Device Restart - Restart/reboot the device
         2)  Factory Reset - Erase all settings and revert to original firmware
         3)  Update Firmware - SD Card - Update the firmware from the SD card
         4)  Update Firmware - OTA - Update the firmware over-the-air

         b)  Back

Select Option: 4



Settings for: /SparkFun DataLogger IoT - 9DoF/Settings/System Update/Update Firmware - OTA

        Checking for an available firmware update .....

        Update firmware from version `01.00.04` to version `01.02.00` [Y/n]? 

        Updating firmware... (100%)
[I] Firmware update completed successfully. Rebooting...

The SparkFun DataLogger IoT - 9DoF is an excellent portable, small data logger tool that can be customized for many IoT applications.

This article is also available in spanish language here.

Este artículo se encuentra en lenguaje español aquí.