.. ECG & PPG Multi-Sensor manual
.. Author: Benjamin Vandendriessche
.. Version: 1.1 [November 2016]

.. STATUS: production

.. role:: red
.. role:: yellow
.. role:: green
.. role:: blue

#############################
ECG & PPG Multi-Sensor Manual
#############################

The Byteflies Multi-Sensor System can integrate many 3\ :sup:`rd` party wearable devices. This manual discusses a brief use case for the **MegaElectronics Faros180 ECG** and **Empatica E4 PPG** devices.

.. rubric:: Quick Navigation
.. contents::
   :local:
   :depth: 2

----

*************
Initial Setup
*************

Docking station
===============

The docking station (Apple Mac Mini) is used to download recorded data and charge the wearable devices. It is configured to run these tasks automatically in the background without user intervention:

1. Connect power cord
2. Connect ethernet cable (if available\ [1]_)
3. Use the USB ports to connect the devices (see :ref:`further <download>`)
4. Power On\ [2]_

.. image:: images/mac_mini.png
   :scale: 100%
   :alt: reproduced from Apple Inc.

.. attention:: The docking station is meant to be left powered on and connected to a network most of the time. This allows Byteflies administrators to remotely manage the system. If you must power cycle it often or in case of a power failure, reboot the docking station **at least 30 minutes** before connecting any devices to avoid data loss.

.. [1] Connect to WiFi network or cellular data connection if Step 2 is unavailable. Currently, this setup requires a one-time connection to a monitor and input peripherals.
.. [2] In case of a power failure, simply switch the Mac Mini back on, no additional steps are needed as long as it is connected to the internet.

----

.. _download:

**************
Recording Data
**************

Faros180 ECG device
===================

.. warning:: The device is not waterproof, never shower or swim with the device or attempt to re-use the Fast-Fix electrode after showering!

.. image:: images/faros.png
   :scale: 25%
   :alt: reproduced from MegaElectronics Inc.

Start new recording with 3-lead electrode
-----------------------------------------

.. image:: images/faros_3lead.png
   :scale: 100%
   :align: center
   :alt: reproduced from MegaElectronics Inc.

* Connect device to electrode leads
* Shave off body hair if needed
* Place 3 electrodes on the chest as shown in the drawing
* Connect the leads to the correct electrodes: RA = right arm, LA = left arm, LL = left leg
* **Start**: push button until you hear a **beep** (:green:`green` LED blinking)
* **Low battery**: :yellow:`yellow` LED (blinking)
* **Error**: :red:`red` LED
* **Stop**: push button ~ 5 seconds (1 long beep, followed by **3 short beeps**)

Start new recording with Fast-Fix electrode
-------------------------------------------

.. image:: images/faros_patch.png
   :scale: 100%
   :align: center
   :alt: reproduced from MegaElectronics Inc.

.. image:: images/faros_angle.png
   :scale: 40%
   :align: right
   :alt: reproduced from MegaElectronics Inc.

* Peel off adhesive protection (highlighted in red above) and connect device to electrode
* Shave off body hair if needed
* Peel off main adhesive protection and place the electrode on the chest as shown in the drawing

    - Black dot centered on the chest, slightly offset to left
    - Electrode patch angled at ~ 60 degrees

* **Start**: single push on button (:green:`green` LED blinking)
* **Low battery**: :yellow:`yellow` LED (blinking)
* **Error**: :red:`red` LED
* **Stop**: push button ~ 5 seconds (1 long beep, followed by 3 short beeps)

Empatica E4 PPG device
======================

.. warning:: The device is not waterproof, never shower or swim with the device!

.. image:: images/empatica.png
   :scale: 40%
   :alt: reproduced from Empatica Inc.

Start new recording:
--------------------

.. image:: images/emp_start.png
   :scale: 20%
   :align: right
   :alt: reproduced from Empatica Inc.

* Wear the E4 snugly above the wrist joint
* **Start**: push button for ~ 2 sec (the device needs about 60 seconds to start up, LED will switch from :green:`green` to :red:`red` to off during start up)
* **Low battery**: :yellow:`yellow` LED (blinking)
* **Stop**: push button for ~ 2 sec

|
|
|

.. warning:: Pushing the button for **more than 5 sec** will reset the device. Never do this unless instructed by Byteflies or a study administrator!

----

************************************
Downloading Data and Device Charging
************************************

The docking station (Apple Mac Mini) is configured to automatically download newly recorded data, and also serves as a charging station for the devices.

.. attention:: Always follow the procedure outlined below. Failing to do so can result in data loss.

.. image:: images/box_instruct.png
   :scale: 40%
   :align: left

Disconnect the Faros (ECG) device from the electrode and take off the Empatica (PPG) band. Then follow these steps in order:

#. Connect the Faros (ECG) device to the USB cable
#. Connect the other end of the cable to one of the USB ports on the docking station
#. **Wait at least 20 seconds before connecting the Empatica device** to the docking station but no more than 1 minute
#. Meanwhile, connect the Empatica (PPG) device to the charging cradle (see inset)
#. Connect the USB connector of the cradle to one of the USB ports on the docking station

After a couple of hours, or whenever you want to start using the devices again, unplug the **USB connectors from the docking station** (i.e. go back to the situation shown in the first picture). **Allow at least 1 hour before disconnecting the device to ensure all data was downloaded!** More time may be needed to fully charge the battery.

* **Faros (ECG) charging**: :blue:`blue` LED blinks (solid when charged)
* **Empatica (PPG) charging**: :yellow:`yellow` LED blinks (turns off when charged)

.. Text block spacers to move next block underneath image

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
