Shop OBEX P1 Docs P2 Docs Learn Events
Propeller and a micro stepper help — Parallax Forums

Propeller and a micro stepper help

grasshoppergrasshopper Posts: 438
edited 2009-04-02 22:26 in Propeller 1
I am having trouble with a stepper motor propeller combo.

Running the code and IC listed in Nuts and Volts "spin baby spin" www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol7/col/NV134.pdf
Running the code and the IC listed in Nuts and Volts ""Stepping out with spin" www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol7/col/NV136.pdf

My stepper motor just pulse left to right. The data sheet for my stepper motor list the phase as this.

PhaseA + - - +
PhaseB + + - -

Its a 20 steps per revolution 2 phase stepper.

Perhaps my wiring is messed up? Any help is appreciated.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit my site -> [url=Http://www.rawcircuits.com]www.rawcircuits.com[/url]

Comments

  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-03-03 18:47
    Ugh... Figuring out the correct phase sequence is always frustrating to me. Is this a bipolar, or unipolar motor?
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-03-03 19:09
    Ok, if that's the case, it's just a matter of getting the wires in the correct sequence... What are you using to drive it? I use an L298 driver for smaller steppers. It can handle 2A per phase.
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-03-03 20:29
    Hmmm.... try swapping some of the inputs then. Either that, or try switching up the phase sequence until you get it. This is always a hassle for me to do with an unknown phase sequence motor. I get the same thing when the sequence isn't right - the motor buzzes, sometimes moves around randomly, etc.
  • hover1hover1 Posts: 1,929
    edited 2009-03-03 20:37
    Hey Michael,

    I have used the circuit in the NutsVolts on my prop board with good results. I was using the 4-phase stepper that Parallax sells. I tried another stepper that I pulled out of an Epson printer, and it just did a little jiggle left and right also. I found that I had to drive it from an external supply.

    I haven't delt with 2-phase steppers, but you can find a good article here:

    http://www.seattlerobotics.org/encoder/may98/steppers.html

    Also try and swap the motor leads around. I had to do that once even though I swore I had them hooked up right!

    P.S. Your ebay BS2P24/40 is the perfect foundation of a dual Vmusic2 project that I am doing for a local Library.

    Jim
  • rjo_rjo_ Posts: 1,825
    edited 2009-03-04 15:56
    grasshopper...

    So... when are you going to turn your X-Project into a kit?

    AND... I have micro steppers all over my basement... but no data sheets[noparse]:)[/noparse] In the long term, I would like to create a set-up with a variable power supply and iterative software that looks for the right connections and voltages. Or, if someone more advanced than myself would like to offer such a solution, I'd be willing to offer a small incentive[noparse]:)[/noparse]


    Nice work.

    Rich
  • rjo_rjo_ Posts: 1,825
    edited 2009-03-04 16:56
    It is on my list... I'll have to go around and collect them all.

    I have two attached to a small x-y table that really bugs me, because it allows for incredible positioning accuracy... and it last worked about 15 years ago... lost all the supporting software along the way. I've gone to the manufacturer, who was sold in the meantime. A complete dead end.

    It can't be that hard. I need to hack together a variable power supply and try to tackle it myself.

    I have my hands full right now, I'll get back to you.

    I really like your X project.

    Rich
  • JasonDorieJasonDorie Posts: 1,930
    edited 2009-03-04 17:40
    To half step, you insert extra steps that only activate a single coil, instead of both coils. In your code, you have %0011, %0110, %1100, and %1001. Adding half steps between them would look like %0011, %0010, %0110, %0100, %1100, %1000, %1001, and %0001. Incidentally, the half steps, if put in as a sequence on their own, wiill drive the motor with half the torque.

    Jason
  • hover1hover1 Posts: 1,929
    edited 2009-03-04 18:05
  • hal2000hal2000 Posts: 66
    edited 2009-03-04 22:48
    Hi

    An engine has 4 steps in full mode.
    step is in the middle of a total of 8.
    If you work in micro steps, and you have to interpolate using PWM
    The outline missing diodes not to break the l293


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Did the curiosity kill the cat?
    ......................................
  • JasonDorieJasonDorie Posts: 1,930
    edited 2009-03-04 23:13
    To half step you want to activate the coil shared by the two steps you're between. So for the step between 0011 and 0110, the shared bit is 0010. If you want smaller than 1/2 steps, you need to use PWM to continuously vary the power to the coils. Basically you 'fade on' one coil while you 'fade off' the other.

    Jason
  • JasonDorieJasonDorie Posts: 1,930
    edited 2009-03-04 23:15
    Oh - you also need to change your code so it expects 8 steps instead of 4 in your lookup table. If you didn't change that, it wouldn't work right.

    Jason
  • JasonDorieJasonDorie Posts: 1,930
    edited 2009-03-05 18:48
    Each of the bits in one of your step values represents a magnetic coil in the stepper - there are 4 in total: top, left, bottom, and right, or 0, 1, 2, 3. When you enable a bit, you're energizing that coil in the stepper. To make it move, you have to turn them on in order, either clockwise or counter clockwise. In your case, the single-coil sequence would be 0001, 0010, 0100, 1000.

    To get more torque, most drivers do what you did and actvate two neighboring coils at the same time. That looks like 0011, 0110, 1100, 1001.

    When I said 'shared bit', I meant the bit that is common between two successive steps, which also means the motor coil that is common between two successive steps. It's actually a little easier to think of if you start with the 'single coil' sequence I wrote above. 0001, 0010 represent two of the steps, and the 1 bits specify which motor coils to engage. To put a half step between these, you just turn on BOTH coils in between these two steps, like this: 0001, 0011, 0010.

    If you are starting with the 'double coil' steps, to add the half steps you need to figure out which coil (bit) is on in a pair of successive steps and insert a new step with only that coil (bit) on, so 0011, 0010, 0110.

    Sorry - I'm typing this on a phone, so I can't do graphics easily. [noparse]:)[/noparse]

    Jason
  • Stan Andover UKStan Andover UK Posts: 1
    edited 2009-04-02 20:13
    If you use a four wire stepper you can reduce the signal by using a not gate onto two wires

    IE feed one signal direct into the stepper motor and the other via a NOT gate

    Use two not gates with a four wire motor you can reduce the signal to two inputs
  • rjo_rjo_ Posts: 1,825
    edited 2009-04-02 22:26
    Great thread... I finally got my six wire stepper going. I'm not sure where I found the info... but if there is no indication as to wiring... you energize one of the wires and call that wire "1"... then while you still have this wire energize you energize one of the other wires... you will see one of three things... clockwise motion... counter clockwise motion or a jitter with a return to the original position. If counter clockwise that wire becomes wire 4... if clockwise that wire becomes number 2... and if no motion that is wire 3. test each wire with your original energized.
Sign In or Register to comment.