How to…

You can measure from virtually any sensor such as pressure, light intensity or temperature. As a special feature you can measure the tiny biosignals such as ECG, EMG, EEG without any additional hardware. Here we show you how to do it.

Biosignals

\

Here we show you how to record ECG, EMG and point you to our sister web page which teaches you in depth how to record and analyse bio signals.

To record the data we recommend AttysScope which is our general purpose oscilloscope program so that you learn how to record the signals. Once you know the inner workings of the biosignals you can then switch to AttysECG and AttysEEG which are pre-configured to make your life easier.

BTW: You can order the cables and electrodes in our shop!

One ECG lead: Einthoven II

  • right shoulder/arm: “-“
  • left hip/leg: “+”
  • right hip/leg: “GND”

This is the most popular configuration which usually has the strongest signal.

Two Einthoven channels with shared electrode

The Attys can also be configured to record in the classical Einthoven fashion where one of the electrodes is shared between two channels. Select the special Einthoven/ECG mode in AttysScope (Android) or in the JAVA/C++ API for both channels. In this configuration the two “+” inputs of the Attys are internally connected so that we need to connect only one electrode to “+”. The 2nd Channel measures then between the “+” electrode and “GND” so that the GND electrode has two roles: it provides the “-” electrode of channel two and acts as the overall reference.

Einthoven II,III


Channel 1 records Einthoven II and Channel 2 of the Attys Einthoven III:

  • right shoulder: “-” connected to Channel 1
  • left shoulder: “GND”
  • left leg: “+” connected to Channel 1.

Einthoven I,II

Channel 1 records (the inverted) Einthoven II and Channel 2 of the Attys (the inverted) Einthoven I:

  • connect the right shoulder to “+” of Channel 1
  • the left shoulder to “GND”
  • and the left leg to “-” of Channel 1

Both channels need to be inverted to see the traces with the right polarity.

Wonder why not 3 Einthoven channels? Because you can just calculate the first Einthoven lead: I=II-III.

Two independent biosignal channels (ECG, EMG, EEG, EOG, …)

If you want to record two independent channels then use the differential inputs of channel 1 as before and in addition channel 2 is measured between the ch2 terminal and GND.

  • Channel 1: “+” against “-“
  • Channel 2: “+” against “GND”

For example for Holter style recordings one might want to place the channel 2 electrodes on the chest while channel 1 records Einthoven II.

EMG

Electrode placement

Muscle activity can be measured by placing the +/- electrodes right over the muscles and the reference electrode (GND) close by.

Recording settings

  • Use AttysScope to record the EMG
  • Set the highpass (DC) filter to 10Hz
  • Enable 50/60Hz mains filter removal
  • Monitor the muscle strength with the peak to peak values (text or window on the right)

Postprocessing

This Python script calculates the amplitude of the EMG signal and then smooths it with an averaging filter with 1s duration:

import numpy as np
import pylab as pl
data = np.loadtxt('emg.tsv');
y = data[:,10];
y2 = abs(y);
w = 250;
y3 = np.convolve(y2,np.ones(w)/w,mode='same');
pl.plot(y3);
pl.show();

Column 10 of the datafile contains the filtered signal of analogue channel 1. Column 11 contains the channel 2. If you want to process EMG from two muscles, for example extensor and flexor, just extract the 2nd channel with y4=data[:,11] and then do the same processing for it as done for channel 1.

EEG

This is a pretty complex topic — because you need to learn how to distinguish between brain activity and artefacts: for example which waves in the video above originated from muscle activity and which from Kirsty’s brain? To get started check out our biosignal pages and take it from there!

Evoked potentials (VEP/AEP)

As stressed above EEG is buried in a high amount of EMG noise. However, if we stimulate the brain repetitively and then measure the EEG over and over again then we can average out the muscle noise which eventually will make the EEG stand out. This is shown above in the clip for a visual stimulus and is called visually evoked potential (VEP). AttysEEG can also generate auditory stimuli which are then repeated many times. This is called Auditory Evoked Potential (AEP).


Visually Evoked Potentials (VEP)


Traditionally, the electrodes are placed with “+” at the back of the head, the “-” on the forehead and the GND on the mastoid. However the “-” at the forehead generates strong eye blink artefacts. As alternative one can place the “-” behind the other ear to reduce eyeblink artefacts. They will eventually average out but it just makes the experiment shorter. Electrode positions are:

  • “Attys Channel 1: +”: at Oz at the back of the head over the visual cortex
  • “Attys Channel 1: -“: at Fz on the forehead
  • “Attys GND” at A1 or A2 at the mastoid or behind the ears where good contact is guaranteed and it’s comfortable. Exact position is not important.

