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.
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.
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.
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.