L298N Dual Motor Controller (MOTOR CHANNEL B not working???)

Hello,

I bought a brand new L298N Dual Motor Controller.

For the start i followed this Tutorial (https://tronixlabs.com.au/news/tutorial-l298n-dual-motor-controller-module-2a-and-arduino/), wired everything up and ran the code.

I tried everything but I cannot get the second Motor Channel running.... :frowning:

When I connect Motor 2 to Channel 1 it works, so both Motors def work.
I tried to exchange all Cables, I tried different Pins on the Arduino.

At the moment I 100% have everything connected like in the tutorial.

How likely is it that one channel can break?

Please read the post "How to use this forum" and follow the directions.

Post your code, using code tags, and a clear, hand drawn wiring diagram (not Fritzing).

Is everything alright on the bottom?

Out 1+2 (working) look totally different than Out 3+4 (not working)

See reply #1.

I dont want you guys to check wiring or the code :wink: I did that in all detail by myself 50 times.

Im just asking what other issues it could be?

For example Shield Broken, Battery Not enough power for both, arduino micro issue etc…

But yeah here is the code:

// connect motor controller pins to Arduino digital pins
// motor one
int enA = 10;
int in1 = 9;
int in2 = 8;
// motor two
int enB = 5;
int in3 = 7;
int in4 = 6;

void setup()
{
  // set all the motor control pins to outputs
  pinMode(enA, OUTPUT);
  pinMode(enB, OUTPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  pinMode(in3, OUTPUT);
  pinMode(in4, OUTPUT);
}
void demoOne()
{
  // this function will run the motors in both directions at a fixed speed
  // turn on motor A
  digitalWrite(in1, HIGH);
  digitalWrite(in2, LOW);
  // set speed to 200 out of possible range 0~255
  analogWrite(enA, 200);
  // turn on motor B
  digitalWrite(in3, HIGH);
  digitalWrite(in4, LOW);
  // set speed to 200 out of possible range 0~255
  analogWrite(enB, 200);
  delay(2000);
  // now change motor directions
  digitalWrite(in1, LOW);
  digitalWrite(in2, HIGH);  
  digitalWrite(in3, LOW);
  digitalWrite(in4, HIGH); 
  delay(2000);
  // now turn off motors
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW);  
  digitalWrite(in3, LOW);
  digitalWrite(in4, LOW);
}

void loop()
{
  demoOne();
  delay(1000);
}

Prob'ly a dumb question, but does motor 1 work on channel 2? And did you try flipping motor wires (+ to - & - to +)?

Yep I flipped the motor and both motor work on Channel 1.

Also flipped + - even though I dont see how that could be the problem? ^^

Does motor 1 work on channel 2?