L298 not working

I have an L298 like this one:
http://www.roboticapy.com/tienda/images/l298_pl.jpg

I can’t make it work, i’ve connected in this way

http://img828.imageshack.us/img828/32/arduinol298.jpg

but without the battery, instead i’ve connected the pin 1 (Current sensing) to the GND of the arduino, and pin 4 (Supply voltage) to 5v of the arduino

Please Help. Thanks

My first instinct is to say "Are you nuts ?" but I will refrain from that and simply ask you:
1-Have you read the datasheet for the L298 ?
2-What motor are you trying to run (post a link) ?
3- You cannot use the arduino 5V to power you motor. That's never going to work for several reasons, none of which you would understand yet if you tried that.
4- You need a battery or power supply. I cannot recommend anything without more info about your motor.

I've read the datasheet, the motor that I am trying to drive is not that big, in fact, that same motor i've made it work before but with an L293D or SN754410

I want to use the L298 because I want more voltage (12v) I've connected to 5v of the arduino just for testing, because that motor WORKS WITH 5v

I've tried to use the SN754410 or L293D with 12v but they get hot

It is an old epson printer motor, not an stepper

Post the code you are using.
Do you a DMM to measure the 5V when you try to run the motor from the arduino ?
Do you know the maximum current the arduino can supply at 5V ?
Are you going to post the link or datasheet for the motor you are using ?
What is the current rating of that motor ?
Post a photo of the motor.

Before I answer all the things you asked, why don't you just tell me how would you connect it?

The motor that i'm using is the rs-385ph-14180
http://www.mabuchi-motor.co.jp/cgi-bin/catalog/e_catalog.cgi?CAT_ID=rs_385ph

I don't have a dmm here

You asked me to post the code, but I think is not a code problem, because, like I said before, I've made it work perfectly, but with the L293D and SN754410 (both of them)

The motor is rated for 12-30V /0.070 A /2.35A Stall current.

You posted this comment:

but without the battery, instead i've connected the pin 1 (Current sensing) to the GND of the arduino, and pin 4 (Supply voltage) to 5v of the arduino

which means you have L298-4 connected to 5V.

In short , you're trying to run a 12V motor off of 5V. You claim you did this before. If your wiring is correct, and the code is not the problem, what do you suppose the problem is ?
All we have to go on is the L298 datasheet and the motor datasheet. You say you don't have a meter to what can you tell us about what happens when you try to run this motor off an arduino 5V regulator ?
What is the power source for the arduino ?

but without the battery, instead i've connected the pin 1 (Current sensing) to the GND of the arduino, and pin 4 (Supply voltage) to 5v of the arduino

And which motor OUTPUT are you using ? (A or B ?)

A schematic is much more useful in trying to figure out what you have connected to what.

I did a quick search for "L298 dc motor arduino" and this is one of the schematics I found.

From this page:

but without the battery, instead i've connected the pin 1 (Current sensing) to the GND of the arduino, and pin 4 (Supply voltage) to 5v of the arduino

The L298 integrates two power output stages (A ; B). The power output stage is a bridge configuration and its outputs can drive an inductive load in common or differential mode, depending on the state of the inputs. The current that flows through the load comes out from the bridge at the sense output : an external resistor (RSA ; RSB .) allows to detect the intensity of this current.

I can't make it work, i've connected in this way

You don't have a meter so you can't tell us the coil resistance of the motor or the voltage across the motor.
You don't have a current sense resistor so you can't tell us the current through the motor. How exactly do you expect us to help you with practically no information about your circuit. Have you posted a photo of your circuit so we can check your wiring ?
What do you expect us to do ? We're not psychic. Go buy a meter and post the voltage (if any across the motor, on the 5V pin, and across the sense resistor that you're going to buy. Otherwise, about the only thing I can say is good luck.

but without the battery, instead i've connected the pin 1 (Current sensing) to the GND of the arduino, and pin 4 (Supply voltage) to 5v of the arduino

With that, you are asking the Arduino's on-board 5V supply to run your motor, which it will never do. If you want to get rid of the battery, get a separate power supply and connect it like you have the battery connected. Be sure to include another ground (-) connection between that external supply and the Arduino.

From your sketch it appears you have it connected correctly. It's probably OK to ask the Arduino to supply the 5V for the logic section which is what you have done with your circuit that has the battery. The L298's maximum quiescent current is 36mA and until you start running, that's the most you will draw.

How many times do I have to say this, THE MOTOR FUNCTIONS WITH 5V, maybe it is not the recommended voltage but for testing purpose, wich is what I want, it functions, LIKE I SAID BEFORE, I made it work with the L293D and SN754410 and when I try to connect it in the EXACTLY SAME WAY but with the L298 it doesn't work

