Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Robotics Chat


Robotics Chat Specific to discussions about robots and the making of.

Reply
 
LinkBack Thread Tools Display Modes
Old 6th April 2006, 08:53 PM   (permalink)
Default Basic stepper control - PIC18F and L293D

Ok... I'm not trying to do anything complex. No microstepping/current limiting, etc. All I need is basic movement: foward, reverse, and turning. I am using bipolar steppers and the circuit shown below. I am having trouble with the sequence, though. The motors move, but the direction seems arbitrary, and can be forced to reverse by grabbing the wheel attached to the shaft. The torque is ridiculously low.

Any ideas?
Attached Images
File Type: jpg stepper_control.jpg (88.1 KB, 655 views)
jshayden is offline  
Old 6th April 2006, 09:12 PM   (permalink)
Default

It sounds like you have no idea what kind of motors you have and how they are wound.

How many wires are coming out of the motor?
The top guess is four
The next best guess is five
Any other number is trouble

If the answer is four then it is a bipolar motor and you will need a different driving arrangement. If it is five then all five wires have to go somewhere.
Papabravo is offline  
Old 6th April 2006, 10:38 PM   (permalink)
Default

I know the arrangement exactly. There are 4 (as shown in the schematic) and they ARE bipolar (as previously stated). And.. I've seen this arrangement used to control bipolar steppers before, I simply am confused with the pulsing, I believe.

Josh
jshayden is offline  
Old 7th April 2006, 01:31 AM   (permalink)
Default

The motor has four wires as shown in the schematic, that's good. Now you have to connect the phases as the L293 expects. If you dont know which pair of wires goes to one of the two phases then you need to find it with an ohmmeter.

Also the L293 needs to supply both voltage and current to the motor. If the motor needs more current than the L293 can supply then you will have trouble making the motor move or producing enough holding torque so you cannot move the shaft by hand.

I'll have a look at the data sheet.
Papabravo is offline  
Old 7th April 2006, 01:36 AM   (permalink)
Default

Ok. I have recently switched motors.
The new motors are ABCD while the old (as on the schematic) were ACBD [where AB are 1 coil and CD are the other].
This problem is easily solved by making up a little cable and twisting the wires. That's not a problem.
The problem I'm having is the pulsing sequence, and possibly this current issue. Thanks for bringing that up. The motors ar rated at 0.42A, by the way.

Thanks Alot,
Josh
jshayden is offline  
Old 7th April 2006, 01:40 AM   (permalink)
Default

The datasheet for the L293DNE is here: http://rocky.digikey.com/WebLib/Texa...data/L293D.pdf

It's capable of up to 1.2A per driver.

Josh
jshayden is offline  
Old 7th April 2006, 01:49 AM   (permalink)
Default Bipolar Stepper Sequence

You want to alternate the coils and the direction in each coil. The following table may be helpful

http://www.eio.com/jasstep.htm#types

Is there a reason why you don't show GROUND connected to pins 4, 5, 12, and 13 on your schematic?

Are you sure the battery can supply the load at its rated voltage? Put a scope on the L293 pin 8 and watch the battery votage sag if the current demand is to large.
Papabravo is offline  
Old 7th April 2006, 01:58 AM   (permalink)
Default

Ok.. I've seen several tables like this. I understand the concept of pulsing the coils according to the chart with +/-'s. I guess what I don't understand is the input to the hbridge. I'm unsure of what combination of 1's and 0's to use when pulsing the hbridge itself. The hbridge table only gives...

A B 1a 1b
0 0 0 0
0 1 - +
1 0 + -
1 1 0 0


But, when describing how to pulse the motor, ++ and -- are used.

Maybe I'm reading something wrong?

Thanks,
Josh


EDIT: Oh, I think I see. 1 hbridge per coil = 2 hbridges per motor, which the L293 provides. I should be able to figure out the sequence from there. The real question is, I'm pretty sure I tried that sequence, and I'm still having the torque issue.
jshayden is offline  
Old 7th April 2006, 02:07 AM   (permalink)
Default Stepper Motor Symbols

The notation ++ or -- means both ends of the coil need to be at the same potential. If both ends of the coil are at the same potential then it does not matter what the potential is - no current will flow.

Each input/output pin on the L293 can connect one end of one coil to either the positive supply on pin 8, or GROUND on pins 4, 5, 12, 13
If you arrange things correctly then you should be able to step by changing only two lines at a time, from some convenient initial condition.

Establishing an initial condition on a stepper with an unknown orientation often causes a small movement from where it is to the new holding position.
Papabravo is offline  
Old 7th April 2006, 05:50 AM   (permalink)
Default

Ok. It's working great! The old motors must just be crap.

Thanks so much for your help. I certainly have a better understanding of what's actually going on now.

Josh
jshayden is offline  
Old 7th April 2006, 01:51 PM   (permalink)
Default

No problem. I'm glad I was able to help.
Papabravo is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 04:31 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker