Another stepper motor ?

tmack

Member
Ive searched and read the other entries on the forum but still Im clueless. I am trying to drive a Haydon 35402 stepper motor 5vdc, 2.5 w 15 degree (bipolar) It looks as though it has 2 coils. The top one has red and black wires. The lower one ha blue and green wire.I have been using the code from here :http://www.picaxe.orcon.net.nz/stepdemo.bas. I can only to get the motor to "twitch". Im not sure if code isn't right for this motor or I have the wires hook up in the wrong order. ( I can't find a datasheet on this motor ) . Any help is appreciated.
 

moxhamj

New Member
We should be able to work around the lack of a datasheet. There will be two coils. Measure them with a multimeter and you will probably get a reading of about 6 ohms on each.

The key is to get the stepping sequece right. The sequence of highs and lows need to be in the right order. I've even resorted to using 4 SPDT switches in the past. Can you post the sequence of highs and lows going to each wire? Maybe use the code you have and put delays in of 30 seconds between each change and go round and check the voltages on each of the 4 wires and write them down. Have a look at pages 16 and 17 of the third manual in the help as it shows the stepping sequence.
 
Last edited:

tmack

Member
I measured the resistance. It seems the red and black are one coil, the green and blue are the other coil. Should I be able to drive this directly from the picaxe or do I need to put in the supporting circuit that looks like an h bridge (pg16)?
My code is firing up pins 0,1,2,4 in that order but im not sure which of my motor wires need to go with which pin. Ive tried it all different ways but seem to have no luck. I think this is what Ive got :

lmmml.lmmml
l......l l ...... l
l......l l....... l
l......l l ...... l
blk red blu grn
 
Last edited:

tmack

Member
stepdemo:
for b0=1 to 10 'CW rotation
pulsout 0,5000: pause 10 'blue Pin 0
pulsout 1,5000: pause 10 'black Pin 1
pulsout 2,5000: pause 10 'red Pin 2
pulsout 4,5000: pause 10 'yellow Pin 4
next b0
for b1 = 1 to 10 'C-CW rotation
pulsout 4,5000: pause 10 'yellow Pin 4
pulsout 2,5000: pause 10 'red Pin 2
pulsout 1,5000: pause 10 'black Pin 1
pulsout 0,5000: pause 10 'blue Pin 0
next b1
goto stepdemo
 

moxhamj

New Member
You need an H bridge. A stepper motor might need 1/2 to 1A per coil and a picaxe can only supply 0.02A per pin.
 

manuka

Senior Member
H Bridge? Normally they're used for bidirectional control of brushed motors.

Steppers need sequenced pulses & many are indeed quite power hungry, with a control amplifier of some sort needed. Often a UCN 5804 or L297 Stepper Motor Driver IC is the easiest approach. That "twitchiness" is a dead give away not enough current is being supplied for your setup. What is your coil resistance?

My barebones direct drive stepper circuit had been based around a bargain Electronic Goldmine stepper that drew only ~10mA & hence could be directly PICAXE driven. It evolved in response to both the availability of the cheap stepper & a wish to show simple stepper action. See the kind of simple DMM detective work involved => www.picaxe.orcon.net.nz/stepdemo.jpg

Stan
 
Last edited:

moxhamj

New Member
Certainly if a stepper only draws 10ma it could be driven with a picaxe. V=IR 5V 0.01A R = 500 ohms so a measurement here of the actual resistance would be very useful.

H bridges are needed for 4 wires steppers and would need two H bridge circuits for each motor. A 297 as two H bridges. 6 wire steppers can be driven with 4 transistors but the stepper that mccormack has sounds like a 4 wire motor.
 

gengis

New Member
Ditto about the H bridge they aren't for brushed motors - but any device that needs polarity reversal to the coil - permanent magnet brush motor, voice coil drive (hard drives use them), bipolar stepper, etc

See>> http://www.cs.uiowa.edu/~jones/step/types.html

He explains the different types of steppers and their drive requirements.

A bipolar is harder to drive than a unipolar (which can be driven from a single polarity of supply voltage to a center tapped coil). Advantage of a BP over a UP is somewhat more power for the same physical asize motor.

Seek and you should be able to find a driver chip that makes it relatively painless - like two H bridges on one chip. Or just research H bridge if you haven't encountered it before.

Car stereo's use a similar system four amplifiers to work two channels - they use linear H bridges. A way of getting more power through a given impedance of speaker coil.
 

Mycroft2152

Senior Member
The Haydon 35402 seems to be an obsolete model. See http://www.hsi-inc.com/
Usually the motor's specs are on the outside of the case. Look for the amperage needed to run the motor, that will give a good idea on how big a driver you will need. The 36000 (newer version?) requires almost 500 millamps to run at 5 volts.