I also try to make it work manually with a 9v battery, by manually I mean, that I put the L298 in the breadboard, then I connect everything but without the Arduino, and I connect the two inputs from the L298 to the battery, one of them to the positive, and the other to the negative, by changing this manually, I should be able to make the motor spin to a side or another,
for logic supply I also use the battery

When I was learning how to use the L293 and the SN754410, I made this manual test and it works

The motor may well function at 5V, but you won’t be getting 5V at the motor from an L298, that is an absolute fact.

From my memory, the L298 loses just under 2V as a minimum, so the best you’re going to get at the motor is just over 3V. As soon as any current is drawn, the L298 loses another 2-3V. Starting a motor is one of the times current is high, so that’s when the volts disappear, and the motor won’t turn.

As I say I’m going from memory, but the L298 can lose just under 5V, so it’s actually likely edit: possible you’re getting almost zilch at the motor. The chip itself has that built-in heat sink as in your link: usually that’s attached to a huge lump of metal to dissipate all that wasted energy.

If you want 5V at the motor, you’ll need at least 7V to the L298, probably 9v in fact.

Ps… your thread title is wrong: I’ll bet the L298 is working exactly as advertised, ie throwing away most of your energy.

edit… pps: I just remembered I had a pic of hooking a 298 to Arduino, see attached. (Arduino pins probably not the same.)

and yet another edit, attached extract from datasheet showing min drop is 1.8 and it goes to 4.9.

L298 drop v2.png

Maybe it's time you posted a photo of your circuit wiring so we can see how you have it connected.

raschemmel:
Maybe it's time you posted a photo of your circuit wiring so we can see how you have it connected.

Yeah, since the first post talks of Arduino 5V to L298 pin 4 which is the motor power and crazy.

But the pic in the first post shows a 6V battery on pin 4 (better, but still low given the 2-5V drop in a 298) and Arduino 5V to L298 pin 9 which is the logic supply and is ok.

giovaelpe:
I want to use the L298 because I want more voltage (12v) I've connected to 5v of the arduino just for testing, because that motor WORKS WITH 5v

Yes but its still the same volts supplying the arduino.

Very bad idea, it is quite possible the back emf from the motor could destroy your arduino.

giovaelpe:
I've tried to use the SN754410 or L293D with 12v but they get hot

What does that tell you ?

photos!!

In one of the photos, I’m showing you the motor, the Arduino and a SN754410, I’m powering the motor from the 5v of the Arduino and it works perfectly

In the other photo I’m doing the exact same connection, but with the L298 and a 9v battery, it doesn’t work

this is the code for both cases:

int pos = 9;
int neg = 10;

void setup(){
pinMode(pos, OUTPUT);
pinMode(neg, OUTPUT);
}

void loop(){
digitalWrite(pos, HIGH);
digitalWrite(neg, LOW);
delay(500);
digitalWrite(pos, LOW);
digitalWrite(neg, LOW);
delay(500);
digitalWrite(pos, LOW);
digitalWrite(neg, HIGH);
delay(500);
}

You guys are telling me that the L298 loses voltage, so, what do you recommend? 12V? 18v?

sn.jpg

l298.jpg

giovaelpe:
You guys are telling me that the L298 loses voltage

Well actually it's the manufacturer's datasheet that tells you....

edit... I can't make out the wiring in the 298 photo.

Post a wiring list with arduino pin numbers in the left column and all other connections in the right column.

Also, click modify and add comments for the two arduino outputs that says what L298 pin they are connected to.

Last but not least, post a list of possible causes of your problem in the order of probability as YOU believe it to be..
ie:
1- bad L298
2-arduino wired wrong
3-L298 wired wrong
4-motor connected to wrong pins
5- power connected wrong
6-Other (missing connection somewhere)

OK here is is what you requested

Connection:

Arduino pin 8 --> L298 pin 5 (input 1)
Arduino pin 9 --> L298 pin 7 (input 2)

L298 pin 1 (Current sensing A) ---> GND
L298 pin 2 y pin 3 (Output 1 and Output 2) ----> each one to a wire of the motor
L298 pin 4 (Supply Voltage Vs) ---> Battery 9V +
L298 pin 6 (Enable A) -----> 5v from Arduino
L298 pin 8 (GND) ------> GND of the Arduino and negative pole of the battery
L298 pin 9 (Logic supply Vss) ------> 5V from the Arduino

That's it!

The reasons that I suspect , as you requested

  1. Bad L298, I will try another one in a moment
  2. Bad L298 wiring, maybe I'm missing something
  3. Something that I don't know, lack of knowledge