Continue to Site

# Single Phase Induction Motor Speed Control using TRIAC and PIC18F4550

Status
Not open for further replies.

#### rov_tar

##### Newbie level 4
Good day everyone!

I'm new here and I'm new to PIC programming..

I would like to ask help from you guys.

I'm using PIC18F4550, zero crossing detector, optoisolator and triac for my induction motor speed control (single phase). I would like to ask ideas from you guys how will I program it or maybe post some codes that will help.

The method for speed control is changing the firing angle for speed control..

My plan is to use a zero crossing detector that will interrupt PIC18F4550 after every 8.333ms (because I'm using 60Hz induction motor). After getting an interrupt PIC18F4550 will fire TRIAC after some delay from 1 to 7 ms. This will cut the current supplied to motor and so the speed of motor will reduce. Thus by varying the delay after which the TRIAC is triggered, the speed of motor is changed.

Your help is very much appreciated. =)

Last edited:

unsigned int angle=0,i;
void cs_delay(unsigned int);
void main()
{
TRISB.F0=0;
while(1)
{
for(angle=0;angle<=180;angle+=45) // Loop to increase the angle by 45°
{
for(i=0;i<50;i++) // Loop to provide continuous train of pulse
{
LATB.F0=1; // Send high to control signal terninal
cs_delay(angle); // Call delay function
LATB.F0=0; // Send low to control signal terninal
Delay_ms(18);
}
}
}
}

void cs_delay(unsigned int count)
{
int j=0;
Delay_us(550); // Delay to move the servo at 0°
for(j=0;j<count;j++) // Repeat the loop equal to as much as angle
{
Delay_us(6); // Delay to displace servo by 1°
}
}

rov_tar

### rov_tar

Points: 2
Depending on the type of motor, be aware that reducing it's input power will not necessarily change it's speed, other than because it has insufficient power to turn it's load. If the motor is unsuitable, you may find it's speed fluctuates and it doesn't start when the input power (firing late in the cycle) is low.

Brian.

rov_tar

Points: 2