Hacking a remote control Hunter ceiling fan controller
-
So a while back I got a used Hunter ceiling fan controller with a remote from a friend. It has 3 fan speeds as well as a line for a light. The remote runs on 350 MHz and I have been trying for a while to figure out a way to MySensorize it. I decided to dig it out again today and take another look. Here is a pic of the main controller:
After popping the cover on the unit, one of the first things I noticed was the radio receiver daughter board which has 4 connections that go to the main board (VSS1, VSS2, P3 and DATA):
I then decided to look inside the remote. The remote runs on a Holtek HT-12E chip which I found out is a remote control encoder chip which I believe is what the E stands for.
I looked up the data sheet for the chip and it seems pretty straight forward as far as how to run the chip. It looks like the buttons on the remote connect to the data lines of the chip and pull the lines low. I am thinking that I can get one of these chips and interface it with a pro mini fairly easy. I should just be able to wire the output of the chip to the DATA line from the radio on the controller. I could take it a step further and also get an HT-12D chip which is the decoder and wire that also to the data line. This way I could still have use of the remote and be able to receive commands from the remote to report back to my Vera controller on the MySensors end. The main controller apparently uses a chip-on-board version of the HT-12D chip that is under a black epoxy dot on the main board, so it is not easy to interface to it which is why I figure I'd need to get the decoder chip. I can get 2 sets of these from ebay fairly cheap: http://www.ebay.com/itm/2Pair-4pcs-Hotek-HT12D-HT12E-DIP-18-IC-Remote-Decoder-Encoder-/272410557408?hash=item3f6cef3be0:g:cAQAAOSw-CpX~hgDIf I can get this all working, and, if I can get more of these, I can use these in all of my ceiling fans. I'll keep the board posted on the progress as I make headway. I'll order the chips today, but coming from China may take a while.
-
@dbemowsk - I love following ongoing projects - good luck and keep us posted
-
I'm actually working on something similar right now. I also ripped apart my remote control.
Originally I was planning on getting a radio transceiver set to read and then mimic the remote codes, but I couldn't get it working.
So instead I'm in the process of connecting the remote board Frankenstein style to an arduino with transistors and stuff.
The remote board has contact patches for all the buttons, and if you connect them to ground it triggers that specific button.
So my final build will have the remote control board, a pro mini, nrf and other parts all cobbled together and stuck in a box on my nightstand. From there I can use my phone domoticz app to control anything.
I'm also adding a temperature sensor so I can automatically control the fan based on room temperature.
-
I received the chips for this project, but I have so many irons in the fire right now, I just haven't had time to get to it. It will be coming soon though.
@micah, what type of ceiling fan controller is it? Maybe you can do something like I am doing. I just bought a set of controller chips. There is the HT-12E and the HT-12D, the encoder and decoder respectively. I am just going to connect one of the encoder chips to a pro mini and pump the signal in where the signal comes off the radio receiver. Then I'll 3D print an enclosure that will attach that assembly to the controller. Or even better, make a whole new enclosure for the whole works.
-
@micah Hi, I'm new to this forum and Arduino and have been looking for a way to control my RF controlled ceiling fans with my HA system. I have both Hunter and Hamilton Bay ceiling fans that each work on their own RF frequencies, however they do not use a fan controller like dbemowsk example above. I was thinking that simulating a button press from the Arduino would work perfectly. I have an extra remote that it could connect to and then just place it in the room. We could use the other remote if we want to manually adjust or turn it on.
Would you mind posting a parts list and how you accomplished your project when you are done? Really looking forward to getting this incorporated into our HA system!
Thank you!
-
@The-Profit Even though your ceiling fan does not have an external controller like the device in my case, it may still use the same chips and circuitry, just inside the fan. You would have a couple options with this. If you have an extra remote for the fan you want to control, the easiest solution would be to wire arduino relay modules across the terminals for each of the buttons inside the remote and using the arduino to activate the relays to simulate a button press. This approach can get a bit bulky depending on the relay modules used and how you wire them to the remote.
Another option would be to pull apart one of your remotes and look at the board. it may use a similar chipset and configuration to the ones mentioned in my previous post. If that is the case, you could wire your MySensors module to the receiver inside the ceiling fan. This obviously would be a more difficult solution and would take a bit more electronics knowledge, but would be cleaner.
-
@dbemowsk Unfortunately this will be my first project with arduino so I won't have the electronics knowledge yet to attempt pulling our ceiling fan apart. Might upset the wife when I can't get it back together...
I have my first arduino uno r3 kit on it's way, do you have any suggestions about which parts/relays to use for my project? If there are smaller parts to help make it less bulky I would be interested in getting those instead. The goal is to use my HA (Homeseer with Arduino plugin) to control the ceiling fan (on/off, speed & Light). So I'm guessing I would need a wifi shield, the R3 and relays?
For the code, is there a good project you suggest I study that would help me accomplish what I would need to get started with hacking the remote?
My hope is to eventually get to the point where I can implement a cleaner solution like you are doing...but in the meantime I will have to settle with the easier solution. Thank you so much for any help!
-
@The-Profit One thing you will see talked about in the forum on occasion is the WAF, or the Wife Approval Factor. So we'll try to NOT upset the wife with this one.
Right now, I typically use my uno R3 for testing circuits that I want to build. Then when I actually do the build, I use pro minis. The pro minis look like this and come in 3.3 volt or 5 volt versions:
In order to program these you need an FTDI adapter which is a USB to serial converter and you connect it to the top set of angled pins to the FTDI adapter to program it. With the uno R3, you just connect a USB cable to it and your computer for programming. If you wanted to stick with a plug and program solution that is smaller than the R3, you could go with a nano, which looks like this:
It is still small being only slightly larger than the pro minis, but they have the FTDI adapter built in to them.When you say that you have Homeseer with the arduino plugin, do you mean the MySensors plugin from this site, correct? If not, you will need that. The next thing you will need is a gateway connected to the computer you are running Homeseer on. For that you should check out the "Selecting a Gateway" page. Depending on the gateway you select will determine how you set up your nodes. I run a serial gateway using nRF24L01+ radios for my setup which I find fairly easy to work with.
So, on to your project. If you are looking to simply turn the fan/light on and off and not worry about any speed control, you can simply do a one or two relay node (two relays if you have a light and a fan to turn on and off). A good place to start with wiring and code for this is the relay node in the build section of the site. This project shows how to build a single relay node with a relay module like this:
That code can easily be expanded to use a dual relay board like the one below which could be used to control the ceiling fan and the light.
Without knowing a bit more on how your system is set up, or how you plan to set it up, I won't be able to help much more. For selecting a gateway (if you haven't already), I can only help with the serial gateway, as that is the only one I have worked with. There are plenty of GREAT people on this forum though that can help you with ANY issue you have. Don't hesitate to ask if you have problems or questions.
-
@dbemowsk Thank you for all that info, it's giving me a great start in the right direction. Sorry it's taken me so long to respond to the questions you had for me.
So what I have since found out is that Homeseer has two separate plugins, one for Arduino and one for mysensors.org. I had no idea there was a difference but have learned that mysensors uses a different library. I'm not sure if the MySensors plugin on this site that you mentioned is the one that I would use with Homeseer or not. Guessing that I will just stick with the one from the Homeseer forum.
So I didn't realize this when I started, but it's sounding like if I use the Arduino library and the MySensors library I would have to have a gateway for each? Hoping I won't have a need to do that... If I use the MySensors gateway, from what I understand the MySensors gateway is only supported as a serial interface, so if I have questions I'll let you know, thank you for that!
On my project, I would like to control the speed as well as the on/off for fan and light, is that not possible? I have a button for each speed (High/Med/Low/Rev), a button for fan on & a button for fan off. The light has a rocker, if you push up it turns the upper light on/off and lower for the lower light on/off. Would I need a relay for each button? (Eight relays?) Might be easier to do it the way you are doing it, just don't have that level of electronics experience yet.
How is your project going by the way? Didn't mean to step in the middle of your thread with all my noob questions.
-
what about buid an dimmer sensor ,put it directly to the fan motor and forget that remote? that is what i would do. that its all about create a scene for that fan, temperature limits,motion .... smat fan you know
what is the motor power ?
-
@The-Profit I am sure that the arduino library and the MySensors library are different in how they talk to devices. The MySensors gateway is not only supported as a serial gateway, though I think that is the most common way that people connect. MySensors also supports an RS485 wired gateway, MQTT gateway, and a few others. Check out the "Selecting a gateway" page for more on the gateways. If you have MQTT already set up for HomeSeer, you may not need any gateay at all (could be wrong on that though), not exactly sure as I have never used MQTT.
As @Tmaster mentions, you could build a dimmer sensor, but if you are going to do that, you will want to make sure you make one that is safe for inductive loads. If you don't have one for inductive loads, you could easily burn out the circuit.
I have not had the time to dig into this one again, though I hope to soon. I have my hands full at the moment with my weather station node that I have been building. Once I get more done on this, I will post to this topic again.