How to control AC 220V fan speed with arduino's PWM output..??

First, you need to know how a dimmer switch work so you can understand the principle how to control an AC voltage.

Here a link : http://home.howstuffworks.com/dimmer-switch.htm

And go to NI$HANT tread. My design use this principle. Bear in mind it is only one device being control. To control multitude devices is no so easy for me at this time. It is going to be "tricky". It is the sychronization is going to be "tricky" part to control different AC devices at differents "dim" levels.

Thanks for the howstuffworks link! This explains it all!

Ya but then it helps!

Microchip´s Application Notes could help you :wink:

hi nishant joy n everyone arduino is kind of new to me :confused: i know just a little bit about it. i want to control my. ac fan. ohhh i live in India 220 volt 50 hz i want to control its speed. >:( i have seen n read all the posts but i havent understood any of it. plz plz tell me what hardware and. what hardware device i have to learn about. plz nishant help me. any adive would be highly appriciated. ✌✌✌✌✌✌

The simple advice is you can't. Standard induction motors in domestic appliances cannot safely be speed-controlled (some can be a little, but its not easy to find out by how much). Get a DC fan.

Hello All,

This thread has been very useful. I am not sure about one thing - for a 110vAC fan control circuit do I need to use the transformer to get 12V-0V-12V or is there a way I can use the AC supply directly into the optocoupler to drive the MCU. I believe I saw a schematic snap shot which shows AC supply connected directly to OC and then OC talking to the MCU.

Thanks.

there is a simple way to do this.you want some 3 triacs(for 3 speed fan)and hack the speed regulator of the fan.and use digital outputs from arduino to switch triacs.

amsaiyed:
Hello All,

This thread has been very useful. I am not sure about one thing - for a 110vAC fan control circuit do I need to use the transformer to get 12V-0V-12V or is there a way I can use the AC supply directly into the optocoupler to drive the MCU. I believe I saw a schematic snap shot which shows AC supply connected directly to OC and then OC talking to the MCU.

Thanks.

Hi,

I dont know how much you already know about triggering a triac for dimming or speed control so i’ll outline it here.

In order to get away without a transformer, you can use half wave rectification to create the DC supply for the circuit. That way you can ‘ground’ one side of the AC.
Note that this can be dangerous. The pot you use for adjustment should have a plastic shaft not metal so it cant conduct to the hands.

The triac works the same in each half cycle of the line voltage, just with opposite polarity. The circuit senses the zero cross of the line, then waits a predetermined time, then sends a pulse to the triac gate to turn it on. So the load only sees part of each half cycle rather than the full half cycle for each half cycle and that is what ‘dims’ the load.
The predetermined time is set by the user by turning the shaft of the pot, and the circuit detects how many degrees the shaft has been turned and changes the predetermined time delay as required. The delay can be anything from close to zero to a little less than one half cycle time. If the delay is close to the half cycle time then the triac never turn on, so that would be for max dimming.

Some dimmer switches you buy at the store work with fans. Maybe all modern dimmers work with fans but i havent tested them all.

Please note that this kind of circuit can be dangerous because part of the circuit is connected directly to one side of the line voltage. Two prong plugs are often plugged in backwards, and sometimes the outlet is not wired right either so you cant depend on using the neutral lead of the line wire because it might become live for numerous reasons.

ok, Make something clear. RPM of AC motor are determine by: 120*f/pole.

So a 4 pole motor that are connected to 60Hz power line (america)= 120*60/4 =1800RPM.

So AC drive doesn't use duty cycle to manage speed, the change the frequency.

aside of creating a lot of harmonics, playing with duty cycle on AC motor can be hazardous for power line because, when powering up, an ac motor can pump until 6 time is nominal current. So switch on and of could be bad.

Hi,

Yes but what is strange is i have seen people do this and it does vary the speed and works for quite some time. Motors with brushes do work better as far as i know like with power tools.

Good AC drives change the voltage AND the frequency.

I use a DC fan for low speed myself.

MrAl: Hi,

Yes but what is strange is i have seen people do this and it does vary the speed and works for quite some time. Motors with brushes do work better as far as i know like with power tools.

Good AC drives change the voltage AND the frequency.

I use a DC fan for low speed myself.

AC motors do not have brushes. Those are DC motors.

universal AC motor does. and it is more than likely that a fan will be equip with it.

Hello again,

What seemed strange to me is that i have seen non brushed motors being controlled with dimmer switches. I have never looked into this very closely, but maybe some day i will break out the scope and do some measurements.

What i think might be happening is they might naturally be selecting a fairly high setting as it does not take too low of a setting to get somewhat lower speeds. That might be why it seems to work. If they go too far down it may stall, but again i havent tried this myself in years now.

Back many years ago i looked into controlling a transformer with a triac. The idea was to use a fairly cheap triac to lower the output of a transformer for some rough voltage regulation. If the output filter is right, it could work. But then there is the core of the tranformer which can not stand an asymmetrical current waveform, it should be the same area above zero as below zero. If not, the core could saturate. All i remember though from those many years ago was that it did in fact work to some degree. I was able to lower the output voltage without blowing anything up. What i dont remember is how well it worked, like did the transformer get hot. I do remember that i did not test it for that long of a time period, so i do not know if it would have gotten hot or not. I also took a brief look into inductors with triacs, and it seems that once a certain point is reached the current keeps the triac turned on when it shouldnt be. But gain that was long ago so i'd have to start all over again with this. If i get some time i'll do that again. If anyone else has some experience with this perhaps they can add some comments.

nitrof:
universal AC motor does. and it is more than likely that a fan will be equip with it.

I stand corrected: [Wikiedia: Universal Motor

The page contains the following (emphasis mine):

Speed control[edit]
Continuous speed control of a universal motor running on AC is easily obtained by use of a thyristor circuit, while multiple taps on the field coil provide (imprecise) stepped speed control. Household blenders that advertise many speeds frequently combine a field coil with several taps and a diode that can be inserted in series with the motor (causing the motor to run on half-wave rectified AC).

So if it is a universal motor and not an induction motor, it looks like a standard light dimmer circuit will work.

It could be pretty messy if you try to directly interface the Arduino with 110 Volt (or worse 220V) power. There are all kinds of electrical hazards that can be created, and you definitely risk the destruction of your microcontroller.

If I were doing this, I would get a TRIAC fan controller (most hardware stores) which has a circuit similar to one shown in post #2. Then replace the speed control pot (has the knob on it) with a photoconductive cell (Mouser or Digikey) optically tied to an LED (put them in a little tube - one on each end). Apply your PWM signal to this LED to control its brightness and in turn that controls the resistance of the photoconductive cell and the fan speed. There is no direct electrical connection to the 110 or 220 Volts (make sure the two leads to your LED don't touch anything in the fan controller). Size the resistance of your photoconductive cell to the maximum resistance of the speed control pot you remove.

As the value of your PWM variable increases, and so the duty cycle of the LED, the photoconductive cell resistance will decrease and the fan speed will increase. It will act just like the speed control but your microcontroller will be in charge.

Trexo: It could be pretty messy if you try to directly interface the Arduino with 110 Volt (or worse 220V) power. There are all kinds of electrical hazards that can be created, and you definitely risk the destruction of your microcontroller.

If I were doing this, I would get a TRIAC fan controller (most hardware stores) which has a circuit similar to one shown in post #2. Then replace the speed control pot (has the knob on it) with a photoconductive cell (Mouser or Digikey) optically tied to an LED (put them in a little tube - one on each end). Apply your PWM signal to this LED to control its brightness and in turn that controls the resistance of the photoconductive cell and the fan speed. There is no direct electrical connection to the 110 or 220 Volts (make sure the two leads to your LED don't touch anything in the fan controller). Size the resistance of your photoconductive cell to the maximum resistance of the speed control pot you remove.

As the value of your PWM variable increases, and so the duty cycle of the LED, the photoconductive cell resistance will decrease and the fan speed will increase. It will act just like the speed control but your microcontroller will be in charge.

Safe and less intrusive... Brilliant! @Trexo

When you say "photoconductive cell", are you referring to a light-dependent resistor or a photodiode?

Big single phase induction motors - those of significant horsepower - have a magnetic design which makes them nearly synchronous - they typically run at 3% 'slip'. Some little ones have a much more skewed rotor design, and can be controlled over a large speed range by varying the voltage at a fixed frequency. Small fan motors are often like this

regards

Allan.

Jiggy-Ninja: When you say "photoconductive cell", are you referring to a light-dependent resistor or a photodiode?

LDR!

Like this one:

http://www.mouser.com/ProductDetail/Adafruit/161/?qs=%2fha2pyFaduixdpM0SJ9tFN%252b0OwU6Abqiej%252bNUGqZ36k%3d or http://www.digikey.com/product-detail/en/luna-optoelectronics/NSL-5910/NSL-5910-ND/5436028

I would prefer the latter one in the metal can so it could be inserted in one end of a small tube with the LED being inserted in the opposite end.

This simulates the resistance of a potentiometer that is most often used in these motor speed control units. The response time of a typical LDR is slow enough that it recognizes the PWM LED output as a fixed level and doesn't see the pulsation.

Definitely not a photodiode!