Limit switches to control motor direction

1. Oct 15, 2016

zxcvb

I am trying to use two limit switches(this one) and two DPDT relays to control the direction of the motor. When the power is applied the motor should rotate one direction (direction for this question isn't important). Also, at this point (initialization) neither switch will be energized. The motor will rotate and move until it energizes the second limit switch (labeled Switch 2). At this point, the direction of the motor should reverse. The motor and hardware will then move towards switch one. Once the motor reaches switch one it should stop completely (not reverse direction again). Below is my basic wiring diagram.

I wired it up and when I supply power the motor rotates. However, whenever switch 2 is energized I can hear relay 2 energize and de-energizes quickly but no motor rotation.

Also, I am trying to implement a latching relay when the motor reverses direction. I do not know if my problem is occurring there.

Finally, I am having problems trying to figure out how to have the motor stop once switch 1 is energized.

Any help with my two problems (reversal of direction, and stop when switch 1 energized) would be greatly appreciated.

2. Oct 15, 2016

Averagesupernova

What type of motor? Permanent magnet motor?

3. Oct 15, 2016

lewando

First some standard shorthand:
K1 = relay 1
K2 = relay 2
S1 = limit switch 1
S2 = limit switch 2

Please verify if this is what you think is happening:

Event 1: (power on) K1 is energized, K2 is de-energized. S1 and S2 are both dis-engaged. Motor is spinning and motion is toward S2.
Event 2: (S2 engaged) K2 is energized, which de-energizes K1. Motor spins to produce motion towards S1.
Event 3: (S2 dis-engaged) K2 is de-energized, which energizes K1. Motor spins to produce motion towards S2.
Event 4: (S2 engaged) K2 is energized, which de-energizes K1. Motor spins to produce motion towards S1.
Event 5: (S2 dis-engaged) K2 is de-energized, which energizes K1. Motor spins to produce motion towards S2.
etc.

This should produce some observable chattering, unless I mis-interpreted your drawing.

4. Oct 15, 2016

Aaron Crowl

Do you have a data sheet for the relays? Shouldn't the relay short the NO pins and disconnect the NC pins when it's energized? You have relay 1 wired as if the pins are going to be connected to the common or supply voltages depending on its state.

5. Oct 19, 2016

ilik

aam... why wouldn't you buy a Motor Driver IC with parameters of your motor? it comes with a datasheet with connection diagrams and operational manual.
these specialized IC s are chap, tiny,Bipolar,have built in voltage/current limiting/regulation and short circuit protection,are available for wide spectrum of motors, and take all the engineering weight off your shoulders. it's a "Buy-Solder-Off You Go" thing.