I want to design a circuit to control speed of an ac motor (eg. a 230V, 100W ceiling fan). I have seen links where they use RC circuit with a diac and a triac to achieve speed control. I just want to know how do I calculate optimum values of R and C for dimmer to work.