L298N trouble

Hi all,
I'm trying to control a DC motor using the L298N driver but am having troubles. Guide I'm using is here: http://myrobotlab.net/tutorial-control-stepper-motor-with-l298n-easy-way/

My L298N board has 2 pins for ENA and ENB and I can't seem to get it working-the tutorial only shows 1 pin for ENA and ENB...any ideas - here's a picture of my driver board: http://tinyurl.com/L298Npic

Difficult to tell from the pic with that watermark, but isn't that ENA just sunder the "6" next to the blue terminals, and ENB is far right. Can you take a better pic, straight down, so we can see the labels?

If not, it "might" be that the two ENA and ENB are joined together on the assumption that both motors would always be on or off together... unlikely though.

EDIT... what's that jumper on the ENB pin?- maybe that's ENA behind it, jumpered together?

Supplementary question: why are you using a 298? There are much nicer solutions around, which don't suffer such huge voltage drops and give off enough heat to cook a meal. I have a Pololu 2130, but there are loads of others.

donnot:
Hi all,
I'm trying to control a DC motor using the L298N driver but am having troubles. Guide I'm using is here: http://myrobotlab.net/tutorial-control-stepper-motor-with-l298n-easy-way/

My L298N board has 2 pins for ENA and ENB and I can't seem to get it working-the tutorial only shows 1 pin for ENA and ENB...any ideas - here's a picture of my driver board: http://tinyurl.com/L298Npic

  1. what is problem your getting, Whether motor is running or not.
  2. In code and picture clearly says that EA enable pin , IN1 and IN2 are direction pin. If you connected to Motor output side A . It must start working.
    3)You can put picture or block diagram how you connecting the Motor Here.

Here's an image of the board: Workbench

I bought the L293D (which hasn't arrived yet), and also got an L298n to experiment which arrived today.

EDIT: I connected the 1st pin of the ENA and ENB to where it was shown in the tutorial and the motor started flickering for a second then shut off. The orange light on the Arduino also started flickering quite fast.

donnot:
Here's an image of the board: http://i.cubeupload.com/ferCBy.jpg

I bought the L293D (which hasn't arrived yet), and also got an L298n to experiment which arrived today.

I wanted to see with motor connections. If you can put circuit diagram also fine indicating pins from arduino to drive and motor to drive.

I'm not really familiar with circuit diagrams but I've connected it as shown in the code in the tutorial. The only issue I'm facing is that there is an unnamed pin above the ENA and ENB which I have no idea what to do with.

int ENA=2; //Connect on Arduino, Pin 2
int IN1=3; //Connect on Arduino, Pin 3
int IN2=4; //Connect on Arduino, Pin 4
int ENB=5; //Connect on Arduino, Pin 5
int IN3=6; //Connect on Arduino, Pin 6
int IN4=7; //Connect on Arduino, Pin 7
 
void setup() {
 pinMode(ENA,OUTPUT);
 pinMode(ENB,OUTPUT);
 pinMode(IN1,OUTPUT);
 pinMode(IN2,OUTPUT);
 pinMode(IN3,OUTPUT);
 pinMode(IN4,OUTPUT);
 digitalWrite(ENA,HIGH);// Activer moteur A
 digitalWrite(ENB,HIGH);// Activer moteur B
}
void loop(){
 
 digitalWrite(IN1,LOW);
 digitalWrite(IN2,HIGH);
 digitalWrite(IN3,HIGH);
 digitalWrite(IN4,LOW);
 delay(10);
 digitalWrite(IN1,LOW);
 digitalWrite(IN2,HIGH);
 digitalWrite(IN3,LOW);
 digitalWrite(IN4,HIGH);
 delay(10);
 digitalWrite(IN1,HIGH);
 digitalWrite(IN2,LOW);
 digitalWrite(IN3,LOW);
 digitalWrite(IN4,HIGH);
 delay(10);
 digitalWrite(IN1,HIGH);
 digitalWrite(IN2,LOW);
 digitalWrite(IN3,HIGH);
 digitalWrite(IN4,LOW);
 delay(10);
}

donnot:
I'm not really familiar with circuit diagrams but I've connected it as shown in the code in the tutorial. The only issue I'm facing is that there is an unnamed pin above the ENA and ENB which I have no idea what to do with.

int ENA=2; //Connect on Arduino, Pin 2

int IN1=3; //Connect on Arduino, Pin 3
int IN2=4; //Connect on Arduino, Pin 4
int ENB=5; //Connect on Arduino, Pin 5
int IN3=6; //Connect on Arduino, Pin 6
int IN4=7; //Connect on Arduino, Pin 7

void setup() {
pinMode(ENA,OUTPUT);
pinMode(ENB,OUTPUT);
pinMode(IN1,OUTPUT);
pinMode(IN2,OUTPUT);
pinMode(IN3,OUTPUT);
pinMode(IN4,OUTPUT);
digitalWrite(ENA,HIGH);// Activer moteur A
digitalWrite(ENB,HIGH);// Activer moteur B
}
void loop(){

digitalWrite(IN1,LOW);
digitalWrite(IN2,HIGH);
digitalWrite(IN3,HIGH);
digitalWrite(IN4,LOW);
delay(10);
digitalWrite(IN1,LOW);
digitalWrite(IN2,HIGH);
digitalWrite(IN3,LOW);
digitalWrite(IN4,HIGH);
delay(10);
digitalWrite(IN1,HIGH);
digitalWrite(IN2,LOW);
digitalWrite(IN3,LOW);
digitalWrite(IN4,HIGH);
delay(10);
digitalWrite(IN1,HIGH);
digitalWrite(IN2,LOW);
digitalWrite(IN3,HIGH);
digitalWrite(IN4,LOW);
delay(10);
}

I have understood you have used above code.

  1. How much motor your using. what is voltage rating??
    2)How you are powering on Motor Driver , whether arduino and motor driver at same potential??
  2. Whether motor is running or not??

I've got a 9V battery connected to the 5v terminal on the shield (not sure how safe, should I connect to the 12V), and the arduino powered by USB. The motor isn't running

donnot:
I've got a 9V battery connected to the 5v terminal on the shield (not sure how safe, should I connect to the 12V), and the arduino powered by USB. The motor isn't running

I just asked what power input your given to motor drive . Before connecting motor Check @ out A and Out B whether your getting voltage given at output ,after uploading sketch.what is rated voltage of motor. If voltage below it i hope it doesn't work.

There is 0V at both out a and out b. The motor is rated at 3-6v

donnot:
There is 0V at both out a and out b. The motor is rated at 3-6v

I.e means motor will get voltage to run.In fig you showed make ensure that you connected 5v, gnd and Motor input(5v).Dont leave any of the pin empty.Then check voltage across the out A and out B.
change delay in the program from 10 to 1000.

There is still completely no voltage going through either of the motor terminals.

donnot:
There is still completely no voltage going through either of the motor terminals.

You upload the simple code

int ENA=2; //Connect on Arduino, Pin 2
int IN1=3; //Connect on Arduino, Pin 3
int IN2=4; //Connect on Arduino, Pin 4
int ENB=5; //Connect on Arduino, Pin 5
int IN3=6; //Connect on Arduino, Pin 6
int IN4=7; //Connect on Arduino, Pin 7

void setup() {
 pinMode(ENA,OUTPUT);
 pinMode(ENB,OUTPUT);
 pinMode(IN1,OUTPUT);
 pinMode(IN2,OUTPUT);
 pinMode(IN3,OUTPUT);
 pinMode(IN4,OUTPUT);
}
void loop(){
 
 digitalWrite(IN1,LOW);
 digitalWrite(IN2,HIGH);
 digitalWrite(IN3,HIGH);
 digitalWrite(IN4,LOW);
 digitalWrite(ENA,HIGH);
 digitalWrite(ENB,HIGH);
}

Can you add datasheet of motor Driver Here . SO i can post exact code.By that time you can try above code and check voltages.
I am thinking ur checking out A output terminal not w.r.t gnd.

I managed to fix it. The jumper connecting the ENA and ENB with the one above needed to remain connected so I added a wire to the jumper and voila! Thanks for the support though

donnot:
I managed to fix it. The jumper connecting the ENA and ENB with the one above needed to remain connected so I added a wire to the jumper and voila! Thanks for the support though

Thank you so much for this post. I was pulling my hair out because I couldn't get my motors to run and the output voltage was @.2 volts when I applied up to 18V of input. :frowning:

I read your post, put the jumper back on and shoved some jumper wires in between and voila, working motors. :smiley:

I don't understand why this answer was so hard to find. I'd think this would be a problem for a lot of people.

Thanks again.

P.S. - This info was so hard to find that I thought it might be beneficial to reply even if the post is dated.