Show Posts
Pages: [1]
1  Topics / Home Automation and Networked Objects / Re: Earthquake switch for a ceiling fan on: September 04, 2011, 07:59:15 am
That a good question. I installed ceiling fans for many years, I do not understand myself. Instructions for the majority of fans say that hot air rises, so in warm weather you want the fan to move air to cool the cold weather you want to push room.In warm air down. This sounds reasonable. Even in the switch will pull the air toward the right and down until you blow the air over his shoulder to the left. 

Interesting.  I'm not sure what you said but it's interesting.smiley-grin You're correct, though.  In warm weather you want the fan to blow down to directly cool the occupants.  This takes advantage of the wind-chill phenomenon.  In cool weather you want the fan to blow towards the ceiling to circulate the warm air that tends to collect there and spread it around the room.  This makes your heaters work more efficiently.
2  Topics / Home Automation and Networked Objects / Re: Earthquake switch for a ceiling fan on: September 01, 2011, 11:12:40 pm
It will take a few weeks for parts to arrive from the US, including the fan.  I'm also studying for a big certs test so I'll be preoccupied with that until the end of the month. smiley-roll-sweat

In the mean time, I've added an xBee shield to the design so I can program the Arduino remotely without having to remove it from the fan. 

I'll keep you posted.
3  Topics / Home Automation and Networked Objects / Re: Earthquake switch for a ceiling fan on: August 23, 2011, 10:57:10 am
Ah, that explains a lot.  No need for fancy modulation when you can just turn the carrier on and off.  Reminds me of Morse Code.  It's also good to know that these circuits are not wildly subject to interference.  I'd been thinking that a loose ground or maybe nearby lightning was causing some people's fans to turn on by themselves, but you think it's more likely that a neighbor's fan or other nearby RF device is turning them on.  Probably not a problem for me in the Japanese country village where I live.

Thanks for the cool graphic.  It really nails the concept down for me. 
4  Topics / Home Automation and Networked Objects / Re: Earthquake switch for a ceiling fan on: August 22, 2011, 07:28:57 am
Hello, sui, it's good to make your acquaintance.  You have some great stuff here.  While I'm no stranger to computers, dealing with micro-controller code is a new experience for me.  Your work here has shortened my learning curve considerably.

I suspected as much about the code length, but had no idea the pulse length only represented 1/4 bit.  I would be interested in learning more about that, if/when you get the chance.

As for the Hunter remote, I have heard that it is not very robust in terms of filtering unwanted signals.  There have been reports that electrical and/or RF interference can make the fan turn on by itself.  Usually it is caused by other nearby RF controlled devices which is why there are four dip switches to help you switch to a frequency that is not so noisy, but often this can occur in the middle of the night when such devices shouldn't be in use.  Have any of your RF devices shown that behavior?  I doubt that'll become a problem for me here, but if it does, what I learn here will help me a lot in tracking it down and correcting it. 
5  Topics / Home Automation and Networked Objects / Re: Earthquake switch for a ceiling fan on: August 21, 2011, 07:56:43 am
Thanks, I'll try that.  I have some parts to order first, including a fan.  I wanted to get this problem worked out before spending the money on the fan and parts as they're really hard to return from Japan if I make a mistake.  Thanks to your help, I think I now have a good handle on it. 

Regarding your code, can you tell me what the 24 is for?

  mySwitch.send(5393, 24); //replace 5393 with your code

And the "set pulse length" variable of 320us is the length of the data stream from each push of a button on the handheld, correct? Is that an industry standard or just what you've found  works best?

Thanks again.
6  Topics / Home Automation and Networked Objects / Re: Earthquake switch for a ceiling fan on: August 20, 2011, 08:09:57 pm
Many thanks, thegeekway, for this info!  That certainly is a good start. 

I assume that one of these tx/rx pairs would work:

I'm still confused, however, on how the Arduino sends the stop code to the mini-tx so the fan's rx can decode and execute it.  If I read the referenced library correctly, it suggests attaching the handheld remote to the Arduino just long enough to store the code in the Arduino's memory.  I assume that it will convert the code into some text form that I will then write into the Arduino's program.  My intention is to thereafter detach the Arduino from the handheld and move it to the fan where it will reside permanently in a box above the fan body.  Attached to the Arduino's output pin will be the input to the mini-tx.  When an earthquake occurs, the Arduino will detect the event and send the stop code to the mini-tx, which will then broadcast it to the fan's built-in rx, which will then execute the command.  The mini-rx that comes with the mini-tx/rx pair isn't needed as the fan's built-in rx will be retaining its normal functions.  Is this the normal approach to solving these problems?


1. The fan's rx has dip switches that are used to change frequencies to avoid interference from other household devices.  Is the mini-tx similarly adjustable?
2. Will the mini-tx convert the code to the proper modulation format or does the Arduino do this?  If the latter, how do I make the Arduino do this?

I don't want to permanently attach anything to my handheld as that will "borgify" it to the point where it won't be used.  The idea is to retain the original handheld as is and have the Arduino duplicate its stop code signal when an event occurs.

Again, many thanks for your help on this!
7  Topics / Home Automation and Networked Objects / Earthquake switch for a ceiling fan on: August 20, 2011, 08:14:59 am
Hi Guys,
This is my first post.  I hope you're all well.
Though I've written a few small sketches for testing purposes, I'm still a newbie to Arduino and what it can do.

I live in earthquake prone Japan, and for my first project I want to build an automatic shutdown switch for a ceiling fan that will power it down in the event of an earthquake.  The thought of five blades 52" in diam spinning around over our heads with an earthquake in progress is not very comforting.  The catch is that the command to shut it down must come from the remote control receiver that came with the fan.  This is because the built-in control unit has a "instant stop" feature that stops the rotation in a few seconds instead of a minute or more if the power were cut by simply hitting the fan's wall switch.

My thought is to rig an earthquake sensor switch at the fan mount (easily done) and have it output a logic level to an Arduino housed just above the fan body.  The Arduino would then transmit the "fan off" radio code to the fan's receiver located in the canopy, which is the metal cone that hides the wire connections and physical attachment to the ceiling.  The distance from the Arduino to the rx is only a foot or so so high power is not necessary.  To Keep It Simple and improve reliability, however, I would rather not hack into the existing receiver, only tap into it with radio waves, as it was intended to be operated.  That will avoid voiding the warranty and allow me to easily revert back to the original design if the project fails to meet its objectives.

I need to know how to do the following:

1.  How to capture the RF stop code from the remote tx on an oscilloscope.  What circuit do I need?
2.  How to duplicate the stop code using Arduino software.
3.  How to build, or what to buy, a mini tx with the same frequency as the handheld remote that will transmit the stop code from the Arduino.  What shield do I need?

The fan is an American Hunter, model 26420, with Hunter Remote model 27224.  The remote uses RF, not IR.  I don't know the frequency.  That too, would need to be determined.

Many thanks in advance for any help you can give!
Pages: [1]