Sie sind auf Seite 1von 6

10/7/2016

StepperMotorBasics

StepperMotorBasics
Dec10,2014,09:46pm LastEdit:Feb17,2015,05:03pmbyRobin2

Introduction
===========
Ifindmyselfrepeatedlytypingsimilarrepliestosimilarquestionsaboutthebasics
ofsteppermotorsandIthoughtitwouldbeusefultowritethisnoteasitwillbea
littlemorecomprehensivethananyindividualreply.
Theinformationispresentedunderseveraldifferentheadingsandthereisquitea
bitofoverlapandcrossreferencingofideassoIsuggestthatyoushouldreadallof
thenoteatleastonce.Ithinkitwouldbepossibletomisssomeimportantinfoif
youonlyreadthebitthatimmediatelyinterestsyou.
ThroughoutthisnoteIhavereferencedPololuproducts.Ihavenoconnectionwith
thecompanyapartfrombeingasatisfieduseroftheirA4988stepperdriverboards.
ThisnoteisintendedtoprovideguidancefortheArduinouserwhoisnewto
steppermotors.Itisnotintendedtobeanexpertdissertationonthesubject.
PleasebeawarethatthistextcontinuesintothenextPost
Typesofsteppermotor
======================
Broadlyspeakingtherearetwotypesofsteppermotorunipolarandbipolar.
Bipolarmotorshave4wiresconnectingtothetwoseparatecoilsinsidethemotor
onepairforeachcoil.
Therearealsotwotypesofunipolarmotorthosewith5wiresandthosewith6
wires.
The6wiremotorscanalsobereferredtoashybridmotors.Theyaresimilartothe
4wirebipolarmotorsandjusthaveanextrawireconnectedtothecentreofeachof
thecoils.Ifyouwanttousea6wiremotorinbipolarmodejustignorethewires
thatconnecttothecentresofthecoils.
The5wiremotorscannotbedrivenbyadriverdesignedforabipolarmotor.An
exampleofa5wiremotoristhesmall28BYJ48motorwhichcanbeseeninmany
ArduinoprojectsandusuallyusesaULN2003chipasitsdriver.
ThisnoteonlyrelatestobipolarmotorsanddoesNOTapplyto5wiremotorsor
theULN2003driver.

MotorSpecifications
====================
Datasheetsnormallyquotethecoilcurrent,coilresistance,nominalvoltageand
holdingtorqueandstepsperrevolution.Forexample,forthismotorthevaluesare
1Amp,2.7Ohms,2.7volts,1.4Kgcmand200steps/rev.
http://forum.arduino.cc/index.php?topic=284828.0
1/6

10/7/2016

StepperMotorBasics

Thenominalvoltageisirrelevantforallpracticalpurposes.Theimportantfigureis
theratedcurrent.
Theratedcurrentisnormallythecurrentpercoilandwhencurrentsarequotedfor
steppermotordriverboardsthatisnormallyalsoapercoilfigure.
Theholdingtorqueisthetorqueavailabletoresistrotationwhilethemotoris
stationary.Theavailabletorquewilldeclineasspeedincreases.
Somemanufacturesprovidegraphsshowinghowthetorquevarieswithspeed.

OperatingVoltage
=================
SteppermotorsareverydifferentfromregularDCmotors.
WithaDCmotoryoucontrolthecurrentinordertocontrolthespeedofthemotor.
Theusualwaytocontrolthecurrentistovarythevoltageperhapsusingthe
ArduinoanalogWrite()functiontocontrolaPulseWidthModulatedpowersupply
tothemotor.
Steppermotorsprettymuchdrawtheirfullcurrentallthetime,evenwhentheyare
stationarythatishowtheyresistbeingmovedfromtheirpresentposition.This
meanstheyareveryinefficient.
Forallpracticalpurposesthenominalvoltageofasteppermotorisirrelevant.Itis
thevoltagewhichwoulddrivetheratedcurrentthroughthecoilwhenthemotoris
stationarybasedonOhmslawe.g.2.7v=1A*2.7Ohms.However,assoonasthe
motorstartsmovingthecombinationoftheinductanceofthecoilsandtheback
emfgeneratedbythemovementwillpreventthenominalvoltagefromproducing
theratedcurrent.
Forthisreasonsteppermotorsarenormallydrivenwithamuchhighervoltage.
This,inturn,meansthataspecializedsteppermotordriverboardisneededwhich
canlimitthecurrenttowhateverthemotorcantake.Ifthecurrentisnotlimitedthe
highvoltagewouldquicklydestroythemotor.

