Have you been searching for a goot damn circuit to drive your stepper motor?? Well even i did when i was learning robotics. Most stepper motor circuits that are available onlne have a bunch of transistors, Sometimes power trnsistors too quite a complicted circuit that drives you away far frm using it. Well i felt for most robotic use the stepper motor can be driven by a simple ULN2003 IC that costs just 12 bucks in my backyard.
The above are the most common types of stepper motors that you’l find in the market.
There are two types of stepper motor that normally is used.1)Unipolar 2)Bipolar . In simle terms they can be thought about like this. In unipolar there are 5 wires.One common wire and four wires to which power supply has to be given in a serial order to make it drive. Bipolar (not normally used in robotics) can have 6 wires and a pair of wires are given supplt at a time to drive it in steps.
STEP ANGLE :The angle with which the stepper motor turns for a single pulse if supply toone wire or a pair is called step angle.
Driving a stepper motor:
1) Identify the wire : Common and windings
As you may see that out of the five wires two are grouped as coomon. The other four are the windings you’l have to give your supply to. Now major crux here is to identify the common line. that’s pretty simple. Just take your multimeter and check the resistance between the wires. Hold one wire a common and it must bear a resistance of 75 ohms with all the other wires then that is the common wire.
Once you have done that the reset of the issue is just a cake walk.
Connect this circuit:
I guess you understand the connections: in case you find the fpic above messy have a look below,
So this is it.Now use your Microcontroller PIC16F877A to give +5v supply to pins a,b,c,d one by one that’s:
a=5v,b=0,c=0,d=0
a=0,b=5v,c=0,d=0
a=0,b=0,c=5v,d=0
a=0,b=0,c=0,d=5v
Then stand aside and watch your motor run.!!
A stepper motor is hard to make it usable in a robot yet the square type of stepper motor seememed to work pretty well for me. My Micoromouse Robot was built on stepper motor . I fount this mechanical design for a stepper mototr robo that’l help you design yours,have a look.
guys.. get your bot up and running
—Madan
If you are new to stepper motors and don’t get this clearly get the exact circut and code
P.S:-
–>Stepper motors are are mostly suited for contests where precession is most inportans like maze solving and path finding robots. where you’l need to know the distance you’d travelled or take a 90′ turn. these things are difficult to handle on a normal DC motor.
–>The minimum time between the two pulses given to ‘a’ , ‘b’ must be greater that 200 micorseconds(it depends on your motor)
–> Microcontroller can always be replaced with your computer parallel port
–> UlLN2003 can drain upto 500 mA so most stepper motors can be drivin satisfactorily.
nice.
can we use this ckt to run HDD platter motors too. http://www.pcguide.com/ref/hdd/op/z_000923spindlemotor.jpg
some steppers got less cables ie 4 and some got hight 6.can i use this same ckt to run any stepper.(just by identifying the ground cable)
and if possibl pls upload the complete schematic with PIC and its code.
thanks
Actually this circuit can be understood this way. unipolar motors needs to drain the current in that series through the pins so i do it using a Inverting darlington pair IC (ULN2003). Actually any type of application which needs to drain (pull low) or rather High too , can b interfaced trough the IC.
You can use The above circuit to work with the HDD platter motors,Just that you’l have to manage the signalling sequence properly to the many pins that needs to be addressed.
You’l find it here:
http://www.epanorama.net/circuits/diskstepper.html
Follw these procedures as given there
1. Deactivate the WRITE GATE line (pin 6)
2. Activate the DRIVE SELECT line (pin 26,28,30 or 32)
3. Wait for READY and SEEK COMPLETE signal to be true.
4. Select the direction with DIRECTION signal. (pin 34)
5. Send the movement pulses using STEP line. (pin 24)
Point to note here is that in the circuit in my post, you are required to give a high in the input pins of ULN2003 to pull output low.
But while signalling for the 5 teps above you’l have to pull the input of ULN2003 Low to get a Output as High.
Crux is that Since your PIC or Parallel port can’t handdle current levels of that magnitude you p[ut an intermediate IC wiz ULN2003. and then give the signalling as required to drive any device.
I guess i’m clear. incase you still need clarification pl don’t mind and comment again.
this article is cool..it clarified my doubts on how uln2003 driver ic should be connected to stepper motor..
it would be of great help if u could explain how this uln2003 ic must be connected to the microcontroller and how the “abcd” pulses must be generated..pls send in the code too ..thanks buddy
hi harrynee .. i have posted what you asked for get it here
https://madan.wordpress.com/2006/06/29/exact-circuit-and-microc-code-for-stepper-motor/
that info was really useful buddy..we got an uln2003 ic n a stepper motor n other required components..we are gonna test them today and wil let u know of our progress..keep up ur cool job!
wat is that u are makin and were u from harynee. saw u on roboics india forum before i saw your comment here!!
me n my frends we r trying to make a humanoid robo..we r in the beginning stages of it..didnt now how to proceed..but now got a kick start..we made the pcb ckt for motor operation..soldering n stuff is over..gotta test it today..wil keep u updated.. ya joined the robotics forum recently to get some guidance for the project..
so r u from svce? i am 2nd yr btech IT from velammal engg coll
so r u from svce? i am in 3rd yr btech IT from velammal engg coll
oh cool… me am in final year ECE in SVCE. me goin to start off with humanoid soon.. geme your mail harrynee(nopesibly haryne). my IM is madan3030. do let me know yours.
are u online now???
its ha_rini5@yahoo.com mail in..
Hi,
i am searching circiut to run hard disk motor continiously at highspeed for my hoby project .i do have hdd motor of a samsung 40 gb hdd,i need full details of that motor ,imean about the terminal detail and the circuit to power the motor for the constant rotation of that motor if detail available pls reply to my mail
Hi,
@ Ib / Vce : Very nice thing to post here the circuit diagram for wiring the stepper with the ULN2003. I try to use it these days for driving a stepper for my telescope motorized mount (the difference is that I don’t use a PIC mC but I use my parallel port of the laptop for drive sequence). Two remarks though: please take care that different steppers have different internal resistance, therefore you have to control somehow the curent that flows throught the motor coils (the maximum output of the ULN2003 is 500mA). So some resistors might be required for other applications (in case your application must drive e slightly more powerful stepper). The second remark is that you may drive your motor with half step sequence, with a slight change of the PIC code. You fin on the net dozens of sites that explain how that works.
Anyway, very nice work and congratulations!
@ A.Stalin : It might be a little more difficult for you to drive such a motor if you say that it comes from a 40gb hdd. I highly doubt that your motor is a stepper motor because as I know curent HDDs don’t use steppers anymore. Older HDDs used steppers to move the read/write head of the HDD.
Regards,
Quasar
thanks for that quasar!!!
May i ask whether the wheel can directly connect to the stepper?? Will it run off as the torque of the stepper is very big…
yeah man. can connect wheels to stepper. i have done that.
i found this ckt on net
http://grant.solarbotics.net/Circuits.htm
we can use this to run hdd motor.
iam not sure but will it work for all types of stepper motors?
at first shot. i think 7414 is a schmit trigger and doesn giv eout enough current to drive your motor. i’l appreciate if you can try it out and post a comment here.
madan plz can you tell me which driver ic to use with the bipolar stepper motor. actually i have bought a stepper motor with 4-wires and now unable to find an ic to drive it. Can you help me with the circuit, wiring and interfacing to an 8051. With regards.
can i know that what is the purpose that we using uln2003 driver to control stepper motor.Besides ULN2003 is it stil got any IC we can use?
@Meesam
U can use uln2003 . hust see the pulse sequence properly which will be 2 pulses at a time. ( essentially 2 pins of your 8051 must be grounded at a time)
@Darkside
Uln2003 is nothing but a darlington array. which can drain good amount of current. There are many ic’s that goes like ULN—-
There’s a good list of those, You need to search.
can u tell me the color code for stepper motor tointerface it with microcontroller using ULN2003
i interfaced ULN2003 with the steper motor but ic got heated up and motor slowed down it cant pull load.(i use 1 to 3 kg of load in our project).
will u plz provide a solution to pull and push load of 1 to 3 kg. i am in chennai doing my final yr project so if u can provide any shop it will be better for me.plz mail me the answer g_barath@yahoo.co.in ( i am new to this forum)
i used the left hand side motor in picture( top of this page)
square one
1-3 KG load? well why do you want to use only stepper motors there? any positioning application? Furthere the motor which you mentioned will not lift that load.
For the load which you want you may find bigger motors at ritchi and those can’t be run with ULN since they draw more current and ULN can drain only upto 500mA.
hi,
plz can u tell me how to interface a bipolar stepper motor(6 pins) to the 8051 microcontroller.
Hi,
Pls tell me how to interfacea stepper motor to a PIC16F877A controller..the motor require 3.5ampers current..
Hi,
Pls tell me how to interface a stepper motor to a PIC16F877A controller..the motor require 3.5ampers current..
use relays instead of ULN in the aboce circuit diagram. I hope that works!! pl try it and comment it back here.
REGARDING INTERFACING OF STEPPER MOTOR AND IR SENSOR WITH 89C51. plz send circuit diagram also.
@Bikram
What you ask for is given on this site. if not 89c51 its for PIC. all you have to do is understand how it works and use it for your microcontroller.
Use search option adn search for “Stepper motor” and you’l find the details you require
Hi Madan
Was wondering is this the easiest way to interface between 4 stepper motors and my PIC16F877 development board, have seen circuits were two motors can be controlled using the ULN2003, is it possible that you might be able to send me a circuit design like this or maybe another alternative. I am also making use of 5 DS1868 digital POTS as these are the only ones i would be able to use so i dont have to write the driver files for them myself.If you could send me a link explaining the connection of these to the PIC16F877 that would help alot.
First time acually experimenting with this field of electonics so some help would be great…
Thanx
@iceman
This is the easiest way of doing it. if you have any other pls suggest me man. do mail me, I’l put them here.
hi, i was wondering how can i design or connect a circuit using a PIC16F877A to a motor driver which is the ULN2803 to control a stepper motor?
If it’s possible, can someone include some circuit diagram so that I can have a clearer picture of the circuit? Thanx
@ jan
Have that exact circuit for you, i am using it in one of my own small projects, as i need to run multiple stepper motors from my PIC16F877. Am unsure how to post the diagram on the web so if you send me an e-mail ill send you the cct.
my e-mail: s20532085@nmmu.ac.za
@ jan
Check out this site just found it, it really concentrares on the basics but should give you a good indication, sunrom also have a premade circuit which you can purchase for $8.33.
Here is the site for the uln2803: http://www.scribd.com/doc/19188/Seminar-on-Mobile-Robotics
goodluck
i would like to know how a stepper motor runs using 8051 micro controller pls reply me………
pls send d ckt so tht i can get things clr its very urgent for me tnx……….
i have a load of 10 kgs.A stepper motor with a torque of 18 kgcm and 2 amp per phase current would work???
For the controller what should i do as ULN2003 won’t work???
@arpit
plese use uln foloower by a relay. ULN should activate relay switch instead of the stepper motor coils. the relay should inturn be connected to the motors.
please!
my motor stepper has 3 lines
and other has 4 lines only
how to use it?
@SInventor
Your four line stepper motor is a bipolar motor and it doesnot have a com line as said in this tutorial above. Secondly i have never heard of a 3 wire one. if you find it out pls post a comment here
the 3 wire stepper motor – from CD/ROM drive (LG,Teac)
and 4 wire – from Hard Disk drive (JVC motor)
and each no colors for wire.
4 wire = 1 common and 3 phase windings. just connect the common to power and pulse the rest (ground potential) sequentially. how to know which wire is common? the resistance between common and a winding will be about half of that between 2 windings.
3 wire = brushless dc motor? (unconfirmed). again, 1 common, and the other 2 are like 2 phase stepper, just pulse 1 at a time. to reverse either of these motors reverse power and ground potential.
Hello sir,
We are building a micromouse using stepper motors. We have 2 stepper motors with following ratings-
1. 3.5V , 0.7A
2. 3.8V , 0.67A
The ratings of the two motors are different and we have to overdrive the motors at around 12V.
For that purpose we are using IC SLA7024M (ALLEGRO MICROSYSTEMS) which is a PWM CHOPPER
IC.
So, we are facing certain difficulties,plzz help to sort them out.
1. Can we overdrive the stepper motor of this rating at 12V?
2. Which IC is better to use for driving it-IC SLA7024M or IC UCN5804B?
3. If using IC SLA7024M , how the current through stepper motor is to be controlled?
4. Will the different ratings of the two stepper motors affect the response much?
HI
I NEED TO DATASHIT HARD DISK STEPER MOTOR FOR MAKE PULSE FROME A ROUND
TANKE YOU
it was nice
u req lot of improvements in technic u hav suggested.
u should read book ‘STepper motors’ by “neon fabrigas”
can i have link to that? at amazon or a ebook too.
hi madan!
can you plz tell me the torque of the stepper motor to be used in the micromouse, i.e. how much load should it carry? should 500gm load carrying stepper motor be sufficient for micromouse?
yeah that should do well for your work
Hi All
Mainly for SInventor (post 47)
I have a 3 wire Stepper Motor (?) salveged from an old 8″ disk drive. I think it operates on either 12 or 24V. The roatation sequence is normally 1 2 3 1 2 3 ….. and can be reversed by reversing the sequence at any point ie 1 2 3 2 1 3 2 1 ……. {reverse occures at the first 3 to 2 transition. Reverting to first rotation direction is done in the same way as the inital reversal.
I have not yet set this up via a micro controller, but have experimented just by applying power to the respective terminals.
Hope this helps
Regards
Jaye Monroe
_____________________
3 Wire opps
I just checked the motor and it is a 3 Phase not 3 wire. Checking it with a 12 volt supply, each phase draws 1.6 amps. The info on steping sequence still holds.
Regards
Jaye
____________________________
Thanks for the info Jaye
hey madan..
i hv used stepper motor in my micromouse..starter in dis field..
motor hs ratin of 7.5dig..
bt i dnt knw abt its torque nd current nd voltage rating..
cn u plz hlp me.. to knw these values..
i m using ucn5804 to drive that stepper motors(7.5dig)..
so wht reading of voltage i hv to use ucn so that motor run with highst efficiency.
hi madan, i m total newbie.
i m confused.
do i have to connect power supply to common wire or to the other four wire.
And i m using atmega32 micro. but as you said
a=5v,b=0,c=0,d=0
a=0,b=5v,c=0,d=0
a=0,b=0,c=5v,d=0
a=0,b=0,c=0,d=5v
atmega cant provide 5v(as far as i know).
and i m totally confused about power sypply. aint there any need to cooncet supply to uln2003 i mean without it how can it provide 500ma current.
pls help me here
thank you very much
ULN will not provide 500mA but drain 500mA.
And connect supply to common
hi madan
can u tel me which ic has to be used to drive a stepper motor of 6 amps, 10v rating. as uln2003 wont work
plz mail man …. its urgent…….. thanku .
@vandana
hey use uln to drive relays and let the relays provide the 6a current to the stepper motor….
hi,
Can I use ULN2001 instead of ULN 2003?
Thank you
somebody if knows the driver circuit of hard disk drive or its sequencing………..
ULN is not my quest .
i need it urgently and looking for people who can help my team in quest or HYBRID SUV drive automated systems ……
if any one is interested in automotive robotics plz contact me on mail>>>>>>
danieloceanrecon@gmail.com
hello ,
can u help me for controlling the speed of a stepper motor with the help of microcontroller . the speed should be controlled such that when load will be given , the motor speed should be the same as the initial speed . that is every time the motor should maintain the same speed , if the load is applied or removed . please get me the circuit diagram to my mail .
thank you .
hello ,
can u help me for controlling the speed of a stepper motor with the help of microcontroller . the speed should be controlled such that when load will be given , the motor speed should be the same as the initial speed . that is every time the motor should maintain the same speed , if the load is applied or removed . please get me the circuit diagram to my mail . my mail id is debashishsahoo87@gmail.com.
thank you .
hey,
i used the uln ckt.. it works great ………but its draining the battrey in no time……… and so i used a high power battery which burnt off the i c…… can u help me plz.
what is the speed that can be in such square stepper motor shown in fig in rpm
http://freeringtones.ifastnet.com
hi madan!
could u pl tel me wats d major difference between PIC n MICROCONTROLLER 8051.its preferrable to use pic rather than MC8051
sir
can i use ULN2003/2004 to control BLDC motor???
plz tell me some application of stepper motor
hello,
I using 4 stepper motor in my project,my question is
when s1 is working,s2,s3,s4 will not work.after sometime s1 will
off,s2 will work.s1, s3,s4 will not work.after sometime s2 will
off,s3 will work.s1,s2,s4 will not work.after that s4 will off,then ist s3will work,s2 will work,s1 will work.after that the process will continue.
thank u
hi madan, i m total newbie.
i m confused.
do i have to connect power supply to common wire or to the other four wire.
And i m using atmega32 micro. but as you said
a=5v,b=0,c=0,d=0
a=0,b=5v,c=0,d=0
a=0,b=0,c=5v,d=0
a=0,b=0,c=0,d=5v
atmega cant provide 5v(as far as i know).
and i m totally confused about power sypply. aint there any need to cooncet supply to uln2003 i mean without it how can it provide 500ma current.how i access stepper motor without parallel port.If i use parallel port please send me the diagram i used.
pls help me here.
thank you very much
viz Says:
January 13, 2008 at 6:00 am
hi madan, i m total newbie.
i m confused.
do i have to connect power supply to common wire or to the other four wire.
And i m using atmega32 micro. but as you said
a=5v,b=0,c=0,d=0
a=0,b=5v,c=0,d=0
a=0,b=0,c=5v,d=0
a=0,b=0,c=0,d=5v
and i m totally confused about power sypply. aint there any need to cooncet supply to uln2003 i mean without it how can it provide 500ma current.
pls help me here
thank you very much
>>elias
these 5V is TTL logic 1 , i think it will work wid atmega try dis code:
#include
#include
void main()
{
DDRA=0xFF;
DDRC=0xFF;
PORTC=0x03;
while(1)
{
PORTA=0x01;
delay_ms(300);
PORTA=0x02;
delay_ms(300);
PORTA=0x04;
delay_ms(300);
PORTA=0x08;
delay_ms(300);
}
}
after first include it is mega.h
delay.h
hi madan,i am jus a beginner…i tried a simple ir circuit given in this site can u jus tell me wat actuator i can connect to tat circuit…lik one havin linear motion so that it clicks a camera
i hav already asked u bfore abt this….i wanna know a simple mechanism 2 kick a ball ( as in a football robot )….
can you calibrate using the circuit
Can you regulate and then generate with the circuit.
please let me know that can stepeer mottor rewind again
yes i want the stepper motor to rewing again
can you regulate then be able to integrate then generate with the circuit?
hi can anyone post the 4 amps & 3volts stepper motor driver circuit using mosfets having four channels .plz iam requesting everyone plz send this ckt to me.coz i need this for my project for connecting HS-50 stepper motor.
iam requesting u again and again can anyone plz send the ckt
can i control the stepper motor by using a dsp kit ie 6713dsk… by writing a c code for it…
Does anyone have a good example of a Pic controled H-Bridge to control a motor.
I want to use PWM to control the speed and direction of a 12v DC motor. I suspect that the motor will draw up to 10A. I suspect that I will need to use N-Channel and P-Channel Mosfets. I have tryed one schematic, but it did not work, so I have been searching the net, and thought I would ask the experts
hi
i made one home cnc router but unknow who that driving
if have driver for step motor please send me pcb and shematic
please help me
thankyou
hi
i made one home cnc router but unknow who that driving
if have driver for step motor please send me pcb and shematic
please help me
thankyou
step 1.8 deg – 6.5v – 1.3a
It is recommended to connect a 12v zener diode between the power supply and VDD (Pin 9) on the chip(ULN2003), to absorb reverse (or “back”) EMF from the magnetic field collapsing when motor coils are switched off.
Plus there is an 8 bit version of this chip “ULN2803”. So this single chip is enough to drive both the motors.
hi madan…
ur doing a gr8 job..keep going man.
plz can u tell me how to interface a bipolar stepper motor(6 pins) to the pic16f877a microcontroller.i knw the connections for 5 wires..if possible plz send me the cod and ckt diagram..its realy urgent…help me
hi madan…
ur doing a gr8 job..keep going man.
plz can u tell me how to interface a bipolar stepper motor(6 pins) to the pic16f877a microcontroller.i knw the connections for 5 wires..if possible plz send me the cod and ckt diagram..its realy urgent…help me
am using STM981 stepper motor which uses 9v and 1.4 amps having 6 wires…so can i use uln2003 or shud i go 4 some other ic…plz reply
hi
i made one stepper motor driver(bipolar). using L297 and L298 but it cannot operate. I try to solve that but nothing interesting result. so i would like to commit sucide..please help me…tension!!!!aarrrgggghhhhh!!!
alease send me abstract of this project……because i have desined this nd now i hv requred its ABSTRRACT
how to connect 4pin relay to89c51(connect with telephon hook switch) also the suitable relay
the ircuit and the internal discrption.plz very argent
hi
can i check voltage in parallel port?
also can i use driver uln2004a ??
I want to drive the stepper motor using msp430fg4618 thru uln2003…but will there be any current or voltage mismatch that would cause damage to my msp…
I want to drive a bipolar stepper motor with Atmega 8. Can I use ULN2003(motor driver) to drive this bi-polar motor in both (forward& reverse) direction?
a=5v,b=0,c=0,d=0
a=0,b=5v,c=0,d=0
a=0,b=0,c=5v,d=0
a=0,b=0,c=0,d=5v
Assuming the sequence is for a bipolar stepper motor.
This sequence will run the stepper motor; Its right..
But this wont give enough torque for the stepper motor.
Its better to use a sequence where u activate two lines at a time.
eg:
1. a=5v,b=5v,c=0,d=0
2. a=0,b=5v,c=5v,d=0
3. a=0,b=0,c=5v,d=5v
4. a=5v,b=0,c=0,d=5v
and again
1. a=5v,b=5v,c=0,d=0
This is for full step drive.
If one needs to run the same motor on half step, try this sequence.
1. a=5v,b=5v,c=0,d=0
2. a=0,b=5v,c=0,d=0
3. a=0,b=5v,c=5v,d=0
4. a=0,b=0,c=5v,d=0
5. a=0,b=0,c=5v,d=5v
6. a=0,b=0,c=0,d=5v
7. a=5v,b=0,c=0,d=5v
8. a=5v,b=0,c=0,d=0
and again
1. a=5v,b=5v,c=0,d=0
This sequence can be created with a TTL circuit costing within US$ 10.00.
A driver with L298 would be needed to drive the stepper motor. Dont expect the TTL output to source the Motor directly!!
Anil
@ Mishuk
Yes Bipolar Motor can be run in reverse if the above sequence is reversed.
Forward, Reverse, Half step Forward and Half step Reverse is possible.
Anil
Hello, I think your site may be having internet
browser compatibility issues. When I look at your website
in Safari, it looks fine however when opening in IE, it has some overlapping issues.
I just wanted to provide you with a quick heads up! Apart from that, wonderful website!
This piece of writing offers clear idea in favor of the new visitors of blogging, that really how to do blogging.
Ι think tthe admin of this site iss truly working hard in favir of his site,
because here every stսff iss quality Ьased data.