Skip to main content

DeepVibe 2024 and Earlier

Migration from TDEngine to TimescaleDB (12/2023)

Changes are present in the linux-socket-app - timescale-db branch.

Planned items

  1. Jake will setup a Django based API Server with a sample table to test the architecture.
  2. Implement the timescaleDB connection in S3 sandwich
  3. Implement the timescaleDB connection in deepvibe-dsp-c

Refer the individual 'README.md' files for run information.

  1. Deep Vibe app on Linux (timescale-db changes are present under a branch of the same name)
  2. ESP-Sensor-Mesh root and intermediate nodes
  3. ESP-Sensor-Mesh Sensor nodes Sensor nodes
  4. Linux-DSP-App Separate app which can read data from TDEngine and perform FFT / CEEMDAN calculations and save them back to the DB
  5. Deepvibe-api-drf Django-REST-Framework used as the API Server for Timescale-DB integration with deepVibe system.
  6. ESP32-Sensor-Network-USB-to-HTTP S3 sandwich

Supplimentary repos:

  1. node.js based socket server
  2. Unit test for sensor integration.

Sensor Nodes

  1. Configuration via menuconfig:
    1. Enable and disable sensors connected. (From LIS3DH, IIS3DWB, BME280 and Dallas Temperature Sensor)
    2. If no accleration sensor is connected, can be set to send dummy data for testing.
    3. Select number of acceleration samples to send.
  2. This node goes through deep sleep cycles.
  3. In the wakeup period:
    1. It connects to the wifi mesh.
    2. Reads in the sensor measurements.
    3. Sends them to the root node via the mesh network as 1024 byte packets.
      1. Larger measurements (acceleration data) is broken down to 1024 byte size packets.
      2. Samller measurements are sent as one packet per each measurement.

Root Node / Intermediate node

  1. Configureable via menuconfig:
    1. Whether the device is a root. (If not a root this device will become an intermediate node)
    2. Server connection type. (USB or IP SOCKET)
    3. Number of acceleration samples.
  2. Intermediate nodes will work as a relay to transmit packets from sensor nodes to the root.
  3. Root node will transfer the received measurement data to the server.

USB connection uses tinyUSB stack which is known to be supported by ESP32S3 and ESP32S2 devices.

Deep_Vibe Server

  1. Configureable via config_socket_app.h:

    1. Select the connection type, (USB or IP SOCKET).
    2. For IP SOCKET, select the PORT to match with the root node.
    3. Set number of acceleration samples.
    4. Enable/Disable TDEngine Local and cloud database connections.
  2. Features

    • Receive data via either IP Socket or USB from the root node
    • Calculate FFT of the acceleration mesurements
    • Save the latest acceleration data as a CSV
    • Parse and push data to TDEngine (local and cloud)

Planned items / Alternatives

Root node

  • Parsing incoming data from nodes:

    • No parsing. Pass packets directly to the computer for processing.
    • Parse data. Read the packet headers, verify receipt of data, and send to socket server.
  • Calculate FFT and send frequency data to socket server.

    • This would require parsing data in the root node.
    • If this is possible, we might not need a Raspberry-Pi.

Socket Server

  • Need to explore methods to create a robust Socket server.
  • Alternative devices:
    • Raspberry-Pi
    • Nvidia Jetson Nano

Mesh protocol

  • ESP-WiFi-Mesh
  • BLE

Mesh Payload

  • Adapt BLE payload format