System Architecture

High-level design of the CyberRod IoT pipeline — from ultrasonic sensing to cloud dashboard.

System Block Diagram

End-to-end data flow from sensors to cloud dashboard.

SENSING PROCESSING CLOUD Ultrasonic UART1 | 9600 baud Fish Detection · 4-byte frames IMU Sensor I2C0 | 6-Axis Acceleration · Rod Motion SHT4x I2C0 | Addr 0x70 Temp & Humidity · CRC-8 Si917 MCU ARM Cortex-M4F @ 80 MHz BRD2708A Dev Board FreeRTOS 11 Tasks · Watchdog · heap_4 Fish Temp MQTT OTA WDT Wi-Fi IMU Azure VM 20.230.132.231 Mosquitto MQTT Broker :1883 · Keepalive 60s HTTP OTAF Server :80 Node-RED v4.1.8 MQTT TOPICS CyberRod/Fish_detection CyberRod/Distance CyberRod/Temperature CyberRod/Humidity CyberRod/Acceleration CyberRod/Update UART I²C I²C Wi-Fi MQTT OTA Dashboard FlowFuse 2.0 WS

Architecture Layers

Four-layer architecture from physical sensing to cloud application.

01

Sensing Layer

Ultrasonic distance sensor (UART, 9600 baud) detects fish proximity with 4-byte frame protocol. SHT4x temperature/humidity sensor (I2C, addr 0x70) provides environmental data with CRC-8 validation. IMU sensor (I2C, shared bus) measures 3-axis acceleration and angular velocity for rod motion and bite detection.

UART1 I2C0 GPIO_29/30 GPIO_6/7 IMU
02

Processing Layer

Si917 ARM Cortex-M4F runs FreeRTOS with concurrent tasks: fish detection (20ms), IMU sensing (100ms), temperature upload (300ms), MQTT connection (100ms), OTA updates (200ms), and watchdog (1s). Hardware watchdog ensures system reliability.

FreeRTOS Si917 heap_4 WDT
03

Communication Layer

Si917 integrated Wi-Fi (802.11 b/g/n, WPA2) connects to local network. Custom MQTT 3.1.1 client over BSD sockets publishes to 7 topics with 16-deep queue and auto-reconnect. HTTP OTAF v2 for firmware updates.

Wi-Fi MQTT HTTP OTAF
04

Application Layer

Azure VM hosts MQTT broker (port 1883) and HTTP server (port 80). Node-RED v4.1.8 with FlowFuse Dashboard 2.0 provides real-time sensor visualization with custom nautical-themed CSS. OTA triggered by MQTT message.

Azure Node-RED FlowFuse 2.0

Data Flow

How sensor data travels from the fishing rod to the cloud dashboard.

1. Sensor Sampling

Ultrasonic sensor sends 4-byte distance frames (header 0xFF + 2-byte distance + checksum) via UART at 9600 baud. SHT4x sensor reads temperature and humidity via I2C with high repeatability command (0x7866). IMU sensor reads 3-axis acceleration and angular velocity over the shared I2C0 bus for rod motion analysis.

2. Data Processing

Fish detection task classifies distance into states (0=none, 1=near <1.2m, 2=very near <100mm). Temperature task converts raw readings: T = -45 + 175*(raw/65536), H = -6 + 125*(raw/65536). IMU task computes acceleration magnitude and detects sudden rod jerks indicating potential fish bites.

3. MQTT Publishing

Processed data queued in 16-deep MQTT publish queue. MQTT task drains one message per loop (100ms period) to Azure VM broker at 20.230.132.231:1883. Client ID: si917-devboard-cyberrod, Keepalive: 60s.

4. Dashboard Visualization

Node-RED subscribes to all CyberRod/* topics. FlowFuse Dashboard 2.0 renders real-time gauges, charts, and status indicators with custom nautical-themed CSS design.

5. Remote Updates

Send "1" to CyberRod/Update MQTT topic to trigger OTA. Firmware downloaded via HTTP from Azure VM (wifi_http_otaf_soc.rps) using Si917's built-in OTAF v2 API.