There are some devices that look like ordinary light dimmers but are sold expressly for ceiling fan speed control. In order to control the fans speed the fan needs its own system of wires separate from that of the lighting element.

Eaton 1 5 Amp Quiet Fan Speed Controller Decora 3 Speed White Light Almond Ivory
Wiring fan speed controller. The live black wires should be connected to the brass screws. This one is a schurz. In the above ceiling fan speed control wiring diagram i shown the main winding running winding and i connect run wire of motor to the speed control switch and you can see it in above diagram that connection of run wire of motor in switch l point and and 1 and 2 for capacitor. Unlike an ordinary dimmer this has a three position switch for low medium and high speeds instead of a continuously variable knob. Make sure that all of the wires are first pulled through the electrical box to ensure that the face place will fit securely against the wall. The fan speed controller is switched on or off using the 30 series switch mechanism provided turning the load on or off using the switch does not alter the fan speed setting.
Wiring the fan to a variable speed control switch lets you make fine adjustments to the fans speed. Filmed this while filming my last vlog and wanted to do a dedicated diy on how to wire an electronic fan controller. Fan speed is adjusted by rotating the control knob. Clockwise increases speed anti clockwise decreases speed. Pwm in brief uses the relative width of pulses in a train of on off pulses to adjust the level of power applied to the motor. Wire up the fan speed switch control switch by following the normal wiring standards.
Lutron diva quiet 3 speed control. A plurality of fans can be used in parallel total current does not exceed 5a supports automatic temperature control and manumotive speed control temperature control speed with four temperature zones for setting up easy to apply in a variety of applications. A 4 wire fan has power ground a tach output and a pwm drive input. A 3 wire fan has power ground and a tachometric tach output which provides a signal with frequency proportional to speed. If you install a ceiling fan without wiring it properly it may prove impossible to operate the fan without the light on and vice versa. Variable speed controls must be specially designed for use with ceiling.
Heres some similar controllers. A ceiling fans wiring is integral when it comes to controlling its speed. Ceiling fan speed control wiring diagram from which you easily learn fan speed regulating speeds. A fan speed control switch makes it easy to adjust the speed at which a fan spins. It can be opened with a three wire fan monitoring function stall warning. The controller employs the use of capacitors to achieve linear speed control of the fans.