Controlling a Ceiling Fan

Hi has anyone integrated a regular Ceiling fan?
I am currently building and looking for ideas on how to integrate a ceiling fan into my home automation.

My home automation will be based on openhab and I am using MQTT as the messaging system between devices.
Regards
Richard

Hi Richard, I am no expert on fans over 50 years since I studied them at Uni, but certainly you can use on/off control with a mains rated relay with no problem. When it comes to speed control, some are locked to the mains frequency by their construction although there will be some slip. The stepped rotational speed ones such as ceiling fans could be also done with relays - take care not to have two relays activated at one time. I am sure there are motors that I have not even thought of. Others more experienced in driving fans will undoubtedly be able to provide more and better information.
David

I have done some work reverse engineering the cheap (50AUD) 433Mhz ceiling fan controllers from Bunnings which also include light control (on/off). This was using nodemcu (Lua) and hacking the rfcontroller module and recompiling the firmware. Which specific controller do you have or are planning to use? I know they all use slightly different encoding protocols but not too hard to pick apart with a scope… By memory there are some resources online which were helpful but I don’t have them with me at the moment.

I have the same construction with my sun blinds.
To protect them from going up and down at the same time i use 2 relays in series.

(i had no software installed so used node-red to create an example)

By connecting them this way. you should never have 2 speeds connected at the same time.
and by using a 4 relay board you also have one left for the lightbulb :slight_smile:
when all relays are in nutral state the fan will stay off (since the last output is not connected.
if by mistake multiple relays are on the lowest speed will be used.

relay

1 Like

An easy way to control a fan (or anything else) that uses a remote control, either a built in one or an after market one, is using a method that Jon used in one of his videos. He hacked the remote controller and soldered directly to the keypad of the remote. Using an arduino as a switch, you could control all of the remote functions such as speed control, on/off etc. Check out Jons video for more info, I think it was the episode about putting a remote controlled lock on his office door.

1 Like

I was just thinking the same thing.

You could also if you want an off the shelf solution use the Sonoff IFAN02.

The Sonoff IFAN02 has now been superceded by the IFAN03.