motorshiwls

Hi, I’m completely new to the arduino and I decided to start doing a car.
I bought a 4-wheel chassis kit, plus the arduino uno and a motorshield l293d.

The problem is that my engines are not spinning, they only start to spin if I “push” on the tires of the car, then yes they start to roll. And if I lean the cart on the ground they stop again.

I did the test by connecting the motor wires directly to the battery and they spin perfectly, so the motors are not the problem.

PS: I am powering the arduino through the p4 port using a 9v battery. Just like another 9v battery to power the motorshield.

Please save me

PS: I am powering the arduino through the p4 port using a 9v battery. Just like another 9v battery to power the motorshield.

You have motors that need a fire-hose of current. You are supplying the current using a stir stick. Of course the motors have no torque.

You mean one of those square looking 9V batteries like go in a smoke detector? That's not enough battery. They can't push enough current. Get some AA batteries and things might work better.

You might also want to show your code and wiring, maybe you did something wrong here. But you have to show it to us if you want us to be able to look at it and help.

Thanks for both of you for the fast reply.

I will be ataching my wiring and code down here.

So, i should be using the AA batteries to get more current and this may fix the problem?

Code:#include <AFMotor.h>

AF_DCMotor motor(1); //Righ Motor
AF_DCMotor motor2(4); // Left Motor

void setup()
{
motor.setSpeed(255);
motor2.setSpeed(255);
}

void loop()
{

motor.run(FORWARD);
motor2.run(FORWARD);
}

Yes, that battery can't run two motors. Get some AAs.

Delta_G: Yes, that battery can't run two motors. Get some AAs.

How many AA batteris should i get? considering that they only give me about 1,5v ? or should i get better ones?

And why do the motors run normally when conected directly to the battery but when i use the motorshield they dont :/

The L293D circuit consumes a fair amount of power itself - most likely enough to make a difference.

If the motors are 6V, you need 4 or 5 AA batteries. With the shield, you might even want 6.

PaulS:
The L293D circuit consumes a fair amount of power itself - most likely enough to make a difference.

If the motors are 6V, you need 4 or 5 AA batteries. With the shield, you might even want 6.

thanks, will try out and comeback later with the results