Hacking Ac motor with Arduino and Solid State Relays

Mighty Forum:

Im wondering if anyone had experience hacking a 120V AC motor with arduino and solide state relays to control the direction? We dont need to control the speed.

------------------------------------------------->
We were able to control the SSRs with arduino and the code below, but we were not able to change the direction of the motor.
You can see from the video

------------------------------------------------->
We are using this motor:

which has a 25% duty cycle.

I think it also has a built-in motor controller, and the motor comes with a pendent switch to control the direction.

------------------------------------------------->

Amico 250V 25A SSR-25DA Temperature Control Solid State Relay
to hack the motor pendent switch

------------------------------------------------->
Here's the code that we're using

// this code only run both direction once when it starts, then the ac motor stops working completely with arduino after that.. we can still operate the motor with its pendent switch

const int motorPin1 = 5; // One motor wire connected to digital pin 5
const int motorPin2 = 6; // One motor wire connected to digital pin 6

void setup() {

pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);

}

void loop()
{

rotateLeft(255, 10000);
rotateRight(255, 10000);
rotateLeft(255, 10000);
rotateRight(255, 10000);

}

void rotateLeft(int speedOfRotate, int length){
analogWrite(motorPin1, speedOfRotate); //rotates motor
digitalWrite(motorPin2, LOW); // set the Pin motorPin2 LOW
delay(length); //waits
digitalWrite(motorPin1, LOW); // set the Pin motorPin1 LOW
}

void rotateRight(int speedOfRotate, int length){
analogWrite(motorPin2, speedOfRotate); //rotates motor
digitalWrite(motorPin1, LOW); // set the Pin motorPin1 LOW
delay(length); //waits
digitalWrite(motorPin2, LOW); // set the Pin motorPin2 LOW
}

ACmotorSSRdiagrams.jpg

acmotorarduino.jpg

We solve the problem by putting 200K resistor to discharge the capacitor. And we 're able to control the direction of the AC motor now via an Arduino.

The arduino code can be downloaded at my github:

Will post more instruction soon

Nice! I took apart a washing machine and got a huge ac motor with a nice ac capacitor as well. I'll post photos latter.