Trouble Powering 2 DC Motors at once (L293D Motor Driver)

Hi, I'm pretty new to Arduino, and I'm having trouble powering 2 DC motors at the same time, using an L293D Motor Driver. I am using 1 9V battery to power it (Not a smoke alarm battery)

My Circuit:

My Code:

void setup()
{
  pinMode(3, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
}

void loop()
{
  	digitalWrite(2, LOW);
  	digitalWrite(3, HIGH);
  
  	digitalWrite(4, LOW);
  	digitalWrite(5, HIGH);
}

Have you checked the enable pins on the L293D?

I've connected them directly to the positive rail

That's the reason for the trouble. The PP3 delivers 9 volt but not current enough. Replace it with a descent power source. AA batteries would do better but not for very long time.

Don't use those Fritzing pictures. Take the time to draw real schematics. All helpers know an UNO is blue and what a bread board looks like. No use for using surface to show that.

How many AA batteries should I use?

What's the voltage rating of the motors? Take that number and add one battery. Adding 2 batteries would likely overload the motors a bit.

The problem here is current, not voltage - adding another battery in parallel could address that, but small 9V batteries (unless lithium chemistry) are notoriously low current and struggle completely with any sort of motor level current.

Thanks! I'll try it out

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.