The following circuit might not work correctly, since triacs are not designed to work with PWM control, please refer to the updated version of the same article below which looks more appropriate for the intended remote fan speed control
Referring to the shown remote controlled fan dimmer circuit, three main stages may be seen incorporated: the infrared signal sensor stage using the IC TSOP1738, the Johnson's decade counter, sequencer using the IC 4017 and a PWM processor stage using the IC 555.
The various operations involved within the circuit can be understood with the help of the following points:
When an infrared beam is focused at the sensor, the sensor produces a low logic in response to this which in turn causes the PNP BC557 to conduct.
The sensor used here is a TSOP1738, you can learn more about it in this simple IR remote control article
The conduction of the BC557 transistor in response to the IR beam links the positive supply to pin14 of the IC 4017 which is accepted as a clock pulse by the IC.
This clock pulse is translated into a single sequential hop of a high logic from the existing pinout to the next subsequent pinout in the sequence across the shown outputs of the IC 4017.
This sequential transfer or shift of a high logic pulse from one pinout to the next across the entire outputs from pin#3 to pin#10 and back is carried out in response to every momentary beam focused on the IR sensor by the IR remote handset.
We can see that the IC 4017 outputs have a set of precisely calculated resistors whose outer free ends are shorted and connected to ground via a 1K resistor.
The above configuration forms a resistive potential divider which generates a sequential incrementing or dropping potential levels at the node "A" in response to the shifting of the high logics across the outputs as discussed in the above explanation.
This varying potential is terminated at the base of an NPN transistor whose emitter can be seen connected to pin#5 of IC 555 which is configured as a high frequency astable.
The 555 stage basically functions like a PWM generator which varies proportionately as its pin#5 potential is varied. The varying PWMs are created at its pin#3.
By default pin#5 is connected with a 1K resistor to ground which ensures that when there is no voltage or minimum voltage at pin#5 results in an extremely narrow PWMs at its pin#3 and as the potential or voltage at its pin#5 is increased the PWMs also gain width proportionately. The width is maximum when the potential at pin#5 reaches 2/3rd of the Vcc of its pin#4/8.
Now apparently, as the outputs from the IC 4017 shifts creating a varying voltage at the base of the NPN, a corresponding amount of varying voltage is transferred over pin#5 of the IC 555 which in turn is converted into an accordingly changing PWMs across pin#3 of the IC.
Since the pin#3 of the IC is connected to the gate of a triac, the conduction of the triac is proportionately influenced from high to low and vice versa in response to the changing PWMs over its gate.
This is effectively converted into a desired speed control or an appropriate regulation of the connected fan across the triac's MT1 and the AC mains input.
Thus the speed of the fan becomes adjustable from fast to slow and vice versa in response to the infrared IR beams toggled on the associated IR sensor of the circuit.
How to Set up the circuit.
It may be done with the help of the following steps:
Initially keep the emitter of the BC547 transistor disconnected with pin#5 of the IC555.
Now the two stages (IC 4017 and IC 555) can be assumed to be isolated from each other.
First check the IC 555 stage in the following manner:
Disconnecting the 1K resistor across pin#5 and ground should increase the speed of the fan to maximum, and connecting it back should decrease it to minimum.
The above will confirm the correct working of the IC 555 PWM stage. The 50k preset setting is not crucial and may be set to approximately center of the preset range.
Next, we need to check whether the IC 4017 output node at "A" creates a varying voltage from 1V to 10V in response to each pressing of the IR remote beam over the circuit's IR sensor.
If the above condition is met, we can assume the stage to be functioning correctly, and now the emitter of the BC547 can be integrated with pin#5 of the IC555 for the final testing of the fan speed regulation using a IR remote handset.
The remote handset could be any TV remote control which we normally use in our homes.
If the above design does not work smoothly with a connected fan, it may need to go through a slight modification for improving the results as shown below:
The circuit takes the help of a MOC3031 triac driver stage for enforcing a hassle free and clean fan control through the remote handset.
WARNING: THE ENTIRE CIRCUIT IS DIRECTLY LINKED WITH THE MAINS AC, OBSERVE EXTREME CAUTION WHILE TESTING THE CIRCUIT IN POWERED POSITION