Creating Audio Output From EDA Sensor W/ Arduino

by samdare in Circuits > Sensors

409 Views, 0 Favorites, 0 Comments

Creating Audio Output From EDA Sensor W/ Arduino

Signalconditioning.JPG

Electrodermal activity is the electrical activity of the skin conducted through sweat. This is a simple biosignal that can be measured with a circuit and sensors created at home.

Circuits can be frustrating! However, using a similar circuit as (IYAD, 2018) with the code included in this instructable, creating an audio output from EDA (electrical dermal activity) is easy!

Supplies

Arduino Uno

Resistance that combines to 10k Ohm or more

EMG electrodes (or you can make your own electrodes at home) and connection to circuit

Matlab!

Build the Circuit

IMG_0573.jpg

Build the circuit as shown in the picture. A resistance of at least 10k Ohm should be used. For the circuit in the picture, a 3.6k Ohm and a 8.2k Ohm are used in parallel. The main resistor needs to be connected to the A0 pin and one of the grounds. The two electrodes connections should be connected at A0 and 3.3 V.

Get a Reading

IMG_0574.jpg

Once the circuit is build, connect the electrodes properly to the circuit and the palm. NIKO electrode clips are used in the photo, but there are several other ways to connect electrodes with other methods and materials. Once the circuits are properly connected in each place, connect the arduino to the laptop and open Matlab.

A general reading is really easy to get. Just intialize the arduino with this code:

a = arduino()

readVoltage(a, 'A0')

When this code is run with no problems, real time data should be output by Matlab from the arduino. Try to see if you can change the signal by changing your GSR with jump scares or by wetting the skin.

Output Audio

Once the real time output is working, further code can be added to output noise for different changes in the EDA. Preloaded matlab sounds are used for this project, but personal audio files can be used to create a more engaging output.

This is the code used for this project: MatlabCodeAudio

After adding the updated code, different audio outputs should play for either the decreasing, increasing, or maintained EDA output signal.

Demonstration

In this demonstration, a reference trial is conducted where no audio is played because the EDA signal is not significantly changing. The other trial uses a minute amount of water under one of the sensors to trigger the audio output for an increasing signal. The song 'Hallelujah" plays when the EDA signal increases more than a specific amount after the last iteration.