Go Down

Topic: speed control of ceiling fan using digital Potentiometer  (Read 4935 times) previous topic - next topic


Hi all,

I am hoping to control the speed of a ceiling fan using a mobile app.  I have been researching using pwm and a triac but everyone seems to say it isn't the best way to go and that the fan motor will be damaged and fail sooner than if it had been controlled differently.

It seems a Potentiometer is a variable resistor and from what I have read a lot of speed controls are just a set of different size resistors.

Has anyone heard of using a digital Potentiometer




I think you will find that most digital potentiometers need a 5V (or lower) supply, and that the terminals of the potentiometer can only be connected to voltages between the supply and ground.

This will rule out their use in typical mains powered triac circuits.


Makes perfect sense..... Oh well

I think I am giving up on controlling fan speed, it seems that it's just not possible with pwm.  I even tried looking up something pre-built that I could buy and use pwm to control it but no luck.

I did find this ........

A/C motor speed controller for hvac

it's $29 but I can't tell if it would be good for a ceiling fan

Anyhow thanks



Several years ago I had to replace the switch on a manual three-speed fan/light fixture. While it was apart, I was surprised to see the speeds were reduced by inserting different valued AC capacitors in series with the AC powering the fan motor.



Don't overlook this note about the hvac controller:

CAUTION - SmartFan Nimbus is designed for OEMs (Original Equipment Manufacturers) and is not intended for end-user or after-market applications. The Nimbus should only be used with compatible induction motors (Permanent Split Capacitor (PSC) or Shaded Pole) that are approved by the motor manufacturer for TRIAC (voltage) control. Attempting to control a fan or motor that is not compatible could cause excessive heating and/or permanent damage to the motor.
Fully adjustable speed ceiling fans are not common, they are usually two or three speed devices operating by way of switched capacitor reduced voltage motors. Trying to run them phase angle (triac) controlled will usually result in releasing the motors magic smoke installed at the factory.

If this were my project, I'd just buy a wifi-enabled fan...




Essentially a simple ceiling fan motor is a torque motor.  The typical 3 speed motor is controlled by different capacitors in different configurations (as mentioned previously).  You can verify this by removing the fan blades, then trying the 3 different speeds.  You will find they will all result in a the same high speed, as there is not significant torque required.  All the above is probably useless but possibly interesting information.

I know simple (i.e. no electronics) fan motors can be controlled by a triac dimmer.  Most dimmer mfg make  special dimmers for fans.  These dimmers are "tuned" for inductive loads with the goal to reduce audible noise.   Again probably not helpful unless you want to control a dimmer knob with a servo motor.

You could look into Levitor Model#  DDF01-BLZ.   It is a bluetooth fan controller.  The only issue is that it is $50 at Home Depot and does not use an arduino (which you may or may not care about).

Good luck
Please do not PM me with thread based messages.  If your thoughts are worth responding,  the group should benefit from your insight.


SW1   SW2   SW3   Speed
Off   Off   Off   Off
On    Off   Off   Low
Off   On    Off   Medium
Off   Off   On    High

so this doesn't look all that difficult to build (is it ?????).

It says three switches which I am thinking I can control with these

Let me know and thanks for your help so far

I don't really need anything more than 3 speeds.  I work for a patio manufacture and we are completing an app that controls lighting and the movable louvers and we thought if we could control fan speed that would just be one more thing.....

so a small device added between the fan and power with the fans original speed control set to high.  So can I create my own capacitor control system with electronic switches


Or here is a ceiling fan capacitor with what appears to be two levels

ceiling fan capacitor


The fan might not like being powered without any cap connected.
Leave the low speed cap always connected, and switch two additional caps in circuit (four speeds possible).
If you also want on/off, then use a relay in series with the fuse.


Leo you old dog (or young) you, I am so happy to hear from you......:) (I was ready to give up on this one)

So four settings is perfectly fine I am going to try to figure out exactly what you mean.  However it sounds possible that is awsome news (I hate to give up).

My leo translator is coming online what you mean is the switch settings that were all off, off, off to turn the fan off was a bad idea. 

Instead sw1 will not be a switch but always connected.

then the other two switches will be used to create 3 other settings above low.

just from my math classes classes 2 bits gives me 2^2 or four options.

it seems that first option  00 (sw2 open, sw3 open) is going to be low. (low)

then our second option 10 (sw2 closed, sw3 open) is going to be next level (low-mid)

then our third option 01 (sw2 open, sw3 closed) is going to be next level (mid)

and our final option 11 (sw2 closed, sw3 closed) is going to be final level (high)

then we put a switch in between house power and the fuse (or after fuse not sure) for on off.

Remember mark isn't the best with electricity diagrams but I am guessing f1 is the fuse, now I am not sure what L1 and L2 are maybe coils (I think) not sure what that is ...... they look like the devices in the switches I use that get powered to make the switch close

