Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help on Specific Bipolar Stepper Motor Sequence

Status
Not open for further replies.

tehipwn

New Member
Hello,

I have reviewed the tutorial available here:
http
://www.8051projects.net/stepper-motor-interfacing/programming-microcontroller.php

and I have got my bipolar stepper motor to turn using the wave drive sequence where only one winding is energized at a time. However, I need increased torque so I was going to go with the stepping sequence that energizes two windings at a time.

The code that causes my motor to turn counter-clockwise using an 8051 and an L298N Dual H-Bridge is:

STEPPER EQU P1
MOV STEPPER, #0001B
ACALL DELAY
MOV STEPPER, #0100B
ACALL DELAY
MOV STEPPER, #0010B
ACALL DELAY
MOV STEPPER, #1000B

So that is the sequence I use. I need assistance, based on that correct sequence, what will the new sequence be to energize the correct 2 windings without blowing my H-Bridge and possibly my Voltage Supply circuit??

I believe the cause of blowing is if both windings of the motor are energized at the same time, but my sequence is different than many websites show, so my windings must be arranged differently so I can't follow their code exactly.

Thank you for any help!
 
Last edited:
I cannot do microcontrollers, but I'll guess the following code could work:

Code:
STEPPER EQU P1
MOV STEPPER, #1100B
ACALL DELAY
MOV STEPPER, #1001B
ACALL DELAY
MOV STEPPER, #0011B
ACALL DELAY
MOV STEPPER, #0110B

Assuming the bits represend following sequense (stepper wiring): 1a 2a 1b 2b AND that the stepper is type bipolar (four wires, not five where one is common).
 
Last edited:
When looking up the sequences I was unsure of one thing. When you say 1a 2a 1b 2b...1a and 1b are connected, and 2a and 2b are connected, correct?

Assuming 1a is connected to 1b and 2a is connected to 2b, my windings are connected as follows:

Port 1.0 - Winding 1a
Port 1.1 - Winding 1b
Port 1.2 - Winding 2a
Port 1.3 - Winding 2b

So would this correspond to a sequence of:

1010
1001
0101
0110

??

That actually makes sense, since at no time no 2 sides of a winding will be energized at the same time.

Someone please confirm this before I blow my stuff up due to short to ground. I'm too scared to try without being sure.

Thank you!!
 
To make it bottom simple: What the sequense does is just to alternately change polarity of the two windings. Change windong1, change winding2, Change windong1, change winding2, Change windong1, change winding2, Change windong1, change winding2, Change windong1, change winding2, Change windong1, change winding2 --- and so on. Then both windings will always be active all the time.
 
The sequence I posted above worked out great. Grossel, thank you for your explanation in the simplest terms possible. The sequence is simple I know, but I just had to make sure before I tried it and blew something up.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top