CR4 - The Engineer's Place for News and Discussion®

Previous in Forum: Transformer Temperature Rise in 54C Ambient   Next in Forum: Force, Velocity and Accuracy Plate
Close

Comments Format:






Close

Subscribe to Discussion:

CR4 allows you to "subscribe" to a discussion
so that you can be notified of new comments to
the discussion via email.

Close

Rating Vote:







13 comments
Associate
India - Member - New Member Engineering Fields - Electrical Engineering - New Member

Join Date: Feb 2012
Location: Krishnagiri, Tamilnadu, India
Posts: 47

How to Drive Stepper Motor

04/23/2012 7:45 AM

hi am using 24 volt stepper motor(2-2 phase). I am using ULN2803 driver IC to rotate stepper motor. But my motor doesn't rotate. whether i need to change motor or i need to change driver IC? or tell me how to drive 24 volt stepper motor(2-2 phase)using transistors? reply soon pls.

__________________
All is well !!! All is well !!
Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be "almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, rate them!
Guru
Popular Science - Cosmology - New Member Technical Fields - Technical Writing - New Member Engineering Fields - Energy Engineering - New Member Engineering Fields - Electrical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Electromechanical Engineering - Old Member, New Association

Join Date: Apr 2008
Location: Lexington, KY
Posts: 1038
Good Answers: 56
#1

Re: How to Drive Stepper Motor

04/23/2012 12:37 PM

Did you read the data sheet for the ULN2803 driver? I don't think it will just run the motor without some sort of command that will indicate how far and how fast and in what direction. You didn't mention any of that support circuitry. In this example

You have to provide a sequence for A, A-bar, B, and B-bar. The rate at which you supply that pulse train must include controls for acceleration and deceleration. If you just throw some high frequency signal into the input, the motor will not be able to establish synchronization between movement with the applied voltage.

__________________
A great troubleshooting tip...."When you eliminate the impossible, whatever remains, however improbable, must be the truth." Sir Arthur Conan Doyle
Register to Reply
Associate
India - Member - New Member Engineering Fields - Electrical Engineering - New Member

Join Date: Feb 2012
Location: Krishnagiri, Tamilnadu, India
Posts: 47
#2
In reply to #1

Re: How to Drive Stepper Motor

04/23/2012 2:42 PM

As u said I gave all the sequence but my motor doesnt rotate.... It gets locked..... wat is the prob with tat?...... I can feel the interlocking when i touch the rotor....wat would be the problem?......I am using AT89C51 Microcontroller....... am using 24volt stepper motor.... some guys told me that This ULN2803 cant drive 24v motor..... wat would be the problem? here the ckt dia....

__________________
All is well !!! All is well !!
Register to Reply
Guru

Join Date: Sep 2009
Posts: 809
Good Answers: 72
#3

Re: How to Drive Stepper Motor

04/23/2012 4:23 PM

Can you give more stepper motor details or it is classified? Rated current, number of motor wires and the way you connected them is essential for any troubleshooting. Also the sequence you feed it must have start-stop stop accelerating ramps. If not, or acc is too steep, it will NOT work properly (or at all). S.M.

__________________
Life is complex. It has a real part and an imaginary part.
Register to Reply
Associate
India - Member - New Member Engineering Fields - Electrical Engineering - New Member

Join Date: Feb 2012
Location: Krishnagiri, Tamilnadu, India
Posts: 47
#4
In reply to #3

Re: How to Drive Stepper Motor

04/23/2012 4:49 PM

ya sure..... now i tested tat circuit..... initially my stepper motor rotates one step......and then it remains the same.... i ve provided datasheet for that motor..

__________________
All is well !!! All is well !!
Register to Reply
Associate
India - Member - New Member Engineering Fields - Electrical Engineering - New Member

Join Date: Feb 2012
Location: Krishnagiri, Tamilnadu, India
Posts: 47
#5
In reply to #3

Re: How to Drive Stepper Motor

04/23/2012 5:00 PM

Actually am doing project on solar tracking system. Am using LDR(Light dependent resistor) to detect sun . As we know tat sun moves 15 degree per hr, am gonna rotate the solar panel connected with stepper motor. Now the stepper motor need to rotate 15 degree per hr as the sun does. so by this i can keep on tracking the sun. The analog value from LDR is compared with a threshold value(1 volt) and if ldr value> 1 volt,the motor 'll rotate, if ldr value< 1 volt ,the motor 'll not rotate. This is my idea.All set , but the stepper motor has 4 leads.....when power supply is swutched on,the motor rotates one step......then there is no such an action...... what would be the problem? can u help me?

__________________
All is well !!! All is well !!
Register to Reply
Guru
Popular Science - Cosmology - New Member Technical Fields - Technical Writing - New Member Engineering Fields - Energy Engineering - New Member Engineering Fields - Electrical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Electromechanical Engineering - Old Member, New Association

