Shop OBEX P1 Docs P2 Docs Learn Events
Stepper software for prop chip - Page 2 — Parallax Forums

Stepper software for prop chip

2»

Comments

  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-04-27 13:32
    Okay, so if you connect the wires of the stepper motor properly, you can probably use unipolar code to run the motor in unipolar mode. My earlier statement was wrong (I edited it above). Bear in mind that the ULN2803 can handle only smaller motors. If your motor needs more amps and is moving a larger load, your motor performance might suffer greatly. However, if your motor is small, I guess the ULN2803 will work okay.

    From my experience, hooking up wires the wrong way on a small stepper motor won't harm the motor. Just make sure it's not mechanically connected to anything. The worst that might happen is that the motor twitches, hums, or grunts at you and doesn't do much else. So if you're desperate, you can test your Prop/ULN2803 outputs using some LEDs, then make a little chart of wire colors, run the program to see what the motor does, switch the wires around, keep track of what you've done already, and go through maybe a dozen iterations or so before you get the right connection of wires. One of the possible wrong configurations will run the motor but will do so in reverse. Without a brand name or motor diagram I'm not sure how else you could do this. But I'm certainly no expert.

    Of course, instead of switching the physical wires around, you could also just switch things in software.
    Brian said...
    ...coil pairs are as follows (orange/white), (green, yellow), (black/brown), (red, blue)

    If I understand this correctly, you will need to connect one wire (from one pair of wires) to one wire (of another pair of wires) so you effect one coil from the two pairs. Then the two wires you just connected together are not used for anything; they are not powered nor are they grounded; they are merely useless "taps" in the center of the big coil you just made. Then you must do the same for the other two pairs of wires. Knowing that, then creating a matrix of possible connections shouldn't be so daunting.

    Of course, wiser, more experienced people on the forum might have better methods for doing this.

    I hope that is of some help and doesn't lead you astray.

    Post Edited (ElectricAye) : 4/27/2010 1:37:42 PM GMT
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-05-02 01:23
    JonnyMac said...
    I wrote a really simplistic Spin driver back in 2006 -- this may help you: http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol7/col/NV136.pdf


    Mr. Mac

    Would you by any chance have the source for this in a zip. It will save me from retyping. Very informative document. Thank you for the contributions that you make to the forum

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • hover1hover1 Posts: 1,929
    edited 2010-05-02 11:46
    Brian, Here's that zip.

    Jim
    Brian Carpenter said...
    JonnyMac said...
    I wrote a really simplistic Spin driver back in 2006 -- this may help you: http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol7/col/NV136.pdf


    Mr. Mac

    Would you by any chance have the source for this in a zip. It will save me from retyping. Very informative document. Thank you for the contributions that you make to the forum

  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2010-05-02 13:04
    Might be speed? I've seen stepers just buzz when the stepping got too fast.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Signature space for rent!
    Send $1 to CannibalRobotics.com.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-05-02 15:11
    CannibalRobotics said...
    Might be speed? I've seen stepers just buzz when the stepping got too fast.

    It's true that a motor can go crazy if you attempt to run it too fast. The misbehavior begins when the motor can not physically move to the next step before it is commanded to go to the step beyond that. But it's also true that a stepper motor can run somewhat rough even at lower speeds. Stepper motors often have instability points, frequencies at which they vibrate, probably the result of some sort of resonance phenomenon generated by the rotor inertia, friction of bearings, magnetic field "springiness", etc. So you might find there are one or two relatively low driving frequencies at which the motor grumbles as it runs. I suppose there are some sophisticated ways to keep the motor from running rough at those frequencies but the other way to deal with that is to simply to avoid those frequencies. You can sometimes tweak that instability point somewhat by altering the mechanical system to which the motor is attached, thereby affecting the resonance of the entire mechanical system.
    For some info on the physics of stepper motors:
    www.cs.uiowa.edu/~jones/step/



    You can also use the resonance effects to make some wicked musical instruments: suspend a big piece of steel sheet metal by some long string or cable and mechanically couple your stepper motor to a corner or edge with, say, a small screw or linkage, then drive it until you hit the resonance of the sheet.

    smile.gif
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-05-03 01:39
    Hover1/ JMac

    I have the circuit wired up and have the code running that accompanies the NV136. I have an 8 wire Bipolar stepper that was purchased via Hobbycnc.com. 23-200-SD8. I have the code isolated to just run the forward and reverse in step mode. I have the repeat 1dx from 1 to 2. One time around it will go forward-reverse-forward-reverse. Another it goes f-f-r-r or it may go r-r-r-r and never go forward. Any ideas? Then with a load on it, it doesnt even do anything but twitch. Any help would be great.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-05-03 03:57
    Brian Carpenter said...
    ....Then with a load on it, it doesnt even do anything but twitch. Any help would be great.

    Do you know what the motor is rated for in terms of voltage and amps? It sounds like it might be under-powered, or at least under-powered for the speed at which you are trying to drive it.

    As odd as this might sound, you often have to drive a stepper motor at much higher voltages than its supposed rating to get some decent performance out of it.
    For getting better torque performance, you might see the following:
    http://forums.parallax.com/showthread.php?p=903251

    Post Edited (ElectricAye) : 5/3/2010 4:05:13 AM GMT
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-05-03 04:43
    I only have 12 volts available. Is this not going to work?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-05-03 04:50
    Brian Carpenter said...
    I only have 12 volts available. Is this not going to work?

    How many amps can your power supply provide to the motor?

    I think you tested your coil resistances already. How many amps will your motor draw at 12 volts?
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-05-03 05:09
    I can give 5 amps at 12 volts

    specs are similar
    23-205-ds8.jpg #23-205-DS8 285oz-in bipolar rating, 205oz-in unipolar rating. 3v, 3A, 200 S/R, 2.2mH, Size #23, Dual Shaft, 8 wire Faster than the 305’s

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-05-03 13:28
    Brian Carpenter said...
    I can give 5 amps at 12 volts
    ....

    That's probably enough power for a motor like this. So the next question is how exactly is it connected? Did you ever find a wiring diagram or did you determine the wiring by trial and error? If you used trial and error, I suppose it's possible that you found a wiring configuration that almost appears to work but isn't the right one. And I'm assuming you are running it in unipolar mode with a unipolar code? Also, how are you driving it? with transistors, a ULN2003 or....? If you are using discrete components like transistors, did you include flyback diodes? Earlier in the forum a number of things were discussed so it's not obvious to me which path you have taken to try your motor. An overall description might help.

    Have you tried to run the motor at a slower speed, like one step per second, just to check that the sequencing is correct?

    Also, to ascertain that you are getting the proper sequence, you can hook up LEDs instead of the motor and watch how the coils get energized as you slowly step through the code.
Sign In or Register to comment.