The datasheet is grey on the operation of chopper on phase and inhibit lines. So my understanding is limited. From what I have understood from the app notes, the inhibit lines open circuit the output drive path. So using this to control the drive current thro chopping should be essentially same as chopping the phase lines. I fail to understand the difference. Probably, L297 was designed to be an universal translator used for both unipolar and bipolar motors and inhibit lines are provided for certain fuctions.
My reason to suggest was
1. to maintain a constant current through the coils by chopping the phase
2. In the half step mode, the inhibit lines should change state at precise point so that the wave shaping can be effected. But your trace pictures puzzles me.
Are we in sync? May be you can post the logic level on the L297 pins.
The scope pictures were of the voltage across the sense resistors, which corresponds to the current level in the coils. In the inhibit-based picture, you can see both sense voltages. When only one coil is being driven, the inhibit line for the inactive coil drops low, which causes the voltage divider logic to be disconnected. The same thing seems to be happening with phase chopping if you look at the 2nd picture, but at a lower resolution things are much uglier. Below is the code used to set the control signals on the L297. The Vref should have been 0.6V, possibly 0.65V, which would give a voltage of 0.4-0.45 peak when both pairs of coils are active.
// bit 0 - DIRECTION: 1 for CW, 0 for CCW
// bit 1 - ENABLE: always high
// bit 3 - HALF/FULL: 1 for HALF, 0 for FULL
// bit 4 - Mreset: 1 for active, 0 for reset (should always be high)
// bit 6 - Control: 1 for phase chopping, 0 for inhibit
PORTD |= 0x02 | 0x08 | 0x10;
//PORTD |= 0x02 | 0x08 | 0x10 | 0x40; //testing chopping off coil lines instead of inhibit lines
Of the two, which met your requirement? The uglyness is due to your scope's sampling rate. Its the time to ask your boss to buy you a Mixed Signal Oscilloscope (Agilent). :wink:
Did you do any further testing using full step?
Today I was reading the 4118M-01 datasheet. According to the torque vs pps graph, the torque degradation is quite considerable. The current stated for the test is 1.7A and half step mode. How about upping the current, taking precaution not to damage the motor. May be you can check with Lin Engg on this.
When I meant logic level it is at the L297 pins. Nevertheless the code is additional info. Just a suggestion.
I would write
temp = PORTD & (~(0x02 | 0x08 | 0x10)) ;
temp |= (0x02 | 0x08 | 0x10) ;
PORTD = temp ;
Also have you tried reseting the L297 at the direction change point and skipping couple of pulses before ramping again to opposite direction? Just a thought.
I was reading the L298 datasheet and I realised the purpose of ABCD or INH chopping. ABCD causes a slow decay and INH is for fast decay coil currents during turing off.
try the L293D. integrated clamp diodes, in a DIL package, 1A
There are pointy haired bald people.
Time flies when you have a bad prescaler selected.
Actually, the pictures were taken off an Agilent Mixed Signal scope, 54645D. I didn't do any new testing yesterday, rewrote the commutation interrupt into a nice state machine, now it's much easier to play with acceleration/deceleration rates. I will do some more experimenting with full-stepping after lunch. I believe that the inhibit-based chopping was performing slightly better, will verify this.
The torque curve for the motor doesn't seem that bad, other than having a low-ish starting torque. At most, we'd only be operating at a speed of 300 rpm, or 2000pps, when doing back-and-forth motion, so our torque should be pretty uniform over the entire range.
Haven't tried resetting before direction switch or inserting delay, the latter at least is definately a possibility. We could also try activating the emergency braking function to try to kill any remaining motor oscillations before starting movement again.
And you are right about the 298 datasheets explanation, although I can't really see a disadvantage to chopping off the inhibit lines, beyond higher power requirements.
edit: Maybe it would be worthwhile to move to the 4118L-01. It has a much higher torque, slightly higher current rating, and slightly lower max speed. I've heard that higher torqueing motors must be accelerated more slowly, is that true?
you can drive a bipolar stepper using L293. Why go for l297/298 combination.
if you want to increase torque, you have to decrease speed, tht is delay b/w two steps
l293 only accepts a max of 36V power supply, we are using a 40V supply. Also, and more importantly, current is only rated at 600mA.
Hi, how is it going?
© 2020 Microchip Technology Inc.