Pages: [1]   Go Down
Author Topic: Hacking Ac motor with Arduino and Solid State Relays  (Read 1028 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
https://vimeo.com/57183524
------------------------------------------------->
We are using this motor:

http://www.harborfreight.com/880-lb-electric-hoist-44006.html
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
}


* ACmotordiagram.jpg (82.54 KB, 800x543 - viewed 34 times.)

* ACmotorSSRdiagrams.jpg (31.71 KB, 300x417 - viewed 30 times.)

* acmotorarduino.jpg (69.51 KB, 600x400 - viewed 26 times.)
« Last Edit: January 11, 2013, 06:54:29 pm by molmol » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
https://github.com/openMolmol/hack-acmotor-with-relay-and-arduino

Will post more instruction soon


* acmotor-capacitor.jpg (1293.44 KB, 1944x2592 - viewed 17 times.)
« Last Edit: January 17, 2013, 02:48:22 pm by molmol » Logged

Beijing
Offline Offline
Full Member
***
Karma: 3
Posts: 193
Skype name habib.derbyshire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

What is man's best friend? The breadboard!

Pages: [1]   Go Up
Jump to: