Heartalarm – pcomp midterm


The initial idea for this project came from living in a bad part of Bushwick that I was scared to walk through at night. I had the idea of making an self defence device/alarm that responds to your level of stress and anxiety. Looking for the right data to trigger this alarm, I arrived at the pulse sensor. I decided to make a basic alarm that will be triggered when the pulse goes above a certain level. The long term plan was to have the small and wearable device connect to wi-fi and report any irregularities online to your spouse/parent/person of your choice. Feedback I got from the class while presenting my idea:

  • There should be another form of input to trigger the alarm so that it doesn’t go off for the wrong reason. I should look into combining more sensors like distance and light so that: if it is dark + someone is getting closer to you + your heart rate is very high > then the alarm will go off.
  • There should be some form of approval from the user that there is indeed a need for help.


  • Failure to work with a piezzo – The code that came with the sensor was using interrupt and there was some overlapping with the tone library that couldn’t allow the piezzo and the sensor to work at once. Trying to troubleshoot this until the last minute, I ended up using processing for sound.
  • The reading was not entirely precise – I should’ve worked further to improve the code and normalise the values of the output.
  • Not putting enough work into the interface and user experience – being too absorbed in getting the basic piezzo and sensor to work, I didn’t pay enough attention to the bigger picture, which was the main challenge of this exersize.

Lessons (Hopefully) Learned

  • Plan ahead
  • Get a plan B, and C
  • Think big and try more solutions, experiment.
  • More focus on user interface.

Some Pride

  • Getting the project significantly smaller using a shield which made it pocket sized.
  • Learning how to solder.
  • Connecting Arduino and Processing.



Pulse Sensor ampd from ziv schneider on Vimeo.

Leave a Comment.