Dermal Resistance
Project Objective
Electrodermal activity (EDA) is the property of the human body that causes continuous variation in the electrical characteristics of the skin.
In this project, I design a multi-channel electrodermal measurement system to record electrodermal activities from nine body sites.

System Architecture
The wearable EDA device mainly includes 4 modules:
- MCU module to control the operation flow and transmit BLE signal.
- Power management module to regulate the voltage, control the power consumption and support wired charging.
- Voltage divider resistor measurement circuit which can measure the resistance between 50 kΩ and 500 MΩ.
- Storage module to locally save data.
Fig. 2 System architecture. The green part represents MCU module; The yellow part represents power management module; The blue part represents voltage divider resistor measurement circuit; The red part represents storage module.
The receiving end consists of a PC and a nRF52832 board as BLE master to simultaneously receive multi BLE slave data.
The execution flow of the master & slave devices is as follows:
1. Before the experiment, the master BLE connect multi dermal resistance acquisition devices (also called slaves in the following).
2. At the beginning of the experiment, the master BLE get the current timestamp from computer, package it in a starting command and send it to slaves.
3. When the slave receives this command, it start collecting and save the timestamp and dermal resistance data to local SD card. In the collecting process, the slave saves files periodically.
4. At the end of the experiment, the master sent an ending command including current timestamp.
5. When the slave receives this command, it stops collecting data, save the timestamp and close the file.

Hardware

Synchronization Error Measurement
Why need to measure cumulative synchronization error?
Except for the initial timestamp being the same, the timestamps of data collected during the process are obtained through the internal timing of the eight devices. Considering the slight variations in crystal oscillators and temperature on each device, we need to measure the synchronization of data acquisition among the eight devices.Measure Method
Connect the detection electrodes of nine slave devices together, and connect the detection terminal to a fixed resistor about every two minutes for a brief moment, continuing this process for one hour. After the experiment, examine the synchronization of responses between different slave devices.

- Result
The detection took about 1 hour, and data from the same start time to end time was extracted from the recording files on the SD cards of each slave device. The general data is as Fig. 6 (a) shown.
Select three downward spike data and zoom in to observe the errors.
- 30 s after the collection begins: The maximum synchronization error between devices is 66ms, as shown in Fig. 6 (b).
- 20 min after the collection begins: The maximum synchronization error between devices is 72ms, as shown in Fig. 6 (c).
- 60 min after the collection begins: The maximum synchronization error between devices is 78ms, as shown in Fig. 6 (d).
Fig. 6 (a) Total data in 1 hour, and each downward spike indicates that the detection electrodes are connected to a fixed resistor at this time; (b) Data from 9 devices at the 30 s; (c) Data from 9 devices at the 20 min; (d) Data from 9 devices at the 60 min;
- Summary:
- The cumulative synchronization error is within 80 ms/h.
- Within a one-hour measurement window, the time sequence of responses from different slave devices to each stimulus remains relatively stable.
- With the passage of time, there is a slight increasing trend in the cumulative synchronization error.
Relevant achievement
[1] Xinyu Shui, Rongzan Lin, Ziyang Luo, Bingxin Lin, Xinxin Mao, Haojie Li, Ran Liu*, Dan Zhang*. Bodily Electrodermal Representations for Affective Computing. IEEE Transactions on Affective Computing. DOI: 10.1109/TAFFC.2023.3315973.
