Mystery Stepper with Axe117

Axel87

Senior Member
Hello all,

Have a mystery stepper motor that I am attempting to use.
Should be noted that this is my first attempt to date using steppers with Picaxe.

The information I can provide on the motor- (Google wasent friendly to me on this, I couldent find anything on this)
Printed on back- 35s1n15dcnr
100 ohm
4627 MB
5 wires- Yellow, Red, Brown, White, Blue
Placing an LED in the connector, all pairs light up when shaft is spun.
Resistance testing led me to the WHITE being the center tap. 200 ohm vs 100 ohm

I am assuming this is a Unipolar?? As this only has one center tap correct?

Next step is to connect this to my AXE117 board, as this has the ULN2003 to drive this.
I got stumped when I came to manual 3 pg.16
It shows a separate 12v supply on a "RED" wire. How do I know for sure that this is a 12V motor? i would presume this is a 24v
Also, I am not following how to connect this motor to the Axe117 from the diagram on pg 16.

Any pointers for me how to get this motor up and running? What material am i missing?
Thanks!

Information I used to get this far-
http://www.easterngeek.com/2010/06/how-to-identify-stepper-motor-lead.html
http://www.instructables.com/id/Find-Bipolar-Stepper-Motor-Coil-Pairs/?lang=es
Picaxe Manual 3
 

john2051

New Member
Hi, I did a search on google without the last letters, and it comes up with an HP media motor.
Presumably a printer motor. Ignore the dcnr. You could always contact hp, maybe they have a datasheet
available.
regards john

try this sales@serverpartswarehouse.com
 
Last edited:

oracacle

Senior Member
not all motors will have the same colour code on the wire. also the makes may intented for it to be comon ground with the other wirese going high.

i take it you 200 ohm from the white wire to all the rest of them, and the is infinte resistance between the rest of the wires
 

Axel87

Senior Member
it was 200 ohm between any two pairs
blue-Yellow, yellow-red ect
from the white to any wire it was 100 ohm
white-blue, white-red ect
From my reading I gathered that the center tap is 1/2 the resistance than any other.
This was just an approximation though ;/
 

SAborn

Senior Member
With your motor the white wire would be connected to V+ and the other wires switched by picaxe control to Gnd.

12v / 100 ohm = 0.12 amp per coil.
 

Axel87

Senior Member
With your motor the white wire would be connected to V+ and the other wires switched by picaxe control to Gnd.

12v / 100 ohm = 0.12 amp per coil.
how did I miss that formula derrr ;/
anyhow, heres what Ive found out playing round with this-
Tried the following code:
Steps:
toggle 1
pause 200
toggle 2
pause 200
toggle 3
pause 200
toggle 4
goto steps

Applied the +12V to the White and 12V GND to the motor case.
Nothing.
Disconnecting the picaxe cus the motor was getting warm.
Playing around with the motor more-
If I connect the 12V GND to White and connect the 12V supply in the following order
Brown forward 1 step, Red forward another step

Same with 12v GND to white
Yellow reverse 1 step, Blue reverse another step.

Any ideas as to whats going on here guys?
As stated, I am still new with these. I would venture to guess that this ULN2003 isnt going to have enough balls to push this? does the require a 12v pulse?
Or am I burning this motor? Damn noobs :) lol

Thanks!
 

SAborn

Senior Member
If the sequence is wrong for Brn, Yel, Red, Blu, then the motor will just step forward and backwards.

With 12v+ to white wire, do the test again shorting each of the other 4 wires to gnd one at a time, till you get the motor to take 4 forward steps, you will need to keep changing the sequence till you work out what colour wire in what order give 4 steps in one direction.

DO NOT apply Gnd to the motor case.

You really cant hurt anything by a wrong order as its just energizing a coil in turn.
 

Axel87

Senior Member
It seems if I disconnect all of the 4 wires- leaving the 12V on the white, by connecting one of the 5v supply for the darligton in
blue,brown,yellow,red order I can get the motor to make a full revolution.

What does this tell us? Is it my code?
If I connect all 4 in the correct order the motor does not spin.
 

SAborn

Senior Member
If its the code you posted above than yes the code is wrong.

It should be something like the code below, which was cut out of a stepper test program of mine, it is not suitable for you but you could change it to suit your needs.

Code:
symbol delay = 50

low c.1,c.6,c.0
	high C.7

Main:


	toggle c.7,c.6
	pause delay
	toggle c.6,c.1
	pause delay
	toggle c.1,c.0
	pause delay
	toggle c.0,c.7
	pause delay
	
	goto main
 

rossko57

