System architecture

System Architecture and Hardware and Software Components

Herein are presented the architecture of our system and its individual components. The main consideration was for the system to be as simple as possible, without compromising any functionality.

Contents

System Architecture

General Sketch

A sketch of the System Architecture.

Hardware Architecture

  • Smartphone:
    • Serves as an interface device and is also a computational node of the system. It receives data from the various sensors and elaborates and collects them and then sends instructions to the actuators’ controller.
    • Carried by the user.
  • Actuator Gateway:
    • Receives instructions from the smartphone and controls the actuators accordingly. Essentially a gateway for integrating the actuators.
    • Located inside the user’s home.
  • Heartbeat Sensor:
    • Senses in real time vital parameters of the user and sends them to the gateway.
    • Worn on the user’s finger. (FR 3.1)
  • Actuators:
    • are located in various positions throughout the room
    • Lights: receive instructions from the actuator controller to dim the lights and change the lighting hue. (FR 4.2)
    • Speaker: receives instructions from the actuator controller and plays music selected by the user as well as instructions on the breathing pattern to be followed(FR 4.1)
    • Aroma diffuser: receive instructions from the actuator controller and diffuses aroma in the user’s environment. (FR 4.3)
  • Microphone:
    • Records the user’s breathing and sends the data to the smartphone
    • Worn on the user

Software Architecture

  • Offline server
    • Contains the user’s preferences, audio tracks (F2.1, 4.1)
  • Actuator gateway software
    • programmed in Python 2.7, running on the same device
    • Actuators control (FR 4.1, 4.2, 4.3)
  • Smartphone app
    • programmed in Java, running on the smartphone
    • Interface for the user (FR 1.1, 1.2, 2.2, 2.1)
    • Analysis of sensor data and subsequent instructions to the microcontroller
    • Offline data collection management (FR 2.1, 2.2)
    • Communication with the online server via SQLite, JQuery and Bootstrap (FR 1.1, 1.2, 2.1)

Selected Components

Hardware Components

Off the shelf

To be procured

  • CC3000 adafruit WiFi shield
  • “Spark electronics” pulse sensor
  • Smartphone (Android 5+), already in our possession

Ladispe

  • 2 Arduino
  • Raspberry Pi
  • Philips hue lights
  • Speakers

Ad-Hoc

Aromatherapy diffuser
Device to be constructed, able to diffuse a relaxing scent throughout the user’s environment in the case of a panic attack. Consisting of a simple store bought automatic aroma diffuser, specially customized and connected to the microcontroller of the system.

Software Components

  • Java (Android), Used for the mobile app development
  • Python 2.7, Used for the actuator gateway programming and online server management
  • SQLite, SQL library for the servers’ management
  • Flask, framework for the HTTP communication management

Open Issues

  • Hardware needed to detect the user’s heartbeat in real time.
  • How to detect the user’s breathing pattern and adjust the instructions in real time.