StepperMotorDriverBoards
===========================
Thesearespecializedcomponentsdesignedtocontrolsteppermotorsconveniently
andefficiently.ThePololuA4988isatypicalexamplethatisoftenusedwith
Arduinos.
Generallyspeakingspecializedsteppermotordriverboardsonlyrequiretwo
connections(plusGND)totheArduinoforstepanddirectionsignals.
Normallyspecializedsteppermotordriverboardshavetheabilitytolimitthe
currentinthemotorwhichallowsthemtodrivethemotorwithahighvoltage(up
to35vforthePololuA4988)forbetterhighspeedperformance.
http://forum.arduino.cc/index.php?topic=284828.0

2/6

10/7/2016

StepperMotorBasics

Andtheyallusuallyhavetheabilitytodomicrostepping.ThePololuA4988can
do1/2,1/4,1/8and1/16microsteps.Itdefaultstofullsteps.Ibelieve
theBigEasydriverwhichusesthesameA4988chipdefaultsto1/16microstepping
mode.

Hbridgedrivere.g.LN298
============================
Thesecanbemadetocontrolasteppermotorbuttheyareaverypoorchoice
mainlybecausetheyhavenomethodforlimitingthecurrentandthereforecannot
usehighvoltages.TheyarealsomoretroubletoconnecttoanArduino(they
requiremorepins)andmoretroubletocontrolwithanArduino(morecalculations
fortheArduinotodo).

Choosingamotorandmotordriver
=================================
Firstchoosethemotor
Theimportantspecificationisthetorqueofthemotor.Generallyspeakingthe
holdingtorqueisquoted.ForthemotorIlinkedtoaboveitis1.4Kgcm.The
availableusefultorquewilldeclineasthespeedincreasesandatnoloadmaximum
speeditwillbezero.Some(probablythemoreexpensive)motormanufactures
providegraphsshowinghowthetorquevarieswithspeed.
Tofigureoutwhatmotoryouneedyouwillhavetomeasureorestimatethetorque
required.Itwouldbeagoodideatochooseamotorwithagoodmarginofsurplus
torque.
Itisnottoodifficulttomakearoughmeasurementofthetorquerequiredbutitis
beyondthescopeofthisnote.
Edit17Feb2015SeeReply#29forasuggestion
Thenchoosethesteppermotordriver
Whenyouhaveselectedamotorandknowwhatcurrentitrequiresyoucanchoose
asteppermotordriverthatcancomfortablysupplytherequiredcurrent.
Youshouldbeawarethattheeconomicalsinglechipstepperdrivers(suchasthe
A4988andtheDRV8825)canonlysupplyabout2amps.Ifyourmotorrequires
morethanthat,youwillneedtogetoneofthemoreexpensivecommercialstepper
drivers.HowevertheworkingprinciplewillbepracticallyidenticaltotheA4988.

NEMA17and23
==============
Thesestandardsonlydefinethesizeofthefrontfaceofthemotorandthelocation
andsizeofthemountingscrewholes.Theysaynothingaboutthepowerofthe
motor.The17isanabbreviationof1.7inches.
http://forum.arduino.cc/index.php?topic=284828.0
......continuedinnextPost

3/6

10/7/2016

StepperMotorBasics

...R

Twoorthreehoursspentthinkingandreading
documentationsolvesmostprogrammingproblems.

Robin2

Re:StepperMotorBasics
Dec10,2014,09:47pm LastEdit:Jan01,2015,10:11pmbyRobin2

#1

