Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

AC220 Celing Fan speed control using uC, pwm and zero detection

Status
Not open for further replies.

skmdmasud

Member
Hi..
I am trying to control AC220 ceiling fan using uC.

My Goal - Change fan speed e.g. Low, Medium, High - is good enough.

My Project so far
-- Zero detection Successful using 1MΩ resistor. (i don't need Isolation, see attachment)
-- PWM to optical isolator(MOC3021) which controls the triac, successful.

uC atmega8 running at 16Mhz, 8 bit timer, prescale 1024.
Result -- when pwm duty cycle is beween 1% to 80% my fan turns very very slowly then at 90% or 100% fan blows at full speed.

pseudocode

Zero detected
set dutucycle, start_timer_8bit
Timer Compare Match
stop_timer_8bit

In other words my project so far can turn on the fan @ full speed and switch off. No speed controlling.

Thanks and Regards.
 

Attachments

  • Zero Crossing Detection.pdf
    95.1 KB · Views: 243
Generally fan control is done by cap switching. However, this method should work better than what youre seeing.

I'm not sure why you're using PWM? You just need to pulse the gate once after a variable delay time into the half cycle.

I would also suggest rather than using a fan right now, use a light bulb instead whilst testing, as its way easier to see the brightness change and make sure your code is working right.
 
Generally fan control is done by cap switching. However, this method should work better than what youre seeing.

I'm not sure why you're using PWM? You just need to pulse the gate once after a variable delay time into the half cycle.

I would also suggest rather than using a fan right now, use a light bulb instead whilst testing, as its way easier to see the brightness change and make sure your code is working right.
Thanks Cicero, I dont know much cap switching. Using a light bulb us a good idea.
 
These https://www.smarthome.com/fanlinc-i...ight-controller-fixture-module-dual-band.html would probably work in the US and one day I may purchase one of those modules.

Ceiling fans are notoriously difficult to control because of the type of motor. The designs are also different. One winding gets a phase shifted signal and three values of capacitance change the speed. Two values A, B and A in parallel with B. There is a winding tap version too and you have to deal with reversal.
The windings are slightly different in inductance.

Induction motor control is usually difficult because the current and voltage are not in phase. Good zero detection is essential. You may have to fire again slightly after the current zero to get 100% on.
 
Induction motor control is usually difficult because the current and voltage are not in phase. Good zero detection is essential. You may have to fire again slightly after the current zero to get 100% on.

I dont know the design of our ceiling fan but i guess it will work, for 100% on i just keep the triac on and it works.
 
Here's a website with typical ceiling fan wiring: https://www.hurontel.on.ca/~taitg/pages/cfan.html

Usually, there is a 3 lead capacitor for a 3 speed fan.
The fan we have are very simple, it has 3 wires. 1 for live and other 2 connects to one end of a Cap and the other ends goes to neutral.
LIVE----FAN====2 wire====CAP---neutral. There is no reversal.

Long before i had this wireless fan and light controller, but after connecting IPS(modified square wave) in our home the controller some how died. This time i am building my own using ir remote. The last part of my puzzle is the speed controlling, every thing else works fine.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top