Now I am going to try to build a proto type this is the BOM I am thinking of

2 - of the above switches that I can activate with 3.3v
1 - 1.5 uF capacitor that is rated for the current
1 - 2.5 uF capacitor that is rated for the current
1 - 4.0 uF capacitor that is rated for the current

2 of the coil things I need help knowing what they are ......Please :)

1 fuse block

2 - two wire terminals (in/out of system)

I know you hate these long stories Leo, but we have the diagram I am just trying to re-create it.

I don't know what the round circle thing next to l1, l2 maybe that indicates the motor

Anyhow thanks for all the help



my dad Use to be the distributor in this area for hunters ceiling fans, He also carried the variable speed control circuits for these fans. They used a phase chopping circuit, to control the speed. Doing a quick search on the Internet I came up with this document.


although I do not know how accurate this information is, it is a starting point.

Hope this helps.


What I really want is something I can build that I can place between the power for the fan and house power.  I need to be able to make 200 of these things.  I have to decide if it is possible and worth it.  However I found this stuff very interesting so I thought I would add my perception of how things are working (wrong probably)

4.2 Rectifier and Transformer
1. Identify the primary and secondary windings of the transformer (127 V - 60 Hz/ 6 V - 500 mA).
2. Connect common to GND. The GND must be common on the board
3. Connect the two cables of the secondary winding to the AC input on the bridge. Consult the
transformer data sheet to identify the cables.
4. Connect the positive side of the bridge to GND with a 10 K resistor.
5. Connect the negative side of the bridge to GND.
6. Check with an oscilloscope the voltage on the 10 K resistor. It must show the full wave rectified.

Ok this seems to explain the connection to the motor in my mind there must be terminal with three leads (either wires of screw terminal)

You connect the ground of the motor to the pcb.

Connect the two cables of the of the secondary winding to the brige on the board.

Connect the positive side of the bridge to GND with a 10K resister --- I've seen this before used to pull a pin down on a mosfet.  That was on the negative side though, not sure why it is done here.

negative of bridge to ground makes sense.

I have an oscilloscope but I have never used it. (inherited it).  I am guessing if you know what your doing this step is pretty easy

4.3 Connection from Rectifier to Board

1. Connect the positive bridge output to j102 PTA1. This the negative input of the controller
2. Make sure j102 GND is connected to the line GND.
3. Connect j102 PTA0 to the voltage on the output divider.

Optocouplers (MOCs) are used to transmit signals between circuits that do not share a power source.
MOCs have a LED and a sensor inside. If the led is turned on, it activates the sensor and lets the current
This circuit is used to isolate signal circuitry from transients generated or transmitted by power supply and
high-current control circuits.

1. Connect j102 PTA4 (PWM output) to pin1 of the MOC
2. Connect pin 2 to GND
3. Connect pin 4 to the TRIAC gate

I really like the sound of this thing (I am buying one and a triac just for fun).  So this translates from the pwm to triac I am guessing to control somekind of undesirable property of the triac.

I want to connect a 3.3v gpio/pwm pin off my synapses rf200p81 here to the bridge and remove the on board pwm.

It seems like it might be fun to buy a fan and control it with my app.  I would have to be able to modify the fan in less than 15 minutes to be viable.  I need to build something that can be easily added to the fan out of the box and the before adding power.  I was hoping the capacitor idea would work but I haven't heard from Leo and I am not sure how the L1 and L2 work and what they are for and I am probably supposed to know.

Anyhow thanks for the input so far

We live to fight another day



You will find different motors have different capacitor configurations.  Usually one of the 2 phase windings is powered by the line,however I have seen where at one of the speeds both phases are fed though capacitors.  A google search will show a number of motor/capacitor/switch combinations.

BTW the capacitors form a (mostly) lossless AV voltage divider.   The smaller the capacitor value, the less energy makes it to the winging.   And although its been a long time since I looked at multipole 2 phase motors, I believe the phase shift adds to the reduction in torque as well.

Keep in mind, motors work on current, not voltage.  The torque created is directly proportional to current though the windings.

Good luck
Please do not PM me with thread based messages.  If your thoughts are worth responding,  the group should benefit from your insight.


The torque created is directly proportional to current though the windings.
Way too broad of a statement. In some motors, yes.  Some may be a maybe. In others, in no way is that factual. Case in point are small AC induction motors, they can require magnetizing currents in excess of 50% of the total current in the stator(s).


@ avr_fred

I'm sorry, I'm not sure what you are trying to say.   In all motors I am aware, torque is proportional to flux and flux is proportional to current.   I'm not sure I understand your example of an AC induction motor, is not the torque proportional to the flux.  I did not suggest it was a 1:1 proportion but for the OP I was trying to communicate that the capacitors were essentially reducing the current to the motor.


Please do not PM me with thread based messages.  If your thoughts are worth responding,  the group should benefit from your insight.

Go Up