How to Make a Running Heart Alarm T-shirt

A DIY heart-rate wereable in a running t-shirt that vibrates when your heart-rate is high, using DFROBOT components.

Hardware components
Arduino Nano
vibration motor module for arduino
beetle- the smallest arduino
heart rate monitor sensor arduino
Software apps and online services
Arduino IDE

Story
I really like to run, and there are tons of items for running equipment. But, what about a wereable DIY gadget? In this case, I made a running t-shirt that vibrates when your heart-rate is very fast. Yay! How do we do this?
We need arduino (either nano or beetle), a vibration motor and a heart-rate monitor. Also a light t-shirt comfortable for running and some ability in sewing :wink:

First of all, the wiring. The heart rate monitor requires GND, VCC (5V), Analog pin and the Vibration motor module GND, VCC (5V) and Digital pin. The heart rate alarm should be adjusted to the user. In the code I will be setting it for +800.


Finally, when connecting everything, we upload the code using Arduino IDE.

//THE ANALOG PIN FOR HEART RATE
const int heartPin = A1;

//THE DIGITAL PIN FOR VIBRATION MOTOR MODULE
const int vib = 6;

void setup() {
 Serial.begin(115200);
 pinMode(vib, OUTPUT); 
}

void loop() { 
 int heartValue = analogRead(heartPin);
//printing for seeing the values at the computer, can be erased afterwards
 Serial.println(heartValue);
 delay(500);

//I use 800 for my own alarm, set your heart-rate alarm as you wish
 if (heartValue > 800){
     digitalWrite(vib,HIGH);
     delay (1000);
     digitalWrite(vib,LOW);
 }
}

And that's it! After uploading you should have a running t-shirt that helps monitor your heart-rate. What are the advantages of using this instead of a heart-rate wrist? well, it's cheaper, it's fun to make and the privacy of the data is kept, as the heart-rate is not saved in any server.

Schematics