continuedfrompreviousPost....
Microsteps
==========
Most(butcertainlynotall)steppermotorsdo200fullstepsperrevolution.By
appropriatelymanagingthecurrentinthecoilsitispossibletomakethemotor
moveinsmallersteps.ThePololuA4988canmakethemotormovein1/16thsteps
or3,200stepsperrevolution.
Themainadvantageofmicrosteppingistoreducetheroughnessofthemotion.
Theonlyfullyaccuratepositionsarethefullsteppositions.Themotorwillnotbe
abletoholdastationarypositionatoneoftheintermediatepositionswiththesame
positionaccuracyorwiththesameholdingtorqueasatthefullsteppositions.
Generallyspeakingwhenhighspeedsarerequiredfullstepsshouldbeused.
ItispossiblewithmostdriversincludingthePololuA4988tousetheArduino
programtochangethemicrostepsetting.Thiswouldrequireadditionalconnections
betweenthedriverandtheArduino.

StepperMotorSpeed
===================
BycomparisonwithregularDCmotorssteppermotorsareveryslowdevices.
Typicalspeedsmightbe1000to4000stepspersecondandfora200stepmotor
thatwouldrepresent5to20rps(300to1200rpm).
Generallyspeakingthemotorswithlowcoilresistanceandhighcurrents(andlow
nominalvoltages)willbemostsuitableforhigherspeeds.Ahighvoltagewillalso
beneededforhighspeed.

Acceleration
============
Ifthesteppermotorisrequiredtomoveaheavyloaditwillnormallybenecessary
tostartthemovementslowly(aswithanymotor)andacceleratetothedesired
speedand,equally,todeceleratewhenitisnecessarytostop.
ThisisquitedifferentfromaDCmotorwhichwillaccelerateanddecelerate
automatically.

http://forum.arduino.cc/index.php?topic=284828.0

4/6

10/7/2016

StepperMotorBasics

Ifyoutrytostartorstopasteppermotortooquicklyitwillsimplyskipstepswith
nodamagetomotor.HoweverTheArduinohasnomeanstoknowwhetherorhow
manystepshavebeenmissedandallofthepositioncontrolwillbelost.
Forthisreason,inparticular,itisessentialtochooseamotorwithsufficienttorque
forthejobandtouseaccelerationanddecelerationwhennecessary.

PositionFeedback
=================
SteppermotorsdonothavetheabilitytotelltheArduinowhatpositiontheyareat,
nordotheyhavetheability(likeaservo)togotoaparticularposition.Alltheycan
doismoveNstepsfromwheretheyarenow.
Ifitisessentialtohavepositionfeedbackarotaryencodercanbeattachedtothe
motorshaftbutthatisbeyondthescopeofthisessay.

InitialPosition
================
WhenitstartsuptheArduinohasnomeansofknowingwherethesteppermotoris
positionedforexamplesomebodymighthavemoveditmanuallywhenthepower
wasoff.
Theusualwaytoestablishadatumforcountingstepsiswithalimitswitch.At
startuptheArduinowillmovethemotoruntilittriggerstheswitch.TheArduino
willthenregardthatsteppositionasstepzeroforthepurposeoffutureposition
keeping.

ArduinoLibraries
=================
WhenusinganArduinowithaspecializedsteppermotordriverboardsuchasthe
PololuA4988thereislittletobegainedfromusinganArduinolibraryunlessyou
needtheaccelerationfeatureoftheAccelStepperlibrary.

DemonstrationArduinocode
==========================
Thecodeinmysimplestepperdemoisintendedasafirststeptogettingyour
motorworking.Italsoshowshoweasyitistocontrolamotorwithoutalibrary
whenaspecializedsteppermotordriversuchasthePololuA4988i8sused.

Wiringconnectionsforasteppermotor
======================================
Thecodeinmysimplestepperdemoassumesthatthemotorisconnectedasshown
inthewiringdiagramsonthePololuA4988webpage.
http://forum.arduino.cc/index.php?topic=284828.0

5/6

10/7/2016

StepperMotorBasics

ArduinoPulseWidthModulation(PWM)
====================================
ArduinoPWMusinganalogWrite()hasnothingtodowithcontrollingstepper
motors.Tocontrolasteppermotorthoughaspecializedsteppermotordriverthe
ArduinojustneedstoprovidestepanddirectionsignalsusingdigitalWrite().
PWMmaybeusedwithinthesteppermotordrivertolimitthecurrentinthemotor
coilsbutthisprocessisinvisibletotheArduinouser.
....END

http://forum.arduino.cc/index.php?topic=284828.0

6/6

Das könnte Ihnen auch gefallen