Shop OBEX P1 Docs P2 Docs Learn Events
Driving 16 (or up to 64) Servos with P2 Smart Pins — Parallax Forums

Driving 16 (or up to 64) Servos with P2 Smart Pins

Ken GraceyKen Gracey Posts: 7,386
edited 2021-01-24 23:58 in Propeller 2

Hey there,

We've got a first release servo object coming from JonnyMac in a P2 Quick Byte, on Monday.

The new object can drive up 32 servos or up to 64 with a second instance of the object. No extra cogs required.



Very exciting to work with some of these new code examples. Sure will be interesting when a robo-enthusiast shows up with a big hexapod.

Ken Gracey

Comments

  • Can this object read the feedback line of the Feedback360 servo?
    If not, is it planned?

    J

  • I am planning on writing code for the FB360 servos -- just need to order a couple. I've got an advanced object for (standard) servos that's nearly done.

  • @JonnyMac said:
    I am planning on writing code for the FB360 servos -- just need to order a couple. I've got an advanced object for (standard) servos that's nearly done.

    Order? They're on their way!

    @thej what would you like exactly - the pulse width value on its own? As you know, the possibilities open up lots of doors for motor control (providing distance, speeds, ramping).

    Ken Gracey

  • I would think the value on its own would be best.
    I could then record the values from a full turn to verify the Max and Min values.
    From there I could calculate the position.

    I would prefer that the object is not approximating anything so that I can control the precision.
    Of course it could be done both ways; quick and dirty values for those that want things to be simple and raw values for those wanting to have max control over precision.

    My 2 cents.

    J

  • @thej said:
    I would think the value on its own would be best.
    I could then record the values from a full turn to verify the Max and Min values.
    From there I could calculate the position.

    I would prefer that the object is not approximating anything so that I can control the precision.
    Of course it could be done both ways; quick and dirty values for those that want things to be simple and raw values for those wanting to have max control over precision.

    My 2 cents.

    J

    And that's the easiest solution for @JonnyMac. I think this would be a second Quick Byte for the F360 servo, too. You can do your own motor control and PID loops as you wish this way. I know from our prior experiences that closed-loop motor control looks easy on the surface, but we've spent many months getting it to work right (with the Arlo, ActivityBot 360, etc).

    Ken Gracey

  • JonnyMacJonnyMac Posts: 8,912
    edited 2021-03-01 21:57

    @thej We'll need to invoke a cog to control and monitor the FB360 servos. How many do you anticipate on a project? If I wrote an object that would allow up to 4 FB360s would that be sufficient?

  • Hi Jon, sorry for teh delay in reply.
    I only need 1 at the moment but could possibly use up to 4.
    That would be perfect!

    J

  • @JonnyMac said:
    @thej We'll need to invoke a cog to control and monitor the FB360 servos. How many do you anticipate on a project? If I wrote an object that would allow up to 4 FB360s would that be sufficient?

    I was able to do four FB360s on P1, six on P2 (because of using smart pin mode (four?) to read the position). Probably eight is possible on P2. Since the user is spending a cog, may as well do as many as possible. Just my opinion.

  • If one only measures the high side of the feedback cycle, yeah, you could actually do eight FB360 servos in one cog. Now... in my world, the only thing the cog does is generate the servo pulses (with rate control) and measure the feedback. It is up to the main app to use the feedback data for fine control.

  • @JonnyMac Has there been any updates to this driver?
    I'm assuming the "servo" driver you have in the P2 Object library is not this one.

    J

  • Here's my latest of the simple servo driver -- this will let you control up to 32 servos with one object. By "simple" I mean that there is no ramping control; you set the position and it goes. I have ramping control worked out and will publish that later.

  • Awesome! Thanks :-)

    J

Sign In or Register to comment.