System Architecture - kobeylake/ares-red GitHub Wiki

System Overview

The following section provides a high-level overview of the system architecture, showing how different embedded nodes interact to ensure smooth operation of the intelligent greenhouse monitoring and control system. The system uses a combination of Bluetooth and serial communication to collect, fuse, and visualize environmental data.

See the following diagram for an overview of the system architecture: image

System Nodes

Base Node

Platform: nRF52840DK
PC Connection: Ubuntu (CLI control)

Function:
Acts as the central controller. It scans BLE advertisements from the mobile node, performs sensor fusion (e.g., CO₂ + temperature to calculate angle), and advertises structured packets to the actuator node. A shell interface allows manual control and overrides.

Responsibilities:

  • Receive sensor data via BLE advertising from the Thingy:52
  • Calculate servo angle using sensor fusion logic
  • Advertise data packets (including angle) to actuator node
  • Interface with a PC via USB UART for shell commands
  • Enable/disable sensors and override values using CLI

Mobile Node

Platform: Thingy:52

Function:
Serves as the environmental sensing unit. It periodically collects temperature, humidity, and eCO₂, then advertises these readings over BLE in manufacturer-specific format.

Responsibilities:

  • Collect:
    • Temperature (°C)
    • Humidity (%RH)
    • eCO₂ (ppm)
  • Format and broadcast readings via BLE advertisements every second
  • Operate on internal I²C for sensor interfacing

Actuator Node

Platform: nRF52840DK
PC Connection: Windows (MQTT Publisher)

Function:
Scans BLE advertisements from the base node, extracts control data (angle, sensor readings), and updates the servo accordingly. Also converts BLE data to JSON and prints to UART for MQTT publication on a Windows PC.

Responsibilities:

  • Scan for BLE advertising packets from the base node
  • Parse sensor readings and servo angle
  • Print JSON-formatted data over UART
  • Drive servo motor based on received angle

Viewer Node

Platform: (Deprecated – replaced with Windows PC + Grafana)

Function:
Initially planned to passively display system alerts and live status. Later replaced by a Windows PC displaying live data via MQTT and Grafana.


Dashboard PC

Platform: Windows PC running Mosquitto + Grafana
Function:
Receives UART data from actuator node, publishes it to MQTT broker, and logs/display via Grafana.

Responsibilities:

  • Run Mosquitto MQTT broker
  • Subscribe to actuator node’s JSON messages
  • Visualise data in Grafana dashboards
  • Act as final display layer for environmental monitoring

DIKW Pyramid Abstraction

image

Data

  • Temperature, CO₂, Humidity from Thingy:52
  • Ultrasonic distance (door detection) from Base Node
  • Servo angle determined by fusion algorithm

Information

  • Categorised states (e.g., “High Temp”, “Door Closed”)
  • BLE-encoded packets containing structured sensor readings

Knowledge

  • Fusion-based decision-making:
    • Only ventilate if CO₂ is high and door is closed
    • Manual override disables fusion
  • Uses CLI commands to manage sensor and logic behaviour

Wisdom

  • Prevent redundant actuator toggling (e.g., if door is open)
  • Delay closing until CO₂ stabilises
  • Facilitate operator insight via Grafana trend visualisation
  • Future potential for adaptive learning (e.g., dynamic thresholds)