Go Down

Topic: Controlling DC Motor with L293 (Read 965 times) previous topic - next topic

TomGeorge

#15
Aug 29, 2019, 01:30 pm Last Edit: Aug 29, 2019, 01:31 pm by TomGeorge
Hi,
Below is a simplified diagram of your schematic, using a L293 will not do the job you need.


The problem is the Enable pins.
When enabled the outputs follow the inputs.
When not enabled the outputs are open circuit.
L293 has tri-state outputs.
But the enables control a pair of outputs.

If motorpin 1 and motorpin 3 need to be HIGH and LOW, both enable pins will need to be HIGH, however this means motorpin 4 is connected to an enabled output, not an open circuit that your motor will need.

I hope that makes sense.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

tlestak

@TomGeorge

Thank you for the explanation.  Any suggestions on how to run the motor?  I have tried various options (op amps, motor drivers, MOSFETs, solid state relays) and seem to have the same issue regardless of the hardware.

jremington

#17
Aug 29, 2019, 09:10 pm Last Edit: Aug 29, 2019, 09:12 pm by jremington
The first thing you need to do is figure out how to wire the motor such that it works properly with a simple, two wire connection to a battery or power supply.

That is the connection you will use for the two outputs of the motor driver.

Then select an appropriate motor driver. Don't bother with the L293.

tlestak

@jremington I can not have a 2 wire output with the motor configuration (1+/3- and 4+/1-).  I think a two output (one output for 1/3 and the other for 4/1) motor driver with the proper current/ voltage capabilities may be the solution.

jremington

#19
Aug 30, 2019, 12:34 am Last Edit: Aug 30, 2019, 12:38 am by jremington
Looking at that motor wiring diagram, it appears that you have no option but to use the limit switches. In that case, for bidirectional control you need to add two diodes, as done here:



The idea is that when one switch opens up at the end of travel, the diode allows you to reverse the current flow so that the motor can be backed away from that end. You will have to experiment to see which switches are activated, and which way to place the diodes (they MUST oppose each other).

Most likely you will use pins 1 and 6 as the power leads, and connect the diodes to some combination of 3,4, and 5. And what are the "auxiliary limit switches"?

As it is, I don't completely believe the diagram posted previously and below, as the NO (normally open) terminal associated with switch 3 is shown as closed.

tlestak

@jremington

It seems that the diode idea would work.  I have yet to attempt it in a lab setting so I will give it a try and let you know.

I am not sure about using pins 2, 5, 6 as they are just linked back to 4 or 3 so I think I have to make it work with the input ports available.

It seems that auxiliary switches are additional switches the manufacturer can add on for additional stopping points of the valve.  Here is the description from the website:
"2 Extra SPDT Switches
The R4 Actuators come with 2 SPDT switches that are activated by cams that are pre-set to full clockwise and full counter clockwise. These are typically used to enegize indicator lamps to indicate the open and closed position of the valve being operated. The 2 extra SPDT switches operate using of 2 independent common voltages, and have adjustable cams to set the contact points at whatever rotation you want."

jremington

#21
Sep 03, 2019, 05:10 am Last Edit: Sep 03, 2019, 05:32 am by jremington
First figure out what the switches attached to pins 3, 4, 5 and 6 actually do at the ends of travel, and make a circuit that looks like the one with diodes (if possible). I suspect that the manufacturer's diagram is wrong, and the NO and NC labels associated with pin 3 need to be reversed.

It is very important that somewhere in the middle of the travel, both switches are closed (NC) as shown in the diode diagram. That way the motor can be moved both ways by simply reversing the current flow.

If you can open up the casing and get access to the "hidden" motor terminal, problem solved!

MarkT

#22
Sep 04, 2019, 02:08 am Last Edit: Sep 04, 2019, 02:08 am by MarkT
@MarkT

I believe the L293NE should be able to handle this as the output and peak output are 1A and 2A respectively.

http://www.ti.com/lit/ds/symlink/l293.pdf
Take that risk if you want, I'm advising you not to because living on the edge of spec's usually ends in disappointment - its false economy anyway as you have a dual H-bridge and one motor, naturally you'd
parallel them up for better speed and lower losses anyway.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

TomGeorge

Hi,
@MarkT  see post #15.

Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

tlestak

Hello,
     So I have discovered a solution using 2 relays and an Arduino.  This circuit would work with a single DPDT relay, however I did not have one that could handle the 24V of the motor and still be actuated by the 5V of the Arduino.  So, I have a Solid State Relay that is activated by the Arduino, which then powers the coil of the DPDT relay and drives the motor.  I have attached a schematic of my set up.  Thank you everybody for the input!

Go Up