AC motor speed controlling

Hello everyone
I'm trying to make an AC motor speed control circuit driven by Arduino mega
I'd tried this circuit but it's not working, where the motor works when I connect 5V directly to IC_MOC3040 (looks like the Arduino doesn't detect zero-cross)
so can someone help me with this problem

code :

int AC_LOAD = 3;
int dimming = 128;
void setup()
{
  pinMode(AC_LOAD, OUTPUT);
  attachInterrupt(0, zero_crosss_int, RISING);
}
void zero_crosss_int(){
  int dimtime = (75*dimming);   
  delayMicroseconds(dimtime);
  digitalWrite(AC_LOAD, HIGH);
  delayMicroseconds(10);
  digitalWrite(AC_LOAD, LOW);
}

void loop()  {
  for (int i=5; i <= 128; i++){
    dimming=i;
    delay(10);
   }
}

=======================================
circuit:

That circuit is for a non-inductive (lamp) load, a motor is inductive.

You cannot change the speed of most ac motors by varying the voltage. Some low torque shaded pole fan motors might be adjustable over a small range but most ac motors will just overheat, stall and burn.

WattsThat:
That circuit is for a non-inductive (lamp) load, a motor is inductive.

You cannot change the speed of most ac motors by varying the voltage. Some low torque shaded pole fan motors might be adjustable over a small range but most ac motors will just overheat, stall and burn.

Not all motors are too inductive for triac control - that circuit will handle a universal motor
OK if an RC snubber is added.

The problem is we don't know what kind of AC motor is involved, and this is essential
to know. If the motor is single phase induction motor, rather than a universal motor,
then it may be completely unsafe to attempt speed control at all (risk of stalling, over current
and thus fire). In general without knowing the design criteria of an induction motor its
hard to judge whether it is safe to let it stall or not. Some will pull 10 times the current
at stall as at normal running, leading to rapid smoke-release etc etc.

Universal motors are normally fairly resistive and so long as there is a simple RC snubber
have no bad habits to prevent triac-based control.

So, aaref, please post full details of the motor... "AC motor" is way too vague.

MarkT:
Not all motors are too inductive for triac control - that circuit will handle a universal motor
OK if an RC snubber is added.

The problem is we don't know what kind of AC motor is involved, and this is essential
to know. If the motor is single phase induction motor, rather than a universal motor,
then it may be completely unsafe to attempt speed control at all (risk of stalling, over current
and thus fire). In general without knowing the design criteria of an induction motor its
hard to judge whether it is safe to let it stall or not. Some will pull 10 times the current
at stall as at normal running, leading to rapid smoke-release etc etc.

Universal motors are normally fairly resistive and so long as there is a simple RC snubber
have no bad habits to prevent triac-based control.

So, aaref, please post full details of the motor... "AC motor" is way too vague.

Thanks for replay
I'm building this circuit for (wash machine carbonic motor) I think it's also called (Universal motor)
I'd controlled with that speed by the traditional circuit and there where no problem
but i wanna let arduino control the triac gate and this is my problem

Unfortunately "washing machine motor" isn't providing any information at all, at least 4 types
of motor are used in washing machines. "carbonic" - never heard the term before, but if its
a universal style motor then that analog triac circuit can be replaced by a digital timed one as
you posted, but with an appropriately sized RC snubber across the load perhaps?