Shop OBEX P1 Docs P2 Docs Learn Events
Stepper motor control — Parallax Forums

Stepper motor control

HansMHansM Posts: 6
edited 2007-09-05 03:49 in Propeller 1
Hi,

I am looking for a method to drive three steppermotors simultaneously. In the past I used Basic Stamp for controlling a stepper (using the ULN 2003 approach from the Stamp manual), but now want to change over to Propeller. I just started with Propeller, so all is new to me!

Thanks,

Hans

Comments

  • SkogsgurraSkogsgurra Posts: 231
    edited 2007-08-29 10:01
    Hello Hans!

    You will be pleasantly surprised when you find out all the possibilities this little power-frugal, low-cost, fast multiprocessing chip can do!

    I have been using it for several months now. And there is a constant smile on my face. Wife and friends say that I am a lot nicer now when I use the Propeller. But complain that I spend too much time with it...

    Tips: Use the ProtoBoard, can't beat that. And plunge right into assembler as soon as you are through the Spin tutorials. Assembler really makes the propeller spin fast while Spin makes you very productive in HMI matters. Also, there are lots of applications for whatever you need. Just browse the forum. There is a "stickie" section where most of the goodies are.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • m.r.b.m.r.b. Posts: 36
    edited 2007-08-29 11:43
    I am a relative newbie to propeller myself... This is the first big 'meaty' project that I am doing...

    I think I can REALLY help you out there.... I am working on that very project (3 axis stepper motor motion controller) NOW, for what I am doing...
    I am 70% through completing my version of it.... Initial testing for 'modules' completed so-far is showing VERY promising results!!!

    {biggest problem is finding time to do things!!!!}

    I am using the prototype board as the basic hardware, with a few additional components added...

    The project will:-

    1) Have a simple / intuitive command set between it, and the host PC, which can easily be tested through Hyperterminal, or embedded into say a V.B. program....

    2) Simultaniously drive 3 stepper motors (with acceleration-coast-deceleration S or Trapezoid curve speed profiles) to either an absolute steps count position, or an incremental steps position.... By issuing differential clock and direction pulses, to nice expensive a chopper stepper motor driver module.

    3) Be able to home (origin) the axes using inductive / optical NPN*/PNP* limit switches.. or end-limit switches
    (The selection between NPN and PNP is basically done through selecting +Ve or -Ve rail return for the LED section of the sensor input opto-isolator(s) on the board ... This will be covered in the documentation when the completed project is posted)

    4) Have ramp parameters that are programable over RS232, from the host PC ...
    IE:
    Starting speed (steps per second),
    Terminal speed (steps per second),
    Home speed (steps per second),
    Acceleration/deceleration (steps per second squared).

    *** PLEASE LOOK OUT, IN THE COMPLETED PROJECTS SECTION, FOR A POST BY ME { m.r.b. } Which shall be appearing in the next week or two.... It's going to do exactly what you want ****


    Regards;

    Mathew
  • GavinGavin Posts: 134
    edited 2007-08-29 12:11
    Hans,

    There have been a few posts on stepper driving.
    Tomorrow my stepper driver pcbs arrive and soon I can finally start trying code.
    My aim is a 4 axis mill, probably only two simultaniously to start with.
    The prop should be able to do this easy but there could be lots of ways to do it.
    One cog per motor, another cog working out the counter·wait times, a cog·working out accelleration·curves, a cog reading the G codes from a SD card or serial port etc....

    After I learn the asm code I will have a better idea on how to do it.

    Gavin



    ·
  • GavinGavin Posts: 134
    edited 2007-09-03 12:01
    I needed a simple way to drive my mill manually.

    Decided on using mouse parts and just wrote my first real Spin program.
    Actually I just cut and pasted bits from VGAtext and Mouse demos[noparse]:)[/noparse]
    It's the start for my mill controller program, which may never get finished if Mathew finished his.
    Blew up the first two of my driver boards on the weekend[noparse]:([/noparse]

    Also put 12 volts into Pin 1 of the Prop, from the smell I let some of the smoke out.
    Strange thing is the demo board still works except for pin 1.
    This is one tough chip to kill.

    For anyone who wants to save money I just found out Sparkfun have·small stepper driver boards.
    Wish·I knew that before spending $500 on making my own boards.

    Gavin
  • LucidGuppyLucidGuppy Posts: 32
    edited 2007-09-04 16:45
    Yeah, I worked with these boards and they're great (easy stepper). I got the motor to step using spin, not asm. I'm going to use a prop-proto board and use a serial interface to control steppers. I power the steppers using an AT power supply at 12 volts.

    Does anyone see a problem with me powering up the protoboard using 12 volts?
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-09-04 20:14
    Gavin,

    nice boards for little automation and robotics project and bit low current for some CNC stuff. Xylotex are pretty economic for that sort of stuff (much less than $500 anyway)

    Guppy of the lucid variety,

    they run fine from 12v


    Cheers,

    Graham
  • GavinGavin Posts: 134
    edited 2007-09-05 03:49
    Yep nice little boards, wish I saw them months ago.
    Xylotex are great boards but I get hit with exchange rates and shipping to Oz.
    I can recommend any board with Allegro microstepping chips, but most are SMD.

    Ron Nollet has some bulletproof driver modules which I should get if I ever get around to doing a X3 conversions.

    My X1 200oz/in mill steppers are only 600ma, one day I will ugrade them to some higher current motors.
    Just made my own 2 and 3Amp drivers, only cost me Oz $1000 if I make one, $10 each if I make all 260+ boards[noparse]:)[/noparse]

    Guppy,
    12volts is fine for 17 size motors or smaller, more voltage gives you higher speed as long as you use PWM/chopper style bipolar drivers.
    Microstepping is better, usually smoother, faster, less noise and heat.
    L297/298 etc full half step chips are good for tinkering, bit old tech these days.

    Gavin
Sign In or Register to comment.