Software

Here is an overview of all the software on offer:

  • General purpose:
    • AttysScope (Android / Linux / Windows)
  • Biomedical:
    • AttysEEG (Android)
    • AttysECG (Android)
    • AttysScope (Android / Linux / Windows)
    • attys-ep (Linux)
    • AttysHRV (Android)
  • Education / School:
    • Google’s ScienceJournal (Android)
    • AttysScope (Android / Linux / Windows)

All programs export to Python, MATLAB, OCTAVE and R. AttysScope can also stream in realtime to Python via an UDP socket.

Talk to us if you require custom designed software and/or consultancy.

AttysScope (Android)

AttysScope an Android app for the Attys which displays, analyses, records and allows in-app-sharing of data, for example on google drive.

Features

  • DC and mains interference removal
  • Displays signals from V down to uV, resistance and temperature (via a PTC)
  • Add your own realtime displays / processing to it by using Android fragments
  • Saves both filtered and raw signals in a data format which can easily be processed in Python, MATLAB(tm), OCTAVE or R
  • Displays peak to peak voltage, root mean square and heartrate as both plots or just text overlay
  • Fourier spectrum of the signal

Running AttysScope

  1. Pair your phone/tablet with the Attys. In older Android versions you might need to type in a security code which is ‘1234’.
  2. Start AttysScope
  3. Set the gain: for small signals such biosignals (ECG, EMG or EEG) set the gain to x500 or x1000.
  4. Enable the DC removal/highpass filter: many signals (ECG, EMG or EEG) have a DC shift which needs to be removed. The cutuff of the highpass can be set in the preferences. Set it to 10Hz for EMG and for any other signal to 0.1Hz.
  5. Enable the mains filter: biosignals are often contaminated by 50/60Hz mains interference. With this filter you can remove this unwanted component. You can set the notch frequency in the preferences.
  6. Record your data in Python/MATLAB friendly format.

Data format

AttysScope saves data as tab separated values where every column of a tsv file represents a channel:

Column number:

  1. Timestamp in secs (from the moment REC is pressed)
  2. Acceleration X in m/s^2
  3. Acceleration Y in m/s^2
  4. Acceleration Z in m/s^2
  5. Magnetic field X in T
  6. Magnetic field Y in T
  7. Magnetic field Z in T
  8. Analogue channel 1 (unfiltered) in V
  9. Analogue channel 2 (unfiltered) in V
  10. Analogue channel 1 (filtered) in V
  11. Analogue channel 2 (filtered) in V

For example if you want to work with the 1st analogue channel then you extract column #8.

This data format is accepted by python, MATLAB(tm), OCTAVE, GNUPLOT and many other plotting applications.

Python scripts

The data files can directly be loaded into Python. Check out the github repository for an example script and you’ll see how easy it is to process data with python.

How to install

You can also install from source by compiling it with Android Studio.

AttysScope (Windows/Linux)

Above recording shows the EMGs of the biceps, triceps and their amplitudes.

Features

  • Records from multiple Attys at the same time. For example, you can attach two Attys to both the upper and lower arm to measure muscle activity, acceleration and orientation. Below we recorded the EMG with one Attys on the arm and the ECG with another Attys worn on the belt:
    Tested BT dongles which work with more than one Attys (Windows):
    • ASUS-BT400: four Attys
    • Belkin: two Attys
  • Realtime Python add ons to visualise data or feed the data into any other program via UDP. Below is a screenshot where the Fourier Spectrum is calculated with a Python script in realtime:

    Here AttysScope talks to the UNREAL engine:

  • Direct data import into Python, MATLAB ™, OCTAVE, R, GNUPLOT and many other software packages.
  • Realtime filtering offering a highpass, lowpass, 50/60Hz bandstop and amplitude detector and feed these signals then into Python or save them for later processing.
  • For Windows and Linux and it’s of course open source!

Windows installation

Installer

Download attys_scope.msi and double click on it.

Compile from source

You can also install from source by compiling it with the (free) Visual Studio C++ community edition or under Linux with QT5-dev installed.

Supported dongles

We recommend the Belkin USB bluetooth dongle, the ASUS-BT400 or internal laptop bluetooth adapters for optimal performance.

Linux installation

Pre compiled packages for Ubuntu

If you have Ubuntu LTS (Xenial) you can install the pre-compiled packages by adding these two PPAs:

  • sudo add-apt-repository ppa:berndporr/usbdux
  • sudo add-apt-repository ppa:berndporr/attys