Senior Member
To elaborate on what was wrong with the code, it turned on each coil in turn... but didn't turn any off. The motor will just get warm. To make the motor move, you have to turn some coil(s) on and some coil(s) off in turn, to make a moving magnetic field inside the motor.
 

Axel87

Senior Member
Thanks for the reference bfgstew, I will take a thorough look.

According to manual 2 pg. 244 TOGGLE-
"make pin out and toggle state"
"High command inverts an output(high if currently low and vice versa)"

Also, the code I grabbed was from manual 3 pg 16.
Why would they provide this code if it doesnt turn off the coils properly?

Thanks again!
 

SAborn

Senior Member
Why would they provide this code if it doesnt turn off the coils properly?
Well its up to you to learn, and not just copy someone elses example, otherwise they may as well program the chip for you too.

Toggle is like you turning a light on, you also need to remember to turn the light off again after you are finished with it........ toggle C.1, ... pause ..... toggle C.1
 

Axel87

Senior Member
Bit harsh. I apologize if I seem like I am fishing for code. I am not, mearly trying to understand what I am missing.
 

inglewoodpete

Senior Member
Hi Axel You need to to closely read the description and understand the circuit diagrams in Manual 3. There are two scenarios described for the unipolar motor.

Option 1 is to drive the motor, via the darlington driver, using 4 PICAXE pins. Turn each pin on, then pause, then turn the pin off. Your program must then move to the next pin and repeat the on/pause/off sequence. Finally, of course, return to the first pins and repeat the sequence.

Option 2 is to drive the motor, via the darlington driver, using 2 PICAXE pins. Note that the circuit diagram in Manual 2 page 16 uses two extra darlington transistors as inverters (a total of 6 transistors with 4 resistors). In this arrangement, two of the motor's coils will always be energised, since they will be in an opposite state to their mate. Using the colours in the manual, the black wire will always be in the opposite state to the brown wire; while the orange wire will always be in the opposite state to the yellow wire.
 

Axel87

Senior Member
Hi Axel You need to to closely read the description and understand the circuit diagrams in Manual 3. There are two scenarios described for the unipolar motor.

Option 1 is to drive the motor, via the darlington driver, using 4 PICAXE pins. Turn each pin on, then pause, then turn the pin off. Your program must then move to the next pin and repeat the on/pause/off sequence. Finally, of course, return to the first pins and repeat the sequence.

Option 2 is to drive the motor, via the darlington driver, using 2 PICAXE pins. Note that the circuit diagram in Manual 2 page 16 uses two extra darlington transistors as inverters (a total of 6 transistors with 4 resistors). In this arrangement, two of the motor's coils will always be energised, since they will be in an opposite state to their mate. Using the colours in the manual, the black wire will always be in the opposite state to the brown wire; while the orange wire will always be in the opposite state to the yellow wire.
Thanks for the input Pete.
I think Im starting to grasp whats going on inside the motor, but havent had any luck with the code.
I found this snippet which I found interesting ( Which I am assuming is utilizing "Option 2" you mentioned correct Pete? ) -
Symbol StepPatt = B0
Symbol StepIndex = B1

Symbol OUTS = PINS

StepIndex = 0

Top:
If INPUT0 = 0 Then CW
Goto CCW

CW:
If StepIndex = 0 Then CW_1
StepIndex = StepIndex - 1
GoTo CW_2
CW_1:
StepIndex = 7
CW_2:
GoSub OutStep
GoTo Top

CCW:
If StepIndex = 7 Then CCW_1
StepIndex = StepIndex + 1
GoTo CCW_2
CCW_1:
StepIndex = 0
CCW_2:
GoSub OutStep
GoTo Top

OutStep:
Lookup StepIndex, ($01, $03, $02, $06, $04, $0c, $08, $09), StepPatt
OUTS = OUTS & $f0 | StepPatt
Pause 250
Return
-http://www.phanderson.com/picaxe/step_1.html

I am sure this has been shared here before. But in case anyone else is reading this, thought I would share again.
Havent had a chance to test it out yet, but I do like the way he breaks down all parts of the code and explains its purpose.
 

inglewoodpete

Senior Member
The code....
Code:
Lookup StepIndex, ($01, $03, $02, $06, $04, $0c, $08, $09), StepPatt
OUTS = OUTS & $f0 | StepPatt
....indicates that it is for the 4-output version (option 1). ($F0 is a 4-bit mask: %11110000)

Peter Anderson's webpage describes half-stepping, which can be done with the 2-output option. So you need to make your choice and write your software accordingly.
 
Last edited:

westaust55

Moderator
Where the original posted code used the TOGGLE command, as already identified that changes to state and leaves the output at the new state.
Instead consider/try using the PULSOUT command which briefly changes state then reverts to the original state.
 
Top