Holiday times! It's the time we get a vacation to have fun and be relaxed. Everyone loves to make their holiday, an unforgettable one. But there will always be somethings that can bother you and spoil the holiday fun. As an example, while you are on your way to a party and suddenly remember that you forgot to turn off your heater at home. Or you may have wanted to turn on your heater for a moment before you getting home.
As always, we all want to make our holidays more interesting. It's Christmas and we want to make our Christmas tree, Door wreaths more attractive. By summing up all these things that we face during our holiday times, I decided to make a device that brings solutions to all the above-mentioned dilemmas.Functionality and Applications
Mainly, this is a power controlling device that can be directly connected to the main current supply at your home. The electrical equipment which you wish to control is connected to this device.
This device includes 3 modes which can be controlled through WiFi.
- Manual Mode - Power on/off manually by clicking the button
- Human Detection Mode - Power on only when the presence of a human is detected
- Timer Mode - Turn on the power depending on a countdown timer
Why these modes are important? Let's consider some practical scenarios.
- You are on your way to a party and suddenly remember that you have forgotten to turn off your heater and it might cause a fire. By using this device, you can turn off the heater manually using your mobile phone's web browser without returning home. Further, you can turn on your house lights using this mode.
- You made a Christmas wreath and some other decorations and you want to highlight them when someone arrives. You can use the human detection mode which will turn on the power when someone is around.
- You need to turn off lights inside your house automatically when someone is not there. Here you can use the human detection mode which turns off your lights when you leave.
- The weather is very cold and you need to heat up your house before you come. Here, timer mode can help you. You can setup a timer through the mobile phone for 15 minutes which will turn on the heater for 15 minutes. Further, this acts as a safety feature just in case you forget to turn off the heater.
Basically this device is made using the components I have mentioned above.
You need to connect them together. Suppose you all have basic knowledge in these kind of stuff.
I have used 16X2 LCD shield with buttons to reduce the number of the wires.
I think you all can connect the modules together according the schematic I have uploaded. I didn't connect the Vcc and the Gnd pins to reduce complexity. Do not forget to connect them when you're actually making it.
Connecting modules is not a big issue. As we are going to work with the main power supply at home, safety should be our best priority.Enclosure
To avoid any accidents, we must place all modules inside an enclosure. It's better if you can design an enclosure from acrylic sheets and cut them using a laser cutter. I found an old enclosure made by myself for another project.
To make space for the Power switch, LCD and PIR, I removed some parts from the original enclosure.Placing Parts
Following images show the placements of the components.
connect MKR1000 board to these components according to the schematic.
I have connected one of the 2 AC wires directly to the black connectors (See the enclosure). The remaining wire is connected to the middle connector of the relay. Remaining 2 connectors of the relay are connected to the red connectors of the enclosure as one for each.
A plug top has been connected to the other end of the AC wires.
Before uploading the code to the MKR1000 board, set the ssid and the password according to your WiFi network.
Connect the electrical equipment to the red and black connectors. Turn on the device. After connecting to the WiFi network, the IP address will be displayed on the LCD screen.
Type the IP address in the mobile web browser. Now it will display the control page.
Select any of the modes as you desire and enjoy your vacation!