Join Date: Apr 2008
Location: Lexington, KY
Posts: 1038
Good Answers: 56
#6
In reply to #5

Re: How to Drive Stepper Motor

04/24/2012 12:46 PM

Sounds to me like it is working just fine. When you apply power, the motor steps to the nearest mini-step position and remains in that position as it should. That motion is the rotor finding a position in alignment with the applied magnetic field, or sync.

You must program the AT89C51 to rotate the motor by sending a sequence, but not too fast, to the driver chip. It will then provide the currents to the various wires causing the magnetic field to be repositioned and in response, your rotor will follow it (as long as the changes are not too rapid).

Your AT89C51 has memory for your instructions as to what you want it to do. Think of it as a very small computer. Like any computer, it must be programmed and it has no analog inputs for the light dependent resistor. So your threshold detector must produce some sort of logic compatible signal while it is being moved. You will also want to program the "return to sunrise" position sequence. For testing purposes you need to program a continuous motion output at some low RPM so you don't slip out of sync.

You can probably get the software to program your AT89C51 free from the chip manufacturers website. But then, you may need to buy or build an appropriate serial interface if one is not provided on your computer. I think you will want to add a couple of pushbuttons to act as control inputs for the LDR and to simulate a "return to sunrise" type signal. You might have a third "jog towards sunset" switch to reposition. These will be connected to some of the programmable I/O ports on the control chip. It may be frustrating and difficult to program the the control chip the first time, but each success after that will become much easier.

__________________
A great troubleshooting tip...."When you eliminate the impossible, whatever remains, however improbable, must be the truth." Sir Arthur Conan Doyle
Register to Reply Score 1 for Good Answer
Associate
India - Member - New Member Engineering Fields - Electrical Engineering - New Member

Join Date: Feb 2012
Location: Krishnagiri, Tamilnadu, India
Posts: 47
#7
In reply to #6

Re: How to Drive Stepper Motor

04/24/2012 5:30 PM

I have programmed AT89C51...... if ldr > 1 v the motor should rotate..... if ldr<1volt the motor should not rotate...... for each process there is one minute delay......

and after finishing this process the motor will rotate to initial position for eg: if the motor rotates 160 degree per day then at evening the motor ll reverses by 160 degree.....so by this it has now come to initial position........

now the problem is stepper motor..... the stepper motor has 4 leads,I gave 24v supply to one of the 4 lead,and i grounded the other leads alternatively...... by this way my motor rotating clockwise and again rotating counterclockwise....... but i need the motor to rotate without using ULN2803....... i ve used sl100 transistors to drive 24v stepper motor

.........

__________________
All is well !!! All is well !!
Register to Reply
Guru
Popular Science - Cosmology - New Member Technical Fields - Technical Writing - New Member Engineering Fields - Energy Engineering - New Member Engineering Fields - Electrical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Electromechanical Engineering - Old Member, New Association

Join Date: Apr 2008
Location: Lexington, KY
Posts: 1038
Good Answers: 56
#8
In reply to #7

Re: How to Drive Stepper Motor

04/25/2012 1:57 PM

OK, now I see what the problem is. The ULN2803 is not configured to operate as an "H-Bridge". The required circuit is known as a H-Bridge for each coil. Attached is the diagram according to the motor manufacturer.

With the ULN2803, there is only a connection to power (if input is on) or high Z if input is off. Therefore you can not conduct any current in the coil. You need a chip with a bi-polor type of output. That is, it is either hot (24V), or ground (0V).

__________________
A great troubleshooting tip...."When you eliminate the impossible, whatever remains, however improbable, must be the truth." Sir Arthur Conan Doyle
Register to Reply Score 1 for Good Answer
Associate
India - Member - New Member Engineering Fields - Electrical Engineering - New Member

Join Date: Feb 2012
Location: Krishnagiri, Tamilnadu, India
Posts: 47
#9
In reply to #8

Re: How to Drive Stepper Motor

04/26/2012 5:32 AM

okay i gonna give +24v supply to A1(black) and B1(orange) and brown and yellow to ground.... you are saying that using ULN2803 it ll not rotate, right? so can i use SL100 transistors?can u give the circuit for that?reply soon pls

__________________
All is well !!! All is well !!
Register to Reply
Guru
Popular Science - Cosmology - New Member Technical Fields - Technical Writing - New Member Engineering Fields - Energy Engineering - New Member Engineering Fields - Electrical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Electromechanical Engineering - Old Member, New Association

Join Date: Apr 2008
Location: Lexington, KY
Posts: 1038
Good Answers: 56
#10
In reply to #9

Re: How to Drive Stepper Motor

04/26/2012 12:55 PM

