Shop OBEX P1 Docs P2 Docs Learn Events
Controling A RORZE 2-PH Stepping Motor Driver — Parallax Forums

Controling A RORZE 2-PH Stepping Motor Driver

zarfzarf Posts: 2
edited 2005-06-08 19:29 in BASIC Stamp
I am having problems with something and I hope someone can help me.· I have a RORZE Stepping motor driver and the model is RD123.· This driver is easy to use by simply attaching a power supply to it (18 volts), hook your motor to some binding posts on the left hand side of the module and on the right hand side of the module (this is considered the I/O side), you run a wire from a separate ground binding post to the start binding post and presto!· You have a running Stepper Motor!· You also have the choice of hooking to this ground binding post, clock wise rotation.· Also, you have 16 speeds through a combination of 4 wires.· You also have, single phase or dual phase.· And also, a binding post, if brought low, after stopping the motor, it reduces the current draw through the motor windings.·· The next binding post is called "Clock Out" and what it does, is outputs a clock pulse that represents each pulse of the motor.· So with a 1.8 degree, stepper running at full step, you'll get 200 pulses which equals 1 rotation.· Remember this is a stand alone module and has its own on board oscillator.·

What I want to do is simply, enable the module by putting a low signal on the start-stop binding post.· I have already done this, no problems.· But what I would like to do is, for example; run the motor for 5 revolutions and use the clock signals from the module to implement·a stop position,·ie,·1000 Clock pulses should equal 5 rotations (this module also has ramping included in the acceleration profile, which can be trimmed).· I have drove steppers with the UCN 5804B driver chip and found that it was very easy to produce a program to step via a debugin command of any number of pulses I wanted.· The BS2 is clocking the chip·because I used the pulse out command.· But what command do you use when the·Stamp isn't clocking but counting?· I need to be able to count from pulse zero to pulse x (my input) and when it is reached, then bring the start-stop wire high.· I have found this to be extremely difficult if not impossible.· I have tried pulse in and it didn't work.· It seems like everything that works with the·Stamp, of course, is working while in a loop.· But I don't see how I can get this thing to work within a loop, so to speak.· One last note, I am new to this and any help would be appreciated.· Thanks.···

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-06-08 19:29
    Hello,

    ·· Probably the easiest/fastest way for you to count the pulses would be to monitor the pulses on a Stamp Pin using code similar to below:

    curr VAR Bit    ' Current level
    prev VAR Bit    ' Previous level
    cnt  VAR Word   ' Counter
    x    VAR Word   ' Value to count to
     
    Main:
       curr = IN0
       cnt = cnt + (curr ^ prev & curr)
       prev = curr
       if cnt = x then Done
       goto Main
     
    Done:
       RETURN
    

    You would set x to the number of pulses you want to count to, then call this routine using a GOSUB.· Once that value has been reached, the routine returns...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.