FAQFAQ   GalleryGallery   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   Forum RSS Feed   Hacked Gadgets Main Site 

Stepper motor drive + controller (wave sequency)

 
Post new topic   Reply to topic    Hacked Gadgets Forum Index -> New Projects Currently Being Developed
View previous topic :: View next topic  
Author Message
oldspring
Newbie


Joined: 28 Oct 2008
Posts: 1

PostPosted: Tue Oct 28, 2008 4:31 pm    Post subject: Stepper motor drive + controller (wave sequency) Reply with quote

Hello, all;

This project use a H-Bridge Drive + BS2sx (controller) to drive a stepper motor.

Components:
1) Basic Stamp 2sx
Manufactory: http://www.parallax.com/
Datasheet: http://www.parallax.com/tabid/440/Default.aspx

2) Stepper motor
Manufactory: www.orientalmotor.com
Datasheet: http://catalog.orientalmotor.com/item/all-categories/pk-series-stepping-motors/pk243-01aa?&plpver=11&origin=keyword&filter=&by=prod
3) Mosfets, transistors, resistors, capaicitors
Bought from: http://www.mouser.com

Attached files:
a) Schematic:



b) Project code
Code:

'======================================================
'   File...... Stepper motor Drive + Controller
'   Purpose... BS2sx + Step Motor + H-Bridge Drive
'   Author.... OldSpring
'   Email..... OldSprings@yahoo.com
'   Started...
'   Updated... 28 July 2008
'
'   {$STAMP BS2sx}
'   {$PBASIC 2.5}
'   Wave sequence
'   step  1 2 3 4
'   +A    x
'   +B      x
'   -A        x
'   -B          x
'=======================================================
OUT1_A            PIN     8
OUT2_A            PIN     9
OUT1_B            PIN     10
OUT2_B            PIN     11
LOOP1 VAR Byte
SPEED VAR Byte      'Speed adjustment
LOW OUT1_A
LOW OUT2_A
LOW OUT1_B
LOW OUT2_B
Main:
FOR speed = 1   TO  9 STEP 3
'------------------- CW 360 degree --------------------
      FOR LOOP1 = 0 TO 50
        GOSUB STEP_CW
      NEXT
      PAUSE 100
'------------------ CCW 360 degree ----------------------
      FOR LOOP1 = 0 TO 50
        GOSUB STEP_CCW
      NEXT
      PAUSE 100
'------------------ CW 180 degree ---------------------
      FOR LOOP1 = 0 TO 25
        GOSUB STEP_CW
      NEXT
      PAUSE 100
'------------------ CCW 180 degree ---------------------
      FOR LOOP1 = 0 TO 25
        GOSUB STEP_CCW
      NEXT
      PAUSE 100
NEXT
'GOTO Main
END
'==================== Clockwise =====================
STEP_CW:          ' CW 7.2 degree
GOSUB STEP10
PAUSE SPEED
GOSUB STEP11
PAUSE SPEED
GOSUB STEP12
PAUSE SPEED
GOSUB STEP13
PAUSE SPEED
RETURN
STEP10:             ' CW 1.8 degree
HIGH  OUT1_A   '1
LOW   OUT2_A   '0
LOW   OUT1_B   '0
LOW   OUT2_B   '0
RETURN
STEP11:            ' CW 1.8 degree
LOW   OUT1_A   '0
LOW   OUT2_A   '0
HIGH  OUT1_B   '1
LOW   OUT2_B   '0
RETURN
STEP12:             ' CW 1.8 degree
LOW   OUT1_A   '0
HIGH  OUT2_A   '1
LOW   OUT1_B   '0
LOW   OUT2_B   '0
RETURN
STEP13:             ' CW 1.8 degree
LOW   OUT1_A   '0
LOW   OUT2_A   '0
LOW   OUT1_B   '0
HIGH  OUT2_B   '1
RETURN
'================== Counterclockwise =========================
STEP_CCW:          ' CCW 7.2 degree
GOSUB STEP00
PAUSE SPEED
GOSUB STEP01
PAUSE SPEED
GOSUB STEP02
PAUSE SPEED
GOSUB STEP03
PAUSE SPEED
RETURN
STEP00:             ' CCW 1.8 degree
HIGH   OUT1_A   '1
LOW    OUT2_A   '0
LOW    OUT1_B   '0
LOW    OUT2_B   '0
RETURN
STEP01:             ' CCW 1.8 degree
LOW    OUT1_A   '0
LOW    OUT2_A   '0
LOW    OUT1_B   '0
HIGH   OUT2_B   '1
RETURN
STEP02:              ' CCW 1.8 degree
LOW    OUT1_A   '0
HIGH   OUT2_A   '1
LOW    OUT1_B   '0
LOW    OUT2_B   '0
RETURN
STEP03:              ' CCW 1.8 degree
LOW    OUT1_A   '0
LOW    OUT2_A   '0
HIGH   OUT1_B   '1
LOW    OUT2_B   '0
RETURN


c) Project picture 1



d) Project picture 2



e) Project video:
http://www.youtube.com/v/kekL5DpTUP0&hl=en&fs=1

Thanks to hackedgadgets team and all forum users,

OldSpring (Author of the project)

More projects at OldSpring Project Website:
http://oldspring.110mb.com
http://oldspring.nvdv.com
Back to top
View user's profile Send private message

Display posts from previous:   
Post new topic   Reply to topic    Hacked Gadgets Forum Index -> New Projects Currently Being Developed All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group