Back to Parent

Outcome


Intention

I designed this device for one room in my house that has the light switch outside of the actual room. This room is a converted closet so it is smaller than the others and has a few other quirks with the light switch being one of them. As you can imagine this can be an annoyance to have go into the hallway to turn off the lights at night. I chose this problem because it is a small thing that is easy to deal with but it is an example of a type of problem that IoT can be used to solve. It is just making someone life a little bit easier.

Context

The solution I wanted to create is very similar to the clapper light switch. In this case a clapper may not be the best solution because of the barrier between the switch and the person so I wanted to create something that allowed you to use a phone to turn off the light with the added benefit of turning the lights off when it was bright outside.

Process

My first iteration was to be able to turn the light on and off with the photo resistor and I was able to accomplish this very early. I then moved on to adding the iOS app where I began with simply turning a light on and off and dimming a light without the photo resistor. Once these two separate parts were completed I moved on combining the two. After combining my first two parts, I found that they did not mesh well together. Specifically because the photo resistor is in the loop method it would crush the message saying to turn off or on the light from the app. To solve this problem I created the switch so that when the user wanted to control the light themselves, they would flip the switch in the iOS app. 

Product

The “final” product that is complete right now is a very basic model of what I wanted to create. It has basic the basic functionality of being able to turn on and off the light from the app as well as the light turning on when it is darker in a room. I also added a dimmer on the app so that you could dim the light. There is a switch in the app to turn the photo resistor on and off. This was necessary because the dimmer was not working as well when the light was being turned on and off. In the future it would be nice to fix this problem and do away with the switch. Beyond that I wanted to be able to display when the light was on and off in the app but that is not working as I wanted. I am able to tell when the light is on and off in the actual app code but the display is not updating right now. It would also be nice to be able to incorporate a motion sensor with the photo resistor so that the light could turn off when there is no one in the room. Finally I think an device like this could be used to help conserve energy by notifying the user when the lights have been on for too long.

Reflection

I learned a lot about communicating with the particle device from an iOS platform, which I believe would be similar with other platforms, and also communicating from the device to other platforms. I think if I were to re-do this project I would incorporate a physical switch earlier. I have a physical switch but it does not interact with the code, by this I mean I am not able to tell when the light is switched off physically because there is no data being passed from the switch. Finally if I were to do this again or had more time, I would clean up the code on both iOS app and microcontroller. I did not get exactly where I wanted but I definitely think the device is in a workable place right now and I was able to learn a lot about the device through this project.

Show Advanced Options
Show Advanced Options
Img 1228.jpg.thumb
Show Advanced Options

First iteration. Attempting to use the photo resistor to turn on and off the light.

Img 1233.jpg.thumb
Show Advanced Options

Light turning on in "darkened room"

Img 1234.jpg.thumb
Show Advanced Options

Light dimmed down all the way

Img 1235.jpg.thumb
Show Advanced Options

Light on full power.

Screen shot 2017 02 02 at 6.15.47 pm.thumb
Show Advanced Options
Drop files here or click to select

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