Can Duet report on stepper current?
-
-
@fcwilt looking at the schematic - no, duet hw does not monitor current going into coils of a stepper motor. Drivers will report a problem (cannot push enough current into the motor) but do not report "currently pushed current".
Note that TMC drivers used are open loop drivers, they are always pushing same (set) amount of current into motors. The only difference is relation between A and B coil and idle state. The driver is unaware if there is more or less force required to keep the position of a stepper motor hence it will always push what's "set". Only closed loop drivers will vary the current (and for steppers, most of them don't do it, they will keep full current non stop and just try to recover position if position is lost, they will not change current; probably some exist that will but all I tried don't).There are "stepper motor analyzer" circuit's out there. They measure current, either on the shunt on the analyzer device (your stepper pass trough the device) or they can attach to the current sense resistors on the driver circuit directly.
-
@fcwilt said in Can Duet report on stepper current?:
What I was thinking of was a feature to generate a CSV set of current readings for a given move in such a way that I could generate a graph of current versus time or perhaps position.
Note that the current through a stepper coil goes through a full sine cycle for each full step so 200 ups and 200 downs for each rotation. to measure this over time during movement will required a large amount of data.
It's feasible though if you are handy with arduino and such. For example, logging the readings from a current sensor into an SD card, but this will require some work.
-
@zapta said in Can Duet report on stepper current?:
Note that the current through a stepper coil goes through a full sine cycle for each full step so 200 ups and 200 downs for each rotation.
It's actually a complete sine cycle every 4 full steps.
-
@fcwilt said in Can Duet report on stepper current?:
way that I could generate a graph of current versus time or perhaps position.
I think you would be interested in the power as the current is constant (but still sinusoidal) the voltage / power is what would vary depending on the load.
that information you might be able to derive from the load angle measurement the tmc driver has available (but I think you need to modify the firmware to write this to a file at a reasonable rate)
-
@bearer said in Can Duet report on stepper current?:
I think you would be interested in the power as the current is constant (but still sinusoidal) the voltage / power is what would vary depending on the load.
Yes, you are correct.
What I hoped to do was to determine if the load remained relatively constant over the range of travel for a given axis OR if there was some binding causing the load to vary.
Thanks.
Frederick
-
@arhi said in Can Duet report on stepper current?:
There are "stepper motor analyzer" circuit's out there. They measure current, either on the shunt on the analyzer device (your stepper pass trough the device) or they can attach to the current sense resistors on the driver circuit directly.
That sounds like what I am looking for.
Thanks.
Frederick
-
@fcwilt this here is probably meant by arhi: https://forum.duet3d.com/topic/12049/building-a-diy-public-domain-low-cost-stepper-motor-analyzer
The used ACS70331 to read current to voltage value is very fast and affordable. -
@fcwilt said in Can Duet report on stepper current?:
@arhi said in Can Duet report on stepper current?:
There are "stepper motor analyzer" circuit's out there. They measure current, either on the shunt on the analyzer device (your stepper pass trough the device) or they can attach to the current sense resistors on the driver circuit directly.
That sounds like what I am looking for.
I have seen that device few weeks ago but can't find it now ... anyhow there's DIY here on the duet forum: https://forum.duet3d.com/topic/12049/building-a-diy-public-domain-low-cost-stepper-motor-analyzer
-
@fcwilt said in Can Duet report on stepper current?:
What I hoped to do was to determine if the load remained relatively constant over the range of travel for a given axis OR if there was some binding causing the load to vary.
i think dc42 has commented on something with regards to getting the load angle / stall detection threshold (same feature) iirc the value would be the max value over some interval so with a bit of scripting and repeat motion you might be able to detect variance along an axis.
i'll update if I find the post where that was discussed.
-
@dc42 said in Can Duet report on stepper current?:
It's actually a complete sine cycle every 4 full steps.
Good to know. if so, what I call 'quadrant' in my stepper analyzer is actually a full step, not a 1/4th of a step. I will try to confirm with a measurement.
-
Thanks for all the feedback.
Frederick
-
@bearer said in Can Duet report on stepper current?:
i'll update if I find the post where that was discussed.
in case you missed the recent thread where it brought up the values are part of M122
https://forum.duet3d.com/topic/17740/driver-4-ok-sg-min-max-0-1023-what-does-this-mean