Back to Parent

Outcome


Problem Statement

My roommate and I are always shocked by how much the electricity costs every month. A big consumer of electricity at our home is the lights that we always forget to turn off before leaving home in the morning. The solution could also be beneficial for cat Luna in my house if the light turns on before we arrive home so that she won’t stay in the dark by herself. It would also be great if the setting can be turned on/off through our cell phones so that no extra electricity would be wasted. Thus, a product of reminder that can notify my roommate and I and/or control the lights by sensing sunlight would save and prevent electricity intemperance. 

Goal

I am looking for a solution that turns on/off the light for our living room according to how much sunlight we are getting. A photo sensor would be used for the sunlight data (which could be replaced by weather data from a weather website API telling when would sunset happen during the day). By setting up the right measurement for sunlight, electricity can be saved when lights were turned on unintentionally. On the other hand, in cases where we want the lights to turn on when we are not home, we could potentially do that using service like IFTTT. Briefly, the product would have these operation steps: detecting the sunlight by the photo-resistor and send info to the cloud, then the cloud transfers the info to the second photon and force the servo motor to move and move the switch with it accordingly.

Process

Parts used:

Photo Resistor x 1

Breadboard x 2

Jumper wires

90 Degree Robot Servo x 1

Tape x 1

Particle Photon x 2

Pushbutton x 1

Resistor x 1

I realized that I needed two sets of photons with breadboards because there is a very long distance between the light source (the window) to the switch by the door which controls the light of living room. The trouble I went into is to make the two photons talk to each other. One of the photons would be used as the station for light sensing which will contain a photo sensor and a 10KOM resistor. The other photon will be connected to a 90-degree servo so that the rotation motion would be efficiently turning on/off the switch by the door. These circuits are not too complicated to build because separating the two functions make it easier to troubleshooting. Then I figured that the command “analogvalue” would allow me to publish the data of light sensibility to the cloud as an event that I called “light_outputviolet” constantly when the setting is turned on by the Pushbutton. The event then can be subscribed by the servo photon where the motor will turn 90 degrees (by setting) if the lighting measurement is low. I added a pushbutton at the end to make sure that we can shut down the function by simply release the pushbutton so that lights would not be turned on solely because how much sunlight the room is getting, which could be helpful during cloudy or raining days.

I intended to use IFTTT service to gain control remotely, but I haven’t got the chance to make it work and this is one thing I would do additionally. 

Img 2827
Show Advanced Options
Img 2828
Show Advanced Options
Screen shot 2018 01 31 at 11.02.42 pm
Show Advanced Options
Screen shot 2018 01 31 at 10.25.48 pm
Show Advanced Options
Show Advanced Options
Show Advanced Options

Outcome

The prototype is almost what I expected with the two photons talking to each other when lack of light triggers the motor to rotate. However, the 90-degree servo motor is not enough for turning of the switch at my home since the distance traveled caused by the motor is not long enough. Also, I want to try again working with IFTTT service to control the motor from my roommate’s phone or my phone. Also I would use power banks to charge the photons in use. 

Show Advanced Options

Reflection

This is my first personal IoT project and I learned a lot from it. I learned some basic operations about IoT, Particle Dev, and troubleshooting for both the software and hardware. In the future, I would be willing to step further away from references and make something from scratch (even the coding part) on my own. I would follow the same process, defining problem by doing researches and consulting, listing out steps that I might go through and managing emotion during trouble shooting and iterations. Particularly, I want to make use of the data I can get accessed to instead of simply connecting thins. 

Drop files here or click to select

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