Shop OBEX P1 Docs P2 Docs Learn Events
propeller with Geko Drive or GRex — Parallax Forums

propeller with Geko Drive or GRex

SkankPileSkankPile Posts: 15
edited 2008-02-29 15:08 in Propeller 1
Has anybody made the propellor work with the geko drives, or interfaced with the Grex for stepper control·via network?

I'm thinking of using the propeller with sensors and such for the logic and then use the trusted gekos at 80v to drive whatever I want on the steppers. I've done some searches and it seems mostly people are driving homemade controllers for bots and such.. but I want to be able to move large screws, paddles, valves·and the like for automation mixed with PID control..

Comments

  • Graham StablerGraham Stabler Posts: 2,510
    edited 2008-02-27 16:49
    I have used a prop with geckodrives, it is the same as using the propeller with any other step and direction controller.

    I actually implemented the same motion control algorithm as the g-rex uses on the propller for a single axis (or rather one at a time). In the future I intend to allow multi axis interpolated moves but that may be a while.

    As for interfacing to a g-rex with a network that could be neat!

    Certainly don't think that just because a lot of people want to make the stepper driver as well for whatever reason that the propeller should not just as well be used with off the shelf gear, that's my prefered way of doing things because when you start looking at mid band compensation etc etc I just can't compete with gecko or IMS or whoever.

    www.youtube.com/profile_videos?user=littlestworkshop

    My two newest videos show a stepper controlled via a propeller using a geckodrive.

    Graham

    Post Edited (Graham Stabler) : 2/27/2008 4:56:25 PM GMT
  • SkankPileSkankPile Posts: 15
    edited 2008-02-27 18:44
    Great news.. now I have a direction to look. I'm going to check out your site, and try it myself before I ask too many questions.. thanks
  • crgwbrcrgwbr Posts: 614
    edited 2008-02-28 00:37
    I have also used a Gekodrive G201 with the propeller. Took about 5 minutes to get it working, no problem at all.

    Regards,
    Craig

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My system: 1.6 GHz AMD Turion64 X2, 4GB DDR2, 256MB ATI Radeon Graphics card, 15.4" Widescreen HD Screen

    I have a duel boot of Ubuntu Linux and Windows Vista. Vista, because it came with the PC, Ubuntu because I like software that works.

    "Failure is not an option -- it comes bundled with Windows."

    Use The Best...
    Linux for Servers
    Mac for Graphics
    Palm for Mobility
    Windows for Solitaire
  • SkankPileSkankPile Posts: 15
    edited 2008-02-28 03:54
    hmm.. I am finding documents on using the L293D and similar devices, but how are you generating the step and direction pulses to the gecko's.. is it much different?

    I'm assuming you'd need to generate a pulse of some sort at a certain frequency, or change that frequency to accelerate, number of steps etc... will you please elaborate or share code so I can get a better picture? I'm assuming its just generating a frequency on two pins.. one for step & one for direction.. instead of the 4 pins using the L293 or ULN2003 like in the guides...
  • SkankPileSkankPile Posts: 15
    edited 2008-02-28 20:33
    well.. I've been looking around and found the gekos take a 2ms pulse frequency and the direction is a simple on/off.. with the movement happening in the bottom of the pulse.

    any help would be appreciated.. I'm a newb.. and am immercing myself in PWM all the sudden, and trying to learn spin at the same time...
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2008-02-28 21:37
    Look it's called step and direction for a reason, one pin sets the direction (or on off as you say it) the other pin just tells it when to step. The step frequency determines how fast the motor turns because on every pulse the motor steps so it will vary. And yes you step up the frequency to accelerate etc.

    I don't know what the 2ms thing you are talking about is. I think the step is active low and the min low pulse length might be 2us but not 2ms I wouldn't have thought.

    Graham

    Post Edited (Graham Stabler) : 2/28/2008 9:43:13 PM GMT
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2008-02-28 21:42
    For a G10

    Step Frequency: 0 to 200 kHz
    Step Pulse “0” Time: 0.5 uS min (Step on falling edge)
    Step Pulse “1” Time: 4 uS min
    Direction Setup: 1 uS min (20 uS min hold time after Step edge)
  • SkankPileSkankPile Posts: 15
    edited 2008-02-29 05:15
    Wow.. it can't be this simple? I'm still waiting for the propeller to get here in the mail.. but I'm going to try this when it does:

    my logic is that it will rotate 180deg and rotate back to 0 in about 4 seconds

    ********************************************************************
    'simple step with Gecko
    'pin 16 -> direction
    'pin 17 -> step

    con

    steppulse = 20 'step pulse 20us
    steplag = 240000 'angular delay ~50step sec

    pub stepit

    dira[noparse][[/noparse]16] := 1 'go forward 180deg
    outa[noparse][[/noparse]16] := 1
    dira[noparse][[/noparse]17] := 1

    repeat 100
    outa[noparse][[/noparse]17] := 1
    waitcnt(steplag)
    !outa[noparse][[/noparse]17]
    waitcnt(steppulse)

    outa[noparse][[/noparse]16] := 0 'go reverse 180deg

    repeat 100
    outa[noparse][[/noparse]17] :=1
    waitcnt(steplag)
    !outa[noparse][[/noparse]17]
    waitcnt(steppulse)

    ********************************************************************
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2008-02-29 11:23
    It really is that simple if you let it be [noparse]:)[/noparse]

    You should run your stepper with half stepping at least, this gives you 400 steps per revolution so 180 would be 200 steps. Code looks ok from a quick glance.

    Actually Geckos have microstepping, either 8 or 10 I forget so that would be 200*8 or 200*10 steps per revolution for a 200 step motor. You cannot position to micro-step resolution but it does give smoother motion (you can position to a half step).

    Graham
  • crgwbrcrgwbr Posts: 614
    edited 2008-02-29 15:08
    The G201 runs at 10 microstep resolution. On my first implementation, it took a while before I figured that out.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My system: 1.6 GHz AMD Turion64 X2, 4GB DDR2, 256MB ATI Radeon Graphics card, 15.4" Widescreen HD Screen

    I have a duel boot of Ubuntu Linux and Windows Vista. Vista, because it came with the PC, Ubuntu because I like software that works.

    "Failure is not an option -- it comes bundled with Windows."

    Use The Best...
    Linux for Servers
    Mac for Graphics
    Palm for Mobility
    Windows for Solitaire
Sign In or Register to comment.