Controlling DC Motor with L293

Hello,
I am attempting to control a 24VDC, 1A motor using an Arduino Uno and L293 H Bridge. I have been struggling with this as the motor has 3 ports to use, which I want all to be connected at once. To spin ClockWise it needs +24 on 1 and -24 on 2. To spin CounterClockWise, it needs -24 on 1 and +24 on 3. The issue I have is with having Port 1 being connected to + and - at the same time, as this just grounds the circuit. I am looking to remedy this issue with the L293 H Bridge and was wondering if the below set up and code will work or fry my components/ board (which I have already done once). Thank you!

Motor_Driver_Test.ino (941 Bytes)

Please provide a link to a datasheet/specification of that motor. I have a feeling you may be misinterpreting something in there.

And a hand drawn circuit diagram might be more useful than that strange Fritzy thing.

Steve

@slipstick

Here is a link for the DC wiring diagram:

I have attached a hand drawn circuit diagram.

Hi,
You are trying to control a valve actuator.

To spin ClockWise it needs +24 on 1 and -24 on 2. To spin CounterClockWise, it needs -24 on 1 and +24 on 3.

The link you provided, the DC motor version has no pin 2 connection.
Although your schematic shows the correct pins.
mot1.jpg
mot2.jpg
The switches are on cams located inside the actuator housing.
Have you applied 24V directy to the terminals to prove that it does work CW and CCW?

Tom... :slight_smile:

mot1.jpg

mot2.jpg

Hi,
OPs Circuit;


The L293 is only rated at 1A, I would be using something a bit heavier in current capacity.
Tom.. :slight_smile:

Apologies... In my original post I meant pins 1,3,4. And yes I have been able to rotate the motor CW and CCW with the pins and by applying voltage directly across the motor. However, I would like to use the pin wiring in my design to make use of the switches so I do not over rotate the valve. I have yet to test out the L293 yet, but the motor only pulls 1A so I was thinking it should be okay.

Some of these 24V valve motors stall at 1.9A, not 1A, so you might need to parallel both channels of the L293D

By the way please give full details of the hardware, i.e. the precise model number, so we don't have to guess if
its the R-150, R-300, R-600. Links to datasheet are good too. https://assuredautomation.com/literature/R_actuators_datasheet.pdf

@MarkT

The model number is R600B and the schematic can be found in my second post.

As the datasheet shows the 600 model 24Vdc requires 1.9A, not 1.0A.

@MarkT

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

I believe the L293NE should be able to handle this

Lots of people have similar beliefs initially, and end up buying a modern, much more efficient and capable motor driver, like one of these.

Unlike most other suppliers, Pololu engineers do not inflate the device ratings, and actively support their products.

@jremington it seems as if you both are correct. I set up my circuit as I have described above and am getting correct outputs with nothing hooked up. However, as soon as I hook up the motor, I will only get an output of about .5V, no matter the input voltage. I assume this is due to limits of the L293?

I don't understand your post. Where are you making this measurement?

Are you sure you have the L293 and not the L293D? If the L293, then external inductive kick diodes are required. As they are not shown in the posted diagram, you may have destroyed the chip.

Another reason to switch to a modern motor driver.

Hi,
What code are you using to control your motor?
Can you post it please?

Thanks.. Tom.. :slight_smile:

@jremington I was taking these measurements across the outputs of the L293NE where the leads to the motor would be connected (i.e. 1+ 3-). When I take these measurements without the motor, I am getting the correct output. However, when I attach the leads to the motor, the voltage drops due to the current draw being too high (I believe). And I am sure that I have the L293NE. I had not seen any documentation regarding diodes to I will look into that...

@TomGeorge the code I am using is in my original post. It is named Motor_Driver_Test.ino

Hi,
Below is a simplified diagram of your schematic, using a L293 will not do the job you need.
L293MOTOR.jpg

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... :slight_smile:

@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.

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.

@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.

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.
mot1.jpg