SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By fatfenders
#194406
Brand new to the game.
1. Parrallax BS2 BOE
2. Easystepper.
3. Mercury Motor SM-42BYG011-25: 30 tooth GT-2 timing pulley; belt, same pulley on the "other end" 12" away.

I am attempting to move a wooden slider back and forth on metal rails. Very little resistance/friction other than that created by the belt on the pulleys and the slider.
I have a test program running the slider back and forth OK but it is just too slow for what I want. Maybe 60 RPM or so.
With the code shown below and adjusting the belt tension as slack as possible (without skipping) it just is not fast enough for what I want which is about 2X as fast.
Could not detect much change when adjusting the easystepper potentiometer.
Am I expecting too much from that motor? If so what motor should I be looking at?
I played around and the code below seems to get the most out of my configuration:

DO
GOSUB forward ' Step forward
PAUSE 300

GOSUB back ' step back
PAUSE 300 ' pause 300ms
LOOP

' Subroutines
forward:
DEBUG CR, "right", CR
FOR j = 1 TO 200*2

LOW _DIRECTION ' Direction
LOW _MS2 ' Select Full Step...
LOW _MS1 ' two phase
PULSOUT _ONE_STEP, 300
PAUSE 2
NEXT

RETURN

back:
DEBUG CR, "left", CR
FOR j = 1 TO 200*2
HIGH _DIRECTION
LOW _MS2 ' Select Full Step...
LOW _MS1 ' two phase
PULSOUT _ONE_STEP, 300 ' one step; 2 microseconds
PAUSE 2
NEXT
RETURN

Any suggestions appreciated.
By Valen
#194440
You do not give any measurements how quickly it actually moves at all. Just that it is insufficient to your desire. Well, how swift if swift?

You state you want 60 RPM. Which means a frequency of rotation and makes no sense if the wooden slider moves in a linear motion. But I guess it should take about a second to move. The mass of the slider and all moving things combine determines the actual speed to which the motor can accelerate. So it may not be possible for it to move to your liking.

Well the timing of each move takes about that time to move in one way. According to the following guide the unit of the PULSOUT duration is 2 microseconds for the BS2.
http://www.parallax.com/go/PBASICHelp/C ... ULSOUT.htm

Your code wants 300 units pulse duration. So each step takes 0.6 miliseconds. Additionally you make it PAUSE 2 miliseconds per step.
http://www.parallax.com/go/PBASICHelp/C ... /PAUSE.htm

That's 2.6 miliseconds total. Then with 400 steps per For-loop this totals 1,04 seconds per direction. So play around with the timing values and see if you like that better.
By fatfenders
#195543
Valen,
Thanks for going to the effort to reply but I just now noticed your post. In the event, and since this was just a silly, fun little project, I decided to just live with the speed I was getting and finish the project. I was more or less successful as you can see in the video I created.
https://www.youtube.com/watch?v=Fyxlian ... e=youtu.be