Compile it from source (Raspberry PI and other distros)

Check out the source from github and follow the installation instructions in the README.

Supported bluetooth dongles

We recommend the ASUS-BT400 for Linux and in general bluetooth dongles or internal ones based on Broadcom chipsets. The Attys works fine with the Raspberry PI 3 with its integrated bluetooth.

Running AttysScope

  1. Pair your computer with the Attys. This is done in the Windows or Linux settings.
  2. Under Windows start AttysScope by clicking on the icon or type attysscope under Linux.
  3. Set the gain (x1 – x5000): for small signals such biosignals (ECG, EMG or EEG) set the gain to x1000 or x2000.
  4. Highpass filter (HP): many signals (ECG, EMG or EEG) have a DC shift which needs to be removed. Set it to 10Hz for EMG and for any other signal to 0.1Hz or use the -DC option which removes the DC from a previously measured average.
  5. Lowpass filter (LP): this filter allows you to smooth the incoming signal. It also allows you to smooth the rectified signal, for example if you want to measure the amplitude of the EMG. This is indicated by the || sign.
  6. Bandstop filter (BS): biosignals are often contaminated by 50/60Hz mains interference. With this filter you can remove this unwanted component.
  7. Record your data in Python/MATLAB friendly format. In general AttysScope saves all unfiltered channels and then in addition the channels which are displayed with all filter operations applied.

Advanced options

  • The ECG mode connects the two positive inputs to each other for Einthoven recordings so that we have a shared electrode. See the howto section for more info.
  • You can switch on a constant current to measure resistance. The current for both channels can be set as well.
  • The Attys has an internal programmable gain amplifier (PGA). By increasing its gain you limit the input range but increase the signal to noise ratio. This might be beneficial for very small signals such as EEG.
  • If you want to process the data in realtime in another application then switch on UDP broadcast. Examples of UDP listeners are on github.

Data format

AttysScope saves data as tab separated values where every column of a tsv file represents a channel:

Column number:

  1. Timestamp in secs (from the moment REC is pressed)
  2. Acceleration X in m/s^2
  3. Acceleration Y in m/s^2
  4. Acceleration Z in m/s^2
  5. Magnetic field X in T
  6. Magnetic field Y in T
  7. Magnetic field Z in T
  8. Analogue channel 1 (unfiltered) in V
  9. Analogue channel 2 (unfiltered) in V
  10. Displayed / filtered channel #1
  11. Displayed / filtered channel #2

For example if you want to work with the 1st analogue channel then you extract column #8. All channels which you watch on screen are saved from column #10, #11, … with all filter operations applied.

This data format is accepted by python, MATLAB(tm), OCTAVE, GNUPLOT and many other plotting applications.

Legal:
Attys Scope uses QT5.7 under the LGPL which requires us to host its source code. You can download QT5 here.

Google’s Science Journal (Android)

Science Journal is an initiative by google to inspire the next generation of scientists! It’s been widely used in STEM education with more than 100,000 mobile phone / tablet installations.

It allows you to record sensor signals from both the Attys and the internal mobile phone/tablet sensors, document them in an electronic lab book and share the results.

You can configure the Attys to measure Volt, millivolt, microvolt and resistance so that it allows a wide range of experiments, for example in Physics education measuring the voltage induced in a coil, in Chemistry to measure pH or Biology to measure signals such as ECG, EMG, EOG and EEG.

This is the trace shown in the clip above when moving a magnet over an improvised coil to show the induced voltage:

Google science journal talking to ATTYS

How to install

  1. Install AttysScope which contains the driver for ScienceJournal
  2. Install ScienceJournal from google play:

AttysECG (Android)

AttysECG is a specialised ECG program for Attys which displays all frontal leads: Einthoven I,II,II and the augmented leads aVR,aVL,aVF using just 3 electrodes: two on the shoulders/wrists and one on the leg/hip.

Features:

  • Heartrate plot which allows you to see heartrate variability (HRV) and changes of the heartrate after exercise. It calculates the average BPM, the standard deviation, and the RMSSD.
  • Vector ECG which is a realtime visual representation of the electrical heart axis not just for R but also for P and T.
  • PQRST inspector: pan/zoom into a single PQRST complex and do precise measurements of the timings and amplitudes
  • Single channel mode, for example for Vets or if you just want to record Einthoven II:
  • Heartbeat ‘beep’ sound
  • The data can be loaded straight away into Python, OCTAVE, MATLAB(tm), GNUPLOT, R, …
  • Works on a wide variety of screens in both landscape and portrait mode (Android Fragments)
  • Add your own realtime displays / processing to it by using Android fragments

