send holding current to stepper without stepper motion?

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

send holding current to stepper without stepper motion?

Postby gatecrasher48 » Sun Apr 15, 2012 11:08 am

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!
gatecrasher48
 
Posts: 5
Joined: Tue Apr 10, 2012 3:11 pm

Re: send holding current to stepper without stepper motion?

Postby gatecrasher48 » Sun Apr 15, 2012 11:17 am

Also, I encounter this problem regardless of the motor's set speed.
gatecrasher48
 
Posts: 5
Joined: Tue Apr 10, 2012 3:11 pm

Re: send holding current to stepper without stepper motion?

Postby adafruit_support_bill » Sun Apr 15, 2012 1:10 pm

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.
User avatar
adafruit_support_bill
 
Posts: 16072
Joined: Sat Feb 07, 2009 9:11 am

Re: send holding current to stepper without stepper motion?

Postby gatecrasher48 » Sun Apr 15, 2012 3:20 pm

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?
gatecrasher48
 
Posts: 5
Joined: Tue Apr 10, 2012 3:11 pm

Re: send holding current to stepper without stepper motion?

Postby adafruit_support_bill » Mon Apr 16, 2012 5:12 am

So is this problem unavoidable, as in there is no way to solve this without adding more mechanical parts to the system?

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.

how could an encoder solve the problem?

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).
User avatar
adafruit_support_bill
 
Posts: 16072
Joined: Sat Feb 07, 2009 9:11 am


Return to Arduino Shields from Adafruit

Who is online

Users browsing this forum: No registered users and 2 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [108]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[31]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[34]
LCDs & Displays[48]
Components & Parts[70]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[111]
 
Wireless[14]
Cables[62]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]