Adafruit will not be shipping orders Thanksgiving Day, Thursday November 22, 2018. Expedited orders placed after 11am ET Wednesday November 21 will go out Friday November 23.
0

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.


Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, or even use Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for MakeCode, CircuitPython, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Join 8,700+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – Python on Microcontrollers is here!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/


Maker Business — Spotlight on Makeblock, one of the latest companies to find success in the STEAM market

Wearables — Emphasize the light

Electronics — Avoid serial confusion!

Biohacking — BDNF a Biohackers Best Friend

Python for Microcontrollers — Python powers costumes, and community @circuitpython @micropython @ThePSF #Python

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



1 Comment

  1. I love the CAPTCHA!

Sorry, the comment form is closed at this time.