I can't find any reference to the SL100 transistor so I don't know if you can use them. If you can figure out how to make the biasing work, you can build your own H-Bridge but then you probably do not need the ULN2803 unless you are just boosting the individual outputs from your controller.

In the previous response, I gave you the circuit. I will explain it in this one. Each coil has its own H-bridge circuit. The inputs to the H-bridge controls the polarity switching. H-bridge devices are very common and they advantages like including the reverse biased diodes used to prevent transistor failure when the coil dumps its magnetic energy after being turned off.

What you seem to be missing is that each wire must be at +24VDC sometimes and at 0VDC at other times. All the ULN2803 or a transistor can do is provide some connection to ether end of your supply voltage (when ON) or a high impedence (when off). Unfortunately, if you have a high impedence condition, the coil will not conduct any current.

Here is how the H-bridge works. For the load to be powered in the green polarity, you must turn on transistors T1 and T2 at the same time. To reverse the polarity, you must turn on transistors T3 and T4 at the same time. It is very important to make sure you have all transistors off for a short time before turning on the other pair. You will have to look up the specifications of the transistors to see how long they take to turn off. Typically it is around 1 mSec. If you turn on both transistors on the same side (like T1 and T3 or on the other side T2 and T4) you will create a dead short circuit and your transistors will fry. Then again, you might put a fuse in line with the power feed but it may not be fast enough to save the transistors.

As you can see, no wires to the motor are tied directly to either +24 V or 0V at any time. That is because they must be switched back and forth to advance the stepper shaft. You need an H-bridge for each coil. The H-bridge comes in an 8 pin dip and sells for less than $3.00 each.

To step you use a binary sequence of polarities on the two coils. First Coil A and B are positively biased. Next, one of them changes polarity. Next both are negative. And the 4th step is the reverse of the 2nd polarity. Then it repeats.

P.S. If you like the help and you think the answer is good, it is customary to "Vote" using the little button in the lower left side of this window, and click on "Good Answer". Thanks and I hope that helped.

__________________
A great troubleshooting tip...."When you eliminate the impossible, whatever remains, however improbable, must be the truth." Sir Arthur Conan Doyle
Register to Reply Score 1 for Good Answer
Associate
India - Member - New Member Engineering Fields - Electrical Engineering - New Member

Join Date: Feb 2012
Location: Krishnagiri, Tamilnadu, India
Posts: 47
#11
In reply to #10

Re: How to Drive Stepper Motor

05/02/2012 3:05 AM

hi my project review over..... my motor doesnt turn..... It just rotates one step.... but when the motor's sequence is changed manually,the motor rotates!!!!! but didnt rotate by programming

__________________
All is well !!! All is well !!
Register to Reply
Guru
Popular Science - Cosmology - New Member Technical Fields - Technical Writing - New Member Engineering Fields - Energy Engineering - New Member Engineering Fields - Electrical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Electromechanical Engineering - Old Member, New Association

Join Date: Apr 2008
Location: Lexington, KY
Posts: 1038
Good Answers: 56
#12
In reply to #11

Re: How to Drive Stepper Motor

05/02/2012 12:02 PM

Sorry to hear that your time frame ended. It sounded like you were almost successful. I have always found that using a stepper motor took a lot more time than I wanted to spend. Not only did you have to correctly solve the coil connection problems, you also had to master the controller program and operation.

Many systems use a "Jog" feature that lets you see that motion is working or not. The Jog feature serves other purposes, but for me it has always meant that the basic function is working. After that, I could spend a lot of time trying to get the program to do what I wanted.

That is the crazy thing about computers (and controllers). They always do what you tell them to do, not what you want them to do.

Perhaps you will have time to figure out why it did not work. It can still provide a learning experience for you.

__________________
A great troubleshooting tip...."When you eliminate the impossible, whatever remains, however improbable, must be the truth." Sir Arthur Conan Doyle
Register to Reply
Associate
India - Member - New Member Engineering Fields - Electrical Engineering - New Member

Join Date: Feb 2012
Location: Krishnagiri, Tamilnadu, India
Posts: 47
#13
In reply to #12

Re: How to Drive Stepper Motor

05/04/2012 9:01 AM

ya you are right. At the beginning of my project I dont have enough knowledge on stepper motor and also microcontroller. But I got enough knowledge not only through my project but also with the help of you and this CR4globalspec. Thank u so much sir.....

__________________
All is well !!! All is well !!
Register to Reply
Register to Reply 13 comments
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be "almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, rate them!
Copy to Clipboard

Users who posted comments:

bharath boss (7); NotUrOrdinaryJoe (5); SimpleMind (1)

Previous in Forum: Transformer Temperature Rise in 54C Ambient   Next in Forum: Force, Velocity and Accuracy Plate

Advertisement