Features Of L297 With L298
I have been investigating stepper motor control for the last couple of months. I've been looking at lots of different solutions and right now I think that using the l297 chip is probably the best balance of features, price and useability. First, here is what I have found about this chip that might be useful for others interested in stepper control. Some useful docs.
- This is my first attempt to build a stepper motor driver for my homemade CNC. It uses the driver IC L297 and the Bridge L298, I will make some changes in the near future, it was not that easy.
- The L298 is an integrated monolithic circuit in a 15-lead Multiwatt and PowerSO20 packages. It is a high voltage, high current dual full-bridge driver designed to accept standard TTL logic levels and drive inductive loads such as relays, solenoids, DC and stepping motors.
STmicroelectronics l297 notes. STmicroelectronics l297 datasheet. My understanding and brief summary. The l297 can create the control signals for bipolar, unipolar and variable reluctance stepper motors. In all cases, you can digitally select full stepping, half stepping and wave stepping modes. The motor takes one step for each pulse sent from the arduino board.
Direction is decided by taking a pin HIGH or LOW. The l297 has another important feature. It includes two PWM chopper circuits to regulate the current in the motor windings. What does that mean??
Well, i found this page. It's a nice and easy going explanation on stepper motors in general and it includes this bit on chopper control of steppers. 'To increase the torque at higher speeds, stepper motors are driven at several times their voltage rating.
A designer might use 5 volt steppers and then run them at 12 or 14 volts. To avoid destroying the motors, the current through the windings is monitored and power is cut off when the current reaches a critical level. When it falls back down, the power is reapplied.
Thus, use 2A as the 'protection' in your design (note: this 'protection' is then only used to protect the L298 driver - if the motor has a lower maximum current then you should design for that limit). BTW: It is the L297 which limits the current (by the chopping mechanism), based on the sensed voltage and Vref.
This technique is known as 'chopper drive' and it allows the motor to increase its top speed.' So that kinda explains the functions of the chip. I don't yet understand how to implement the chopper drive properly. Also, I have not yet tried any circuits!! But from reading and researching, I believe the following to be true. If you don't want the chopper drive.
If you want to control a bipolar stepper, you can use the l297 with the l293. If you want to control a unipolar stepper, you can use the l297 with the L702B or any darlington transistor array. I'm not sure if you would need a buffer.
If you do want the chopper drive. If you want to control a bipolar stepper, you can use the l297 with the l298. If you want to control a unipolar stepper, you can use the l297 with the ULN2075B In all cases, you will need a few extra components to complete the circuit. So, now I have some questions for you! Does anybody have any experience using the chip?? Or any good circuit designs for using it?? The chip has an input Vref.
This is used for giving the reference voltage for controlling the Chopper circuit. Can anybody explain how to connect up this pin?? I would like to compile circuit designs using the l297 to control bipolar and unipolar steppers, with and without chopper control. I want to find the easiest possible solution for each circuit. Please post if you already have a good solution for one of these circuits. I will now start trying some circuits, i'll post when I get one working. Maybe I made some mistakes above.
Please correct me! I'm just a beginner still! Hi I made some stepper motor drivers with the L297 and L298 five years ago, and they still work great! The schematic for it is on page one of the L297/298 datasheet: Here is what I recall from building them: - the L297 will give you three-pin control of the motor: on/off, direction and step.
The L298 takes care of the power circuitry. I hooked some quite large steppers up to it and it never failed. Almost indestructible. Use a heatsink for the L298. I put the whole circuit in a Hammond 1590B box, and the box acts as a heatsink. Use an onboard regulator (7805) to provide nice clean power to the L297, and lots of bypass capacitors.
I recall that while there were a lot of settings, as you mention above, they mostly weren't critical. I just put a trimpot on for Vref etc, and tuned it so that it worked well. Be sure to use some nice Schottky diodes on the motor leads to suppress transients, which are quite large on a good-sized stepper motor. I think OnSemi will still send you a few dozen or so free diodes as samples, but you have to pay shipping now it seems: good luck!
Thanks Daniel! You keep coming to my rescue I am planning to try the schematic on the l297 datasheet. I'm glad to hear that this one worked well for you! I have a few questions about it. As i am planning to control the l297 from the arduino board, can i just use 5V output from that to power the l297 or do you suggest an external power supply using the 7805?? In the schematic there is a.33 capacitor and 22K resistor connected to the 'osc' pin.
Features Of L297 With L298 X
What is their purpose?? I'm new to electronics.
I will investigate tonight, but perhaps you can explain. What is a trimpot and how do i connect it to the vref pin?? How do I know when it is adjusted right?? Am i right that the l297/l298 setup is for bipolar steppers only??
If so, have you tried some other setup using the l297 with unipolar steppers?? If you can answer any of these questions, I would be very grateful! Thanks / Jonathan. Hi jonathan 1.
The 5v cominoug from arduino when connected to the USB are supplied from the computer. This means that if you overload it you risk damaging the computer (altough it's a very remote risk) Whenever you plan to power anything bigger than a couple of LED use an external power supply. Anyway motors (unless tiny) should not be powered from the regulated 5V supply but should use the unregulated voltage supplied to the board (this usually floats between 7.5 and 9v) 2.
Going from memory the OSC pin determines the PWM frequency used to drive the motors. If you change those values you change the pwm freq. A trimpot is a potentiometre that can be adjusted with a screwdriver. Connect one end of the trimpot to 5v, the other end to ground and the pin in the middle to vref.
Tweak until the motor runs smoothly 4. You can use it with unipolars. You'll have to hook up the motor in a different way. (look here for details) you can drive the 298 directly from arduino if you dont need any of the sofisticated features it has.
For simple circuits a nice L293D (D not E or B) has power drivers and diodes integrated. You can see a circuit here massimo. I'm getting closer to actually trying to build this thing! Just a few more questions. I'm gonna start with this circuit. I have a few simple questions.
Daniel - you recommended a 12V/2A power supply. I can only find basic AC adapters at maximum 1.2A. Could you give me a link to one like you recommend?? - I just didn't look properly - Forget this stupid question!
Features Of L297 With L298 Light
The diagram suggests using the L6210 which is a '2 schottky bridge motor controller'. This seems to be discontinued.
Would you recommend another IC or is it cheaper to use seperate diodes?? Daniel suggested Schottky diodes. Can you give me a part number??
I have found so many different diodes. I don't understand how to select the appropriate one. Also, maybe I'm confused, but I was thinking, can I use the l293d instead of the L6210?? Daniel - you wrote 'Use an onboard regulator (7805) to provide nice clean power to the L297, and lots of bypass capacitors'.
Does this mean that I need to use some capacitors with the 7805 or are they included inside the 7805?? If i do need to use the 7805 with some external capacitors, how do I wire it up??
Very simple one. Does 'Rs1Rs2=0.5ohms' mean that both resistors should equal 0.5 Ohms or that the total resistance of Rs1 and Rs2 should equal 0.5ohms?? Thanks for helping out a slow learning electronics geek wanabe! Hi Jonathon, in terms of the power supply current, the bigger the better, but of course this all depends on the size of motor(s) you will use.
Features Of L297 With L298 Hair
Forget the 'IC Bridge' diodes. Just use discrete ones. In the diagram they call them 'fast diodes' which is synonymous with Schottky diodes. Try one of these Digikey part numbers, it's not very critical: SR305DICT-ND or SR306DICT-ND. Basically any Schottky diode with a 50V voltage rating and a 2 or 3 amp current rating will do the trick. The bigger the motor, the bigger the power supply.
If you can solder SMT parts, then you can get a package with all the diodes in it, see 'Schottky barrier diode arrays' in the curent Digikey catalog. For the regulator you need the old standby circuit for the 7805. See the diagram here: which is part of an excellent explanation of motor controls done by ITP at NYU: Throw in a few extra 100uF capacitors on both sides of the regulator, just to be safe. In my stepper driver, I used.47ohm power resistors for RS1 and RS2. They are there to sense the current flow int he motor windings. Two one-ohm 1/2 watt resistors in parallel for each one will do the trick. Sounds like you aren't an electronics newbie anymore, you're doing great!
Daniel - 'Throw in a few extra 100uF capacitors on both sides of the regulator, just to be safe.' (which reminds me. What apps do you use for your schematics and PCBs?? I found tinyCAD and freePCB - Should I try something else?? Now back to the topic.) What I don't understand is.
What is the point of the 5V / 9V Power output pins on the Arduino board?? If i remember correctly, when arduino is powered by an external supply (ie not USB), the 9V pin actually outputs the same voltage as the supply voltage. So, if I run arduino on a 12V power supply, don't I get the clean 5V and unregulated 12V that i need? Hello jonathan For schematic diagrams I recommend Eagle Cad. You can find it on.
There is a free edition that works up to 100mm x 80mm of pcb (on the schematic side there are virtually no limitations) When I need to make beautiful schematic diagrams I use eagle, export into EPS and open it in illustrator. Do a select all, change the font to a nice one and I get a print ready schematic. BTW Arduino is designed always on Eagle. Going back to your circuit.
What you need around a 7805 is just 2 capacitors per side. 100n to clean up higher frequency noise and an electrolitic capacitor of 100uF or more that is used for compensating voltage fluctuactions. When your motor starts there is a power surge and the voltage generally drops. The large capacitors compensate for this by releasing the 'energy' they have 'stored'. Jonathon: I think Massimo is in Sweden and I am in Canada, near the pacific, so here is part two of your international answer! In terms of the 12V motor supply and the clean 5v supply, the answer lies with the motor.
When a stepper motor turns on, it draws large amounts of current into its windings. A small motor could draw 10 amps for a few milliseconds, for example. These large current draws make the supply voltage drop, unless your power supply can handle it. Supply voltage drops are bad news for microprocessors! This is why the two supplies are always best spearated: never run any inductive load from the same supply as the microprocessor.
You are asking for unpredictable trouble if you do. Another reason for separating the supplies is to prevent noise from getting back into the microprocessor. Motors and inductors put out a large voltage spike when their fields collapse, and you don't want this to get back into the microprocessor supply, so you use a separate supply. The general rules are: - try not to drive anything with an arduino pin that draws more than a few milliamps- say 10ma or so. try not to drive large loads that source their current from the arduino's regulator, as this might interfere with the stability of the Atmega8's power supplies.never drive an inductive load that sources it's current from the processor power supply!
Use a separate supply. Hope this helps! Daniel PS: the larger the filter cap on the motor side of the regulator, the better: there really isn't a limit, but in practice anything up to 470uF on the 12V side would be reasonable. You can add as much as you want. Well, I've certainly been finding both of your advice very helpful! So i would second that motion! I'm planning to breadboard the circuit very soon, so I will post some pictures of that, and the final schematic that I use.
After this, I intend to make a circuit using the l297 and the ULN2075B to control a unipolar stepper. Also I have a nice working circuit that uses a TTL 74194 shift counter as the transalator.
I'll post some picures of that too (under a different topic). I'm interested to compile a group of circuits to control both unipolar and bipolar steppers, that offer a range of price vs functionality options. Just for the record.
Jonathan is in London, the capital of rain and tea! (and i changed my user name to 'flat stanley' for those who remember my 'little accident' just after the London workshop!).