simulate this circuit – Schematic created using CircuitLab

So I'm trying to speed controlling a single phase AC Induction Motor(For Fan). And I am trying to use phase cutting to control it. So I use arduino to detect zero cross of AC Wave, and then cut the wave with triac, also I am adding a snubber circuit. But I can't reach 90% of the speed, and when I try to set the speed to 50% the motor goes humming.

What is the cause that I can't reach 90% of the speed and why the motor goes humming when 50%? Also, is there another available option to control single phase AC induction motor using arduino? I already try to search about VSD/VFD but after some google searching it won't work with a single phase(only 3-phase motor).

For the diagram, all ground in schematic is arduino ground, and voltage source is from the same source.

int AC_LOAD = 3;    // Output to Opto Triac pin
int dimming = 128;  // Dimming level (0-128)  0 = ON, 128 = OFF

void setup()
  pinMode(AC_LOAD, OUTPUT);// Set AC Load pin as output
  attachInterrupt(0, zero_crosss_int, RISING);  // Choose the zero cross interrupt # from the table above

//the interrupt function must take no parameters and return nothing
void zero_crosss_int()  //function to be fired at the zero crossing to dim the light
  // Firing angle calculation : 1 full 50Hz wave =1/50=20ms 
  // Every zerocrossing thus: (50Hz)-> 10ms (1/2 Cycle) 
  // For 60Hz => 8.33ms (10.000/120)
  // 10ms=10000us
  // (10000us - 10us) / 128 = 75 (Approx) For 60Hz =>65

  int dimtime = (75*dimming);    // For 60Hz =>65    
  delayMicroseconds(dimtime);    // Wait till firing the TRIAC
  digitalWrite(AC_LOAD, HIGH);   // Fire the TRIAC
  delayMicroseconds(10);         // triac On propogation delay (for 60Hz use 8.33)
  digitalWrite(AC_LOAD, LOW);    // No longer trigger the TRIAC (the next zero crossing will swith it off) TRIAC

void loop()  {
  i = 90; 

I got this code from http://www.alfadex.com/2014/02/dimming-230v-ac-with-arduino-2/ and I just modify the loop so I can get a constant speed. I give i = 90, so I can get approximately 70% of the speed( 90 / 128 ). Thanks!

  • 1
    \$\begingroup\$ Post a schematic of your circuit. Edit your question. On toolbar, you will see a pencil and circuit components. Click on it and enter your circuit. It's fairly easy. Or add your circuit as an image. Someone should be able to help you from that. \$\endgroup\$ May 9, 2017 at 1:00
  • \$\begingroup\$ I already added the schematic, I created it from taking many sources and don't know if it's good. \$\endgroup\$
    – Naufal B
    May 9, 2017 at 1:51
  • \$\begingroup\$ How are you detecting the speed? If this is part of your circuit, please show it. It would be wise to include your code as well, in case there is an error there. \$\endgroup\$
    – user133493
    May 9, 2017 at 2:06
  • \$\begingroup\$ There's the code, I am detecting the speed with a tachometer. \$\endgroup\$
    – Naufal B
    May 9, 2017 at 11:00
  • \$\begingroup\$ So I'm trying to use it with led lamp, if my i in arduino is around 30-50, my lamp start humming, and then from that point to 128 both my lamp and my voltage source start humming worryingly. Is it because I'm using LED Lamp? or there's something wrong with the schematic? \$\endgroup\$
    – Naufal B
    May 9, 2017 at 14:26

1 Answer 1


The problem is that the Triac turns itself off when the current drops. Giving that the motor current is out of phase in respect to the voltage, and probably by 90 degrees in your case, when you activate the Triac near the middle of the semi cycle, the Triac suddenly turns off because the current drops. You should keep high your drive from the intended point until the end of the semi cycle -OR- you could emit several pulses from the intended point until the end of the semi cycle.

Doing so it is more difficult to turn off the Triac just before the next (semi) cycle, but it is necessary in order to use the full semi cycle.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.