Searching \ for 'More stepper problems' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/steppers.htm?key=stepper
Search entire site for: 'More stepper problems'.

Truncated match.
PICList Thread
'More stepper problems'
1999\09\21@015543 by Jon Petty

picon face
Hi

I've been having a battle with a stepper motor project. I think the problem
could be with the stepper motor itself.

After a lot of struggle getting the wires figured out I got the motor to move
in the CW direction. When I applied the reverse bit sequence the stepper
quivers. It works fine CW. I have tried about every bit sequence  and used
INCF and DECF on all the sequences. Some of the arrangements caused the
stepper to move in CW direction when the CCW button was pushed, but never CCW.

Any ideas?

Maybe I am just brain dead. It is a 6 wire linear 12v stepper, 2 power wires
and 4 coil wires. I have ordered some more steppers with docs, as soon as I
get them I can give then a try.

tHANKS

jON

BACKGROUND-------------------

I rearranged the wires on the motor

FROM            TO
1----           2----
2----           1----
3----           4----
4----           3----

When I did this the motor would now turn CCW and no bit sequences would turn
it CW.


This sequence works using INCF in both wiring schemes- the 1234 wiring scheme
turns CW and the 2143 turns it CCW

STEP
   ADDWF   PCL, F          ;full step
   RETLW   B'00000110'
   RETLW   B'00010100'
   RETLW   B'00010001'     ;WORKS IN CLOCK WISE DIRECTION
   RETLW   B'00000101'

Using 1234 wiring scheme and these bit sequences will not produce CCW turn.
Using 2143 wiring scheme and these bit sequences will not produce CW turn.

1234 wiring scheme

STEP2
   ADDWF   PCL, F          ;full step
;   RETLW   B'00000101'
;   RETLW   B'00010001' ;INCF BINDS
;   RETLW   B'00010100' ;DECF TURNS CW OK
;   RETLW   B'00000110'

;   RETLW   B'00010100'
;   RETLW   B'00000110'
;   RETLW   B'00000101' ;DECF TURN OKAY CLOCK WISE
;   RETLW   B'00010001' ;INCF BINDS

;   RETLW   B'00010001'
;   RETLW   B'00000101'
;   RETLW   B'00000110' ;DECF MAKES THIS BIND
;   RETLW   B'00010100' ;INCF MAKES THIS TURN CW

;   RETLW   B'00000101'
;   RETLW   B'00010001' ;INCF BINDS
;   RETLW   B'00010100' ;DECF TURNS WELL CLOCKWISE
;   RETLW   B'00000110'

;   RETLW   B'00000110' ;INCF MOVES CLOCK WISE OK
;   RETLW   B'00010100' ;DECF BINDS
;   RETLW   B'00010001'
;   RETLW   B'00000101'

;   RETLW   B'00010001' ;DECF BINDS
;   RETLW   B'00010100' ;INCF BINDS
;   RETLW   B'00010100'
;   RETLW   B'00000110'

1999\09\21@053417 by McMeikan, Andrew

flavicon
face
Hi Jon,
       those bit patterns did not look to crash hot, not saying its wrong
(didn't look that close), but not obviously correct either.
I have some code that drives a stepper (although off a shift register, but
you will still be able to figure it out), if you (or anyone else) wants a
copy of it (a thermal printer using a 16c84,thermalhead,shift register [or
two, can't remember]) send me an email (OFF LIST) with a subject of 'send
file thprn.asm' and my machine will send it off to you.

       cya,    Andrew...

PS:Yes I know I write lousy code!

> {Original Message removed}

1999\09\21@064620 by Quentin

flavicon
face
Jon Petty wrote:
>
> Hi
>
> I've been having a battle with a stepper motor project. I think the problem
> could be with the stepper motor itself.
>
> After a lot of struggle getting the wires figured out I got the motor to move
> in the CW direction. When I applied the reverse bit sequence the stepper
> quivers. It works fine CW. I have tried about every bit sequence  and used
> INCF and DECF on all the sequences. Some of the arrangements caused the
> stepper to move in CW direction when the CCW button was pushed, but never CCW.
>
But if it turns CW does it turn smoothly? You should feel some torque if
it does.
Sounds to me you still got a wire problem. Let me try and explain my
way:
I take it you got the coils figured out to be:
WireA-Coil-Common1-Coil-WireB
and
WireC-Coil-Common2-Coil-WireD
If correctly wired, then for full step, the sequence should be:
Pulse1 on WireA, Pulse2 on WireC, Pulse3 on WireB, Pulse4 on WireD. This
is what you want.
OK, now how to get the sequence:
Connect Pulse1 and Pulse3 to WireA and WireB, and Pulse2 and Pulse4 to
WireC and WireD. Don't worry about which goes to which for now, actually
you wouldn't know now anyway, hehe.
Run your steps. Don't worry about direction either for now, you just
want it to turn smoothly, any direction.
If the stepper does not run or runs jerky, swap just WireA and WireB.
Leave WireC and D as it is.
Hopefully it should turn smoothly now, if not, see timing.
If you now want to turn direction, do it in your software, but if you
want to change direction on the wires, you'll have to swap WireA with B
and WireC with D.

Timing: Another problem I can think of is that you might either try to
run the stepper to fast, or depending on load, accelerate the stepper to
fast.
Try and put a longer delay between pulses. On the steppers I use
(industrial types) I found if the time delay gets down to 10 millisecs,
I start to get problems.
Stepper motors with load (inertia) can loose it's sequence (pulse/coil
relation) if accelerated to fast.

Rather start with a longer time delay between pulses and speed up the
stepper when it works OK.

Try any one of my Bit sequences:
;HALFSTEP, SLOWER, MORE POWER
STEP        ADDWF       PCL,F
           RETLW       B'00000001'
           RETLW       B'00000011'
           RETLW       B'00000010'
           RETLW       B'00000110'
           RETLW       B'00000100'
           RETLW       B'00001100'
           RETLW       B'00001000'
           RETLW       B'00001001'

;FULLSTEP, FASTER, LESS POWER
STEP        ADDWF       PCL,F
           RETLW       B'00000001'
           RETLW       B'00000010'
           RETLW       B'00000100'
           RETLW       B'00001000'
           RETLW       B'00000001'
           RETLW       B'00000010'
           RETLW       B'00000100'
           RETLW       B'00001000'

Hope this helps
Quentin

1999\09\21@152927 by Jose Souto

flavicon
face
Jon, have you already looked at http://www.cs.uiowa.edu/~jones/step ?

Jon Petty wrote:

> Hi
>
> I've been having a battle with a stepper motor project. I think the problem
> could be with the stepper motor itself.

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...