Introduction: How to Hack an Electric Hoist (AC Motor)

For this project we were hired to do a small hacking for a trade show. I worked on this with Molmol Kuo. Special thanks to Eric Rosenthal for the consultancy with the electronics and Zach for the support with the code.

The Electric Hoist that we’re giving has a built-in motor controller, a capacitor, and a pendent switch, that allows manually adjusting the directions.

The goal of the project was to move raise and lower a couple of pallets with other stuffs attached to the hook of this winch, not uniformly on time. So we hacked the motor to be able to control the direction from an Arduino UNO, but still allow any manual control from the pendent switch (when arduino is not running).

Step 1: Materials and Tools

Materials:

1 Electric Hoist
4 Solid State Relays
1 Arduino
1 bread board
200K ohm resistor

Electric AC wire
5V wire
Heat Shrink Tubing or Electric Tape
plastic box

Tools:
soldering equipment
stripper wire
pliers

Step 2: Hacking

our idea was to replicate what the pendent switch does but with an arduino. For that, we figured out how the switch was working and with a multimeter we realized that when you press DOWN, the switch joins two pair of wires (red with white and black/green with black). Similar to when you press UP (white with red and black with pink). [photo #1]

So the switch to go UP and DOWN is like a pair of switches to light up a lamp each one, that is why we need 4 relays, and we will control with an arduino to switch every pair to move the motor in every direction.

You can see the diagram bellow [photo #2], also how it looks like in our motor. We had problems managing the direction, but Eric Rosenthal gave us an explanation and a solution for the problem. When we control AC motors with the solid state relays, the relays don't discharge the capacitor but the switch does it someway. So when the capacitor is not being discharged, the motor will go on the same direction as the charge. The solution is the inclusion of a resistor (200KΩ) between both terminals of the capacitor which will discharge the capacitor when the motor is not operating (we didn't have 200KΩ resistor, so we used two 100KΩ connected in series).

After having done this we hacked also another motor, but this one had two capacitors connected in parallel so I connected 200KΩ in every capacitor (I am not completely sure about this, but it works at least) [photo #8].


To finish it, we packed everything in a plastic box and we made a hole to put the pendent switch and be able to control it from the outside of the box without touch any electronic piece, because we are working with AC power and we wanted to be safe.

Step 3: Coding

And this is the code we used to control the winch. You can also find it here:
https://github.com/openMolmol/hack-acmotor-with-relay-and-arduino

the code included a delay according to the duty cycle of the motor that is 25%. This means that if you use it for 30 seconds you will have to wait around 2 minutes to use it again to avoid damaging the motor.

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// We are using two solid state relays to control the AC motor with an Arduino Uno
// Attach 200k resistor between both terminals on the motor's capacitor
// Allow the motor to have a 10 seconds of operation time each time
// the code is based on an AC motor with 25% duty cycle
// The relay pins connect to arduino's digital PWM Pin 10 and 11, ground to ground
// SSR circuit developed with Eric Rosenthal
//yesyesno LLC Jan, 17, 2013 mailto: molmol@openmolmol.com

int PinDown = 6; // choose the pin for the relay
int PinUp = 5; // choose the pin for the relay

int nSecondsMoving = 10; // unit in seconds; DO NOT go less than 10 seconds
int nSecondsMovingUp = nSecondsMoving*1.2; // the motor goes up 1.2 times longer than it goes down

int nSecondsPausedMin = nSecondsMoving * 4;
// this is nSecondsMoving * 4 -- we need to wait 2 minutes if we've moved for 30 seconds

int nSecondsPausedMax = nSecondsMoving * 4 + 10;
// this is nSecondMovind * 4 + something to add for randomness, ie 10 seconds..

boolean firstTime;

void setup() {
Serial.begin(9600);
pinMode(PinUp, OUTPUT); // declare relayPin as output
// motor will go down first
pinMode(PinDown, OUTPUT); // declare relayPin as output

firstTime = true;

}

void loop(){

digitalWrite(PinUp, LOW); // turn relay OFF
digitalWrite(PinDown, LOW); // turn relay OFF

if (firstTime == true){
delay(1 * 1000); // 1 second of delay on first start
} else {
delay(random(nSecondsPausedMin, nSecondsPausedMax) * 1000); // random delay between each operation
}

digitalWrite(PinUp, HIGH); // turn relay ON

delay(nSecondsMovingUp*1000);

digitalWrite(PinUp, LOW); // turn relay OFF

delay(random(nSecondsPausedMin, nSecondsPausedMax) * 1000);

digitalWrite(PinDown, HIGH); // turn relay ON

delay(nSecondsMoving * 1000);

digitalWrite(PinDown, LOW); // turn relay OFF

firstTime = false;
//end down
}