Hi all, I'm running two small 12v 0.4amp stepper motors off of my arduino uno and ladyada mshield. When I feed step commands to the motors, the initial position is inconsistent, but all subsequent commands are perfectly on target. The motors are not overheating and the other motors in my system are not experiencing the same problems, so I don't think my code is the issue. Has anybody experienced similar problems with small steppers?
I'm thinking that since the motors are only experiencing problems when they are first charged up, the problem could be worked around by telling the motors to begin drawing their holding torque current without actually telling the steppers to move. That way, they get charged up but the initial inconsistency problem is avoided since they aren't moving during that initial command. Is this possible to do with a stepper motor?
Any input/advice would be greatly appreciated!
send holding current to stepper without stepper motion?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 5
- Joined: Tue Apr 10, 2012 4:11 pm
-
- Posts: 5
- Joined: Tue Apr 10, 2012 4:11 pm
Re: send holding current to stepper without stepper motion?
Also, I encounter this problem regardless of the motor's set speed.
- adafruit_support_bill
- Posts: 88092
- Joined: Sat Feb 07, 2009 10:11 am
Re: send holding current to stepper without stepper motion?
Each step of the motor energizes a different combination of coils. Typical stepping sequences go through 4 different combinations. (e.g. A-D, A-B, B-C, C-D).
The stepper library always starts with the same combination of energized coils. If that is different than the combination that was energized when the motor stopped, then the motor will move. In practice this is handled with an encoder and/or limit-switch. On power-up, the motor seeks to the home position, then all steps are made relative to that.
The stepper library always starts with the same combination of energized coils. If that is different than the combination that was energized when the motor stopped, then the motor will move. In practice this is handled with an encoder and/or limit-switch. On power-up, the motor seeks to the home position, then all steps are made relative to that.
-
- Posts: 5
- Joined: Tue Apr 10, 2012 4:11 pm
Re: send holding current to stepper without stepper motion?
So is this problem unavoidable, as in there is no way to solve this without adding more mechanical parts to the system? I understand how I could use a limit switch to indicate to the program when the motor is at 'home' position, but how could an encoder solve the problem?
- adafruit_support_bill
- Posts: 88092
- Joined: Sat Feb 07, 2009 10:11 am
Re: send holding current to stepper without stepper motion?
You could hack the library to remember the state of the motor when it was de-energized. But you would lose that if you powered down the Arduino.So is this problem unavoidable, as in there is no way to solve this without adding more mechanical parts to the system?
Some encoders have a "home" pulse built in. There are also "absolute" encoders that give you an actual angular position, (but these are very expensive).how could an encoder solve the problem?
Please be positive and constructive with your questions and comments.