It's December 24th, Christmas time is near!
But you won't be celebrating Christmas day here.
You're going to visit your grandmother Ethell.
Surely this Christmas is going to be special.
You run out of the house too eager to stop.
Oh you forgot to turn the Christmas tree lights off!
No need to worry, these lights have your back!
For this is the ultimate holiday hack.
_______________________________________________________________
The Automatic Christmas setup allows you to no longer worry about manually turning the tree lights on and off. Upon activation, the lights will turn on for a set amount of time and automatically shut off after. It's easy to forget to turn the Christmas tree lights off which can do a toll on your energy bill through the holiday season.
Below is a graph of the motion sensors ability to read and send movement data to the photon. The photon was mounted to the wall near the lights. When people are in the area, the photon publishes the "itschristmas" event. The graph also shows the intensity of the motion detected. The bars up to ten show motion that was close to the sensor, and shorter bars resemble distant motion.
If the motion has already been detected recently, it resets the light timer for 20 minutes (adjustable via code). After a designated period of time without motion the lights will turn off. With an approximate range of 10 meters, the PIR sensor should have no problem keeping the lights on with people in the room. Even Santa can't trick this device,
Above are 3 photos showing key elements of this project. The first is the Photon attached to the PIR motion sensor. The sensor was taped to the door so motion would be detected upon entry. The code used by this photon publishes an event called "itschristmas" whenever motion is detected.
The second photo is the photon that is programmed to subscribe to the "itschristmas" event. When triggered the photon will activate a relay, switching the Christmas tree lights on. The relay is powered by the 3V3 output of the photon, and the transistor acts as the switch for the device.
The last photo shows how the device was rigged to work with the Christmas lights. The Christmas light wire was cut and soldered to the ends of the wires attached to the relay. This gave it a full connection to the circuit and enabled the switch to control the lights. Any exposed areas are then covered with electrical tape or an equivalent insulator. The lights are plugged into the wall as normal. The circuit diagram for the relay module should use an SPDT 5V relay (JZC-11F) that comes with the particle maker kit.
Comments