I'm wondering how to connect the L293D (H-bridge) and an MPU 6050.

I'm using 1 Arduino Uno, 2 DC motors, 1 MPU6050 and an L293D.

When I tried this, I got some sparks/smoke from the breadboard and none of the motors where running. I only used a 9v battery, not 12v.

mpu 6050 and l293d

Here's the L293D:


MPU 6050 wiring: int-digital 2, SDA-A4, SCL-A5, GND-GND, VDD-Vss

L293D wiring: Vss-VDD, Input4-Digital 5, Output4-Motor, Output3-Motor, Input3-Digital 6, Enable2-5V, Enable1-5V, Input1-Digital 9, Output1-motor, Output2-motor, Input2-Digital 10, Vs-12V battery.

  • 2
    I can't see the connections on that Fritzing diagram clearly enough to answer. A properly-drawn schematic might help. Also, if you only used a 9V battery, draw the diagram and schematic that way, instead of drawing 9V in series with 3V and then saying differently. Also indicate how you are powering the Arduino -- is it via USB? The diagram doesn't show anything connected to Vin. Also indicate pin 1 on the L293D – James Waldby - jwpat7 Dec 19 '15 at 20:12
  • 2
    You should not be using a 9v "transistor" battery in a motor control project. This 9v + 2xAA horrible idea keeps showing up in posts, so clearly some grossly misguided person is promoting that somewhere on the Internet, but it is a flawed idea best avoided. If you really need such a voltage, use 8-10 AA's to have decent current capability. The L293D and L298 are also general bad ideas, requiring relatively high voltages to overcome their loss, while many of the readily available motors/gearboxes want low voltages and high current more suited to FET driver chips. – Chris Stratton Dec 19 '15 at 21:06
  • I agree with @ChrisStratton. That is not a 12V battery. – Nick Gammon Jan 11 '16 at 9:31
  • It actually is a 12v (nominal) battery, it is just not suitable for the task. – Chris Stratton Jan 12 '16 at 15:46

I don't really se anything wrong with the wiring, atleast your diagram seems to be in order. only thing I would ad is give the pin 8 a ceramic capacitor to ground

but There is a few possible issues you can check.

1 -the sparks make me think that you had a Loose connection at the spark site on the breadboard, maybe the IC was not properly pushed Down in the breadboard, this happens alot, try Again and make sure the IC is complete inserted.

2 - if this does not work You might have destroyed the first L293 or the breadboard tracks but if you have more than one try to see if a replacement or movement of the old ic does the trick

3 - the motors are to large, and so the current drawn is to high for the L293 to handle and caused thermal shutdown of the L293, a very high current drain will also occur if the motor is stalled. Anyway add some current limiting resistors and see what happends.

4 - if the motor hums without moving then it is because Both the forward and reverse input eg. 1 and 2 is enabled simultaneously.

5 - the code is not appended, so that cannot be verfified, but the MPU 6050 is correctly installed

| improve this answer | |
  • Ive switched out the H-bridge and added a capacitor. But still nothing – Marc Jan 17 '16 at 16:06

There a some mistakes with the wiring of the supply voltage (Vss) according to the datasheet (http://www.ti.com/lit/ds/symlink/l293.pdf) of the L293D a those on pin 8 (Vss2) and 16 (Vss1). I think those are not connected because each Vss is for one motor of the driver. So you have to connect 9V (or 12V) to both pins. There is also something wrong with the capacitor (polarity). And your connection of the battery to the breadboard is a bit weird because + of the battery is usally the red not the black wire / marked row on the breadboard.

| improve this answer | |
  • I will add the changes when i get time. For any people in the future – Marc Dec 22 '15 at 18:36
  • Hey do you mean that i should connect pin 16 to the battery and not the arduino 5V? – Marc Jan 11 '16 at 10:59
  • VCC1 16 — 5-V supply for internal logic translation VCC2 8 — Power VCC for drivers 4.5 V to 36 V – Marc Jan 11 '16 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.