Clarification: Pg16 of Microcontroller Interfacing Circuits-Stepper Mtr

rogerm123

New Member
Looking at the diagram of the ULN2003; can someone explain what the notations "To 11,To10,To 4, and To1" are referencing? Also are the two bottom pins the supply to the motor? And finally shed some light on #6 out and #7 out?
The motor is the 28BYJ-48.
My first intro to steppers.
Thanks
 

The bear

Senior Member
Hi,
You are more likely to get quick responses/answers if you add a link to the device in question.
Good luck..........
 

PieM

Senior Member
Manual3 Pg16: "Look carefully at the table, and notice that a pattern is visible. Coil 2 is always the opposite (or logical NOT) of coil 1. The same applies for coils 3 and 4. It is therefore possible to cut down the number of microcontroller pins required to just two by the use of two additional NOT gates. "
So input 1 is output 6 (pin 11) which is the logical NOT of Pin 1 (In2)
and input 4 is output 7 (pin 10) which is the logical NOT of Pin 2. (In 3)
Output are NOT gates.
 
Last edited:

rogerm123

New Member
So instead of using the Toggle command to abbreviate the coding -not competent enough to really understand yet, I wanted to start off programming all four coils independently to learn how to do it. The driver board which came with the motor referenced above has a plug for the motor which has five leads, pins for four inputs from the controller, and a ground and power pin. The coding online for similar devices (can not read Chinese) that I can find shows eight steps (which I can only assume is just repeated)? At the bottom is my code for these eight steps.
Result: It turned about 20deg over a long period of time- could not see movement with naked eye. Also LED lights for each motor leg do not make sense with inputs. I took the eight steps below to be the inputs to the driver board from my controller-If they are the outputs from the driver board to the motor should I code the controller as if below values were inverted ?


25928
The following picture is the control signal to drive a 28BYJ48 stepper to rotate 1/4096 circle.
line​
1​
2​
3​
4​
5​
6​
7​
8​
red
1​
1​
1​
1​
1​
1​
1​
1​
orange
1​
1​
0​
0​
0​
0​
0​
1​
yellow
0​
1​
1​
1​
0​
0​
0​
0​
pink
0​
0​
0​
1​
1​
1​
0​
0​
blue
0​
0​
0​
0​
0​
1​
1​
1​

symbol out1=C.0
symbol out2=C.1
symbol out3=C.2
symbol out4=C.4
symbol ctr1=b0

Start:
low out1,out2,out3,out4
Do while ctr1<2000
low out1,out2,out3,out4
'low out2,out4
high out1
pause 2
low out1

'low out2,out3
high out1, out2
pause 2
low out1, out2

'low out1,out3
high out2
pause 2
low out2

'low out1,out4
high out2, out3
pause 2
low out2, out3

high out3
pause 2
low out3

high out3, out4
pause 2
low out3 ,out4

high out4
pause 2
low out4

high out1,out4
pause 2
low out1, out4

ctr1=ctr1+1
loop
pause 5000
goto Start
 

rogerm123

New Member
Problem Resolved. Went back to 4 step vs eight step AND TIED DOWN THAT SERIAL IN PIN( a freshman mistake)
Thanks all.
 
Top