Ceiling Fan Digital Speed Control using MCU

Status
Not open for further replies.

haxan

New Member
Hi,

I am trying to make a digital speed controller for ordinary ceiling fans using a Microcontroller (PIC).

I am trying to divide speeds into 10 portions ( Off, 10%, 20% .... 100% )

I know very little regarding controlling speeds by varying phase of AC power which a lot of ppl do with triac's. I have attached a circuit diagram of MOC3022 attached with a triac and was wondering if i could use similar concept. Also i know very little of PWM and zero-crossing which i read about in search of this small project.

Can anyone please guide me in the correct direction.
 

Attachments

  • Untitled.jpg
    80 KB · Views: 2,244
It depends entirely on what kind of motor is in the fan, all the fans I've seen can't be controlled by that type of method.
 
Its a simple AC motor which runs on 220V in one direction. Its not like drill machine motor.

Sorry its not mentioned on the FAN.

There are several Fan dimmers available in the market but they are not digital. I believe these normal dimmers work on Phase change method to control the speed of the FAN.
 
Last edited:
That's just a normal light dimmer, buy one from a local shop and see if it controls the speed of your fan.
 
But it says "it's sutable For Lamp Dimming OR Fan Speed Controlling".

Do you think there is no way to control speed of fan digitally?
 
But it says "it's sutable For Lamp Dimming OR Fan Speed Controlling".

Do you think there is no way to control speed of fan digitally?

Like I said, it depends on the exact motor used - try a cheap lamp dimmer from a local store, and see if that works OK on your fan. If it does, then build yourself a digital one, MicroChip have an application note for a lamp dimmer.
 
I have done that. I broke the Fan dimmer which was already installed in my wall. It contains "z0409mf" which is a Triac from ST. Then there is a "ST DB3 C148", i think its a DIAC maybe.

Then there is a 683J in silver packing with two legs. A variable rotator and a resistance of 4.1K ohms.

Does this make any sense? I believe the Triac means that it can be phased control correct?
 

Yes, sounds like a phase control one.
 
I have written a small code which takes inputs from two 4-bit dimmer values and generates a PWM with a dutycycle which is 100 * dimmer value read. The dimmer can have values between 0 - 10 (10 being full on).

Now my question is, how do i map it for the actual triac. I know i am suppose to detect zero crossing and then fire triac according to the phase i want out. How do i calculate the Timeperiod of the PWM that needs to be generated.

You can see the attached images for PIC connections and output. First PWM is at 20% and the other one is at 60%.

 

Attachments

  • Untitled.jpg
    62.4 KB · Views: 416
  • Untitled1.jpg
    146.6 KB · Views: 474
Last edited:
Can anyone please help me with this phase control code?

I have a zero detection circuit but dont know how to implement it to my phase control system. Also do no quite understand the PWM purpose for all this.

Attached is the zero crossing detection circuit.
 

Attachments

  • Untitled1.jpg
    135.4 KB · Views: 1,995
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…