Close

Jerky Steppers... and underspec'd drivers.

A project log for CD/DVD mechanisms and cartesian thinggie[s?]

DVD-laser-etcher, dremmel-router, possibly a 3D printer? Who knows!

eric-hertzEric Hertz 06/04/2016 at 21:180 Comments

So, I'm finally back, getting into the groove of this ol' project...

Numero Uno: The code works, still, *Woot!*. Took a little bit of cleanup, and had to parse/rewrite some poor-documentation to get the pinouts right...

But... I have two axes running. Two DVD-sled axes... This revisit is spurred-on by #Mini PCB printer.

So, here's the weird thing... I did some math, right...? And if I did the math right, that means there's about 840 "steps" over 1.5inches... which is, roughly, 1.7mil of precision. YET, when I watch these motors do their moving... it's Jittery, to say the least.


Taken a step further, I'm using microstepping which, frankly, should be roughly 512 steps *per* step... so there's dang-near little doubt I shouldn't be able to *see* the stepping-motion. I'm no fool, I realize my "microstepping" technique may not be perfect, and I also am aware of the fact that microsteps are usually quite a bit less precise than regular steps (wherein, e.g., a half-step may not actually be halfway between two full steps, but might lean toward one side more than the other... especially with loading, etc...). But, even *full* steps should be about 1.7mil, so, frankly, I shouldn't be able to *see* it stepping around... right?

Nah, it looks *aweful*.

So, I did a quick test... I switched the axes, by merely changing the wiring... and suddenly that really jerky axis is smooth. And that smooth axis is jerky.

So, there's two possibilities, here... Either A) My code is poorly-implemented on one axis, and not on the other, or B) the driver-chips aren't acting the same....

So, I don't quite get this, because, again, even if the microstepping was *really* bad, and even if the driver-chips can't handle microstepping *at all*, they'd still, worst-case, be stepping somewhere around 1.7mil per step. But, yet, it's *easily* visible just how poorly they're stepping...

But, it is what it is.

The fact is, now that "jerky" axis is moving *really smoothly* and hope is restored.

Apparently I just need to get rid of whatever poor driver-chips I've got, and move on. Or, maybe, all it'll take is slowing the PWM frequency a bit...

Seriously, though... I mean, the jerkiness was *easily* enough to destroy layouts for, say, a TQFP... When I did the calcs I thought "Oh, 0.0017... that must be 17mils... Yeah, that's about the jerkiness I'd seen..." No, that's 0.0017=1.7mils per step. Per STEP (not microstep). So... it's *really* weird.

But, then, what isn't these days...?

Carrying on...

If this 1.7mils/step is true, then there's really no reason for microstepping at all. At least positioning-wise. OTOH, the *act* of microstepping from one step to the next allows for (or at least seems to) *much* greater torque during the transition from one step to the next... So that's something...

Then there's *heat*...

The motors are DANGED HOT... I'm using 12V to drive 'em, which may be the problem... But 5V isn't enough to move 'em... So, realistically, maybe I should be using a more... sophisticated... approach.

A) These motor-drivers (from old floppy-drives!) have two settings... a low-power mode, which holds the motors with 5V, and a "seek" mode, which uses 12V... So maybe I should start considering that...

B) If microstepping isn't gaining *any* (necessary) positional benefit... (e.g. if it really is 1.7mils/step) then the only benefit of microstepping is to apply quite a bit of power *during* the transition from one step to the next... which will certainly help missed-steps, but should probably be avoided for actual *positions*...

OTOH, if doing something like PCB artwork, we're not talking about *briefly* moving a motor to a position and holding it there, we're talking about *constantly* moving the motors to draw various traces... So... Hmmm...

I kinda miss the ol' DC-motor (and feedback-loop) approach... At least, there, only the amount of power *necessary* to hold/move it is applied... In a case like this, "holding" a position requires almost *zero* power, whereas moving it might require a bit, but probably not nearly as much as a stepper... (wherein the stepper must apply enough power to compensate for *any* load it may encounter, as opposed to the actual load it is encountering).

So... I guess the question is how to determine when it's acceptable to lower the voltage...

---------------

All that written before I figured out the problem... the stepper-driver chip that caused the jerkiness was (likely) spec'd for a lower current and was clipping the current. But, only at certain PWM-duty-cycles. So, I think, what was happening was it was somewhere midway between steps, then suddenly the power was cut (on only one winding) and the stepper would jerk to the next (or previous?) step, then the current-clipping would be disabled (as the PWM duty-cycle changed) and it'd jump back again to somewhere midway between steps. Taken a step further, the actual "step" it would wind-up in could probably be somewhere *dramatically* different than normal single-stepping because: Only one winding would be powered (whereas normally both windings would be powered either with one polarity or opposites). And, plausibly, it might've been moving forward then jerking backwards and forwards again (making it that much more visible). So, maybe that all makes sense.

It's smooth, now, but REALLY HOT, so that's the next consideration.

Discussions