“Control fan using any microcontroller.
in one of our projects, we need to speed control of ceiling fan so we made a circuit.
this circuit is divided in to two-part
1. zero-cross detector
2. trice circuit for control
in the zeroCross detector circuit, we detract zero-cross point AC voltage so we can give a signal just after zero crosses.
after getting zero-cross we five pulses according
like in India the AC frequncy is 50Hz so Time Period is T=1/50 =0.02s = 20000us
and the half-cycle is 10000us so we give the signal at Trice is the width of 0 to 10000us to control the fan. 0 means 0% and 10000us means 100%.”