May 30, 2012 AT 10:07 am

ASK AN EDUCATOR! – “How can I control a solenoid or motor with an H-Bridge?”

Garrett asks:

how do i send/control the L293DNE motor driver to power a SOLENOID or just a dc motor

This is a really good question, and quite a popular topic. The L293D or DNE, depending on the manufacturer, is a Quadruple Half H-Driver or H-Bridge IC that allows for the control of high current loads from a low current source. The advantage of this chip over just using a transistor or MOSFET is in the fact that you can control the polarity of your motor when used as a full H-Driver.

If you are looking to just control a solenoid, I would recommend using a transistor. Specifically one that can handle the relatively high current loads like a TIP120 or equiv. This transistor with a base resistor will be able to drive ~1A from just about any microcontroller. This can also be used to drive your motor and I actually ran a post earlier which gives a much more in depth overview.

Regarding your L293D, below is a circuit diagram that illustrates 3 possible configurations for driving a motor. The one the left shows the IC being used as a full H-Bridge. The pins are configured as follows:

  • Pin 1 (1/2 Enable) – Channel 1/2 enable HIGH = ON
  • Pin 2 (1A) – Channel 1 logic control
  • Pin 3 (1Y) – Motor Lead
  • Pin 4 – GND
  • Pin 5 – GND
  • Pin 6 (2Y) – Motor Lead
  • Pin 7 (2A) – Channel 2 logic control
  • Pin 8 (Vcc2) – Motor Power Supply

To turn CW, make 1A HIGH and 2A LOW. To turn CCW, make 1A LOW and 2A HIGH.

The diagram on the top and bottom right show how you can control your motor in one direction. The top right diagram shows the motor being controlled on the HIGH side and the bottom right diagram shows the motor begin controlled on the LOW side. The control scheme is essentially the same as above, though you will only be controlling one of the logic control lines.

I hope this has helped to answer you question and clarify the use of the L293D!

Don’t forget, everyone is invited to ask a question!

Click here!

“Ask an Educator” questions are answered by Adam Kemp, a high school teacher who has been teaching courses in Energy Systems, Systems Engineering, Robotics and Prototyping since 2005.

Related

1 Comment

  1. I love the CAPTCHA!

Sorry, the comment form is closed at this time.