1

I'm building a simple robot and have a L293D motor controller (details here and diagram below on the left). It takes two positive input voltages - one for powering the IC and one for driving the motors (in my case it will be +5V and +9V). However, it has four grounds and doesn't give any indication how those should be matched up with each power source. Does it not matter what's connected to what with regards to the grounds? I'm concerned that if I wire the ground for 5V to the wrong pin, that there will be a mismatch and mess something up. Sorry if this is a noob question - I don't have EE background.

enter image description here

Chris Stratton
  • 33,282
  • 3
  • 43
  • 89
g491
  • 181
  • 1
  • 5
  • 2
    It has only one ground. The reason it's split across several pins is because they use a standard package but need to get the sink current and heat out. – Janka Nov 14 '20 at 22:05
  • 1
    @Janka, it's probably a non-standard package as, I imagine, the pins are all connected internally - probably through a chip-mounting metal pad in the middle. I think the lead-frame would have to be a special. – Transistor Nov 14 '20 at 22:08
  • 2
    All the grounds would have to be connected together. But **you really, really, really don't want to use a horrid L293** or any other lossy Darlington driver. Use an FET driver. – Chris Stratton Nov 14 '20 at 22:20
  • I read the tutorial followed by the OP and found it very good. L293D and STM32 Contorlling DC motor speed and direction - EG Projects, Engineering Garage 2019apr https://www.engineersgarage.com/stm32/dc-motor-control-with-stm32-microcontroller/. I think both L293D and L298N are very good for newbies to learn the basic things about DC motor driver. One main reason is that it is easy for newbies to find good friendly tutorials for L293D and L298N. / to continue, . . . – tlfong01 Nov 15 '20 at 06:22
  • However, for ninjas to start off robotics projects, I would highly recommend the new generation driver ***DRV8871***: https://learn.adafruit.com/adafruit-drv8871-brushed-dc-motor-driver-breakout?view – tlfong01 Nov 15 '20 at 06:26

1 Answers1

2

They'll all be connected internally and probably have a square section of the lead-frame holding the chip in a way that gives good thermal contact.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. The general idea.

Good practice would be to connect all four pins together and run the 5 V ground to one side and the 9 V power supply ground to the other. Use a suitably heavy gauge for the motor return and let that be the only point where the two power supply grounds connect with each other. (This avoids any chance of motor return current taking a sneak path through your logic ground.)

Transistor
  • 168,990
  • 12
  • 186
  • 385
  • #Transistor, your advice is very good. The schematic is also newbie friendly. BTW, for toy motors which take less than 500mA when running, and less than 2~3A when starting or stalling, I usually use AWG 22 or thinner for those toy motors. For the 9V grounding wire, I think AWG22 is also good enough. For ordinary/typical connecting wires, I usually use AWG26 or thinner, similar to those used for jumper wires. For applications where space is very limited and needs a lot of bending, I usually use more flexible AWG 30 (wire wrapping wires). / to continue, . . . – tlfong01 Nov 15 '20 at 01:51
  • / continued, - Have said the above, I think for newbie's starting off projects, thickness of wires is not that very important, usually thickness like those breadboard jumper wires are OK. – tlfong01 Nov 15 '20 at 01:53
  • #Transistor, there is a slight confusion of where the "floating" motor current goes. Motor current actually does not directly goes to ground, but directly goes to the transistor, before going to ground, as shown in the following picture: https://i.imgur.com/wv1cP9Y.jpeg. – tlfong01 Nov 15 '20 at 02:34