Since the old standard, the 5804 driver chip, is now obsolete, and the replacement is surface mount. Sparkfun is selling an EASY Driver board that is a good deal.
 

tmack

Member
Well, I put a L293D in and wahlah it works. It seems kinda herky jerky though. Is it possible to make it run smoother by tweaking the code? Any advice as to where I should start? As always Thanks ALOT for your advice.
 

inglewoodpete

Senior Member
My guess is that the jerkiness could be caused by inappropriate software. Your code example was energising each output 1 at a time. The code sample for bipolar motors in the interfacing manual ("Output Device 7" pp 16, 17) energises 2 outputs at a time.

PS. I haven't done any work with stepper motors since my Intel 8080 days, 20+ years ago, so I could be barking up the wrong tree.
 

Rickharris

Senior Member
The speed also affects the jerkiness - at faster speeds the stop start nature is ironed out somewhat.

Energising 2 coils is use to give half step resolution in some motors to do this the coils are not = spaced but have a slight offset. It also increases torque because you have twice the magnetic flux.

Try stepping faster i.e. with less stop time between steps. To go slower make the on time shorter as well, in the example I have here the buggy (a commercial product) turns the motors off between steps to reduce power use.
 

SD2100

New Member
I am trying to drive a Haydon 35402 stepper motor 5vdc, 2.5w
15 degree
It will be jerky having 15 degrees per step, thats only 24 steps per turn, some motors have step sizes of 1.8 degrees which will give you 200 steps per turn and much smoother movement.
 

tmack

Member
I bought a couple other stepper motors in a surplus store near my house today. I cannot find any data on them. Is there a way to figure out what voltage I need to drive them. They are all bipolar 4 wires. One is japan servo kp56hm2-026 the coils R is 1.5 ohms and it says 1V on it . Can it really be 1V? The next is Japan servo kh42hm2-023 1.8 with a coil R of 28 ohms. The third is a Astrosyn 17pm-m008-05 that has a R of 11ohms on is coil. I ran this one on 5 volts and it seems to work ok. Is there any way that given what I know I can figure out the voltage? I could use V=IR but I dont know what I(current) is. Thanks for any help. Hope I'm not being too dumb here. Thanks for all the help.
 

moxhamj

New Member
There is no exact volts and there is a lot of flexibility here. The important value is the watts - how hot will it get if a coil stays energised. If you pulse it very occasionally and limit the pulse widths and don't leave a coil on for very long you can drive a 1V stepper with 12V or 20V or more. So ballpark figures - think about a 1W resistor and how big it is and how hot it gets (it would burn a bit at 1W) and then the size of a 5W wire wound ceramic resistor and how big that is and how hot it gets (do some experiments with resistors out of the junk box). I'd be nice to a small stepper (2cm) and maybe not put more than a watt or two through it. But an 8cm stepper with a 5 ohm coil running at 5V - that is 5 watts and it will get warm but it is bigger so can dissipate the heat.

Of course, when motors get hot they a) cook the insulation on the wires and b) the magnetic flux disappears and they stop working as motors.

So V=IR and W=IV so if you know the R and you pick a random V your 1V motor with a 1.5R coil will pass 0.66A and will heat up W=IR = 0.66*1.5 = 1 watt. So yes, it probably is a 1V motor.

Ballpark the 11 ohm one probably works best on 5-6V but with care would be ok at 12V.

If the motor moves to a position and then stays there (eg driving a lead screw) then it is off most of the time and so can handle a lot more intermittent current. If the motor is driving a robot wheel and is constantly fighting with the robot (eg the robot is trying to stay in the same place on an incline) they will get a lot hotter as they will be on all the time.

Also you can add resistors in series with a motor. This wastes power but it does give a more constant current drive which is what steppers like and maybe you only have a 5V supply. So for that 1V motor you could put 4 ohm resistors in series with the coils and this limits the current to about 1A. But only 1/5 of the energy coming from the battery goes into the motor - 4/5 is wasted in the resistors.
 
Last edited:

Mycroft2152

Senior Member
Dr. A. nice explanation.

There are a lot of methods to drive steppers. Getting the correct amount of power (not voltage) at the right time is the key to efficient running. Using resistors does waste a lot of power, so for higher power steppers current sensing and PWM are used. There are some chips and boards designed specifically for that purpose. One decent one is on the EASY Stepper board from Sparkfun. It is also reasonable priced. ~$15 Us.

The logic part is easily doable with a PICAXE, but the actual driver part can be tricky. Here is a clever inexpensive design for Instructables. Note: replace the logic with a PICAXE. The clever part is to use a light build as a varying resistor. They are inexpenive as compared to high wattage resistors.

http://www.instructables.com/id/Easy-to-build-CNC-Mill-Stepper-Motor-and-Driver-ci/?ALLSTEPS
 
Top