DeepVibe 2024 and Earlier
Migration from TDEngine to TimescaleDB (12/2023)
Changes are present in the
linux-socket-app-timescale-dbbranch.
Planned items
- Jake will setup a Django based API Server with a sample table to test the architecture.
- Implement the timescaleDB connection in
S3 sandwich - Implement the timescaleDB connection in
deepvibe-dsp-c
Links to code repositories
Refer the individual 'README.md' files for run information.
- Deep Vibe app on Linux →(
timescale-dbchanges are present under a branch of the same name) - ESP-Sensor-Mesh → root and intermediate nodes
- ESP-Sensor-Mesh Sensor nodes → Sensor nodes
- Linux-DSP-App → Separate app which can read data from
TDEngineand performFFT/CEEMDANcalculations and save them back to theDB - Deepvibe-api-drf → Django-REST-Framework used as the API Server for
Timescale-DBintegration with deepVibe system. - ESP32-Sensor-Network-USB-to-HTTP → S3 sandwich
Supplimentary repos:
Sensor Nodes
- Configuration via
menuconfig:- Enable and disable sensors connected. (From
LIS3DH,IIS3DWB,BME280andDallas Temperature Sensor) - If no accleration sensor is connected, can be set to send dummy data for testing.
- Select number of acceleration samples to send.
- Enable and disable sensors connected. (From
- This node goes through deep sleep cycles.
- In the wakeup period:
- It connects to the wifi mesh.
- Reads in the sensor measurements.
- Sends them to the root node via the mesh network as 1024 byte packets.
- Larger measurements (acceleration data) is broken down to 1024 byte size packets.
- Samller measurements are sent as one packet per each measurement.
Root Node / Intermediate node
- Configureable via
menuconfig:- Whether the device is a root. (If not a root this device will become an intermediate node)
- Server connection type. (
USBorIP SOCKET) - Number of acceleration samples.
- Intermediate nodes will work as a relay to transmit packets from sensor nodes to the root.
- 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
Configureable via
config_socket_app.h:- Select the connection type, (
USBorIP SOCKET). - For
IP SOCKET, select thePORTto match with the root node. - Set number of acceleration samples.
- Enable/Disable TDEngine Local and cloud database connections.
- Select the connection type, (
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