How to stop a motor with 2 limit switches

Thread Starter

GlassOfTonayan

Joined May 2, 2022
2
Hey.
Im making a mini garage door proyect, this is how it works:

Press and release button.
Motor runs in one direction.
Traveler hits first limit switch.
Motor stops and sits.
Press and release same button.
Motor runs in the other direction.
Traveler hits second limit switch.
Motor stops and sits.

Two limit switch are for set and reset the flip flop
But I have no idea how to connect the other switches to stop the motor :(
Can anyone help me please.Sin título.png
 
Last edited:

MaxHeadRoom

Joined Jul 18, 2013
28,686
There are a few other conditions for a garage door, I used a small Pimicro for the logic.
For e.g. if you hit the button to close the door and it has not reached the final position, if pressed again, it will stop, hit again, it will reverse to the upper limit, unless button pushed again, where it will stop.
Also depends if you want obstruction detection and also door collision detection.
 

Thread Starter

GlassOfTonayan

Joined May 2, 2022
2
There are a few other conditions for a garage door, I used a small Pimicro for the logic.
For e.g. if you hit the button to close the door and it has not reached the final position, if pressed again, it will stop, hit again, it will reverse to the upper limit, unless button pushed again, where it will stop.
Also depends if you want obstruction detection and also door collision detection.
I just want that when the door goes down and touches the limit switch, the motor stops. Likewise, when it goes up, it stops when it touches the other limit switch. :(
 

SamR

Joined Mar 19, 2019
5,040
Most garage door openers already have that as an adjustment screw accessible on the box surrounding the motor and gears. Why do you need it again?
 

crutschow

Joined Mar 14, 2008
34,431
Below is the LTspice simulation on my take on the circuit, using one CD4013 connected as a toggle FF.
The limit switches are normally closed, and open when the respective limit is reached, stopping the respective signal to U293D.
(Normally closed limit switches are generally safer, since they stop the motor if there's an open connection anywhere in the signal path for any reason.)

Each push of the PB SW reverses the motor direction.

Does that do what you want?

1651530475120.png

Note that if you are using a DC motor as your schematic implies, then you need diodes across the motor for transient voltage protection, as shown in the LM293 sheet (below):

1651530655372.png
 
Last edited:
Top