Sci-Fi movies have spoilt our expectation for the future, but they've also inspired us to work hard for a glorious future.
In this tutorial, I'll guide you through the process of making a window that is connected to the internet. Yes, you've read that right. An electric-driven window controlled via the internet!
Step 1: Gathering the Materials
It is important to understand that this project is tuned to fit my own environment. I have 5 window panels in my room and I chose to automate 3 of them. Also, you may not have the same window opening mechanism as mine so adjust this project to your own needs!
- 3x 360 Continuous Servo Motor
- 1x Arduino (I used the one I've designed from scratch)
- 1x ESP8266 Module
- 1x 3.3v Voltage Regulator
- Bundle of Wires
- M3 screws
Alternatively, you could use a NodeMCU board which has a microcontroller and wifi chip built-in, which would allow you to exclude the Arduino, voltage regulator and esp8266 altogether.
- Soldering Equipment
- 3D Printers
If you don't have a 3D Printer at home (I don't, I traveled 2 hours to another college and use theirs), you could always find one possibly in your local library or you could send your .stl files to a 3D manufacturer and have them ship it to you.
Step 2: Start With the 3D Printing
My stl models can be found here. This repository will also include my Arduino Firmware code and circuit design for my custom designed PCB.
I see many people are using the same rolling window so this model should work fine.
Step 3: Make the Circuit
There are many ways you could do this. If you're using an Arduino board, I would suggest using a custom shield with 3 servo connectors and an ESP8266 header. If you're using the NodeMCU, it easily integrates into a normal perfboard.
I'm using a custom AVR board that I've designed that will serves as the brain of my upcoming projects. Don't worry about it, just use an Arduino. I might dedicate a whole tutorial to my AVR Board in the future.
Step 4: Assembly
Start assembling everything together.
Like I said just now, everything is available on my Github.
The continuous MG996R servo motors should go on the slot in Servo Casing Holder V4.stl. Servo Horn V2.stl will function as an adapter between the servo shaft and the window gear.
AVR Board Casing Optimized.stl is only useful if you're using the AVR Board I've designed.You can make your own chassis to house the Electronics as you wished.
Make sure your wires are long enough to link your Arduino with the Servos.
Step 5: Coding and App
The source code is available on the my GitHub repository. Just be sure to replace your WiFi SSID, PW and Blynk Token in the code.
Speaking of Blynk, we'll use the Blynk library and app for this project. Go ahead and download Blynk on your phone and simply create a new project. An Email will be sent with the token. Create a button in the project and link them via VirtualWire.
Step 6: Enjoy Your Project
Now that you have an automated window, you can now sit back, relax, and use your phone to control it when you're lazy to get up. Or you could even set a timer in Blynk to close at specific time