Your cart is empty!
Browse our Blog. You will find multiple applications, solutions, code examples. Navigate using the tag cloud or search using specific criteria
Using a variable frequency drive with an Arduino based PLC
Introduction
In this case we are using a VFD (variable frequency drive or adjustable frequency drive, AFD). The program on our M-Duino 21+ is in charge to provide a simple user interface to the user and control the VFD. So, through our serial monitor in our Arduino IDE we will be able to control the three phase motor.
Using a analog output 0-10 V we will be able to control the speed of a three phase motor. A part of that we also will be able to control the rotation direction using two digital pins.
Requirements
VFD - Frno. 75e1s-7e
M-Duino PLCThree phase motor
Wiring
(*Remember to wire the VCom and Com (-) to provide power supply to the digital outputs)

Software
////////////////////////////////////////////////////////////////////////////////////////////////////
void setup(){
Serial.begin(9600L);
delay(1000);
printMenu();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void loop(){
if (Serial.available()){
int byteSerial = Serial.read();
if (byteSerial == '0'){
digitalWrite(Q0_0, LOW);
digitalWrite(Q0_1, LOW);
analogWrite(A0_7, 0);
Serial.println("Motor Stop");
printMenu();
}
else if (byteSerial == '1'){
digitalWrite(Q0_0, HIGH);
digitalWrite(Q0_1, LOW);
digitalWrite(A0_7, 50);
Serial.println("Forward rotation mode");
printMenu();
}
else if (byteSerial == '2'){
digitalWrite(Q0_0, LOW);
digitalWrite(Q0_1, HIGH);
analogWrite(A0_7, 50);
Serial.println("Reverse rotation mode");
printMenu();
}
else if (byteSerial == '3'){
analogWrite(A0_7, 50);
Serial.println("Speed nº1");
printMenu();
}
else if (byteSerial == '4'){
analogWrite(A0_7, 127);
Serial.println("Speed nº2");
printMenu();
}
else if (byteSerial == '5'){
analogWrite(A0_7, 255);
Serial.println("Speed nº3");
printMenu();
}
}
}
void printMenu(){
Serial.println("------------------------------------------");
Serial.println("Command guide:");
Serial.println("Press 0 for Stop");
Serial.println("Press 1 for reverse rotation");
Serial.println("Press 2 for forward rotation");
Serial.println("Press 3 for Speed nº1");
Serial.println("Press 4 for Speed nº2");
Serial.println("Press 5 for Speed nº3");
Serial.println("------------------------------------------");
}