Remote Controlled Fan Regulator With Timer

Niras C V / VU3CNS

The circuit is an electronic fan regulator which incorporates a timer to turn off the fan after a given time. You can control the whole functionality, change fan speed, timer settings etc. from your couch or bed. Infrared receiver module TSOP1738 is used to receive the infrared signal transmitted by remote control.


  • Phase angle speed control for AC fans with 9 speeds.
  • Timer (up-to a max of 8 hour) with LED indication.
  • Remote control with NEC format cheap remote.
  • Microcontroller based design with mimimum external components.
  • Transformer-less power supply.
  • Surge protection.

Fan Regulator - Assembled
Figure 1. Remote Controlled Fan Regulator With Timer - Assembled


PIC12F675 is a fully functional 8 bit micro controller in eight pin package. The PIC12F family is very similar to microchip popular PIC16F devices and with the same instruction sets. The PIC12F675 is featured with a internal 4 MHz oscillator factory calibrated with in ±1%, six i/o pins and other peripherals like timers, ADC module etc.

PIC12F675 and few more components are used to make this project. BT136 – 600D is logic level triac from NXP semiconductors® are intended for general purpose bidirectional switching and phase control applications. These devices are designed to directly interfaced with microcontroller or low power gate trigger circuits. The device can be trigger in all four quadrants but it is better to avoid the fourth quadrant which has higher gate trigger and latch currents. This circuit used quadrant two and three to trigger the triac which can handle a load current up to a maximum of 4A.

Definition of operating quadrants of triac
Figure 2. Definition of operating quadrants of triac (All polarities are referenced with MT1)

The power supply for the circuit is derived from the a 230V, 50Hz ac line using a capacitor (C6) and a zener diode (D1). The 5.6V zener diode combined with the forward voltage drop of the rectifier diode produce an IC supply close to 5V. This arrangement is used to drawn a full wave current from the mains supply.

Zero cross detection - PIC12F675 input structure
Figure 3. Zero cross detection - PIC12F675 input structure

The zero cross is detected by R8 which is connected to microcontroller input pin (GP4) and ac line. The ESD protection diodes at input pin (GP4) allows this connection without damage. The voltage is clamped between Vdd + 0.7 and Vss – 0.7 Volts for positive and negative half cycles respectively. The “interrupt on change” at this pin is enabled for generating an interrupt at each zero cross. The triac is triggered with different phase angle (phase angle control) to make different fan speeds.

Two push button switches SW1 and SW2 are used to increase/decrease speed. The microcontroller has eeprom which is used save the changed value after 4 seconds, so at power up, the microcontroller remembers the last fan speed. While starts the fan, the microcontroller completely turn on the triac for two seconds, and it helps to gain the speed rapidly, then it is switched to the selected speed.

Remote controller
Figure 4. Remote controller (actual size 85 x 39 x 6 mm)

Finally a remote controller is used to control fan speed, on, off and timer operations. Cheep Chinese remotes used in car-audios, which operates with CR2025 lithium battery, is used here as it is available in plenty from local market. It doesn't have a manufactures name and data-sheet, but found that it uses the popular NEC remote control protocol. You can find more details about this protocol from the SB projects website.

Operational Use

The remote control has a total 21 keys, and the keys “0 to 9” are used to control fan speed, “0” will be turn off the fan. The key “CH-” can also be used to turn off, while the key “CH+” is to turn on. The +/- buttons can also used to increase/decrease fan speed respectively. The previous/next keys are used to increase/decrease time respectively with one hour step, and a maximum of 8 hour can be set. The timer will be disabled when the time decremented to zero. The timer can be turned on/off using the “PLAY”/“EQ” keys in the remote, and it will be disabled automatically when it reaches the set value (i.e. when the fan turned off by the timer). No timer adjustments are possible, if the fan is not running. The eeprom also store the time values, so when enabled it starts with the last value. The timer is enabled while pressing previous/next in the remote, it will not change the time value for the first time. The two push buttons (SW1 and SW2) can also used to increase/decrease fan speed.

The LED is lit while it accepts the commands from the remote control. It also used to display the remaining time if the timer is running. The number of blinks represent the remaining time, and it repeats in every six seconds.

The Circuit and Assembling

Schematic - Remote Controlled Fan Regulator With Timer
Figure 5. The Circuit diagram. The fan is connected between Hot out and neutral line (N).

Since there is no transformer for power-line isolation, the user must be very careful and assess the risks from electric shock hazards. The author is not responsible for any damages arising from any use of this circuit.

The PCB is designed with Eagle software can be used to build the project. The circuit, pcbs and hex file for programming PIC12F675 are available in the link [1]. Please take care not to erase the internal oscillator calibration constant, which is written to the last location program memory. The Microchip® Development Tools maintain all calibration bits to factory settings, or if you are using IC-Prog, it will ask you before erasing.

The circuit can be tested with a 12V AC (instead of 230V AC) supply from a transformer, and connecting a 10 Ohm, 0.5W resistor parallel to the capacitor C6. The output (i.e. between 'N' and 'Hot out') may connected to a LED through a 1.2k resistor, instead of fan. Now use remote or keys to test the circuit functions, like speed (LED brightness will change), timer etc. After testing you can put the circuit in actual situation, but please remember to remove the 10 Ohm resistor.


[1] Download circuit, pcb design and hex file (for programming PIC12F675).

Go Back