AC Fan Control using Arduino  - Page 1
Forum section: electronics / beginners

author: yashrk
author_rank: Frequent Contributor
timestamp: October 15, 2014, 02:26:30 pm
content: Hey Guys,I am trying to control my rooms lights, fans by using arduino, its easy to control lights with it by using relays but I am getting problem in controlling my fan speed, specifically how can I replace my regulator with digital circuit.Certainly I want circuit to be safe as I am playing with mains (220V)and rest assured after it is completed it will be installed by a professional.I also want to know if there any more precaution I should be taking in designing the circuit or choosing parts (RELAYS).Thank you for your replies,YashRK.

author: Richard Crowley
author_rank: Super Contributor
timestamp: October 15, 2014, 02:49:23 pm
content: We cannot begin to try to help you when we know absolutely nothing about your fan or the controller.If you want any practical help, you will need to reveal some relevant details.

author: oldway
author_rank: Super Contributor
timestamp: October 15, 2014, 02:51:24 pm
content: Probably a fase controlled triac regulator.

author: Nickk2057
author_rank: Regular Contributor
timestamp: October 15, 2014, 06:05:40 pm
content: best way to say on this is a solid state relay.

author: Udayan Sinha
author_rank: Regular Contributor
timestamp: October 16, 2014, 05:04:28 am
content: Use a triac. It's popular for AC load control using a low-powered DC source (like an Arduino). There are loads of tutorials online by people on fan speed control or light-dimming applications using an Arduino for you to refer. Nearly all of them involve a triac.

author: paul18fr
author_rank: Contributor
timestamp: October 16, 2014, 06:11:07 am
content: you can probably use the PWM (Pulse Width Modulation) capabilities of the arduinohttp://arduino.cc/en/Tutorial/PWMhttps://www.google.fr/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=arduino+pwm+fan+speed

author: Seekonk
author_rank: Super Contributor
timestamp: October 16, 2014, 01:45:39 pm
content: Many have tried this and it works to some success because of the inertial aspects of the fan. It doesn't work well at all with a lamp. the 50 or 60 Hz will beat with the 490 Hz of the PWM. Those results will be even different if you use a zero cross SSRY or a random turn on type. In any case it won't be linear with PWM. With things like heaters and motors order does emerge out of chaos over time. If you look with the Arduino for a zero cross and then control a timed pulse to a SSRY that has random turn on a phase control can be made.

author: Richard Crowley
author_rank: Super Contributor
timestamp: October 16, 2014, 01:59:00 pm
content: We are all just shooting in the dark here. We know nothing about what size fan (current draw) yashrk is talking about. Or what kind of motor, etc.And we also know nothing about what "control" means here. Does it mean on/off? Does it mean switching different windings on the motor? Does it mean full range control? Is it manual? It is automatic (temperature or humidity controlled, etc.) We don't have the first clue. And it seems apparent that yashrk doesn't understand what is important, either.Until yashrk returns to hold up his end of the conversation, we are probably wasting our time here.

author: yashrk
author_rank: Frequent Contributor
timestamp: October 19, 2014, 05:27:04 pm
content: I am so sorry I couldn't reply to you guys my net was down, it's a normal ceiling fan works on AC, it will consume 1-2 ampere max. I want to control it's speed with arduino, it doesn't much matter if I get full scale control over the speed or traditional 5 stop control.The solid state relay idea looks good but it will be expensive. I am looking for a circuit which is bit cheaper and safe.Cheers guys,YashRK.

author: Seekonk
author_rank: Super Contributor
timestamp: October 19, 2014, 06:11:14 pm
content: Without getting complicated, just turn an output on for a time period of 100 to 1000 milliseconds and then turn it off for the remaining time of that 1000ms. It can be turned off totally but I don't think you would want to turn it on for a period less than 100ms. Any SSRY of 5A or more generally has an isolated input that will accept 5V for only a few bucks.

author: yashrk
author_rank: Frequent Contributor
timestamp: October 20, 2014, 07:52:19 am
content: So you are asking me to use solid state relay is there any other circuit

author: Simon
author_rank: Unknown
timestamp: October 20, 2014, 09:28:38 am
content: Quote from: yashrk on October 15, 2014, 02:26:30 pmAny professional worth his salt will want to know it's safe or they won't install it.Why do you want to use an arduino ? there may be simpler methods, not everything needs a microcontroller you know.

author: Rerouter
author_rank: Super Contributor
timestamp: October 20, 2014, 09:54:52 am
content: For a dc input and ac switching with variable time, i would use an opto-coupler to give the arduino feedback on the zero crossings, and an opto-triac triggering a proper power triac to switch the power,this way you can regulate to a % of the waveform, your entire circuit is isolated from the mains, and you dont have to worry about the maximum amount of cycles that a relay will live through (for fan speed control you would be looking at days to weeks max lifetime)

author: Simon
author_rank: Unknown
timestamp: October 20, 2014, 11:06:44 am
content: Yes appropriate ANALOG circuitry can create a pulse at every zero cropping to trigger an interrupt in the arduino and generate a pulse of the length you want from 0-10ms. very clunky but if you must.

author: yashrk
author_rank: Frequent Contributor
timestamp: October 20, 2014, 11:20:57 am
content: Thank you guysSimon - I will be controlling many other relays and I'm also thinking of adding multiple sensor and also remote control so I will be need a micro controller

author: Simon
author_rank: Unknown
timestamp: October 20, 2014, 11:46:55 am
content: Then the method i suggested might not work as the delay will eat into your processing time , you could do it off the "system clock" or devolved the pulse control to analog circuitry under the control of the uC's PWM output.

author: Richard Crowley
author_rank: Super Contributor
timestamp: October 20, 2014, 12:44:40 pm
content: Remember that we are dealing with a product that ALREADY implements speed control. How does the EXISTING speed control work? Cobbling up some different method of speed control seems like a poor substitute for simply duplicating the already-designed method of speed control.

author: Jeroen3
author_rank: Super Contributor
timestamp: October 20, 2014, 01:25:58 pm
content: Most cheap desk and ceiling fans use one or two resistors and a multi-pole switch.All you'd need are a few relays.

author: Simon
author_rank: Unknown
timestamp: October 21, 2014, 07:00:17 am
content: bit wasteful

author: SL4P
author_rank: Super Contributor
timestamp: October 21, 2014, 07:38:51 am
content: Quote from: Richard Crowley on October 20, 2014, 12:44:40 pmYep. I've saw your earlier post, and this is not going to end well if he follows the 'current' path... Multiple relays, mains power, PWM on AC - and a newbie to boot.I susect it is a standard 'switched windings' control box (cheapie), and assuming he wants to go across that - he has to implement an interlock so that switch + relays doesn't equal tears. I can see the hot-glue and duct tape already.OP: Please don't invite me over to visit. Just send photos as soon as you can before the hospital stay.