L293D Motor Direction Control for Under $2.20

17K24026

Intro: L293D Motor Direction Control for Under $2.20

Further to my instructable 12V NE555 PWM Controller for Under $3 I have designed and built a simple and cheap DC Motor Direction Controller that can either be used with the PWM Controller, for speed control or by itself with a 12V power supply.

I designed this DC Motor Direction Controller so that I could give direction control to DC motors that I am building into mini tools (drill, lathe, table saw, solder smoke extractor, etc.). While, I don't need direction control for all of the tools that I'm building, it IS necessary for some. Plus, who doesn't want to spin their DC motor backwards?

The overarching design principles that I've used here are:

  1. Works with my NE555 PWM Controller;
  2. Works without my NE555 PWM Controller;
  3. It's cheap;
  4. It uses minimum parts; and
  5. It works

For the direction controller to work with the NE555 PWM Controller, it will take the PWM modified power from that device and modify the polarity of the signal and push it on to the DC Motor. As I mentioned with the NE555 PWM Controller, I'm only interested in a 12V motor.

To achieve this magic, I'm using an L293D Quadruple Half-H Driver, well ... I'm using half of one. If you're interested, the L293D can manage 36V, however, as discussed in my previous instructable, the NE555 PWM Controller (as designed) will handle 18V max. So there's your upper limit.

The parts list and costing for this instructable is:

  • 1 x LM7805 Voltage Regulator ($0.40)
  • 2 x 100 nF electrolytic capacitor ($0.06)
  • 2 x 2 pin header ($0.26)
  • 1 x 1k ohm resistor ($0.01)
  • 1 x SPDT slide switch ($0.05)
  • 1 x L293D Quad Half-H Driver ($0.85)
  • 1 x 16 pin DIL ($0.35)
  • 1 x 50 x 33mm PCB ($0.14)

The prices quoted are for parts purchased from eBay that I've accumulated over some time. These prices change over time ... so caveat emptor, dude.

STEP 1: The Horse Before the Cart

If you are using this with the NE555 PWM Controller, that device comes first. The reason for this is simply that if the LD293D direction controller were first, you'd be switching polarity and THEN feeding it to the NE555 PWM Controller. And that would mean that the polarity would be wrong and the NE555 PWM Controller wouldn't work when the polarity was reversed.

When designing this circuit, I made a couple of mistakes ... such as, I was feeding 12V from the NE555 PWM controller BEFORE it was square waved and feeding that into the 5V regulator. All that happened was that the NE555 PWM Controller rendered itself totally redundant. No, don't do that!

Another design fault that you will see in the scan of the PCB is that the GND connections for the L293D don't go anywhere ... I had to solder in a jumper under the board to connect to the common GND of the LM7805 to make it do anything (groan!).

The above Fritzing PCB view shows both of those problems fixed.

I have also designed in two M3 holes on either end of the L293D so that I can bolt in a piece of aluminium to act as a heat sink. Feel free to add a proper heat sink if you like (you'd like to if your L293D is getting hot). The L293D will start to get hot if you are pumping > 1.5 W into it. Under 1.5 W, free air will reduce the temperature to a safe operating range. If you are going above that, you're going to need some heat sink (and a good read of the schematic and search for advice on the interweb).

STEP 2: The PCB

Attached are the copper bottom and silk screen top from my Fritzing design.

These can be printed and transferred using whatever method you prefer. Personally, I prefer laser toner transfer and an Hydrochloric Acid and Peroxide etch bath.

As this design is a minimal component design and all of the traces are extra thick (48 mil), it shouldn't be too had to place and solder by eye ... well, you should use a soldering iron rather than your eye, unless you've got heat ray eyes.

Use a non-conductive washer or non-conductive bolt when bolting the heat sink to the copper trace ...

I have now added a "schematic" to the instructable. Please be kind ... I'm not very good at schematics.

STEP 3: All Done

To connect the two boards together, I've made a pair of DuPont Male pin jumpers (male to male).

To connect the motor to the board, I've gone with a DuPont Male/4.1mm Spade connector (male to female) jumper. This way, I can easily switch the motor and or motorised device without having to worry about soldering/desoldering (such a drag).

Anyway, that's it. This is a pretty straight forward circuit and build.

Check back again later, I've ordered a couple more JT0 chucks and I'm planning a mini-lathe.

Ciao!

23 Comments

Clean layout, which you do not see everyday. I'm saving this instructable for future use. BTW, I also started in IT in 81 just as the punch cards were being phased out. You must be getting long in the tooth.

Thanks pglassbrenner,

Lol, long in the tooth ... well short in the tooth, truth be told ;) to quote Python, My "Eyes are gnarled, my teeth are dim".

Thanks for the comment and good luck with your future use.

Cheers

Looks good. Definitely be giving this a go

Am I the only one who thinks you meant L293D instead of L239D? I can't find an L239D dual H bridge or quad half bridge.

i thought i was the only one going nuts trying to locate the chip.i did find a lm239 from texas instruments but it is an op amp and was curious if there wasn't a typo. thank you for correcting this.

Looks like I missed the schematic somewhere???? Did I?

l didn't schematic the circuit. I'll give it a go .

schematic now added, JohnC430. I'm not too good at schematics :) I've colourised the connections to make it a bit easier to read. (doesn't help me much, I'm colourblind)

Hi, well put together 'able. I don't quite understand though, it seems you're using a brushed dc motor. Can't you simply reverse the polarity with a switch? Forgive me, my knowledge is limited.

Hi mach1950 ... thanks for the comment. You're right, you "can" simply switch the polarity, however, the L239D does the switch from pole to pole gracefully and with no kickback by using internal clamping diodes. When you switch from pole to pole without protection, you have a charge going in both directions from the source to the motor and, because the motor is still spinning, from the motor back to the source and run the risk of blowing one or both the motor or source.

Anyways, that's my (also limited) knowledge of motor switching (not being cute or condescending) I've only been playing with DC motors for a short time and this is the best solution/cheapest solution that meets the objectives of my project.

If anyone out there knows better, feel free to stick your oar in!

You could use an on-off-on switch with the two "ON"s cross connected so that essentially you're just switching the wires round. Because you pass through zero (i.e. the off position) no nasty things happen. I have done this for a friends 3ph AC motor to switch direction. I don't see why it shouldn't also work for DC.

because the AC goes thru Zero volts and DC can be full on when u try to change direction so opening a switch is bad news for the driver.

cool. good explanation! see this is why i love instructables.

Thanks baelza.bubba that's a great explanation, and makes perfect sense. I need to make some of these!!!

cheers :) post an "I made it" when you do! also check some of the other comments. There's one about on/off/on switch that may apply ... an in4001 diode may be a solution.
More Comments