Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

Project Request

Return
yasir ahmed
yasir

posted on 2011/08/21 11:53:24 PM CEST

Motor Control

Steper Motor Control Help requried

hi,
I want to control the steeper motor with pic18f452.please tell me about the sequence that how can i get the step angle of 9 degree or any degree according to my requriement.please give me some helping diagram and source code.thanks

USER Comments

yasir ahmed
yasir

posted on 2011/10/10 01:59:51 AM CEST

thanks dears.i will check yours suggestions.if i have any quiry then i will contact with you.

  • Rating:
0
No Abuse Reported

Do you want to report abuse comment ID: 126 in "Steper Motor Control Help requried" request.

Adrien Letellier
_adrien_

posted on 2011/09/06 01:46:36 PM CEST

I post a code that should work, for now I can't test it :(. If you find a bug and/or resolve it, please tell me to modify the code.

:)

See ya

  • Rating:
0
No Abuse Reported

Do you want to report abuse comment ID: 63 in "Steper Motor Control Help requried" request.

Adrien Letellier
_adrien_

posted on 2011/09/06 10:58:47 AM CEST

The previous comment is good but not optimised. I propose to use a timer instead of the delay function. You will keep free time to do something else

  • Rating:
1
No Abuse Reported

Do you want to report abuse comment ID: 62 in "Steper Motor Control Help requried" request.

Sime Bacelic
simenesky

posted on 2011/08/22 06:10:39 AM CEST

See this picture: http://electroprivod.ru/public_images/pc_operating2.gif
This is controlling unipolar step motor with ULN 2003.

The code is very simple, you just have to make pulse on this 4 pins at the right time. Let say that we want full puls, just make something like this

fullstep:
PORTB=%00001000
Vdelay_ms (interval)
PORTB=%00000100
Vdelay_ms (interval)
PORTB=%00000010
Vdelay_ms (interval)
PORTB=%00000001
Vdelay_ms (interval)
goto fullstep

if you whant to make it half step:
halfstep:
PORTB=%00000001
Vdelay_ms (interval)
PORTB=%00000011
Vdelay_ms (interval)
PORTB=%00000010
Vdelay_ms (interval)
PORTB=%00000110
Vdelay_ms (interval)
PORTB=%00000100
Vdelay_ms (interval)
PORTB=%00001100
Vdelay_ms (interval)
PORTB=%00001000
Vdelay_ms (interval)
PORTB=%00001001
Vdelay_ms (interval)
goto halstep

and if you what to make it go other direction just go backwords with codes.
I am mikrobasic programmer by the way !!!

If you have more questions I am here

Regards

  • Rating:
7
No Abuse Reported

Do you want to report abuse comment ID: 16 in "Steper Motor Control Help requried" request.