Motor driver won't work for a 2 wheel drive

L298N Motor driver module is not seeming to work and i dont know why anymore.

int const ENB=13;
int const ENA=9;
int const In4=12;
int const In3=11;
int const In1=7;
int const In2=8;

void setup() {
  // put your setup code here, to run once:
pinMode(ENB,OUTPUT);
pinMode(In4,OUTPUT);
pinMode(In3,OUTPUT);
pinMode(ENA,OUTPUT);
pinMode(In2,OUTPUT);
pinMode(In1,OUTPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(In3,HIGH);
digitalWrite(In4,LOW);
digitalWrite(In1,HIGH);
digitalWrite(In2,LOW);
analogWrite(ENB,180);
analogWrite(ENA,180);
delay(1000);
digitalWrite(In4,HIGH);
digitalWrite(In3,LOW);
digitalWrite(In2,HIGH);
digitalWrite(In1,LOW);
analogWrite(ENA,180);
analogWrite(ENB,180);
delay(1000);
}

Pookiloo:
L298N Motor driver module is not seeming to work and i dont know why anymore.

You don't know why anymore? Did you know at one time? What has changed? Did the battery die?

Paul

I do not know why at all and i used a different board but broke BUT IT DID WORK. Its hooked up through the programming port plus a extra 3V of batt since my friend broke my other 5V pack and didn't replace it but its a secondary at the moment.

Pookiloo:
I do not know why at all and i used a different board but broke BUT IT DID WORK. Its hooked up through the programming port plus a extra 3V of batt since my friend broke my other 5V pack and didn't replace it but its a secondary at the moment.

Time to make a wiring diagram of what exactly you have and how you have it wired together. Can we guess your "programming port" is the computer's USB connection?

Paul

It is a USB. I appreciate your help but I would rather less sass. Sorry. I don't mind if your not meaning it but I'm asking for help so I know I am an idiot but I don't need someone else to treat me like that.

here you go

Schematic_motor_Sheet-1_20190107202818.pdf (30.9 KB)

Pookiloo:
It is a USB. I appreciate your help but I would rather less sass. Sorry. I don't mind if your not meaning it but I'm asking for help so I know I am an idiot but I don't need someone else to treat me like that.

When someone writes "driver module is not seeming to work and i dont know why anymore.". What am I to think?

If English is not your native language, then you are forgiven.

Paul

Nice schematic!

I see you are using the Arduino pin d13, which is used by the microcontroller to control the LED on the board. Can you puck another pin to use as the enable?

Paul

The motor supply Vs should be on pin 4; pin 9 is Vss the logic supply.

I'm sorry I put it on the 12V power supply. I thought on the module it said Vss cause I couldnt see it very well haha Also I changes the ENB pin to 6.

I can't open that new schematic.

int const ENB=6;
int const ENA=9;
int const In4=12;
int const In3=11;
int const In1=7;
int const In2=8;

void setup() {
  // put your setup code here, to run once:
pinMode(ENB,OUTPUT);
pinMode(In4,OUTPUT);
pinMode(In3,OUTPUT);
pinMode(ENA,OUTPUT);
pinMode(In2,OUTPUT);
pinMode(In1,OUTPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(In3,HIGH);
digitalWrite(In4,LOW);
digitalWrite(In1,HIGH);
digitalWrite(In2,LOW);
analogWrite(ENB,180);
analogWrite(ENA,180);
delay(1000);
digitalWrite(In4,HIGH);
digitalWrite(In3,LOW);
digitalWrite(In2,HIGH);
digitalWrite(In1,LOW);
analogWrite(ENA,180);
analogWrite(ENB,180);
delay(1000);
}

Also Im running a Ultrasonic Sensor on it so some ports are taken up (4).
Sorry it was just an image of the Motor driver cause im blind and so you knew what i was referring to

So to clarify then: does the L298 now have the motor supply Vs on pin4, and logic supply Vss on pin9?

To be honest im not sure what that is nor can i find it on the L298N board. I cant see all the labels and no where online it mentions those sorry.

I see now this thread is about an L298 module not a loose chip; I was going by your schematic in #5 which shows the loose chip.

So perhaps try again with the attachment on #9 and or provide a link to the actual module.

sorry man here is a link

'

Well that has a connection diagram for Arduino, and a sketch; what happens if you do it exactly like that?

(That's one of the better L298 module instructions I've seen; they are often quite shall we say, sparse.)

Show us a diagram of how you have it hooked up; in particular do you have the ground connected across from the module to the Arduino?

I dont have it hooked up across the ground i have it hook on a breadboard side bar but only the 2 connecting wires cause I dont have long enough wires since i have it on a chassis that but the ENB is now on 5 since I tried swapping it off of 13

Schematic_motor_Sheet-1_20190107202818.pdf (30.9 KB)

However you have it physically hooked up, with breadboard or whatever, do you or do you not have the equivalent of the wire I marked with the arrow?

I do its hooked to the secondary battery pack sorry