Fareed Mohmed← All projects

Info page · no simulation · Arduino and electronics

3-Phase Motor Speed Control with a VFD and Arduino

How a variable frequency drive changes the speed of a 3-phase induction motor, and how an Arduino can give it a speed signal and a run command safely.

This topic cannot be run safely or meaningfully in the simulator, so this page explains it with diagrams, calculations and sample code instead. Everything here is original.

What you will learn

  • Why changing the frequency changes the motor speed
  • What a rectifier, DC bus and inverter do inside a VFD
  • How to send a 0 to 10 V speed signal and a run command

In short

A VFD turns incoming AC into DC and then builds a new 3-phase AC supply with the frequency you ask for. A 4-pole motor runs at about 120 x frequency / 4 rpm, so 25 Hz gives about 750 rpm and 50 Hz about 1500 rpm (less the slip). The Arduino only sends a speed reference and a run signal. It never touches the motor power wires.

Try this next

  • Fit a real 10 k potentiometer to the VFD analog input first.
  • Add a stop button and an emergency stop to the run circuit.
  • Read the VFD current with an ACS712 on the control side and show it on an LCD.

Danger: 3-phase mains (415 V AC) and stored DC energy. The DC bus capacitors of a VFD stay charged at more than 500 V for several minutes after switch-off. This page is for learning. The power wiring of a VFD must be done by a qualified electrician, with the correct MCCB, earth, motor cable and the drive manual open in front of you. Never connect an Arduino pin to the motor terminals or to the mains side.

What is inside a VFD

3-phase mainsR, Y, BRectifier6 diodes: AC to DCDC busbig capacitorsInverter6 IGBTs, PWM3-phase motorU, V, WArduinoPWM speed signalRC filter + amplifier0 to 10 VVFD analog inputAI1 and GNDVFD digital inputFWD / run

The rectifier changes the AC to a steady DC. The capacitors smooth it. The inverter switches the DC on and off thousands of times a second with IGBTs. By changing the switching pattern it produces a 3-phase supply of the frequency you want. The drive also changes the voltage in step with the frequency (V/f control), so the motor does not saturate at low speed.

Speed, frequency and poles

Synchronous speed in rpm = 120 x frequency / number of poles. The real motor speed is a little lower because of slip (about 2 to 5 percent under load).

CaseSpeed
2-pole motor, 50 Hz3000 rpm (about 2880 real)
4-pole motor, 50 Hz1500 rpm (about 1440 real)
4-pole motor, 25 Hz750 rpm (about 720 real)
4-pole motor, 5 Hz150 rpm, but the cooling fan is weak: do not run long

Our site has a separate AC induction motor selector if you need to choose the motor first.

How the Arduino talks to the VFD

const int SPEED_PWM = 9;    // PWM pin to the RC filter and 0-10 V amplifier
const int RUN_RELAY = 7;    // relay module: contact wired to the VFD run input
const int POT = A0;         // speed knob
const int BTN = 2;          // run / stop button (to GND)
bool running = false;

void setup() {
  pinMode(SPEED_PWM, OUTPUT);
  pinMode(RUN_RELAY, OUTPUT);
  pinMode(BTN, INPUT_PULLUP);
}

void loop() {
  if (digitalRead(BTN) == LOW) {          // button pressed
    running = !running;
    digitalWrite(RUN_RELAY, running);
    delay(300);                           // simple debounce
  }
  int speed = map(analogRead(POT), 0, 1023, 0, 255);
  analogWrite(SPEED_PWM, running ? speed : 0);
}

Parts list

PartWhat to look for
3-phase induction motor 0.37 kW, 4 poleNameplate: 415 V star or 230 V delta, current, rpm
VFD (for example 0.75 kW, 3-phase input or 1-phase input)Rating at least equal to the motor current
Relay module (5 V coil)Contact rated for the VFD 24 V control, 1 A
Op-amp LM358 + 10 k resistors + 10 uF capacitorFor the 0 to 10 V signal
Shielded control cableKeep it away from the motor cable
MCCB / MCB and earthSized from the drive manual

Do and do not