Back to Parent

Outcome


Problem Statement

This creative home hack that I am designing is for one of my roommates. At the beginning of the year his room light burned out, and he did not have the motivation to replace it. Since the light did not work he had to resort to a lamp by his bedside for lighting. When it was dark outside, there was no natural light in the room, and when he would try to make his way to his bedside for the lamp, he would trip on his clothes because he couldn’t see where he was going. 

Goal

The goal of my homehack is to design a motion activated light (lamp) that can be used in my roommate’s room so that he doesn’t have to stumble around the room just to turn the light on. Another feature that is to be added to this device is a email notification whenever the light is turned on. This combines the functional nature of a lamp with a security mechanism that my roommate can use to tell if and when people enter his room. 

Process

During the course of this project, I lost most of my code because my computer ran out of storage space and so the code wasn’t saved. I do have a new revised code however that is functional. See photos and videos for the arrangement. As a chemistry major with little coding experience, I found the majority of the project to be difficult. One of the hardest parts was trying to get the motion sensor to turn the light on and have the light stay on for a certain period of time, and then time out and turn off. Another challenging part of this was to get the motion sensor to be constantly taking in data and updating the motion to delay the amount of time the light would be on. I was only partially able to solve this problem, in that I was able to have the light turn on and stay on for a set time, but it only detected motion once the delayed light time was over. Overall, I was able to have the motion sensor detect motion, turn a light on and then send an email notification. The notification only worked once and I could not figure out how to get it to work consistently. 

I began by following directions from a hackster project (https://www.hackster.io/reagan-bush-84/motion-activated-light-switch-3eac2e) with assembling the motion sensor. I then used the tutorials and other help from the iot website (http://diotlabs.daraghbyrne.me/7-communicating-events/pir/) to work on getting the sensor to work and writing the code. 

A push button was added to give it a manual on/off switch for the light in case the motion sensor doesn't pick up motion or my friend wants to turn the light off.

Show Advanced Options

Outcome

The complete prototype would be hooked up to the lamp if I were able to get it connected. Currently there is just an LED representing the lamp. One thing that I would add next is a voice sensor that could detect my roommates voice so that it wouldn’t send him alerts when he was entering the room. 

Show Advanced Options
Breadboardsetup.thumb
Show Advanced Options

Bill of Parts:

-Particle photon

-PIR motion sensor

-7 Jump Wires

-Resistor 1k ohm

-1 LED

-Breadboard

-1 Pushbutton

-USB Micro cable


Show Advanced Options

Reflection

I learned a lot from this project. The main thing that I learned is that coding is tough and there are so many small things that make a huge difference in whether the code works or not. Even though I was focused on this specific project, the entirety of the assignment I was thinking of other homehacks that would be innovative and beneficial to either myself of my roommates; I even thought of and Iot for my brother. I got almost to where I wanted. It was hard for me to dig deep into the code with litte background and confusing tutorial videos and minimal time, however I do think I learned a lot from this project and got a lot out of it. I think I would need more lessons on the programming aspect of the project in order to make it better, just because I don’t have a lot of experience and every step would take be way longer than it should have.  

Project Summary

#smartlamp this is a product that eliminates the light switch and at the same time notifies the user when someone enters their room. 

Drop files here or click to select

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