R3gyT:
Hi,
I recently bought quite powerful stepper motor 57STH56-2804 http://www.snasda.com/doc/57STH.pdf (2.8A, 2.5V)
Unfortunately, you can't use the L298 to drive that stepper, which you would know had you read the datasheet for the L298 closely. Note that in the table called "Electrical Characteristics" (page 3), it states that VS (supply voltage to the outputs) must be a minimum of VIH (input pin HIGH voltage - ie, 5 volts in the case of the Arduino) plus 2.5 volts; note that it also says that the input pin HIGH voltage minimum can be 2.3 volts - so the minimum supply voltage, at best, for the outputs is 4.8 volts - almost twice what your stepper is spec'd for. If you were using a "standard" Arduino, the minimum you could supply to those pins would be 3.3 volts, so your supply could only be at minimum 5.8 volts (over twice what your stepper is spec'd for), and if you were using a standard 5V Arduino - then it'd be 7.5 volts (3 times the spec of the motor).
You'll need either a different h-bridge, or a different motor, or both.
R3gyT:
I decided for this one because I intend to use its high torque. However I am new in this "hardware things" and I would be really thankful for some help.
I will indulge your questions here a little, but there are also a few things I'd like to point out about the L298 as well:
- It does not have a standard pin spacing profile - it -will not- plug into a standard 0.1" grid (breadboard or otherwise)
- To get anywhere near its rated current output, you need a fairly beefy heatsink - Multiwatt15 heatsinks, for some reason, aren't easy to source; then again, you could just bolt it onto a chunk of aluminum and be OK, though something finned would be better
- The L298 does have over-temperature protection, which is related to current consumption - but it isn't the same as controlling the current
- Note that you -need- the flyback diodes as noted in the L298 datasheet; they aren't internal to the IC (like some variants of the L293) - also, they must be fast switching shottky-type diodes (once again, the datasheet will guide you) rated for the voltage and current expected - don't just drop any diode on there
Regarding item 1 above - check out these adapters: http://www.jrhackett.net/L298adapter.shtml
I have no affiliation with this guy - I'm just a happy customer. Also if you wanted to build a complete driver board (and had the extra parts) he also sells the following: http://www.jrhackett.net/L298brdInfo.shtml
Cheaper than most Chinese Ebay offerings, if you already have the parts (and don't mind the assembly time).
R3gyT:
I found out, that it should be possible to use two L298 drivers, one for each coil, if I use paralled configuration (See Fig.7 http://www.gme.cz/_dokumentace/dokumenty/332/332-005/dsh.332-005.1.pdf) because this way L298 should allow me to get up to 3A.
Here comes my first question. Will L298 limit the current on its own, or do I have to care about it, to not burn it?
As I noted above, the L298 has over-temperature protection, but that is mainly for protection of the L298 - not of the motor. To protect the motor, you need to protect it from what the L298 can provide (up to 4 amps, though in reality, 3.5 amps is about the limit).
R3gyT:
I expect the answer to be that I have to care, so how can I limit the current? I want to power the motor from battery, so I care about power consumption and if I put a resistor in the circuit, I will get huge amount of energy losing to heat. Better solution might be MOSFET ahead of the L298, so I could limit the current a bit more with arduino, when I don't need full torque, but still lot of energy lost on MOSFET. So any other ideas to limit the current and not waste so much energy?
Well, you could use what the L298 datasheet recommends, which is the L6506 Current Controller (see page 9); if you wanted to "emulate" the L6506, you would do so (with the Arduino or another microcontroller) by monitoring the Rsense resistors (separate resistors you supply - pay attention to the L298 datasheet for values and ratings) for each of the bridges in the L298 voltage levels, then using PWM on the coil output pins to limit the current (note pages 3-4 of the L6506 ST datasheet gives a lot of information on this process). This is called a "chopper drive". Note that to do this properly, you're probably going to need more test equipment (oscilloscope at minimum, but probably also some temperature probes, maybe a frequency counter, etc); however, you can probably get "close enuf" without investing a ton of money in tools.
R3gyT:
Also about the steppers, I'd like to be sure that I understand correctly, how it works:
Rated voltage is a minimum voltage the motor needs to work and if i give him higher voltage, current will get faster to the coils and it'll be able to achieve higher speeds, right? But, if I constantly give 2A, there will still be just about 1.8V on my 57STH56 and rest of voltage would be lost somewhere in L298 probably, so what am I missing?
Current 2.8A in specs is maximum current I can use and get maximum torque, if I give it less current, I'll get less torque, if i give more than 2.8A, I'll break the motor?
Pretty much - but given that you can't use the L298, it's all a moot point. However, that said, I hope the above helps you (or others) if you do have a project in which the L298 would be more ideal (also, note that I mentioned above something about the L293 - it won't work for your purpose, either, because it doesn't have the rated current, and has similar voltage limitations, with a minimum of 4.5 volts on the supply).