Pages: [1] 2   Go Down
Author Topic: AC Fan Speed Control with Arduino  (Read 5943 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi

i am planning on getting started with an arduino project. it's just been a few days since i found out that the arduino is so much more than just the little robot i used to play around with during artificial intelligence lectures at university smiley .. so here i am with my first project to be realised with an arduino:

about a year ago i have converted our test facility's cooling so that it can now use free cooling. the trick was very simple. i've installed two huge fans with filters that suck cold air from outside into the room and two identical fans which blow hot air that is collected in a containment inside the room back outside again. Like this we could lower the power consumption for cooling our test facility dramatically (from several thousand watts per hour powering all the Air Conditioning Units we had installed down to about 600W peak per hour powering the fans.. plus we need one set of filters every month smiley ).
So far i have a fan speed regulator (more details later) that is controlled by a simple potentiometer. since there are usually some people in the test room during the day we just adjust the fan speed to the current cooling demands we have. the problem comes during week-ends or now in the winter when we have cold nights and nobody is around to either turn the fan speed down or up.

that's where the arduino comes into play: i would love to be able to control the fan speed through an arduino with one or more temperature sensors connected to it. the problem is: i am more of a software engineer than a hardware guy and i know only very little about electronics.

i have googled around and found some solutions which might work but i am missing all the details to put it all together.

so here is what i have:
  • 4 HELIOS HRFW 400/4 TK Fans (230V Single Phase AC Motor) The Motor can turn in either direction depending on which terminals i connect the power to.
  • A Fan-Speed controller (triac based). here is a link to the german and english datasheet (second page is english): Data Sheet
  • a potentiometer 470kOhms as recommended by the datasheet.

now i found one solution which looks simple enough for me to reproduce: a Photo-Resistor Cell instead of the Potentiometer which is hot-glued to a white led (and wrapped into black tape or something else). the LED is then controlled by a PWM output of the arduino. some guy did a youtube movie about that:
Here are my challenges with that solution:
  • which photo resistor should i take.. looking at how the pot is attached to the triac it seems that it needs to deal with 230V .. so maybe this one here from farnell would that be okay?
  • how do i attach it to the triac? the potentiometer is connected with the first two feet to the power source and the third pin is connected to a cable from that fan-speed controller.. can i simlply put the photo resistor between the power source and fan-speed controller cable or do i need to solder in a resistor in parallel with it?

the second solution i found was to use a digital potentiometer to control the fan speed controller.. i found here in the forum some links to such parts but they where all not ment to work with 230V on the potentiometer side. the i2c version i looked at could only use the same voltage on the three potentiometer-output-pins as it was powered with from the arduino.. so 5v in that case.. is there a way i can "boost" that ? this seems to clearly be the nicer and more accurate solution but i am afraid it already requires alot more knowledge than what i currently have.

can anybody help me getting that project going? is there maybe already a finished box out there which accepts pwm input from the arduino and regulates the fan speed accordingly? that would also be a solution, i am not in any way bound to keeping on using the triac that i am using right now.. it was just cheap and it perfectly does the job at the moment smiley
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1926
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
Quote
The Motor can turn in either direction depending on which terminals i connect the power to.

Do you need to change the fan direction with this new system also??

Also, we don't know how the speed controller works. Can you carefully measure the voltage across the potentiometer  to see what's needed..

The LED-driven LDR (Light dependent resistor) would be the easiest method, but the control VS LED current will be non-linear, but probably workable in software...

You need an LDR with enough power dissipation rating...

Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34506
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but the control VS LED current will be non-linear, but probably workable in software.
According to recent postings this is not the case, just a change in the value of the PWM feeding the LED between 1 & 2 covers nearly all the speed range.

An AC SSR can be obtained that takes a PWM input to give proportional control of AC.
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1926
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

hmmm. Not really sure about this case, but ac dimmers I have built did not have an apparently linear relationship of (linear pot) rotation VS brightness.

Anyway, whatever that effect may be it can be "fixed in software'...
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

wow, thanks for all your answers.

Quote
Do you need to change the fan direction with this new system also??
i don't need to change the fan direction at all .. i just noticed that because it might give you a hint what type of engine it is if that was needed.. but i am fine with it turning like it does now smiley

Quote
Can you carefully measure the voltage across the potentiometer  to see what's needed
i just measured the voltage across the potentiometer. when it is closed all the way (maximum resistance i think) i measured 230V .. the more i open it (higher fan speed) the more the voltage drops until it reaches 0 .. that's when the potentiometeri is connected through .. sonds logic to me smiley so i guess i need a 230V LDR right?

so do you think the LDR from Farnell will do the job?

@Grumpy_Mike:
Quote
just a change in the value of the PWM feeding the LED between 1 & 2 covers nearly all the speed range.
doesn't that depend mostly on the specs of the LDR and on the circuit it controls? the one in the youtube movie looks pretty smooth..

Quote
An AC SSR can be obtained that takes a PWM input to give proportional control of AC.
please help me to understand that.. i always thaught a SSR had the same function as a mechanical relay but without moving parts.. so to my knowledge (which isn't much i confess that) it can only turn the fan on or off.. but not make it run at 30 or 50% ..

EDIT:

I forgot to mention that in the meantime i found the Velleman K8064 Kit which is a DC controlled Dimmer that accepts an input voltage between 0 and 12V. it can be set to any range between 0 and 12V with two potentiometers.. so i could set it to a range from 0 to 5V and then use the PWM output from the arduino to supply the voltage.. i found other posts in the old forum discussing this.. as they seemed to have some complications converting the pwm pulses to an analog signal i decided to use a velleman io card with analogue outputs for now.. but i wold love to find a solution that doesn't need a pc to work.
« Last Edit: October 20, 2011, 08:50:26 am by psuter » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34506
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
it can only turn the fan on or off.. but not make it run at 30 or 50%
There are types of SSR that give proportional control by phase angle switching. That is at the start of a cycle they delay a bit before turning it on. The longer the delay the shorter time the power flows for that cycle and so the lower power the load gets. These are from Farnell but are very expensive, I have seen them much cheaper, around the £12 mark.

http://uk.farnell.com/jsp/search/results.jsp?N=0&Ntk=gensearch&Ntt=SSR+phase+angle+control&Ntx=mode+matchallpartial&suggestions=false&ref=globalsearch&_requestid=299773&isGoback=false&displaytext=&isRedirect=false

Quote
doesn't that depend mostly on the specs of the LDR and on the circuit it controls?
Both the LDR and the LED and how they are physically optically coupled, that is if there are any intervening filters.

That LDR from Farnell only has a voltage rating of 240V peak. If you measured 230V RMS then you are getting 325V peak voltage so it is going outside it's specifications.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

just an update on my project: the velleman kit was a complete waste of time and money.. allthough it stated in the onlineshop that it was capable of regulating a motor speed it wasn't .. it worked more or less with a light bulb, but as soon as i connected a single phase engine from the fan it went into an error state which according to the manual means "Triac triggering time out" and one of the possible causes is "Load doesn't conform to specifications" .. plus as long as it was still working it didn't really regulate the speed of the engine. it barely had two speeds at all and they where both close.. i could also see how the propeller stalled for a second when i changed speed.. so i don't think this is doing anything good with those engines smiley-sad ..

by the way, the velleman dimmer was also completey useless for a light bulb (60W) as there was no way how it could be adjusted to be capable of switching the light completely off and completely on. i could either set it so that on the maximum output from the recommended velleman IO card (they list this card as recommended feed for the dimmer) which is 5V lit the light completely but then when i set the output to 0V it would not turn off .. or i could set it so that it will turn off completely with 0V but then it could not be fully turned on. what's more: from about 0-3V there was no litght at all.. so digital output values from 0-125 didn't do a thing.. and from 130 on to 255 it would regulate the light a little..

so really, this just seems to not work as it should.. maybe i did something wrong soldering it together.. but i think this is very unlikely as i have seen other reports on the web confirming my findings and also the selfcheck and everything turns out okay..

so lets look at those ssr's and let's find a matching led and ldr so i can try those alternatives smiley
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34506
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
so lets look at those ssr's and let's find a matching led and ldr so i can try those alternatives
Have you a link to the velleman kit? Because I think that it uses triacs and phase angle switching. You will get exactly the same results with an SCR (an SCR is just half a triac) when controlling your motor.
This is probably because the motor is too inductive to be switched correctly with a triac. This happens because an inductive load forcs aphase shift between the current and voltage of up to 90 degrees. To turn a triac off you have to reduce the voltage across it to zero and reduce the current through it to zero. With a resistive load these two conditions happen at the same time. With an inductive load they never happen at the same time.

You might have to apply phase angle correction to the motor in order for it to work with a triac (or two SCRs).

http://en.wikipedia.org/wiki/Power_factor
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What sort of motors do the fans have? If they use induction motors, then you won't be able to control the speed much using phase angle switching - the speed is tied to the supply frequency. If they are series-wound motors with brushes, then phase angle switching should work.

The results you reported when you tried to use the velleman kit suggests to me that the fans may have induction motors.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hmm.. the problem is i only have the product number of the whole fan and there seems to be no tec spec sticker on it either (i bought them used and they have been re-painted in black and nobody seemed to have bothered to keep the labels readable ..

however, i looked at the specs in a german product sheet and there the manufacturer says that the engine is a "Kondensatormotor" which is a capacitor motor.. so would that be an induction motor, brushless and such?

i think you are probably right with your assumption that only phase angle switching is working, because as far as i understood, the current triac-based speed regulator that i am using with the pot. is doing exactly that and that works absolutely fine.

regards
Pascal
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

however, i looked at the specs in a german product sheet and there the manufacturer says that the engine is a "Kondensatormotor" which is a capacitor motor.. so would that be an induction motor, brushless and such?

That suggests it is a single phase induction motor, and therefore not easy to speed-control without a variable frequency inverter.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Dubuque, Iowa, USA
Offline Offline
Faraday Member
**
Karma: 48
Posts: 2542
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

however, i looked at the specs in a german product sheet and there the manufacturer says that the engine is a "Kondensatormotor" which is a capacitor motor.. so would that be an induction motor, brushless and such?

That suggests it is a single phase induction motor, and therefore not easy to speed-control without a variable frequency inverter.

I'd agree without even reading it. It's extremely unlikely that a universal motor would be used in a fan application simply because the brushes would wear too quickly.

I would be surprised if you can find a variable frequency drive for less than $300. You'll probably want to consider controlling air movement by switching fans off and on.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hmm.. okay that's where i reach the limits of my english knowledge..  isn't phase angle control the type of dimming where you chop a certain part after the zero crossing away and leave the rest there? like so:

because i just bought a dimmer doing this (in german: phasenANschnittsteuerung) which can be controlled by a wireless transmitter that can be attached to a pc and it seems to work well ( i don't have that pc interface yet but the dimmer itself seems to regulate the speed quite well like my previous manual fan speed control i had).

so i think the above thing is working, but the opposite, where you chop away a certain part before the zero crossing does not seem to work on that engine..

that would also be in accordance with the german wikipedia page about those two types of dimmers where they say that you can control inductive loads with that type of dimmer like i have it now.

fyi, the dimmer is this one right here: FS20 DI20-3
the only problem with that is, that it can only control one fan as it is only rated up to 200VA and a fan uses 150W .. but this can easily be fixed by buying four of them smiley ..
Logged

Dubuque, Iowa, USA
Offline Offline
Faraday Member
**
Karma: 48
Posts: 2542
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So basically you have a triac dimmer and it is rated for inductive loads. Those "inductive loads" typically refer to devices which include transformers, fluorescent lights, or universal motors (as would be in a hand-held power tool). It does not refer to an induction motor.

As you can see in your waveforms the triac dimmer is chopping the current mid-phase but it is not changing the frequency of the wave. An induction motor's speed is based on the frequency of the AC power. "But it works" you say, and yes it might for a time, but you're definitely on the road to overheating and destroying these motors if they are in fact induction motors!

If you can post a picture of these fans that would be extremely helpful. If possible find someone with electrical knowledge that can inspect the motors and tell you what you're dealing with.
Logged

Boulder, CO
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The "proper" way of controlling fan speed would be to use a 3-phase fans (208-230V up to 460V), and control them with a VFD (variable frequency drive). There are a lot of good drives available inexpensively, but they generally don't work with single-phase induction motors (due to the starting circuit in the single phase motor, and the fact that single phase, with 120 0-volt crossings per second, can't be held at low speeds easily). I'm sure that isn't what you want to hear, since it involves two parts you don't have (3-phase motors and VFDs).

The upside is that with the right AC motor, modern VFDs are super-cool, and automate a lot of what you want to do. You can get cheaper ones on Ebay, but here is a link to a commercial version: http://www.automationdirect.com/adc/Shopping/Catalog/Drives/GS1_%28120_-z-_230_VAC_V-z-Hz_Control%29/GS1_Drive_Units_%28120_-z-_230_VAC%29/GS1-10P2 - Linked not as an endorsement, just that Automation Direct has a lot of good documentation about their products so it is a good way to learn about VFDs in general. eBay is another good source of used VFDs, and cheap Chinese units (the Huanyang brand is cheap, slightly dubious, and well documented by CNC hobbyists).

They work by rectifying your input power (either 120V single phase, up to 230V single phase) to DC, then using a variable frequency inverter (IGBT based, usually) to send a three-phase, variable voltage, variable output frequency to the induction motor, simulating a sine wave by chopping a DC signal at high frequency. The nice thing about modern VFDs is that they are relatively inexpensive, let you choose motors that don't match your power source phase or voltage (giving you more motor options), very efficient, and generally have full serial communication and control, allowing you to both set speed, and request information, like current speed, load %, current, etc. Makes it easy to interact with.

There are probably OSHW methods to create a VFD, but you'd be working with a high voltage DC-bus, and fast switching IGBTs, certainly out of my range of experience. Maybe someone else knows about some comparable projects.

-Sam
Logged

Pages: [1] 2   Go Up
Jump to: