Pulse Sensor Wearable

by AnnaHerrera_CarlotaMarginet in Circuits > Arduino

12084 Views, 70 Favorites, 0 Comments

Pulse Sensor Wearable

IMG_6719.jpg
IMG_6735.jpg
IMG_6703.jpg
IMG_6682.jpg
IMG_6684.jpg
IMG_6694.jpg

Project description

This project is about designing and creating a wearable that will take into consideration the health of the user that will wear it.

Its objective is to act like an exoskeleton which function is to relax and calm the user during a period of anxiety or stressed situations by emitting vibration in those pressure points we have on the body.

The vibration motor is going to be on while the photoplethysmographic pulse sensor receives, during some time, an elevated rang of accelerated hard pulsations. When the pulse rate decreases, meaning that the user has calmed down, the vibrations will stop.


A short reflection as conclusion

Thanks to this project we have been able to apply part of the knowledge acquired in the class exercises, in which we work on several electrical circuits using different sensors and motors in a real case: a wearable that relaxes the user during a period of anxiety or stressed situations.

With this project, not only we have developed the creative part while designing the patron and sewing it, but also the engineering branch, and we mixed them all together on one single project.

We also put in practise the electrical knowledge when creating the electrical circuit on the protoboard and transferring it to the LilyPad Arduino soldering the components.

.

Supplies

Photoplethysmographic pulse sensor (Analog input)

The pulse sensor is a plug-and-play heart-rate sensor for Arduino. The sensor has two sides, on one side the LED is placed along with an ambient light sensor and on the other side there is some circuitry. This is the responsible for the amplification and noise cancellation work. The LED on the front side of the sensor is placed over a vein in our human body.

This LED emits light which falls on the vein directly. The veins will have blood flow inside them only when the heart is pumping, so if we monitor the flow of blood we can monitor the heart beats as well. If the flow of blood is detected then the ambient light sensor will pick up more light since they will be reflected by the blood, this minor change in received light is analysed over time to determine our heart beats.

It has three wires: the first one is connected to the ground of the system, the second one +5V supply voltage and the third one is the pulsating output signal.

In the project one pulse sensor is used. It is placed below the wrist so that it can detect the hard pulsations.


Vibration motor (Analog output)

This component is a DC motor which vibrates when receiving a signal. When it does not receive it anymore, it stops.

In the project three vibration motors are used to calm down the user through three different relaxing points located on the wrist and hand.

Arduino Uno

Arduino Uno is an open-source microcontroller and developed board by Arduino.cc.The board is equipped with sets of digital and analog input/output (I/O) pins. It also has 14 Digital pins, 6 Analog pins and is programmable with the Arduino IDE (Integrated Development Environment) via a type B USB cable.


Electrical wire

Electrical wires are conductors that transmit electricity from one place to another one.

In the project we used them to connect the electrical circuit welded on the Bakelite plate to the Arduino pins.


Other materials:

- Wristband

- Black thread

- Black dye

- Fabric


Tools:

- Welder

- Scissors

- Needles

- Cardboard hand mannequin

fritzingpulse.jpg

First, we did the electric circuit using a protoboard so that we could define how we wanted the circuit to be as to which components we wanted to use.

PHOTO-2019-12-05-21-55-12.jpg
PHOTO-2019-12-05-21-59-56.jpg

Then, we did the final circuit we were going to put inside the mannequin by soldering the components using a tin solder. The circuit should look like the photography above.

Each cable has to be connected to the correspondent port in the Arduino Uno and it is recommendable to cover the electrical part of the wiring to avoid short circuits using insulating tape.

We programmed the code using the Arduino software and charge it to the Arduino using a USB cable.

<p>//buffer to filter the low frequencies<br>#define BSIZE 50
float buf[BSIZE];
int bPos = 0;</p><p>//heartbeat algorithm
#define THRESHOLD 4   //detection threshold
unsigned long t;    //last detected heartbeat
float lastData;
int lastBpm;</p><p>void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
  pinMode(6, OUTPUT); //declare the vibrator 1
  pinMode(11, OUTPUT);//declare the vibrator 2
  pinMode(9, OUTPUT);//declare the vibrator 3
}</p><p>void loop() {
  // read and process the input from the sensor on analog pin 0:
  float processedData = processData(analogRead(A0));</p><p>  //Serial.println(processedData);    //uncomment this to use the serial plotter</p><p>  if (processedData > THRESHOLD)  //above this value is considered a heartbeat
  {
    if (lastData < THRESHOLD) //the first time we trespass the threshold we compute the BPM
    {
      int bpm = 60000 / (millis() - t);
      if (abs(bpm - lastBpm) <= 10 && bpm > 40 && bpm < 240)
      {
        Serial.print("New heartbeat: ");
        Serial.print(bpm); //show in screen the bpms
        Serial.println(" bpm");</p><p>        if (bpm >= 95) { //if bpm is higher than 95 or 95...</p><p>          analogWrite(6, 222); //vibrator 1 vibrates
          analogWrite(11, 222); //vibrator 2 vibrates
          analogWrite(9, 222); //vibrator 3 vibrates
        }
        else {//if not (bpm is lower than 95)...
          analogWrite(6, 0);//vibrator 1 doesn't vibrate
          analogWrite(11, 0);//vibrator 2 doesn't  vibrates
          analogWrite(9, 0);//vibrator 3 doesn't  vibrates
        }
      }
      lastBpm = bpm;
      t = millis();
    }
  }
  lastData = processedData;
  delay(10);
}</p><p>float processData(int val)
{
  buf[bPos] = (float) val;
  bPos++;
  if (bPos >= BSIZE)
  {
    bPos = 0;
  }
  float average = 0;
  for (int i = 0; i < BSIZE; i++)
  {
    average += buf[i];
  }
  return (float)val - average / (float) BSIZE;
}</p>

5c1a23ea07b76.jpg

During the designing process we had to take into consideration the location of the pressure points in the body to know where the vibration motors must be placed, and we selected three of them.

IMG_7304.JPG
IMG_7290.JPG
IMG_7320.jpg

To obtain the wearable, first we dyed the flesh colour wristband using black dye following the instructions of the product.

PHOTO-2019-12-05-22-41-23_1.jpg
3027B86B-82B4-4859-AE87-67590636EFF1.jpg

Once we had the wristband, we did four holes in the cardboard hand mannequin. Three of them were made to extract the three vibration motors we used in the electric circuit and the last one was done to place the pulse sensor on the mannequin’s wrist. Apart from that, we also did a small cut on the wristband to make this last sensor visible.

713AACAA-855E-4476-93F4-48E2048CDAF9.jpg
IMG_6690.jpg

Later, we did one last hole on the lower side of the cardboard hand in order to connect and disconnect the USB cable from the computer to the Arduino board to power the circuit. We did a final test to check everything worked well.

IMG_6455.jpg
IMG_6462.jpg

To give to our product a more customizable design, we draw and cut a circle in garnet colour in which we then sewed some lines to represent the electrical heart beats.

IMG_6464 (2).jpg
IMG_6682.jpg

Finally, as the black wristband covered the vibration motors, we cut and sewed three small hearts on the wearable to know their location.

Now It's Time for You to Try It!

Checking the pulse sensor
Heartbeats