Three stage timer for frequency inverter

Hi to all,

I have one project that I need to run AC 3phase motor 2,2kW in three speeds in different times.
When I start the motor with START push button it should turn with 50Hz for 15sec, after 15sec it should run on 40Hz for 22sec and after that it should run on 30Hz that long until I push STOP button to stop the motor.
When I push STAR button again it should start timer from beginning.

For this project I will use frequency inverter that has three inputs for preset speeds.
My firs idea was to use NE555 timers but now I would like to use Arduino UNO and program somehow timer with three digital outputs to run frequency inverter.

Should it be possible to do that with arduino?
And if it is possible I should add STAR and STOP throo Arduino too.

If you can do it with a 555, you can do it with the Arduino. The basic [u]Blink Example[/u] puts-out a square wave so all you have to do is change the frequency and program two more output pins for the 3 phases. (If you want the Arduino to anything else besides delay all the time, you'll have to use the Blink Without Delay method.)

That's the easy part... The hard part is getting sine waves and controlling 2.2KW...

Frequency inverter has 3 digital inputs and this inputs you can program directly on inverter very easy. I just need to give 24Vdc on this inputs (I3D-I5D) so I thought to use arduino to give that three digital signals ON and OFF to inverter in programed time...
I can use output D2, D4 and D7 to go high and triger the inverter throo relays.

I will try with blink example, tnx.

I wrote some program that its working somehow :slight_smile:
is it possible to run-START program with push button on input 2 and STOP any output on another input 12?

int speed1 = 4; // frequency inverter motor speed 50Hz
int speed2 = 7; // frequency inverter motor speed 40Hz
int speed3 = 8; // frequency inverter motor speed 30Hz
int START = 2; // Start the program
int STOP = 12; // Stop the program
     
void setup()
{

pinMode(START, INPUT);
pinMode(STOP, INPUT);

pinMode(speed1, OUTPUT);
digitalWrite(speed1, HIGH);
delay(15000);
digitalWrite(speed1, LOW);

pinMode(speed2, OUTPUT);
digitalWrite(speed2, HIGH);
delay(22000);
digitalWrite(speed2, LOW);

pinMode(speed3, OUTPUT);
digitalWrite(speed3, HIGH);

}
     
void loop()
{
 if (digitalRead(STOP) == HIGH)
 {
  digitalWrite(speed3, LOW);
 }
 
 
}

Put the sequencing code in a function other than setup() - then call it from loop() when needed.

You probably want to learn about state-machines to do anything smarter.

I dont know how to put sequence code in a function :confused:
The program that I wrote is working for now only I need to add START button to run the program, because now I have to push reset button on Arduino to run program from beginning.
Is it possible to run my code with external button throo input 2 on arduino?