The L297 integrates all the control circuitry required to control bipolar and unipolar stepper motors. Used with a dual bridge driver such as the L298N forms a.
Stepper Motor controller L298 L297 Stepper Motor Driver using L298 and L297 For additional stepper motor drivers see the Links below. Click the image to enlarge Introduction This Stepper motor controller uses the and driver combination; it can be used as stand alone or controlled by microcontroller. It is designed to accept step pulses at up to 25,000 per second. An on-board step pulse generator can be used if desired (40-650 pps range).
Single supply operation is standard All eight inputs are pulled up to +5V by RP1 (4.7K) and are buffered by 74HC244. The output driver is capable of driving up to 2Amp into each phase of a two-phase bipolar step motor. The motor winding current is limited by means of a 35KHZ-chopper scheme. The potentiometer (R6) is for varying the winding currents. The nature of the chopping scheme eliminates the need for external current limiting resistors on the motor windings; this simplifies connections and increases efficiency. A useful of this design is the 'idle' current reduction mode.
![L298 driver board L298 driver board](http://www.wzmicro.com/l298drv.jpg)
The amount of reduction is fixed at approximately 50% from whatever the running current is set at. Similarly, the motor current can be commanded to shut entirely off. The internal +5V voltages required for operation are derived from the stepper motor supply. The motor supply voltages should be at least 9V, but must never exceed 32V.
J3 Pin Functions Step pulse (J3-2) Increments the motor step counts in the selected direction by one step or haft step. The increment is triggered on the negative edge of the input pulse. CW/CCW (J3-3) A logic high on the input selects step advances to be made in the clockwise direction, If it is logic low, step advances will be make in counter clockwise direction Half/Full (J3-4) The input can select between 3 operation modes. When left disconnected or driven high, the half step mode is selected.
When brought low, this line select the full step or wavedrive modes. The selection between these modes is determined by the time of the transition (more detail later) Home (J3-5) When this line is low, the controller is reset to a know 'Home' state Run/Idle (J3-6) A logic high on this input allow full current operation (As set by R6 control), A logic low reduces the winding current to approximately 50% of the normal 'Run' setpoint current.
This ratio is fixed by R4 & R5 On/Off (J3-7) A logic high on this input allows current to be applied to the motor windings, A logic low disables the output driver Clock out (J3-8) The output clock pulse, It is variable from 40-650pps. Home output (J3-9) A high on this pin indicates the controller is in the 'Home' state Step Pulse Specification The minimum Step pulse width is 1usec, and can remain low indefinitely if needed. It must be high for at least 1usec between pulses, and may not repeat more than 25,000 times per second. Current Reduction This Stepper motor driver design has the ability to reduce the current supplied to the stepper motor windings by about 50% upon command. When the J3-6 line is brought low, the current regulating chopper logic is set to 50% of the normally set current level. It is not recommended to run the stepping motions at this low current.
Further it is advisable to allow the stepper motor to remain at full current for at least 0.2 sec past the completion of a motion. The reason for this is that the mechanical system attached to the motor will have some amount of inertia, If the current is reduced too soon, the motor may overrun the position it was commanded to go. Stepper Motor Drive Mode To select the three available motor drive modes, the following sequences are used: Half Step Drive J3-4 to a TTL high, no further action is required. Full Step Pulse the J3-5 low for at least 5usec and the bring J3-4 low Wavedrive Pulse the J3-5 low for at least 5usec, then with J3-4 High, pulse J3-2 low for at least 5usec then bring J3-4 low.
FullStep Mode The fullstep mode sequences the motor phase in the following manner: A B - + + + + -The full step mode provides the maximum low speed torque because two windings are always energized. It is also provides the largest amount of rotation per step pulse. It will always be the noisiest acoustically, and has the highest mechanical torque ripple. HalfStep Mode The halfstep mode sequences the motor phases in the following manner: A B - + off + + + + off + - off -off The half step mode normally provides the smoothest mode of operation. It is also provides the smallest amount of rotation per step pulse. Its principle advantage is a much higher resistance to mechanical motor and system resonance.
Mostly for this reason, higher motor angular rotation speeds are usually possible with the halfstep mode. Wavedrive Mode The wavedrive mode is a variation on the full step mode which exhibits the following phase pattern: A B - off + off off - off - The wavedrive provides the lowest power consumption of any of the three modes. One phase is always on, but never more than one. The step angle per step pulse is the same as the full step mode, but less low-speed torque available. There is an important advantage to this mode concerning step angle accuracy. Here is a good information on you might want to read. Stepper Motor driver data sheets: data sheet data sheet For additional information and resources on stepper motor drivers see the Links below.
If you need help to build or have hard time to find the parts for this project, please feel free to email us at All of the parts can be purchased from us. Back to Projects Page View other projects:. View CCD Camera / Module Send mail to with questions or comments about this web site.
I am currently building a stepper motor circuit for a small robot. The circuit consist of the L297 and SLA7024M motor driver.
I have now constructed two of these and both seems to have some issues. I intend on driving both in half step mode, but I have tried both for testing purposes. For both circuits it seems like the L297 works as it should, as I have looked at the outputs on a oscilloscope, and the sequence match what I want. I have never worked with steppers before so not sure what to expect, but I think something is wrong here. In both cases I used a 1ohm 2.5W resistor as current sensing resistor, and used a potentiometer to limit the Vref to 0.5V.
From the datasheet this sould result in a Iout of 0.5A. Circuit 1: The motor spins slow and steady at 50Hz, but as I increase the frequency (100-700Hz) the motor starts twitcing in the same spot. At high frequencies(1kHz) the motor runs fine but the speed is a little higher then I need. Also as the frequency is increased the the motor randomly change direction. I use an arduino with a simple code I found online, the arduino is controling the pulse(speed), direction(cw/cww) and enable pins of the L297. The half/full is connected to the 5V bus which will set it in half step mode (it also work on full step). Circuit 2: This circuit really buggs me, it was working fine at one moment, but now it seems that the circuit don't supply the motor from the high voltage line.
The motor rotate at 50Hz but only pulls about 0.05A. If I increase the frequency the speed goes up, but not nearly as fast as the other one. Obviously because it dosent get enough current.
So I'm wondering if the IC might be destroyd? I would think it would be wierd since I have used a bench supply and never alowed more then 1.5 A. I have trippled checked all connection and they all seem fine. Here's the links to the datasheets. Motor: RS 440-420 5V, 0.5A Unipolar Stepper L297: SLA7024M: I also have some questions regarding the datasheets.
L297: It is stated that the minimum clock time is 0.5us, is this really the clock signal? Wouldnt that be 2MHz? The motors run at 50-2000Hz but over that the motor stops and get very warm. Some other information This chip is a nightmare to work with as the pin layout does not match up with standard protoboards or veroboards. My solution was to solder a piece of wire to each pin which I then soldered to the verobord. The IC is literally two of the same circuit to drive each phase of the motor. The datasheet provides a circuit diagram on how to connect it.
The changes I have made is to use a 1Ohm resistor for Rs and a potentiometer for R2. I have meassured the pins and they show a 0.5V on Vref, which should be right.
Hope someone can help me! Please let me know if I left something out.
Stepper motors have some nasty pitfalls for the unwary. Careful system design is required to get good performance out of them, not as simple as they seem.
The first problem is most likely mechanical resonance, at certain speeds the stepping energy is dissipated in torsional vibrations at the resonant frequency of the rotor, this causes the motor to lose torque and stall. The solution is to avoid this resonant frequency by accelerating through it rapidly, this can prevent the resonance from building up and stalling the motor. You need a really smooth input pulse train to accomplish this acceleration, any jumps or jerks in the pulse train can cause the motor to stall. For best performance, the acceleration curve needs to be tuned to the motor and load.
Also be aware that the dynamics of the drive train can be important too- gear backlash can cause serious problems with noise and vibration. The inherent inductance of the motor limits the rate that the coil current can rise when switching from one winding to another, this limits torque at higher speeds. Driving the motor from a higher supply voltage will increase the high speed torque via more rapid current build up when switching. Commercial stepper drives often use high voltages to get the coil current up as fast as possible. Please provide a schematic showing the connections. Are you driving from an MPU, or just a bunch of switches? If you are sensing the coil current and doing a PWM, you can drive each coil from a higher voltage.
I've heard at least a factor of 2 over the motor rating, but the higher, the better. Torque come from coil current - not voltage. If you are not sensing current, and just driving from a voltage supply, you cannot simply raise the voltage, but you need to ensure you do not exceed current ratings and thermal ratings. I've seen stepper motors get pretty warm. Thank you all so much for your replies.
I will try to answer all of you in this post. I have acctually got both circuits working today. In the first case I am guessing it had something to do with resonant frequencies which I have was told about, and this effect was reduced when I held the motor tighter. In the other case I found that it was some bad connections on the protoboard. Once it was soldered onto a veroboard it was working perfectly.
Once both was working I made some simple functions to output 400 pulses at different frequencies which was to check that it did one revolution(I'm running at half step). This seemed to work, but still need to test more once I have the robot assembled which will put more load on the wheels.
I did however find a new problem where when using a mbed for the pulse signal the gonal amplitude was heavly reduced when the L297 was powered on, this caused the high pulse to be so low that the L297 did not requgnise it as an high pulse(. The driver circuit should control the current in the coils to a safe level, the drive voltage can be very high, limited only by the semiconductors in the driver and the insulation breakdown rating of the motor. Motor nameplate voltages are rated at DC, you wont get much performance out of a motor at that voltage. Stepper motors are a terrible choice for a battery powered project, they consume the same power even when stationary, producing zero mechanical output. One trick is to include a switch that drops the coil current down while the motor is not turning, this can save significant power.