SOFTWARE ARCHITECTURE

SOFTWARE ARCHITECTURE

The code consists of:
-Arduino firmware running on the machine
-A Graphical User Interface (GUI) running on a laptop
-A piece of software running on the laptop, called the Daemon, that ensures bidirectional commonication between the GUI and the Arduino microcontroller

  • The machine microcontroller code is designed to run at a fixed 100Hz.
  • The machine microcontroller (ATmega 2560) sends sensor data to the pc at +20Hz, and are just sent. (no acknowledgement)
  • The microcontroller and the pc act as each other’s watchdog, exchanging a signal once per second. If one of both does not respond for 5 seconds, the other activates its alarm.
  • The ventilator will keep working when the pc fails.
  • The ventilator and pc (a laptop) work on separate batteries and have their own PSU.
  • Sensor data received by the PC (via Python) gets stored in MongoDB.

Data is processed on the pc, and displayed in the graphical user interface.

Needed operating parameters are set on the graphical user interface and sent to the arduino. This is done via a protocol where the settings are resent if no confirmation is received.

The architecture makes it possible to do remote monitoring of the machines, over LAN.

For safety reasons we do not intend to enable remote parameter change.

All files can be found through our download page.

INSTALLATION INSTRUCTIONS (WINDOWS)

https://docs.google.com/document/d/1eMyjQ7Yv6Cu650nBNyh-ECA4ibVBjIZ2Z_saMSKduOk/edit#

Installing the GUI is a 3-part process:

1-install the Daemon

2-install Docker

3-Pull latest version of the software in Docker

1- INSTALLING THE DAEMON

Download csharp-Daemon  from https://github.com/beademingstoestel/

-Unzip this

-Ventilator Daemon for Windows64 can then be found under
csharp_daemon-master\csharp_daemon-master\VentilatorDaemon\publish

Make a shortcut on the desktop to VentilatorDaemon.exe,
located in that map.

Done.

2- INSTALL DOCKER

https://hub.docker.com/editions/community/docker-ce-desktop-windows

After installation you will need to reboot.

3-PULL LATEST VERSION IN DOCKER

Download the (https://github.com/beademingstoestel/frontend_installer/blob/master/docker-compose-windows.yml) file and rename it to docker-compose.yml
Save this file somewhere where you can find it.

Open a terminal windows, go to the folder where you saved this file.

Run ‘docker-compose up’ in the directory containing the yml file.

Files will be downloaded and installed

3b-Updating to a new version

In the directory containing [docker-compose.yml](https://github.com/beademingstoestel/frontend_installer/blob/master/docker-compose.yml) file run following commands:

– docker-compose pull

– docker-compose up –force-recreate

Download the latest version of the daemon from [https://github.com/beademingstoestel/csharp_daemon/tree/master/VentilatorDaemon/publish](https://github.com/beademingstoestel/csharp_daemon/tree/master/VentilatorDaemon/publish).

You now have the latest version of the software.

4-RUN THE GUI

-Connect the machine / Arduino to the pc.
-Start ventilatordaemon.exe

-Open Chrome and go to: http://localhost:3001/