Stepper Motor Overdriving

Discussion in 'General Electronics Chat' started by prodigyaj, Dec 30, 2007.

  1. prodigyaj

    Thread Starter Active Member

    Dec 11, 2007
    48
    0
    I am using a Bipolar Motor Rated at 4.5V 1.2Amperes and coil resistance at 3.8Ohms at a standard step angle of 1.8 degree.
    I wish to overdrive the motors at 9.6V using L297 - L298 Driver Circuit.
    The circuit provided by L297/L298 data sheet as a reference I want to design the motor driver circuit. In this circuit the Sense Pins ( given in Datasheet as 0.5Ohms at 2W ) controls the current during overdriving.
    Can anyone tell me if for 9.6V what should be the value of sense pins ?
    Also please tell me everything regarding overdriving as well , also the hazardous in not giving a proper chopping circuit !
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Driving a motor beyond the recommended max voltage is generally a risky endeavour.

    Can you provide us with information on why you feel the need to overdrive the motor? Perhaps we can suggest a workaround that will eliminate the need to do so.

    hgmjr
     
  3. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    The higher voltage presents no problem, as long as you incorporate a limiting resistor to keep the current at 1.2 amps.
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    It would help to know which manufacturer's datasheet you are looking at.

    I am looking at a datasheet by ST Microelectronics, I'm looking at Figure 8 on page 8.

    It's showing Rs as being 0.5 Ohms, 2W, which is to drive motors up to 2A.
    It does not say explicitly how to calculate the sense resistor, which I find interesting.

    However, since that circuit is designed to drive motors up to 2A, and you wish to limit the current to 1.2A, you could calculate:
    Rsense = 2A / 1.2A x 0.5 Ohms
    Rsense = 0.8333 Ohms
    Note that this is the smallest value you can use without overstressing your stepper motors. You could go to 1 Ohm, and your current would be limited to 1 Ampere, and you would then need a resistor capable of handling 1 Watt. With the 0.8333 Ohm resistor, you will need a 1.2W resistor; but since they don't make a 1.2 W resistor, you'd have to use a 2W resistor, or a couple of 1W resistors in parallel.

    Since it's sometimes difficult to get fractional sizes like 0.8333 Ohms, you could use a 1 Ohm and a 5 Ohm resistor in parallel. However, if the resistors are actually measuring somewhat less than they're rated (which is common) then you'll allow too much current to flow through your motors. Instead, you could parallel a 1 Ohm with a 6 to 10 Ohm resistor. The 1 Ohm would need to be rated for 1W, but 5 to 7 Ohm in parallel could be 1/4W, and 8-9 Ohms could be 1/8 Watt.

    Note that the resistors must not be wirewound, as they would add an inductive "kick" to the sense circuit. Use carbon resistors or thick-film SMD's.

    Note that while you can use up to 46V on the Vs, you must still supply 5V to Vss, which is the TTL logic portion of the L298.

    The L297 has a half-step function. This enables you to position the stepper motors more precisely than their 1.8° rating, but the half-step may not necessarily result in a precise 0.9° step.

    Make sure you supply a clock to the L297 that's within specifications.

    The chopper driver circuit is in the L297 IC, so you don't have to worry about it. But, the chopper turns the current to the motors on and off so that the maximum current you've programmed via the Rsense is not exceeded. Note that if you're going to be using multiple L297s, you need to synchronize their chopper oscillators to prevent problems with noise. See the L297 datasheet.

    Since you'll be running your stepper motors at their maximum rated current, you should provide a solid mounting for them that is capable of dissipating the power consumed, or your motors will overheat and burn up. You can monitor the temperature of your stepper motors using a thermistor or temp sensing IC such as an LM34, LM35, LM334, LM335 etc. along with a comparator circuit; when the motors exceed your pre-set temperature, disable the driver until the motors have cooled.
     
  5. prodigyaj

    Thread Starter Active Member

    Dec 11, 2007
    48
    0
    First of ALL l thank you for your efforts !!
    The Rsense you mentioned , the calculation , rather the diagram shown in the Datasheet is not complete.
    There is a Vref Pin at L297 which gives the Peak Load Current and help the motor in deciding the current chopping !
    From what i gather Current Limit ( I ) = Vref / Rsense
    My Limit is I = 1.2 and Vref is already given Vcc , so according to this it comes out R approxx 4.7Ohms.
    I am not sure about the realtion i mentioned as it is not clear in the datasheet aswell !!
    Secondly when i overdrive a motor rated at 4.6V using 9.6V will the coil get burnt if i dont involve a chopper circuit ?
    I mean i heard overdriving a stepper motor involves giving 10tims the rated value but here its only 2.2times !! ?
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The L297 already has a chopper oscillator and associated circuitry in it.

    There is no Vcc in either circuit. There IS Vs, which should be +5V.

    Back to the sense resistors vs Vref ;)

    You don't tie Vref to Vs unless you like seeing smoke.

    Let's say you're planning on just using the 0.5 Ohm resistors as sense resistors, as shown in the schematic. So, what Vref do you need to get 1.2A across those 0.5 Ohm resistors?

    Vref = I x R
    Vref = 1.2A x 0.5 Ohms
    Vref = 0.6 V
    So, you need to create a voltage divider network to supply your Vref with exactly 0.6V. The lower Vref is set, the lower the current will be through your stepper motors.
    You could take that from the Vs, but be sure to use bypass capacitors or your reference voltage will be quite noisy.

    I suggest that you use 10K Ohm resistor from Vs (+5V) connected to the Vref input, and a 1.2K Ohm resistor from Vref to ground to obtain a 0.6V reference. As I already mentioned, you should connect a bypass capacitor from the Vref input to ground. A 0.01uF capacitor would probably be sufficient.

    If you wanted to be able to make fine adjustments to Vref, you could use a 10K Ohm potentiometer between Vs and Vref, and a fixed 1K resistor between Vref and ground. Don't use a potentiometer on the ground side of Vref, because if it fails your Vref will be pulled up to Vs, causing your chopper drivers to dump as much current as they can through your stepper motors. With the pot on the Vs side, if it fails the worst thing that will happen is that Vref falls to 0V, and your L298 driver stops driving your stepper motor.
     
  7. prodigyaj

    Thread Starter Active Member

    Dec 11, 2007
    48
    0
    The thing i want to ask is Cant I change my sense resistances value to limit the current instead of manipulating My Vref !
    the reason being the PCB I developed has already given Vref = 5V
    So to limit my current I would prefer to change the resisteance Rsense so that i can avoid the trouble of cutting the pcb tracks of Vref !!!

    kindly suggest me wether this would be a correct approach and the calculation gives me Rsense = Vref / I limit
    Rsense = 5/1.2
    Rsense = 4.18ohms !
    Can I proceed by changing the resistance ?
     
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I would not recommend that you connect Vref to 5V, nor increase Rsense by so much.

    If you are determined to go that route, then you might as well throw away your entire circuit, because the Rsense will be dissipating (wasting) much of the power across them instead of the power doing useful work by moving the stepper motor.

    The idea of Rsense is to have a known fixed low resistance value so that the voltage across the Rsense can be detected, and the current reduced when the current limit is reached.

    With a value of 4.18 Ohms, you will be dissipating in excess of 6 Watts across Rsense. This is not a reasonable amount of power to waste. You will also be dropping 5V across Rsense, which has nullified your higher voltage overdrive advantage. You might as well just use a ULN2803 driver IC and forget about the L297/L298.

    It is OK to cut the trace, and make the changes necessary. The pain will be temporary, I promise.

    You will have far better performance from your circuit, and much less smoke from the resistors ;)
     
  9. prodigyaj

    Thread Starter Active Member

    Dec 11, 2007
    48
    0
    As I said i already have got the PCB fabricated , so what ever has to be done has to be on this !
    There are a couple of factors that I would like to tell wrt to my application requirements !
    Firstly my current requirement will not ponder above 1A very often , if at all it has to it would be 2/10 times situation !
    I have 2 such motors and these are to be run for totally 10minutes and the batteries i use are 2.2Ah NiMh , and the total requirement as per rated values should be 2.6Amperes , so I guess i must have enough power to play with right ?
    And moreover when the sense voltage is comparable to Vref , dosent the chopper part of the circuit switch off , so wont that mean only a very momentary dissipation ?
    What if i dont implement the chopper circuit and directly give 9.6V to steppers rated at 4.5V , i mean is it high voltage enough to burn out the windings of my motor ?
     
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The reason for using the chopper drivers in the first place is to maximize the torque of your stepper motors; applying the more-than-double your motor's rated voltage initially helps overcome the inductance of the windings; the chopper circuit cuts the current off when the voltage across the sense resistor exceeds the preset limit via Vref vs Rsense/Vsense; thus protecting your motor.

    Since you are NOW thinking of using 4.18 Ohms for Rsense, and have connected Vref to Vs (+5V), your chopper circuit will never even come into play! 5V is beyond the limits of the Vref input. Additionally, when you subtract the 5V dropped across the 4.18 Ohm Rsense, you wind up with 4.5V left over; precisely what the motors are rated for. Even with a completely charged, fresh set of 9.5V batteries, you'll never be able to exceed 1.2A current throught the circuit - because Rsense is wasting most of your power by dissipating it in heat. The advantage of using the higher voltage and the chopper circuit is completely nullified by your 4.18 Ohm Rsense. Worse, you'll be wasting more than half your expended power in heat. Well, if your room is cold, that's not so bad. ;)

    If you attempt to run the 4.5V motors with 9.6V directly, they will have a very short life. I don't know if the motors will burn up before your batteries explode due to overheating, but you will likely wind up with a smelly burnt mess. 9.6V is more than twice your motor's rating. I don't know how well your 2.2Ah NiMH batteries will handle a combined load of two 2.6A loads in parallel (5.2A total), even for a short time. You should consult the manufacturer of the batteries to determine the maximum safe discharge rate. That rate will also be temperature dependant.

    You need to use 0.5 Ohm resistors for Rsense, and you need to make a voltage divider circuit for Vref so that it is 0.6V above ground potential, and you need to use a capacitor from Vref to ground in order for the circuit to work properly and efficiently.

    End of story.
     
  11. prodigyaj

    Thread Starter Active Member

    Dec 11, 2007
    48
    0
    my total requirement of current comes to about 2.6 Amps ? how did ur calculation get 5.2 Amps ? can u elaborate ?
     
  12. prodigyaj

    Thread Starter Active Member

    Dec 11, 2007
    48
    0
    After you could answer my previous query i have found a mini solution for my problem , lemme know if it valid !
    Cant I limit my source current ? I mean since my Battery can supply theoretically any amount of current cant I limit them using limiter circuits to 2.6Amperes ? so in this case the current would never increase above 1.2Amps ! i came to this conclusion as with same setup i.e with Vref = 5v and Rs = 0.5ohms i ran a 4.5V 1.2PeakAmp motor using a 750mA DC power source and it ran as cold as a cucumber !!!
    so if the current limiting thing is possible then please help me with a limiting circuit !!!
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Your motors are rated for 1.2A @ 4.5V. If you put your full battery across an individual motor, you will pass roughly 2.6A through that motor.

    You can't run your TWO motors in series, so you would have to run them in parallel. When placed in parallel, current is additive. Since each motor would pass 2.6A, your circuit current would be 2.6A + 2.6A = 5.2A.
     
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK.

    Cut the trace leading to Vref, and put a voltage divider network across it.

    Or simply make a new board that has the correct layout.

    You rushed into making your board without all of the design worked out, and there is a mistake on it. And now you seem to want to compound the mistakes.

    The solution is to go back and correct the single mistake you originally made; not to try to cobble up the rest of the circuit in an attempt to compensate for that mistake, which for some unknown reason you are unwilling to look at.

    Go back and look at the datasheet again for the L297. Find the limits of the voltage supplied to Vref. Understand that the circuit cannot work properly if you have connected Vref to a voltage that is outside of the maximum/minimum limits; and that you might actually damage the device by doing so.

    As long as you have Vref connected to Vs, your circuit has ABSOLUTELY NO CHANCE of working properly or efficiently, no matter what else you might do.

    I've spent too much of my OWN time on your project, trying to save you from destroying it.

    You made a circuit board already - why don't you simply make another one, but corrected this time?

    Using an external current limiter, or running with a reduced voltage level, will defeat the whole purpose of using the L297 and L298 ICs, and you will not be happy with the performance of the circuit.

    By the way, bad circuit boards can make good drink coasters. I have more than one coaster. :rolleyes:
     
  15. prodigyaj

    Thread Starter Active Member

    Dec 11, 2007
    48
    0
    thanks a lot , i m now seriously considering cutting the tracks leading to the Vref = Vcc pin and put a potentiometer in series !
    One last query can I use only one common potentiometer for both L297's Vrf Pins ? this would mean both the motors have same limit and i wouldnt have to explicitly calibrate for the other one also !
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I do not recommend using a single potentiometer for both L297s.

    Each L297 should have a fixed non-inductive resistor from Vref to ground, and each Vref pin should also have a bypass capacitor with the leads as short as possible to ground. The bypass capacitor can be a ceramic capacitor in the nF range; tantalum might be better, but they're relatively expensive.

    I say to use a fixed resistor from each Vref to ground due to reliability concerns. Potentiometers are nowhere near as reliable as fixed resistors. If your potentiometer should "break" and become electrically open, the fixed resistors will cause Vref to be pulled to ground potential and your stepper motors will cease to function, but no damage will occur to your circuit.

    Let's discuss what might happen in the event of a wiring failure:
    You've decided to partially follow my advice to use a fixed 1k Ohm resistor from Vref to ground on each L297, along with a bypass capacitor on each L297. However, instead of using two separate 10K pots, you decide to jury-rig one pot to adjust both. You manage to get the Vref set pretty close to 0.6V on both L297's, and everything is going along just fine.

    Eventually, one of the wires going from the pot to one of the L297s breaks due to vibration or whatever, and that motor stops functioning, but the other motor continues to run for a short time, then overheats and burns up! :eek: What went wrong???

    The two 1K resistors became connected in parallel when you joined them together to connect to a single potentiometer. This caused the combined resistance to be half of what it was originally; ie: (R1 x R2) / (R1 + R2) = (1K x 1K) / (1K + 1K) = 500 Ohms. When you adjusted the pot to get 0.6V on Vref, its resistance wound up being about 4167 Ohms.

    However, when the wire broke leading from the pot to the Vref of one of the L297's, the voltage divider network changed. You then had 4167 Ohms to Vs, and 1K Ohms to ground, resulting in Vref increasing to 1.2V! This told the L297/L298 IC's to allow up to 2.4A through your remaining stepper motor, which quickly became cooked.

    Use separate potentiometers. They are much less expensive than having to replace your stepper motors and ICs.

    If you don't wish to have two pots, then use fixed resistors for the divider bridge.
    Here are two rules for your selection:
    1) The total value of the two resistors should be at least 250 Ohms but less than 50K Ohms; this will keep the power consumption of the divider network for each Vref under 1/10 Watt. Total values above 50K Ohms may cause stability problems, as the input impedance of the Vref pin is not known.
    2) The Vs side resistor must be at least 8.33 times the value of the ground side resistor. It is OK to go higher, at the cost of reduced motor performance (but extending their life and increasing battery life). Do not go lower, or you will be putting too much current through your motors.

    For example, R1 = Vref to ground, R2 = Vs to Vref
    R1 = 100, R2 = 820 Ohms (this is not good, as Vref will be higher than 0.6V)
    R1 = 120, R2 = 1K (Good)
    R1 = 1.2K, R2 = 10K (Better, lower current used than above divider)
    R1 = 2.4K, R2 = 20K (Half the current of the above "better" divider, reaching the point of diminishing return)
     
  17. prodigyaj

    Thread Starter Active Member

    Dec 11, 2007
    48
    0
    Thanks a lot sir for your invaluabel inputs ! I would like to close this thread and have a new thread on a batteries , I hope it would be as active
     
Loading...