Go Down

Topic: How to control a Ceiling Fan? (edit!) (Read 7354 times) previous topic - next topic


Jan 10, 2012, 04:15 pm Last Edit: Jan 10, 2012, 05:50 pm by troglodisme Reason: 1
Hi guys,

is there anyone out there who could give me some hints on how to control a ceiling fan with my arduino? For controlling I mean turning  it on and off (which could be done just with a simple relay, right?) but also controlling its speed. I am not sure how to handle this, as I've never worked with 220 volts "devices" before..

I just changed the title of the post cause it could have been misleading as I am asking how to do this, not telling it! Please let me know if you have any idea about this. It could may be even not using arduino, I don-t know! Thanks a lot


Are you planning to have a control for you to set the speed? Perhaps a knob you can turn to set the speed with a switch to toggle it on/off?


Jan 10, 2012, 06:19 pm Last Edit: Jan 10, 2012, 07:48 pm by el_supremo Reason: 1
I've never worked with 220 volts "devices" before

Meddling with 220Vac isn't safe.
You need help from a qualified electrician. If the fan speed can be controlled, they can install a switch with a "dimmer" kind of control that will set the speed. An Arduino, or other microcontroller is not the way to go.

[edit] P.S. Like your name
Don't send me technical questions via Private Message.


it can be done.  here is a  project that used a PIC, but could substitute an arduino:


(PeterH) Yes, I am planning on controlling the fan speed. The second part of this project will include a iOS app so everything would probably be controllable via a mobile device.. but for now I would just be happy to control it by remote, yes probably with a knob.

(brucethehoon) thanks a lot for the link. that looks really good but I wouldn't know where to start "converting" that to arduino. have you tried something similar yourself?

Also, a friend suggests I could use a Dimmer Rack with a DMX controller.. that's the cheapest I found but yes it's still pretty expensive: http://www.soundlightuk.com/shop/products/Soundlab-4-Channel-DMX-Dimmer-Pack.-1000W-per-channel.-Can-be-controlled-via-Standard-512-DMX-or-by-0%252d10V-Analogue-Control.html but it could be pretty easy to interconnect the DMX with midi, so with a computer.

What you guys think about this? I need to decide asap!  Thanks to everyone again


i'd use moc and triac! you could then control the fan with simple analog write code aka PWM with speed control and everything. the scheme is really easy too :) use a moc3041, and some triac(how much current does the fan draw?) maybe the popular BT139 series?

http://www.nxp.com/documents/data_sheet/BT134_SERIES.pdf (to see the BT139/138/137/136/135 just change BT134_SERIES.pdf in the line to BT139_SERIES.pdf etc)

scheme: http://www.tradeofic.com/uploadfile/ic-circuit/2009713212017176.gif
they are for a moc3011 but it is the same pinout. one is resistive (like a LED), one is inductive scheme(like your fan)
http://dduino.blogspot.com all my Arduino/electronic projects!!!

{NEW} Getting Started, Learning, Reference + FAQ PDF!!:


Thanks to everyone for the help. I am gonna try setting something up during this weekend and I will update the post after hand..


I think you could probably make your own chopper style dimmer, or buy a commercial one, and I don't see why that couldn't be controlled by the Arduino (it'd need somebody cleverer than me to design it, though).

As a low tech alternative, my fans have several speeds selected by a pull cord and I assume there's some sort of switch to connect different combinations of coils in the motor. That sounds like something that would be highly amenable to being controlled by some low tech relays. If you think you could get away with 3-4 distinct speeds rather than continuously proportional, maybe that would be an option?


I've no idea how to control A.C but maybe you can use a servo to manually turn the regulator (The knob which is used to manually set the speed.).
This method is not so feasible, but if you can afford a servo, then maybe it's safer. If you wish to go by this method, then be sure to get a regulator(not sure if it's the right word) which doesn't need much force to turn so that the servo doesn't have problems turning.
If you want to meet a beautiful nurse you must be patient.

Go Up