ESPHome Three Speed Smart Pedestal Fan
by MKJustUK in Circuits > Electronics
2376 Views, 4 Favorites, 0 Comments
ESPHome Three Speed Smart Pedestal Fan
I took a fairly standard pedestal three speed (one button per speed and off) fan and made it smart and controllable with Home Assistant (and therefore Google, Alexa etc). I wanted to do this as I like to have a fan on at night, initially stronger and then less so and eventually turn off while going to sleep in the summer.
Supplies
I used an ESP8266 (specifically a Wemos D1 mini) available from Amazon, AliExpress etc and a 3 relay board that the ESP8266 can control. There is also a 230ac to 5vdc 700ma transformer board to take the mains power and convert it for the ESP8266 and relay board.
Disconnect the Buttons
The first thing to do is to carefully disconnect or cut the wires from the mains supply and buttons. This will leave you with:
- 2 wires from the mains supply (blue and brown)
- 1 wire for direct contact to the fan (black)
- 3 wires for the fan that control speed (red, darker blue and white)
Add the Power Board
The power board needs to be connected to the incoming mains wires. At the same time, the direct fan wire is also connected to the live mains wire. The output is connected to the ESP8266 and the Relay Board. This leaves the three ´speed´ wires unconnected for now.
Wire Up the Relays
Simply wire the neutral wire from the mains supply into the COM of the first relay and loop through to the COM of the other two. This will then allow the circuit to the fan to be completed through one of each of the relays.
Wire Up the Relay Control Board to the ESP8266
The Relay control board needs 5vdc and GND from the ESP8266/Power converter. There are then three more wires for each of the relay control points. These are connected to different GPIOs on the ESP8266.
In the picture you can also see the three fan speed wires are connected to their relevant relay. You may need to experiment with these to find the right speed wires for each relay to suit. I copied the order from the buttons before I cut them and numbered the relays as you can see. The code then follows the relay numbers as I´ve written them.
Manual Button
For a manual override button, I removed the original switching gear and pulled off the plastic buttons. I then glued the three speed buttons in place on the casing and replaced the off button with a new 3D printed one. The ´holder´ has a small microswitch inserted that the button presses against. The microswitch is in turn connected to the GND and another GPIO of the ESP8266 to act as a simple input to switch on/off/change speed.
Control
The ESP8266 has an ESPHome sketch uploaded to it that allows control via Home Assistant and the manual button. See the Github page below for details of that part of the project.
Github page for ESPHome YAML and the 3D printer files for the button and holder pictured.