# Connecting pins of L293D to pins of inverter 7404

I would like to know the right configuration of pins using a 7404 inverter while the pins are connected to an L293d. When connected for driving DC motors why must an inverter be used? The pins through the inverter are used as pins with PWM. Can the three pins of from the L293d be connected to microprocessor along with the ENABLE pin on the L293d or must the inverter be used?

Here is a diagram:

I'm sorry, but I mean that your answers are very similar to shown diagram above. It seems normal that I understood just like you. But I want to know why is involvement of inverter important? Inverter is for appropriate to increase the voltage? Via this method of connection my robot arm uncontrollably moves after uploading the source code on the Arduino and via serial communication. Here is another diagram shown below, where two inputs of each side L293 are connected to output pins of Arduino. It is done correctly ?

I´m sorry for my grammar mistakes.

Here below another diagram is, as far you want to see it. Are these inverters recommended for controlling DC motor on the imaginary robot arm? What is the importance of using invertors 7404 on the breadboard? I have ceramic condensators 33pF which they´re lying around two output pins of DC motor. Are these things necessary and why are is used?

Thank you.

• Here is a diagram. I have a board Arduino Mega 2560 and I plan to control DC motors. I have question, why I must use invertor on breadboard? ![circuit diagram][1] [1]: i.stack.imgur.com/fOfKn.jpg Thanks ! – Andrej Kozlovský Apr 25 '13 at 23:59
• Good, but I'll you send only code for testing robot arm. It uncontrollably moves after initialization. That´s why I just have inverter on the breadboard. Here is code: [1]: pastebin.com/p37djGnK – Andrej Kozlovský Apr 26 '13 at 0:23

If you really must avoid the use of the inverter IC, an alternative is to create your own inversion in software, using more of the Arduino pins:

Each of the outputs generated by your Arduino code is being used to generate a positive and a matching negative signal via the inverter, to drive opposing halves of the H-Bridge in the L293.

To achieve the same result in software, if your code uses something like DigitalWrite(pin1, x) on a given pin, you will have to assign another pin and add another DigitalWrite(pin2, !x) immediately following the previous line of code. This will generate the inverted signal, which you would feed in where the inverter output line goes in your current circuit.

If, however, PWM and AnalogWrite() are used as your method of motor control, some slightly more involved coding will be needed to generate PWM that is exactly opposite in phase to the existing PWM outputs. This may well be within your skills (or not), but I'll refrain from coding it for you in this answer.

If you need help with that, it deserves a separate question.

While the breadboard layout you have shown is useful to show how you have wired things, you really must also draw a schematic diagram, showing the actual inverters and L293 drivers - you will then see that the inverters are required.

One output of the Arduino goes to input 1 of the L293, and to the input of an inverter. The output of that inverter goes to input 2 of the L293. With this connection, when the Aduino output is high, output 1 of the L293 will be high, and output 2 will be low, driving the motor in one direction. When the Arduino output is low, the states of the L293 drivers will be reversed, driving the motor in the opposite direction.

(Disclaimer: I've never used an L293, but I can read datasheets!)