LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

want to control the direction of a simple dc motor

i am using a NI cDAQ 9472 to control the direction of motor with the help of a motor driver L293D by generating a pwm signal. I am able write the code for one direction of the motor, but how to write the code to control both directions of motor

0 Kudos
Message 1 of 3
(3,040 Views)

To change the direction of a DC motor, you need to reverse the polarity of the leads.  That means you will need to either have a PWM signal that outputs a negative voltage for the reverse direction and a postive voltage for the forward.  Whether you can do that depends on your DAQ device and whether the L293D driver can do that.

 

The other possiblity is to use a digital output to drive a DPDT relay that reverses the leads.

0 Kudos
Message 2 of 3
(3,010 Views)

venky@4 a écrit :

i am using a NI cDAQ 9472 to control the direction of motor with the help of a motor driver L293D by generating a pwm signal. I am able write the code for one direction of the motor, but how to write the code to control both directions of motor


You didn't provided much information, we don't know what your code looks like and how you connected the L293D. Typically you would have to reverse to polarity of the outputs feeding the inputs of the L293D (1A, 2A or 3A, 4A).

 

Ben64

0 Kudos
Message 3 of 3
(3,001 Views)