Shop OBEX P1 Docs P2 Docs Learn Events
Motor Control PWM — Parallax Forums

Motor Control PWM

crgwbrcrgwbr Posts: 614
edited 2007-02-25 19:10 in Propeller 1
Hey,
Has anyone written a PWM object for motor control?

Thanks,
Craig

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life

Comments

  • rokickirokicki Posts: 1,000
    edited 2007-02-22 20:56
    I think lots of people have done this. Heck, I wrote a 20 line Spin program that let me control cheap R/C cars by just dangling a
    wire off a pin. (These were digitally proportional steering/drive cars.) I'm thinking of making a connection-free robot out of
    these (no modification to the cars; just mount the protoboard and sensors and 9V battery on the car). The protocol is really
    trivial; I was able to reverse engineer it just by connecting a scope probe to the antenna of the original remote control.

    You can do this directly in Spin, by the way, to start out; 1.5 ms is plenty of time for the Spin interpreter. And if you use the
    counters, you can even define two edges by a single Spin command.
  • crgwbrcrgwbr Posts: 614
    edited 2007-02-22 21:11
    I may have misunderstood your post, but it sounds like you we're talking 'bout servo control. I had ment normal PWM that you would feed into the gate of a mosfet to control the speed of a brushed DC motor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    NerdMaster
    For
    Life
  • rokickirokicki Posts: 1,000
    edited 2007-02-22 21:13
    Ahh, my mistake, sorry. Even so, I think you'll have no difficulty throwing something together quickly.
  • crgwbrcrgwbr Posts: 614
    edited 2007-02-22 21:15
    It's an easy mistake to make. Anyway, I knew it wouldn't be to hard; I just didn't want to write one if someone else aready did. ie: reinventing the wheel.

    craig

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    NerdMaster
    For
    Life
  • Tom DoyleTom Doyle Posts: 1
    edited 2007-02-23 10:28
    I submitted a PWM motor speed/direction control object to the object exchange earlier this week.

    tom ...
  • TrevorTrevor Posts: 8
    edited 2007-02-23 19:26
    I'm guessing objects submitted to the exchange take a little time before they are available?

    I am interested in PWM motor control as well and the only PWM code I saw on the exchange was in the BS2_functions package.
  • crgwbrcrgwbr Posts: 614
    edited 2007-02-23 20:12
    Thanks Tom, I'm looking forward to seeing it on the object exchange. Do you think you could possible post it here to?

    Thanks,
    craig

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    NerdMaster
    For
    Life
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-02-23 20:23
    Sorry about that, it's now authorized. You have to goto Motor Control category·(the All category wasn't checked and I can't change it).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 2/23/2007 8:29:57 PM GMT
  • crgwbrcrgwbr Posts: 614
    edited 2007-02-23 20:45
    Thanks Paul

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    NerdMaster
    For
    Life
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-02-25 19:10
    I reauthed it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.