The L293D motor control doesn't work well

Hello everyone,
I use Arduino Uno and the L293D MOTOR CONTROL board.
I downloaded the relevant directories to run a DC motor. I burned a few programs I found online / built-in examples but the engine didn't move. When I measure voltage on the M1 ports (for example), I do not see differential voltage. When I measure from one of the M1 ports to the ground I see the voltage varies according to the code but only positive, I can't make it go BACKWARD :frowning: .
What could be the reason?

yoavbenita:
What could be the reason?

Without seeing your program and your wiring diagram how can we know.

Also please post a link to the specifications for the motor you are using.
And details of the motor power supply (volts and amps).

...R

That's my program

#include <AFMotor.h>

// DC motor on M1
AF_DCMotor motor(1);

void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Motor party!");

// turn on motor #1
motor.setSpeed(200);
motor.run(RELEASE);
}

int i;

// Test the DC motor, stepper and servo ALL AT ONCE!
void loop() {
motor.run(FORWARD);
for (i=0; i<255; i++) {
motor.setSpeed(i);
delay(3);
}
for (i=255; i!=0; i--) {
motor.setSpeed(i);
delay(3);
}
motor.run(BACKWARD);
for (i=0; i<255; i++) {
motor.setSpeed(i);
delay(3);
}

for (i=255; i!=0; i--) {
motor.setSpeed(i);
delay(3);
}
}

my wiring diagram is very simple, just put the l293d board directly on the Uno, and the engines is like that

I am not familiar with that motor shield. Please post a link to its documentation.

You have not told us what motor power supply you are using.

When posting code please use the code button </>
codeButton.png

so your code 
looks like this

and is easy to copy to a text editor See How to use the forum

...R

Robin2:
I am not familiar with that motor shield. Please post a link to its documentation.

You have not told us what motor power supply you are using.

Link to its documentation:

The uno use usb and connect to the computer, the l293d have external power of 6v(4 * AA batteries).

holdingpattern:
... mean that if M1-A reads a positive voltage to ground for (FORWARD), you're not getting a similar positive voltage on M1-B for (BACKWARD)?

Exactly !

FORWARD supposed to be like M1-A = 5v, M1-B = 0v. For BACKWARD is the upside.

yoavbenita:
Link to its documentation:

Thanks. It's a pity they don't explain how to use the shield directly without the AFMotor library. I much prefer to do initial tests without the complication of a library.

...R

holdingpattern:
And presumably you tested all 4x sets of output and got the same result?

What happens if you ask for only full speed in each direction, not the ramping?

I tried to run each one individually, directly at maximum speed and still the same problem for everyone.

Robin2:
Thanks. It's a pity they don't explain how to use the shield directly without the AFMotor library. I much prefer to do initial tests without the complication of a library.

...R

What kind of tests?
If i use (for example) M1-A and GND, it works fine but without reverse.

holdingpattern:
I think Robin2 means the same tests you're doing, but directly driving the pins with analogWrite() and not rely on the library as middleman.

I'm sorry but I have no idea how to do that.
If you can help me in that I'm really appreciate that.

Still we have no idea what motors you have - this is basic information we absolutely need. For all I know
you've grossly overloaded the shield and burnt it out.

I suspect the shield that you have is a clone of this discontinued Adafruit Motor Stepper Servo Shield V1.2 and the Adafruit schematic is here.

...R

This sounds like a school project. It would help if you posted a real schematic, not the frizzy thing. Besides updating your knowledge on electronics you might start by defining the problem with specifications including a flow chart, schematic, power requirements, and EMI requirements if any. Define what the expected outcome needs to be. Purchase the Arduino cookbook and read it, this will give you some basics. also use the online tutorials and videos available, there are many good ones on this web site. At this point you will be able to define the problem and may have already solved it. If you do all of this the professor will be happy with you. I believe the basis for this assignment is for you to learn several things, copying and not understanding will hurt you in the long run. Future assignments will probably be based partly on what you learn in this one.