Reduce power to steppers when not moving

More
8 years 2 months ago #115962 by Ralf
Is it possible to assign a pin that is only active when a move is done?

If possible I would like to utilize my drivers "power down" function, which reduces power to the steppers when full power is not needed, i.e. when the mill just sits idle, but still needs to maintain it's position.

Please Log in to join the conversation.

More
8 years 2 months ago #115979 by PCW
One way is to feed motion.current.vel into the "near" component and then use the output of near to set the drives to low power mode when the velocity is zero or very close to 0 , something like:

loadrt near
addf near.0 servo-thread
setp near.0.in2 0
setp near.0.difference 0.00001
net velocity motion.current-vel => near.0.in1
net zerovel near.0.out => PinToEnableLowPowerMode

Please Log in to join the conversation.

More
8 years 2 months ago #115990 by Ralf
Thanks, I actually think that I understand what's going on there.. ;)

Will test out tonight..

If I want to add a hysteresis to prevent powerdown from flickering up and down, could I abuse the debounce component, combined with an or gate like this ?
Code:
loadrt near addf near.0 servo-thread setp near.0.in2 0 setp near.0.difference 0.00001 net velocity motion.current-vel => near.0.in1 loadrt debounce cfg=1 addf debounce.0 servo-thread setp debounce.0.delay 1000 net debounce-in <= near.0.out => debounce.0.0.in loadrt or2 addf or2.0 servo-thread net powerdown-1 or2.0.in0 <= near.0.out net powerdown-2 or2.0.in1 <= debounce.0.0.out net powerdown or2.0.out => PinToEnableLowPowerMode

I would assume that the or gate would be needed, since the debounce seems to work in both directions, and would would cause a delay before the steppers would be enabled on move, if wired directly to the output.

Or does a timer module exists, with a simple countdown function, instead of using debounce?

And where would I put all of this, custom.hal or custom_postgui.hal?

Please Log in to join the conversation.

More
8 years 2 months ago #116008 by Mike_Eitel
Use OR plus ONESHOT in parallel to rise current. OR in0 for moving and OR in1 for delayed reduziert
Mike

Please Log in to join the conversation.

More
8 years 2 months ago #116021 by Ralf
Oneshot seem to do the trick, together with velocity.

The following works out nicely in halscope.
Code:
loadrt near addf near.0 servo-thread setp near.0.in2 0 setp near.0.difference 0.0000001 net velocity motion.current-vel => near.0.in1 loadrt not addf not.0 servo-thread net moving not.0.in <= near.0.out loadrt oneshot addf oneshot.0 servo-thread setp oneshot.0.width 1 setp oneshot.0.rising TRUE setp oneshot.0.falling TRUE setp oneshot.0.retriggerable TRUE net moving oneshot.0.in <= near.0.out loadrt or2 addf or2.0 servo-thread net moving-inv or2.0.in0 <= not.0.out net powerdown-2 or2.0.in1 <= oneshot.0.out net powerdown parport.0.pin-08-out <= or2.0.out

Please Log in to join the conversation.

Time to create page: 0.166 seconds
Powered by Kunena Forum