Stepper Motor Driver (L297 + SLA7024M)

Discussion in 'General Electronics Chat' started by grumpiegoblin, Mar 15, 2016.

  1. grumpiegoblin

    Thread Starter New Member

    Mar 15, 2016
    Hi there!

    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



    I also have some questions regarding the datasheets.

    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.
  2. Sensacell

    Well-Known Member

    Jun 19, 2012
    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.
  3. shortbus

    AAC Fanatic!

    Sep 30, 2009
    Isn't that the biggest fault that people experience with steppers? Using the motors "name plate" values to try and run them. Can't remember off hand what the recommended value multiplier is but it is significantly higher than the 'name plate' value.
  4. shortbus

    AAC Fanatic!

    Sep 30, 2009
    How are you using these two drivers together? Aren't they both stepper drivers?
  5. mcasale


    Jul 18, 2011
    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.
  6. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    typically way more than 2x..
    Example.. I run a 4.2V 3A stepper from 24V all day long
    shortbus likes this.
  7. grumpiegoblin

    Thread Starter New Member

    Mar 15, 2016
    Hi guys!

    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(<2V). I went over the circuit a hundred times but could not find anything wrong. I then soldered up a new one (exactlly the same) and then it worked. I have no clue why it did this. I tried with an arduino and this worked . It did draw the current somewhat down, but the arduino output the signal with higher amplitude, which made it work.

    The motor name plate is 5V 0.5A and yes I am aware that the motor require segnifienatly more voltage to maintain the current/torque. In my case I have worked with between 12-24V. And yes the higher the voltage the better it will keep a high torque at high speeds. However for my application, a small robotic vehicle, I am not looking for a very high speed but rather good control at low speeds. Therefore I have to weigh the advantages of high voltage with disadvantages of high weight of battery. I am therefore looking for a good solution using 12-14V batteries.

    I am using the L297 to translate a single clock signal into the four phase signals in correct sequence required by the SLA7024. I could have the microprocessor do this but as it will have other tasks to do when driving I thought this would take some load of it. The L297 would require additional circuitry to run, which is explained in the datasheet where it is suggested to run it with the L298.

    The SLA7024 is used for current sensing. The datasheet provide the equation Iout=Vref/Rs. Rs beeing the current sensing resistor. In my case this is 1ohm. Which means I need 0.5V on Vref. Which I have. I don't have the schematic on hand as I never drew up one, but it is very similar to this circuit.
    the L297 is connected the exact same way(not utilizing some of its functions), but I connected up the SLA7024 according to the datasheet.

    Thank you all!
  8. Sensacell

    Well-Known Member

    Jun 19, 2012
    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.