problem with power supply to dc motors

hai

i'am a newbie to arduino and has very less knowledge in electronics

i want to control my remote car using arduino, so i removed the circuitry of my remote car leaving the motors( had attached the images of it )

i had read some basic tutorials on arduino and motors, i used l293d to control 2 motors and made the connections like

enable1,2 -- arduino pin 10
enable 3,4 -- arduino pin 11
input 1 -- arduino 8
input 2 -- arduino 9
input 3 -- arduino 4
input 4 -- arduino 2

in order to check the simple motion of back wheels i uploaded the following code
i connected output 3 and 4 to the motor wires of back wheels of my car

int enable34=11;
int input3=4;
int input4=2;



void setup()
{
  pinMode(enable34,INPUT);
  pinMode(input3,OUTPUT);
  pinMode(input4,OUTPUT);
}

void loop()
{
  
  
  analogWrite(enable34,255);
  digitalWrite(input3,HIGH);
  digitalWrite(input4,LOW);
  delay(3000);
  
  digitalWrite(input4,HIGH); delay(3000);
  
}

when i connected USB cable to power arduino and vcc pins(8,16) of l293d to 5v of arduino the car moves

when i connected USB cable to arduino and 8 th pin of l293d to 9v battery and 16 th pin of l293 d to 5v of arduino the car is not moving

when i connect arduino to 9v battery and 8 th pin of l293d to 9v battery and 16 th pin of l293 d to 5v of arduino the car is not moving but when i lift it up the wheels are moving too slow and some times i had to initialize the motion

iam totally worried about this
i am thinking that the battery's could not supply the sufficient power to run the motor
but the usb port is providing the sufficient !

as i told earlier i had very less knowledge in electronics please help me with a way to provide an alternate power supply to run my car with out the usb

iam providing the necessary photographs of my project

thanks in advance

It may be as you suggested, your 9 volt battery is not supplying enough power (it may be depleted). Use a volt meter to check the voltage of the 9 volt line, while the motor is trying to run.
What voltage does the motors need. If they worked from the usb power, then 5 volts makes them run.
I would replace the 9 volt battery with 4 AA batteries of high capacity (3000 mah or more).

thank you very much sir...

i have tried what you said 4 AA batteries when connected directly to motor car runs with high speed

i used 6f22 9v battery to power arduino and 4 AA batteries as input to Vss(pin 8) of l293d , Now car the moves with less speed compared to the earlier case

i have read that there will be a voltage drop in l293d ,are there any solutions to overcome this problem

is using 6f22 9v battery to power arduino is efficient or not ?

thanks in advance :slight_smile:

If the 4 AA batteries, through the l293d is not enough speed, they try using 6 AA batteries.

The arduino can run ok with 9 volts on the Vin. It would be more efficient with about 7 volts tho. If you wanted to drop it a bit, you could add a couple diodes in series with the 9 volt battery.

Thanq sir. .
I want to know whether 6f22 9V battery can sufficiently power arduino

I am not familiar with a 6f22 9V battery. But, 9 volts is plenty to power an arduino. If it stays up to 9 volts you are in good shape.
But most small 9 volt batteries, will discharge pretty quickly. So, for a while (maybe a several minutes or hours, depending on the power draw) it will work great. But when the battery gets depleted, putting out less than 4 or 5 volts, you will have a problem.

EDIT: Check 9v battery current | Electronics Forum (Circuits, Projects and Microcontrollers) for info on batteries.

parimi:
i have read that there will be a voltage drop in l293d ,are there any solutions to overcome this problem

No solutions other than to avoid H-bridge chips using darlington output stages (L293D & L298 for instance)

  • that is the reason for the 2.5V or so voltage lose.

MOSFET H-bridges may perform far better, but you have to check the figures to work out the losses for a given load
current.