Introduction: Emotion Aid

Introduction

Communication of emotions is a challenge for many people, not just due to the effects of social distancing during the pandemic but also in general. To address this issue, a strategy has been developed to evaluate sensing values as emotions and translate them into a wearable that can facilitate better understanding of emotions in daily life situations.

Strategy

The "Emotion Aid" is a wearable that assists individuals in expressing and communicating their emotions in a non-human way, which is more comfortable and fun for them. To achieve this goal, the device incorporates sensor feedback such as temperature, pulse, and moisture sensors that helps users define their emotional state and express themselves more effectively. By enabling visual translation of emotions through the wearable, users have a tool that can ease understanding in any common scenario.

(This project was developed by Clara Blum and Mohammad Jafari as part of the Computational Design and Digital Fabrication Seminar (CDDF) in the Master's programme Integrative Technologies and Architectural Design Research (ITECH) at the University of Stuttgart)

Supplies

Before starting, it is recommended that you read the entire guide to get a good understanding of what to expect, not just the component lists. Once you have read the guide, you can begin shopping for all the necessary components and ensure that you have access to all the relevant tools needed for the project.

Components

1.01. Arduino Uno + cable to USB port

1.02. Breadboard

1.03. Jumper wires + general wires

1.04. Capacitive Soil moisture sensor hygrometer module V1.2

1.05. Temperature Sensor [DS18B20] + 220Ohm Resistor

1.06. Pulse Sensor [ICQUANZX]

1.07. Servo motor

1.08. 9 Volt Battery + snap connector

1.09. Bra

1.10. 1mm Woodsheet

1.11. Timber scraps

1.12. 1x Screw and washers (size depends on your Fan size)

1.13. 1-2 sheets of A3 white paper (or any choice of paper)

1.14. Velcro tape

1.15. Bell Wire (optional if you need to alongate any wire connection)

Equipment

2.01. Computer with Arduino IDE installed

2.02. Handsaw

2.03. Woodglue

2.04. Hot glue gun

2.05. Drill (optional if you prefer not using glue)

2.06. Soldering iron (optional if you need to alongate any wire connection)

2.07. Sanding paper (optional)

Step 1: Set Up Circuit

Setting up the Circuit is very straight forward. You can follow the image and the digital diagarm above or connect as follows:

For the general setup...

  • connect the breadboard to the Arduino Uno with jumper cables - cathode goes to the 5V hub and anode to the ground hub (GND)
  • the 9V battery cathode goes to the VIN and the anode to another ground hub (GND)
  • the servo anode and cathode are connected to the breadboard and the signal pin to pin 9

All the sensors need to be connected to anode and cathode on the breadboard and to a signal pin on the arduino. If you are following the uploaded code and have not adjusted the pins, connect the signal pin...

  • of the moisture sensor to pin A0
  • of the pulse sensor to pin A1
  • of the temperature sensor to pin 12 (digital) - don't forget to build in a 220Ohm resistor!

Try to use only black wires for the negative poles (anode), red wires for the positive poles (cathode) and a selected color per sensor or servo, this way it is easier for you to follow the current in the circuit.

If you are unsure about anything, please check the data sheets of the components.

Step 2: Set Up Code

The project and the code are informed by research projects on human emotion sensing, detection and definition, especially the paper "Human Emotion Recognition: Review of Sensors and Methods".

In the code we communicate the emotional states of being calm, tired or sad and angry or nervous.

The code uses several libraries, defines constants and variables for sensors and actuators. 

You can download all the libraries inside the arduino IDE:

#include <OneWire.h>
#include <DallasTemperature.h>
#include <Servo.h>
#define ONE_WIRE_BUS 12
#define USE_ARDUINO_INTERRUPTS true
#include <PulseSensorPlayground.h>

We also define emotion thresholds based on sensor values and controls a servo motor based on these values:

//CALM
const float calmTempThreshold   = 19.75;  //AVERAGE
const float calmHumThreshold    = 20;     //AVERAGE
const float calmPulThreshold    = 230;    //AVERAGE

//ANGRY/NERVOUS
const float angryTempThreshold  = 22;     //HIGH
const float angryHumThreshold   = 30;     //HIGH
const float angryPulThreshold   = 231;    //HIGH

//TIRED
const float tiredTempThreshold  = 19.5;   //LOW
const float tiredHumThreshold   = 10;     //LOW
const float tiredPulThreshold   = 229;    //LOW

A main loop function requests data from sensors, calculates values, and controls the servo motor accordingly.

void loop() {
  //REQUESTING SENSOR VALUES
  sensors.requestTemperatures();
  temp = sensors.getTempCByIndex(0);

  hum_sensor_analog = analogRead(humPin);
  float moisture_percentage = ( 100 - ( (hum_sensor_analog/1023.00) * 100 ) );

  int pulValue = analogRead(pulPin);
  myPulseSensor.getBeatsPerMinute();
  float myBPM = myPulseSensor.getBeatsPerMinute();

[...]

if ((temp > tiredTempThreshold && temp < angryTempThreshold) || (moisture_percentage > tiredHumThreshold && moisture_percentage < angryHumThreshold) || (myBPM > tiredPulThreshold && myBPM < angryPulThreshold)) {
  Serial.print("CALM");
[...]
}
else if (temp > angryTempThreshold || moisture_percentage > angryHumThreshold || myBPM > angryPulThreshold) {
  Serial.print("ANGRY OR NERVOUS?");
[...]
}
else if (temp < tiredTempThreshold || moisture_percentage < tiredHumThreshold || myBPM < tiredPulThreshold) {
  Serial.print("TIRED OR SAD?");
[...]
}

Generally the servo moves acording to an individually defined degree, one can get creative and write lots of functions for varying movements - here we show the basic principle:

void servoDegree(int degree){
  servoFan.write(degree);
}
void openFan(){
  servoDegree(180);
}
void closeFan(){
  servoDegree(0);
}

Of course, you can adjust the movement to your liking by editing the code.

Step 3: Test Circuit & Code

All the electronics part are now in place, and we can make our test to check whether all the wiring is working.

First, connect you Arduino Uno to your laptops USB port. In the Arduino IDE select the Arduino Uno board and the respective port.

Now you can compile your code, this will upload the code to the arduino and you could already disconnect it from your laptop and use it by powering it with the battery only. Let's leave it connected though for a little while longer to revise the output on the serial Monitor in the Arduino IDE.

You should see the values outputs on the serial monitor and the respective movement of the servo motor.

Consider:You might have to adjust the thresholds acording to your locations climate or your individual pulse, temperature and sweat values.

If something does not work, check the wiring and the code again (see step 2 & 3) - is everything well connected and to the correct pins?

Step 4: Cut & Assemble Sensing Parts

For the sensing set we attached the sensors to a bra. You are very much at liberty regarding the design here, but you need to consider an implementation that ensures acurate placement of the sensors. The pulse sensor can just as much be connected to a fingertip and the moisture sensors can also be attached to in the inside of your palm - maybe you can try making the sensing set in form of a glove?

In our case the pulse sensor is attached with hot glue to the center point of the bra in between the two cups. the moisture sensor is loose and stuck underneath the side barely touching your armpit. The temperature sensor is attached to the breadboard but can aswell be moved to i.e. the other armpit - here you would need to alongate the sensor pins with bell wire.

We cut long strips of velcro to attach the arduino, the batteries and after the follwoing step the mechanical elements as well. Using velcro enables easier detaching for making adjustments and taking the wearble on and off.

Step 5: Cut & Assemble Mechanical Parts

For the mechanical actuation we built a large scale hand fan, please follow any fan builing tutorial on youtube or this very nice ehow instruction "How to Make Japanese Fans" and decorate it to your liking.

Consider: connect all the timber strips with a screw as its stronger than a pin and can later stabelize the whole fan in the holder. Also, we recommend inserting washers in between the strips for easier opening and closing.

Apart from that, you will need to build the holder. You are very much at liberty regarding the design here, but it needs to be stable enough and you need to fix one end of the fan to the holder and the other to the servo. We built all the parts out of timber scraps and woodglue.

It is recommended to use velco for a temporary connection in case and changes need to be made or you just want to disconnect the fan or the servo.

Step 6: Now! Be Emotional

Congratulations if you made it until here - reading wise and hopefully also building and testing wise!

Step 7: OPTIONAL Variations

Here are some suggestions for optional next steps:

  • You can further adapt the circuit with more sensors and mechanical actuators, try i.e. to have two motors moving two fans or implement another actuation
  • Change the components to smaller ones to include them more subtle into the wearable
  • Implement into another wearable like a shirt, hat or a belt - which works best to define emotions, do you think?
  • Try the extra variations with more sets connected via wifi


Please make the Emotional Aid, make any of the proposed or your own variations and share them with us! Have fun!