RF Fan Control Project for Arduino or Raspberry Pi

First off… lemme say I have NO experience with Arduino or Rasberry Pi, but am considering one for a project I have been meaning to start for quite some time.

I have three Hampton Bay ceiling fans (that I quite like) that are controlled by the following RF controller…


The control surfaces of this remote are as follows:

1.) Fan speed, momentary contact, loop, first contact = hi; 2nd = med; 3rd = low; 4th = off.

2.) Fan direction, momentary contact, toggle, up, down.

3.) Light switch, momentary contact, toggle, on, off.

4.) Light dimmer, momentary contact, time based, hold (or close) to continuously cycle through brightness hi to low then low to hi.

5.) 4 gang DIP switch to select transmit channel, latched contacts.

There are other buttons on the remote for setting and entering a thermostatic mode which will be ignored.

The remote has an LCD display which displayes the brightness level 20%-100%, Fan speed (hi-med-lo-off) and direction(down-up). But the remote is not two way syncro’d, i.e. if you move the remote out of range and set it to high, it will indicate hi but obviosly the fan is not on. If you then move the remote in range and press the speed button once again it will indicate medium, and the fan will actually start up at medium speed… so some state info is kept in memory, and it appears four different signals are being sent as opposed to just a simple toggle (light behaves this way too).

My plan is to cannibalize one of the remotes and use it to control all three fans, making the necessary closures of four relays to simulate the positions of the DIP switches. Three other relays will be used for the momentary closures needed for 1, 2, and 3 above. I know #4 is kinda dicey from a relayed control standpoint… Hell, it’s dicey from the actual button on the remote, so not really necessary here as we rarely change their brightness anyway.

Hard to believe no one has done this before as popular as these things are (or if they have they’re keeping it a secret), but what I wonder most about is how to keep things in sync? Three different fans, seven different fan states.

Is this project just too big a cluster***k, or am I just making it out to be?

Looks like you have company :smile:


My first vote is to go with an Arduino first because it is a hobbiest’s PLC which works very well for controlling and reading inputs and outputs. The problems come with making your setup overly complicated but you can always add shields and the like.

The Raspberry Pi, however, is more like a low power Linux computer with a little bit of GPIO built in. It is great if you need to run supplentary apps along with your control program, such as a webserver or database, but it is can be overly complicated for a simple task.

In summary, I would first go with an Arduino to handle simple I/O and then move to an RPi if it gets more complicated.

Yeah… I read that; 3 months in and nothing working yet LOL.

However, they are using a remote with four distinct contact closures for each fan mode. No real logic needed other than hi=r1, med=r2, low=r3, off=r4.

My feeling is that the brains of the thing would need to remember three arrays (one for each fan), and increment the value in a name:value pair in a fan’s array anytime a relay is actuated. Then there would need to be a simple logic switch to determine the number of momentary closures to execute for any given command, depending on the fans current state as represented in that fan’s array.

Is arduino capable of this scenario?

Hmm, I not sure I’m totally clear on what you want to do, but my best interpretation is this:

Arduino Hash Table/Dictionary

Duino has limited RAM space (~2K), but should be enough to store your data if you code efficiently.