Go Down

Topic: How to control AC 220V fan speed with arduino's PWM output..?? (Read 57320 times) previous topic - next topic

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.

sperera

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.

MrAl

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.


nitrof

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.

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.

Jiggy-Ninja

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.
Hackaday: https://hackaday.io/MarkRD
Advanced C++ Techniques: https://forum.arduino.cc/index.php?topic=493075.0

nitrof

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

MrAl

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.

Jiggy-Ninja

universal AC motor does. and it is more than likely that a fan will be equip with it.
I stand corrected: Wiki[edia: Universal Motor

The page contains the following (emphasis mine):
Quote
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.
Hackaday: https://hackaday.io/MarkRD
Advanced C++ Techniques: https://forum.arduino.cc/index.php?topic=493075.0

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.

ilak2k

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

Jiggy-Ninja

When you say "photoconductive cell", are you referring to a light-dependent resistor or a photodiode?
Hackaday: https://hackaday.io/MarkRD
Advanced C++ Techniques: https://forum.arduino.cc/index.php?topic=493075.0

allanhurst

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.

 

Trexo

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!

farzu

i want to make an automatic speed and on/off controlled fan. as an extra feature it will contain human sensing for the fan turned on and off. can anybody help me?? can anybody give me the codes???

Go Up