Stepper motor control
Rob311
Posts: 83
I have 2 available pins left on my stamp and want to drive a stepper motor.
Any sugestions?
~Rob
Any sugestions?
~Rob
Comments
get a cheap stepper motor driver and use the two pins as Tx and Rx and do it with RS232 ASCII.
·
That’s what I did and it seemed a lot easier to program. Just tell it how many steps you want to go and it goes. Also gives you the ability to set an acceleration and deceleration profile. Some may have the ability for a rotary or linier encoder (depending on your application)·so you can do relative movements. And adjustable currents for various motor types.
Post Edited (Grant_O) : 4/19/2006 11:22:56 PM GMT
http://www.eettaiwan.com/ARTICLES/2002MAR/PDF/2002MAR08_AMD_MPC_AN81.PDF
but i cant get it to work
im using a bs2 and ULN2803A Darlington Array
i only get holding force for 2 of the 4 phases
any other ideas?
look like the one i had posted... maybe i can get this variation working
...still open for any other ideas incase i cant
You have 16 more pins to drive 4 steppers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
if i can get it done with 2 pins, why would i use 4?
I'll go out on a limb here -- you can use either a 2003 or a 2803, just know that they aren't pin-for-pin equiv., the 2803 has one more driver than the 2003.· That, and I ran mine w/·& w/o the zener (a 15V.)
Post Edited (PJ Allen) : 4/20/2006 2:02:41 PM GMT
A stepper controller may be a good investment if you ever want to switch from unipolar to bipolar or switch to higher power than the UNL2x03 can provide.
The BS2p40 really just gives you the most flexibilty to have a BasicStamp do it all.· You might be able to add logic that can keep it down to two pins.· I just don't have the information for such.· Google is your friend.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
The real answer to your question depends on a number of things, but based on what you've said so far, 2 pins are plenty. First you need to determine what kind of stepper motor you have, or want to actuate - unipolar or bi-polar. Second you have to decide if you're willing to use external circuity, and if so how much and what kind. Last you need to specify what kind of "control" you're really after. If all you want to do is make it turn in one direction, that's one thing. If you want various options like: FORWARD, REVERSE, or full step, half step, micro-step, or single stepping, then you need to so specify.
In any/all instances much of the anwer boils down to the following, which you may not have considered. With ONLY two pins available, you still have four possibilites of states for those two pins, as follows:
/code
·State···· Pin· Pin
Number····1··· 2
·· --- ---
···· 1······· 0··· 0
···· 2······· 0··· 1
···· 3······· 1··· 0
···· 4······· 1··· 1
code/
Said even slightly differently, there are also IC's which will permit you to input two state inputs, and will fan out the data across 4 pins:
/code
················ Inputs
················ |···· ·|
··············· A······B
··············· =====
·············· |········ ·|
··············· =====
··············· C·D E F
··············· |· |· |·|
··············· 0 1· 2 3
··············· Outputs
code/
So, in summary, there is a good deal more "power" (or utility) in just two pins, than one may initially realize.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
I took a look at the article you mention and was surprised to find it was actually a Parallax BasicStamp 1 text - just posted at a Taiwan web site. I have never tried this method. It is the first time I have actually heard of it.
Smoothness can be a function of how fast or slow you are going. Seems like you should be getting four distinct steps, not two.
Apparently your concern between using 2 pins and UNL2803 or 4 pins is in regards to how smooth you want to run. There are several ways to feed power to a unipolar stepper: 4 steps with single coil on; 4 steps with two coils on; 8 steps or what is known as half-step mode.
You appear to be using the second, which should provide the greatest holding power and most torque. Seems like you might have an error in software [noparse][[/noparse]are you sure you have translated the BS1 code to BS2 code properly]·or hardware that results in only two positions, not four.
The first method may be smoother, but weaker. The third might be even smoother, but holding power is sacraficed further in alternating positions.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
What would that chip be called?
/code
Inputs
| |
A B
=====
| |
=====
C D E F
| | | |
0 1 2 3
Outputs
code/
it woudl be perfect. simple enough for me to use and powerfull enough to be used.
a name, or part number would be greatly appreciated.
http://www.asic-world.com/digital/combo1.html
Post Edited (Grant_O) : 4/20/2006 7:03:54 PM GMT
i think...
anyone know of a good brand/type of logic gate?
anything i need to know about buying them? or should i jsut got to jamco and order 4 random "and" gates and 4 random "inverters"?
Being fundamentally lazy, I like to off-load this type of busy work to a co-processor. I like Serial LCDs, serial Motor controllers, serial relay boards etc. For this application, a very simple approach would be available directly from Parallax and would only use one pin:
Stock#: 27938 Little Step-U Motor Controller Price: $69.00
Hope this helps.
Vern
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
you have to much money to burn
if you wana pay $70 for one and mail it to me ill pay for shiping
There are a number of ways to approach these logic gates you want to use. Here are a few of them. You could use a 2 => 4 decoder or demux (de-multiplerer), similar to this one:
http://www.fairchildsemi.com/pf/74/74AC139.html
Wangling the ENABLE pin on the IC above may or may not prove to be a problem, but the logic is correct.
Another possible solution may be the use of a ripple counter or ring (Johnson) counter like this one: http://www.semiconductors.philips.com/pip/74HC_HCT4017_CNV_2.html
The Johnson counter is really nothing more than a specialized shift register whose outputs appear singly, in sequence, and which rotates a high output bit back to the input after "n" iterations. Again it's probably a bit more than you need, but it's the simplicity of your needs that "causes" that.
The most simplistic way I can think to do this is with 4 cascaded flip-flops which are essentially set up like the Johnson counter above. Each flip-flop SETs the next stage, and that next one RESETs the last one, essentially, and then rotates back to the beginning. I'm reasonably sure quad flip-flops (4 in one package) are available.
That should give you a few different options. A decade counter may provide yet another solution.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->