Ceiling Fan Controller

I wanted the ability to control my house’s ceiling fans from my phone. When I found the Spark Core on Kickstarter I knew it was the perfect setup.

All the fans in my house are from the same manufacturer and they all had a remote so I could control each individual fan:

In the back of this remote are dip switches which sets which fan I control. So with this in mind, I knew if I tapped into one of the remotes and control the dip switches, then I could control the entire houses fans. I took an Ethernet cable and soldered it directly to the remote’s board:

I hooked up the ground and then taps into FAN LOW, MED, HIGH and also into the 1st 2 dip switches. Next I built a PCB board with Opto-couplers and the Spark Core:

With this in place, now I could send commands to the Spark Core which would simulate someone pressing a button on the original remote and it also set the proper dip switches.

Next up was the software. Since I use an Android phone, I started developing a simple App:

With this app I can click on a room and control the fan’s mode:

I put a video together of how all this works:

Here you can see when I issue a command from my phone, it goes to the Spark Core and then the Spark Core simulates with remote being pressed.

I actually been using this solution for a few months and I am really happy with the solution. Only issue I had was when my Access Token expired!

I plan making the entire project open source.

If anyone has any questions please let me know.

Carsten

EDIT:

Here is a video of me controlling it from my Phone:

And here is a video of the fan being controlled by my Samsung Gear Live (Android Wear):

6 Likes

I’ll post a video of an actual fan turning on/off tomorrow.

I also extended the Android app for Android Wear! So I can control it from my watch. I’ll post a video tomorrow of this as well.

2 Likes

That’s really neat. How did you build the PCB?

Using Eagle:

are you taking orders? i was planning on doing this myself, but since you beat me too it!

My light remotes are very similar, with the same dip switches and same number of buttons

Do you have a feature for dimmable lights? 3 of the 5 fan lights in my house are dimmable by pressing and holding the button for more than 2 seconds

Did you consider using a 433mhz tx/rx module to read the code from the light switch and then repeat it? thats the approach i was going to use, but hey if your way works… i have a spare remote to hack too!

I have 2 boards left that I could ship you. Just pay for the shipping and its yours.

Are you sure the remotes are using 433mhz? I am by no means an electrical expert, but I figured it would be some proprietary radio. But if it does use that frequency then we could purchase a tx/rx module like you said and make it send the commands directly. Which is a better approach for sure.

As far as controlling the lights, you can easily rewire one of the cables to hookup into the light button. Currently I have 3 wires going to DIP switches and then others are GND, FAN OFF, LO, ME, HIGH.

With the 3 DIP inputs you can control up to 8 fans. If you only use 2 DIP inputs then you can only control 4. Or you run another cable over. I guess it really depends on what you want to do. But if we can make it work using the 433mhz tx/rx then it wouldnt be a problem in the first place!

Carsten

As promised, I added a video of the fan being controlled by the phone app and also by Android Wear. Check first post for the videos!

1 Like

@Carsten4207 Very nicely done Sir! Any plans to share the Andriod App project?!

Mohit

I’ll open it all. I had to migrate the code from Eclipse to Android Studio for the Android Wear stuff too work. So I need to clean it up some and then I’ll post it!

The Android app is actually flexible. You enter your Spark Username/Password, and then it’ll list all the Cores on your account. From there you select which Core and configure the Fans.

Like I said, I’ll clean it up and publish it all on Github (if I can figure out how git works :smiley:)

2 Likes

Sorry about the excessive delay, but I finally managed to upload everything needed to Github:

https://github.com/dresslerc/FanController (this is my 1st real Github project so I hope I didnt mess anything up…)

Let me know if you have any questions.

3 Likes

I’ve created a blog that explains in greater details how this works.

https://medium.com/@CarstenDressler/ceiling-fan-control-from-smartphone-654c4de4954e

3 Likes

dude, I just loved how you are operating ceiling fan with your mobile set . I also want to do the same .Please help me out . ( Am beginner what first step I am suppose to pull off…)