loading

the motor driver L293D controlling the direction of motor, i want to use limit switch to control two position of motor

I am developing a automatic gate project. I want the DC motor stopped as soon as the gate closed or opened completely. I use IC L293D to control the motor forward or backward. This project is also using Arduino. I plan to use a limit switch to control the movement of  DC motor.

Picture of the motor driver L293D controlling the direction of motor, i want to use limit switch to control two position of motor
sort by: active | newest | oldest
iceng1 year ago

Just to demo the other way, or maybe to prevent motor stall burn out when the micro goes to La-la land ! .

L293D.JPGmotorsw.jpg
FarhanJ (author)  iceng1 year ago
thanks a lot! it works...I've simulated the circuit, but the motor can only rotate in one direction and not in the other direction. after changing direction diode then I can drive the motor in two directions, and limit-switch works as well as I wanted.
iceng FarhanJ1 year ago

You are correct !

Please tell me, what is the name of your simulation software.

L293D-1open.JPGL293D-2open.JPGL293D-3close.JPGL293D-4close.JPGL293D-5close.JPGL293D-6close.JPGL293D-7open.JPG
FarhanJ (author)  iceng1 year ago

im using Proteus 8

FarhanJ (author) 1 year ago
the simple simulation circuit i made
two way with limit swtich.JPG
rickharris1 year ago

Feed limit switches into digital inputs on Arduino.

Then use software to control the barrier.

From your diagram if pin 2 is high and pin 7 low the motor turns 1 way - if pin 2 is low and Pin 7 high it turns the other way.

if pin 2 and 7 are both high or low the motor stops.

FarhanJ (author)  rickharris1 year ago
thanks a lot sir. very helpful idea! ☺