WiFi-Enabling My Bedroom Switches
Published on Wednesday, December 25, 2019
I wanted to explore home-automation after working with Arduino and lower-level languages for a few years. It seemed as though controlling your lights was the de-facto home-automation starter project, so that's exactly what I went with.
The three main switches in my room (light, fan, and an outlet) should have the ability to be controlled wirelessly. In addition to this wireless control, they should also controllable using a physical switch, in case something should happen to the internet connection.
To plan out the design for my project, I first had to disassemble the existing panel to see how much room I had to work with.
I chose the Wemos D1 mini, with an ESP8266 module, to be the brains of the project. The board was cheap and there seemed to be enough tutorials and libraries that supported it.
I soldered the board, supply voltage wires, and a few 2N7000 transistors to a piece of protoboard. Don't mind the random gap that split the board in half (whoops).
To cover the relays and high-voltage wires, I designed a simple housing using CAD.
I used a piece of 1/8" plywood that I had lying around to build the panel. In hindsight, my design could have been a bit better, as I had to deal with misaligned components when actually mounting the panel.
I drilled holes for the screws and pushbuttons and threaded the relay control wires out of the board.
After all the components were mounted, I attached the relay housing to the front of the panel.
Through lots of frustration, I finally got the high-voltage wires hooked up to the relays and mounted the panel to the wall. The project was complete!
This project was a great introduction to DIY home automation. For future projects, I'll be sure to plan out the layout a bit better.
I now use the wireless capabilities daily to automatically turn on the lights when my morning alarm goes off!