Let's Make Robots!

H546 Unipolar Stepper motor driver

Hi, ive been trying to make a steppermotor driver for 2 http://www.active-robots.com/products/motorsandwheels/stepper-motors/datasheets/103h546-0440.pdf

I have used a ULN2003 like this:

(the second motor is in 5, 6, 7, 8 (I have a bigger ic)

Only the first motor works. The other just wobbles back and forth. Does annyone know what I have done wrong?

PS the circuit worked tempromentaly when I breadborded it on 2 seperate ICs. I thorght that the tempromental-nuss was due to a dodgey connection somewhere (which I am plauged with on breadboards)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks to all of your realy good feed back ive mannaged to get them both running at the same time: on on a breadboard, the other in a circuit =) Typicaly I dont have enough headder pins to make a new circuit so that will have to go on hold for a while but again: thankyou!!!

What was it?

I have seperated it onto 2 chips so the batteries are seperate.

When I first did this it didnt work and I dont know why (I presume I soldered something badly) but now I have re-made it and it works !

do you have a more complete schematic showing your MCU and both motors and the battery, and other components like resistors and capacitors?

whats the exact battery and MCU you have?

did you do everything we suggested earlier like swapping the 2 motors?   this will tell you if the problem is the motor or not.

show us your code.   does your code "Excite" the motor as described in the datasheet?   

does the problem only show up when running both motors at same time, or problem shows up whenever you run 2nd motor?

you are correct, running a stepper motor is not always easy.   but if you remain patient and double-check everything 2 or 3 times you can do it.   dont assume anything is obvious. I have found that sometimes you must verify 2 + 2 = 4   at least 8 times.  :-)

My code is:

Symbol Blue1 = 7

Symbol Yellow1 = 6

Symbol Orrange1 = 5

Symbol Red1 = 4

 

Symbol Blue2 = 3

Symbol Yellow2 = 2

Symbol Orrange2 = 1

Symbol Red2 = 0

 

Symbol PauseTime = 20

 

Main:

gosub Step1

gosub Step2

goto Main

 

End

 

Step1:

low Orrange1, Yellow1

high Blue1, Red1

pause PauseTime

low Red1

High Yellow1

pause PauseTime

low Blue1

high Orrange1

pause PauseTime

low Yellow1

high Red1

pause PauseTime

Return

 

Step2: 'with un possibily un nessesary highs and lows just to see if it changes anything.

low Orrange2, Yellow2

high Blue2, Red2

pause PauseTime

low Red2, Orrange2

High Yellow2, Blue2

pause PauseTime

low Blue2, Red2

high Orrange2, Yellow2

pause PauseTime

low Yellow2, Blue2

high Red2, Orrange2

pause PauseTime

Return

Im using a Picaxe 28X1 chip on their 28pin learing board (like in the first robot tutorial)

I dont have a complete schematic so I shal describe. There is the normal picaxe board (like I said) so the output from the microcontroller goes through 330 ohm resistors and then through a wire to the darlington chip. I have the darlington chip wired up just as in the picture (i got it from google) but my chip has 8 inputs and outputs so its just plugged in like the picture but with 2 motors. I have the outputs of the darlington chip going straight to the motor. The darlington chip runs of the motor's power supply (as in the picture). I just have the battery soldered onto stripboard and then the relevent connections soldered onto the same strip: I have no capacitors or anything to smooth it.

I have tried the motors with 3 and with 4 of each battery: duracell AA (alkanine),  Ansmann energy didgital AA (NiMH, 2850mAh) and Hähnel Rechargeabble AA (NiMH,1800 mAh). 

When I swapped the motors it made no difference: the one marked in the code as number 2 still just jittered and the one as number 1 rotated contunuously. I have the same problem with number 2 wether the 1st one is plugged in or not. 

I think that the amps is much for the darlington :( however, I dont know of any other chips with higher amp caperbility. At the moment I am just running it for a few seconds anyway at a time so I doubt it will have burnt out yet and there are loads of schematics round the internet for steppermotor drivers that use that chip so mayby the datasheets I have read have been wrong??

Anyway, thanks for all of the feedback everyone: this is a big help :)

 

Red2=0 ? Pin 0? Should that be 1-4 and 5-8 instead of 0-3 and 4-7? Also check continuity from the mcu chip pins to the uln and from the uln to the motor cables.

Its labled 0-7 on the board but I agree it seems quite odd

assuming the motors are the same model, try swapping the 2 motors with each other, and leave the wires and connections all the same, to see if the problem travels with the motor or not.

double-check every connection for continuity.

try different slots on the breadboard.

make sure your battery has enough juice for the task.

make sure your code is properly talking to the right MCU output pins.

make sure you are complying with the voltage and current limits of the IC's and motors.

make sure your circuit matches your schematic.

what did you mean by "make sure your battery has enough juice for the task"?

Make sure you have the right operation voltage (Normally 12V for stepper motors). Make also sure your battery has the capacity to power a stepper motor. Depending on the size of the stepper, they can draw a lot of current.