Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After any move the stepper remains in a high current state #19

Open
drp0 opened this issue Nov 7, 2019 · 3 comments
Open

After any move the stepper remains in a high current state #19

drp0 opened this issue Nov 7, 2019 · 3 comments

Comments

@drp0
Copy link

drp0 commented Nov 7, 2019

My stepper draws 200mA when moving and 370mA when the move has completed.
It would be useful to have an idle call which sets the stepper control lines to zero:

This works:
void idle(); // drp CheapStepper.h

void CheapStepper::idle(){
      seq(8);      // drp CheapStepper.cpp
}

This utilises the default case in switch(seqNum) of void CheapStepper::seq (int seqNum)

If the function is called on the completion of a move, the current drops to 30mA !
The next move appears un-affected.

stepper.run();
  if (stepper.getStepsLeft() == 0){
  // if the current move is done...
  stepper.idle(); // low current

David

@mrv96
Copy link

mrv96 commented Jan 8, 2020

Hi, your method idle is already present in the code:

`void CheapStepper::off() {
	for (int p=0; p<4; p++)
		digitalWrite(pins[p], 0);
}`

Consider also the fact that if you power off all coils, your motor will loose retention torque.

@drp0
Copy link
Author

drp0 commented Jan 8, 2020

Hi,
off() looks like the same idea- does it affect any other parts of the library?

I had considered the loss of torque. However in some applications battery demand in static positioning outways the need to apply torque to a stationary motor.

@mrv96
Copy link

mrv96 commented Jan 8, 2020

off() is already part of the master official library, it's sufficient to call it.

Since it has been already included, i suppose that it doesn't affect any other parts of the library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants