Shop OBEX P1 Docs P2 Docs Learn Events
What is the "most official" object for controlling servos? — Parallax Forums

What is the "most official" object for controlling servos?

WBA ConsultingWBA Consulting Posts: 2,935
edited 2011-10-08 19:44 in Propeller 1
I am currently working on a project that requires the use of objects that are either heavily documented, used as the demo object for a Parallax product, or are supplied with the Propeller Tool to make it easier for someone to duplicate the project, even if they have no Propeller experience.

However, I have come to a point where I can't decide which Servo Control Object should be used. Here are the two that I am considering and the pros/cons for each as compared to my previously mentioned requirements.

Kye's Dual Servo Engine
Pros: Clean, simple, single spin file, no PASM.
Cons: Demo needs more details, formatting cleanup, not "official"

Beau's Servo32v7
Pros: Parallax Authored, heavily commented demo, includes theory of operation, single spin file if ramping is not used
Cons: Requires 2 spin files, also uses PASM

Any feedback would be appreciated.

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-10-07 16:23
    Andrew,

    Are you aware Beau's Servo32v7 is part of the Propeller Tool's library (v1.3)?

    I think it would be impressive for newcomer to realize the Propeller can control 32 servos at once. I confess to not having tried Kye's Dual Servo Engine so I don't know how it compares with Servo32v7.

    Duane
  • WBA ConsultingWBA Consulting Posts: 2,935
    edited 2011-10-07 16:56
    Duane: Nope, did not catch that because I am using v1.27(r) which has Servo32v5. Guess I missed it because of the 5-7 difference and I skimmed through the list. I will take a closer look at it though because having it in the Propeller Tool Library allows me to reduce my requirements to be a simple object.
  • WBA ConsultingWBA Consulting Posts: 2,935
    edited 2011-10-07 21:02
    After going over Servo32v7 a bit more, I am going to go with it. Even though Kye's object is much easier to use, my main issue of Servo32v7 needing 2 spin files is nullified if ramping is not used. Since my project has no need for ramping, I will only be using the main spin file. Also, since Duane pointed out that it is part of the Propeller Tool, that gives it another advantage.
  • JonnyMacJonnyMac Posts: 9,202
    edited 2011-10-08 10:29
    I haven't posted this in ObEx yet, but I think it's a very good servo controller. It uses just one cog to control eight servos, and that includes individual speed control per servo and a method that allows all servos to land on the same spot at (about) the same time. I discussed the inner workings in my Nuts & Volts column; the code attached here has been improved a bit since. If you need more than eight servos you can add the second counter to the servo control loop to get up to 16 -- still using just one cog and getting advanced control.
  • w4fejw4fej Posts: 264
    edited 2011-10-08 11:27
    JonnyMac wrote: »
    I haven't posted this in ObEx yet, but I think it's a very good servo controller. It uses just one cog to control eight servos, and that includes individual speed control per servo and a method that allows all servos to land on the same spot at (about) the same time. I discussed the inner workings in my Nuts & Volts column; the code attached here has been improved a bit since. If you need more than eight servos you can add the second counter to the servo control loop to get up to 16 -- still using just one cog and getting advanced control.

    I used Jon's file the other day just to get familiar with my PPDB and it took only microseconds to get it up and running. Even I could make this work right out of the box and that's saying a lot..

    Mike B.
  • JonnyMacJonnyMac Posts: 9,202
    edited 2011-10-08 19:24
    As of this afternoon I have uploaded my new servo driver to ObEx.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-10-08 19:44
    I also have a servo driver (in pasm but called from spin) which I am using for my QuadCopter, so it only drives 4 cogs. We use ESCs to drive the brushless motors but they require the same old servo drive information. It is pin independant so you can set any output pins. I have since seen a slightly better way to drive the pins (in Servo8 which I think may be Jason Dorie's code) and so will update to this soon. It is only a pasm change so it can be substituted when done. There is a parameter that sets the repeat cycle (currently I use 4ms) and it is also clock independant by using clkfreq. All servos are updated in parallel, not serially which permits faster changes as required by QuadCopters.

    Here is a link to the thread http://forums.parallax.com/showthread.php?133372-Ken-s-QuadCopter-Build-Log-(now-includes-videos)/page7 see post #250.
Sign In or Register to comment.