How to controll A.C. 230V fan speed with arduino..??

I've never made a motor speed control, but I've made light dimmers (not with the Arduino), and from your schematic, the concept looks basically the same...

You can't use PWM, but it's something like PWM synchronized to the 50/60Hz line frequency. You only need a modified top part of the schematic (including both opto-isolators) and the Arduino would replace the CD4xx parts, etc.

It works like this - You detect a point along the "phase" of the AC signal (usually near the zero-crossing). That's the full-wave rectifier, the FET B2, and an opto-isolator, with the current-limited AC driving the opto input.

The opto-isolators keep the high voltage away from you and the low-voltage control circuitry (i.e the Arduino). If you are building your own power supply, you can use the isolated transformer secondary to get the timing/phase and eliminate one of the opto-isolators.

That isolated detected phase/timing signal goes to an Arduino input.

An Arduino output drives the other opto-isolator, which drives the TRIAC (A1).

After being triggered by the phase/timing signal, there is a delay (i.e. 0-10mS @ 50Hz). Then a short pulse into the output opto-isolator (IC1) "fires" the TRIAC somewhere along the AC half-cycle. (The pulse has to be "short" because it cannot extend into the next AC half-cycle).

Once triggered, TRIACs always stay-on 'till the current falls to zero (the next AC zero-crossing).


Other thoughts:

The actual zero-crossing is difficult to detect, and the peak is difficult too... So it's generally best to find a point somewhere in the middle (around 45 degrees). With a microcontroller, it's easy to compensate since you know the line frequency.

Also with a microcontroller, you don't need full-wave rectification. When you find one zero-crossing point (or trigger point) there is another one 180 degrees later (10 mS later at 50Hz).

You'll probably have to experiment with the timing/delay to get it to work right near zero-speed and near full-speed.