The experimental procedure is:

  1. Attach electrodes as described
  2. Sit in a comfortable position so that muscle activity is minimal, look at the screen and relax!
  3. Switch on the VEP stimulus / recording
  4. Wait for 200 sweeps or more until the VEP appears
  5. Switch off the VEP stimulus / recording
  6. Move about normally again.

ISCEV standard for clinical visual evoked potentials


Acoustically Evoked Potentials (AEP)


Here we measure the response of the auditory cortex which is behind the ears. Consequently, the active electrode is behind the ear and the negative one on the forehead. The GND is behind the other ear.

  • “Attys Channel 1: +”: behind the ear over the auditory cortex
  • “Attys Channel 1: -“: at Fz on the forehead
  • “Attys GND” at A1 or A2 at the mastoid or behind the ears where good contact is guaranteed and it’s comfortable. Exact position is not important.

The experimental procedure is:

  1. Attach electrodes as described
  2. Sit in a comfortable position so that muscle activity is minimal and wear a headphone for the stimulus
  3. Do a quick test run to adjust the headphone loudness. It should be clearly audible
  4. Switch on the AEP stimulus / recording
  5. Wait for 1000 sweeps or more until the VEP appears
  6. Switch off the VEP stimulus / recording
  7. More about normally again

Because the AEP is smaller than the VEP one needs to wait a bit longer. Watch a movie with subtitles or let the radio run the background. The AEP won’t be affected. It’s also advisable to lie down in a comfortable position to avoid muscle activity and closing the eyes helps to avoid eyeblink artefacts.

Learn in depth about biosignals

If you want to learn in depth how to record different biosignals such as ECG, EEG and EMG then check out the biosignal howto pages where we explain with YouTube videos how to record ECG, EMG, EEG and other modalities. All experiments on this web page can be done with the Attys.

Temperature

Thermocouple

Thermocouples can be used to measure temperatures as high as 2000 degrees Celsius.

Thermocouples generate a small voltage which is proportional to the measured temperature. In our store you can buy a K type thermocouple which gives us 39uV/C. This voltage is called Seebeck voltage and is generated when two different kind of wires are welded together. The trouble is that these two wires end up inside of a plug containing probably two copper clamps which will give us an additional voltage. People call this place “cold junction” where this unwanted voltage is generated. The cold junction reduces the voltage measured which we can be written down as a simple formula:

V_out = a (T_h – T_c)

where a is the so called Seebeck coefficient which is 39uV/C for our K type sensors and T_h and T_c are our hot and and cold junction temperatures. In other words, T_h is the actual temperature we would like to measure whereas T_c is the temperature of our socket at the pre-amplifier. We see that we subtract the temperature of the cold junction from the temperature from the hot junction. With a bit of school math we arrive at our formula which converts the voltage to temperature:

T_h = V_out / a + T_c

The Attys can measure temperature as well, for example on its 2nd channel while measuring the temperature on the 1st one.

You can also measure temperature with the help of an NTC resistor. This is a resistor which decreases its resistance when heated up. The Attys can also measure resistance so that also an NTC can be connected to it — without any additional components.

LM35

The temperature sensor LM35 is a classic under the temperature sensors. It is housed in a standard plastic transistor package and just needs about 5V supply voltage, for example three 1.5V battery cells. The LM35 outputs 10mV/C so that the Attys can easily cover temperatures from zero degrees up to 100C.

To turn it into a temperature probe just solder a ribbon cable on the sensor and then put some epoxy over the pins. If the cable is quite long the LM35 tends to oscillate wildly which can be prevented by adding a 2.2K load resistor from its output to GND.

Mechanical strain

This is a piezo sounder which you can find in your noisy greeting cards. There it’s used as a speaker but it can also be used as a sensor. Just connect it to the unipolar input of the Attys and in parallel a 1M resistor. This is the same sensor which has been used in the demo video.

Mechanical pressure

This is a force resistive sensor (FSR) which decreases its resistance when you apply pressure to it. The Attys can measure resistance by sending a small current through the external component so that no external components are required.

Light intensity

The LDR reduces its resistance when light shines on it. With the Attys in resistance measuring mode one can measure light intensity straight away.