Recording the ECG

You just need three electrodes:

  1. right arm: “-” connected to Channel 1
  2. left arm: “GND”
  3. left leg: “+” connected to Channel 1.

Data format

The ECG is saved as a text file containing human readable numbers. You can always check the content with a text editor. Every row corresponds to a moment in time and the columns contain the different channels:
  1. time in secs
  2. Einthoven I (V)
  3. Einthoven II (V)
  4. Einthoven III (V)
  5. Augmented lead aVR (V)
  6. Augmented lead aVL (V)
  7. Augmented lead aVF (V)
  8. heartrate (BPM)

Python

Python can directly load the data files so that you can plot and process the recorded data. Check out the “python” folder on github for an example script which plots all 6 ECG channels.

How to install

Install AttysECG from google play:

You can also install from source by compiling it with Android Studio.

AttysEEG (Android)

AttysEEG is our EEG Android app and has especially been designed for displaying and analysing EEG in realtime on your tablet or phone. You can easily extend it by adding so called Android Fragments for your specific analysis needs which then show up on the right hand side of the app.

Features

  • Realtime EEG plotting and recording on your phone or tablet
  • Plots alpha, beta, gamma, delta and theta bands
  • Histograms of the different bands either in microvolts or normalised
  • Auditory evoked potentials (AEP) by playing click sounds or custom sounds through the headphone jack
  • Visually evoked potentials (VEP) by using a standard inverting chequerboard stimulus
  • Beta Ratio and PowerFastSlow which is used to determine the depth of anaesthesia
  • Saves the raw EEG, the different bands and the analysis results as tab separated files for analysis in MATLAB(tm), OCTAVE, R, excel, …
  • Easily extensible using Android Fragments

AttysEEG on github

Dataformat

Every column represents one channel:

  1. time (sec)
  2. raw EEG (V)
  3. filtered EEG with mains and DC removed (V)
  4. delta band, below 4Hz (V)
  5. theta band, 4-8Hz (V)
  6. alpha band, 8-13Hz (V)
  7. beta band, 13-30Hz (V)
  8. gamma band, above 30Hz (V)

These files can directly be loaded into Python (csv.reader or numpy.loadtxt), Octave and MATLAB(tm).

The bands are created by 2nd order low- and highpass Butterworth filters.

How to install

Install AttysEEG from google play:

You can also install from source by compiling it with Android Studio.

attys-ep (Linux)

Visually evoked potential app for Attys for Linux

This program performs averaging over repetitive stimuli. It works on continous data such as visually evoked potentials and also on discrete events such as spikes.

Installation

Installation is from source. Please check out the latest version from github.

Running attys-ep

Make sure that you have paired the Attys with your bluetooth device.

Just type: “./attys-ep”

AttysHRV (Android)

Heartrate variability (HRV) app which shows the heartrate in form of concentric rings — and in scientific form.

Heartrate variability is negatively correlated to perceived stress and anxiety and has been shown to be a biomarker for these conditions. In turn there are indications that it can be used as a biofeedback mechanism to reduce stress, for example with the help of deep breathing.

Features

  • Heartrate animation in form of concentric circles: as shown in the example above the rings only show when you have a high HRV and won’t show when the HRV is low.
  • Display of the raw ECG signal in the background: this shows instantly if the raw ECG is recorded properly or if there are any problems with the electrodes.
  • Scientific plot of the heartrate with RMSSD, SD and average: while the visual feedback is instant one might want to look at the precise calculations, too.

Concept

HRV is usually analysed by looking at its fast changing component caused by breathing (the so called ‘HF component’) normalised against the slow changes of the heartrate (the LF component). When displaying the heartrate as concentric circles it is possible to show the HRV in a qualitative way in realtime. Essentially by looking at the concentric circles is equivalent of finding the fast changing component of the HRV. In addition, the ripples of the circles are normalised against the slow changes (LF) which means nothing else than normalising their contrast in the time domain.

Electrode placement

  1. right arm or right shoulder: “-” connected to Channel 1
  2. left arm or left shoulder: “GND”
  3. left leg or left belly/hip: “+” connected to Channel 1.

How to install

Install AttysHRV from google play:

You can also install from source by compiling it with Android Studio.

Learn more

On our sister pages we explain the relationship between HRV, stress and show an exercise how to reduce stress.

References