Back to Parent

Outcome


Problem Statement

I decided to design for my roommate, whom I am currently living with in Pittsburgh. I chose to design for her because her problem was unique - she comes home drained and exhausted and is looking for a way to let off steam and relax. Melissa is a full time graduate student and works part time at Google. She is also the lead on the Hyperloop team on campus and is also involved in several other organizations. She exercises daily and eats very healthy. In short, she leads a very busy lifestyle. IOT can significantly benefit her because there are many opportunities to make a relaxing environment through IOT.

Goal

My goal is to create a solution that makes the home more relaxing when Melissa comes home. She placed importance on the fact that she is most stressed when she first arrives at the apartment because she has a lot of thoughts going through her head at the end of the day. In order to alleviate this stress, I decided to build a system that plays music, which has beneficial properties when it comes to stress relief, when she enters the home. I hope that by being exposed to music as soon as she walks in, she can divert her mind and focus on the music instead of all the thoughts in her head.

Process

To complete this I used a motion sensor, a piezo speaker, an LED, breadboard, and all the appropriate wires. I first started out by wiring the piezo using this online tutorial. However after speaking with classmates and researching online, I found that I could eliminate the need for 2 wires by directly wiring to the ground and digital inputs (shown in images below).

As for the code, I started off with the code from the online tutorial:

Screen Shot 2017-01-30 at 1.13.14 PM.png

Screen Shot 2017-01-30 at 1.13.29 PM.png

I then wanted to add in the functionality of only playing this music when motion is detected. So I started off with another document using code from this online tutorial. I then modified my code to include this functionality by combining these two codes correctly. Once I was done with my code and deployed it, it wasn’t working which is when I realized that my wiring was wrong. I had wired things to analog that were supposed to be digital. After fixing those issues, I was able to get it to work!

Outcome

I ended up with the final code below:

Screen Shot 2017-01-30 at 1.22.32 PM.png

Screen Shot 2017-01-30 at 1.23.06 PM.png

Screen Shot 2017-01-30 at 1.23.17 PM.png

This diagram depicts my final wiring of the components:

Creative_assignment_1_bb.png

Bill of Parts:

Motion sensor

Piezo speaker

LED light

10kOhm resistor

Appropriate wiring

Future work: My next step would be to code it to be able to play the “discover weekly” Spotify playlist that Melissa listens to when she walks into the door.

Reflection

I learned quite a lot from this project especially because I came into this with no background in electrical engineering or computer science. This activity definitely demystified how electronics work for me, because before I just considered the process to be a big black box in which I had no idea what went on. This was a great introductory project into circuits and the useful applications. I look forward to more projects in the future.  

Show Advanced Options
Show Advanced Options
Drop files here or click to select

You can upload files of up to 20MB using this form.