Shop OBEX P1 Docs P2 Docs Learn Events
Will the servos Parallax sells work from a pulse directly from the Propeller? - Page 2 — Parallax Forums

Will the servos Parallax sells work from a pulse directly from the Propeller?

2

Comments

  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-04-08 17:16
    Ok..
    I think I finally got it right...
    Excluding the deculping caps and verifying the servo header pins, I think this circuit is done.
    Thanks again Beau.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    568 x 307 - 51K
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2006-04-08 18:06
    Looks good, Now I guess I need to modify the software.... smilewinkgrin.gif

    That's ok, I wanted to test this circuit as a sanity check anyway. The local
    surplus store isn't open on the weekends, so I have to wait until Monday
    to get some 573's unless I decide to go hunting through my IC bucket.

    One minor suggestion... reverse the order of Servo0 through Servo7 so that
    it works out sequentially in software as well as from the board layout.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • jammajamma Posts: 33
    edited 2006-04-08 22:41
    Nice work, Beau & KK.

    Do you see a way to extend this to even more servos? Looks like you might be able to get at least 96 per propeller.
    Believe it or not, I've got an app in mind that requires at least 256 servos.
    The cost of controlling them has been a gating factor to date (on top of the servo costs, of course).
    Clever use of a handful of propellers might make it attainable...
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2006-04-09 01:26
    jamma,

    I think 96 per Propeller might be the upper limit.

    If I shorten the Zone time to 3mS instead of 5mS, six 74xx573's can be used instead of four. (6 x 8 = 48)
    This makes the total pin count come to 14 .... That's enough for 2 circuits, each controlling 48 servos (48 x 2 = 96)
    Now, using 28 I/O's, there are 4 pins left over to communicate with the Propeller to make servo updates.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 4/14/2006 2:21:49 PM GMT
    1361 x 513 - 198K
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-04-09 01:55
    Beau:
    · Attached is the re-revised drawing... [noparse]:)[/noparse]· It's awesome!
    · About the software, can you make the object require three prams:
    · Servo pins (ie 3..10), Controll pins (ie 11..14), Delay (4000000)
    · and have the Object wait delay before starting?· This way, it can be synced with other Servo Objects.· Unless you have a better idea.

    · When I get my chip and stuff, or if you have the time, I·would like·to add a basic command
    · object:· SERIN & OUT driven servo commands, and maybe start, sync & stop commands.
    · I havent thought this all the way through, but the general idea is to make a
    · complete Propeller driven Servo app board, along the lines like Jamma was asking for, only with a dedicated Propeller chip.

    · I like your idea, but like you said before, when you get into a polling update, timing becomes tough.·
    · The idea we'v been working with·has plenty of time, and provides for leeway.· Not to metion, any SERIN capable chip could drive the board.
    · The idea I had was to duplicate your object in code, and let the parallel processing of the Propeller do the work.

    ··
    · What do you think ?

    · Fred

    · (How do I get this thing to put Fred under my nick name?)


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK


    Post Edited (Kaos Kidd) : 4/9/2006 2:03:58 AM GMT
    571 x 304 - 48K
    873 x 668 - 140K
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2006-04-09 02:44
    Kaos Kidd,

    "About the software, can you make the object require three prams:
    Servo pins (ie 3..10), Control pins (ie 11..14), Delay (4000000)"

    When it comes to this many servos, it might be better to dedicate or reserve a group of pins for the task.
    This goes for both the Control pins as well as the servo data pins.

    As far as a delay, why would it be necessary?



    To keep computability with our current products, the thought is to keep the same communication style
    as our existing 16 servo controllers.

    www.parallax.com/detail.asp?product_id=28023

    or

    www.parallax.com/detail.asp?product_id=28823




    From a Spin object perspective calling a servo within the Propeller could be as simple as....

    Servo.Set ( {Servo #} , { Pulse Width value } , [noparse][[/noparse] Ramp ] )


    {} required
    [noparse]/noparse optional

    'Servo #' ranges from 0 to 47
    'Pulse Width' ranges from 1000uS to 2000uS
    'Ramp - should be comparable to the PSC ( Parallax Servo Controller)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 4/9/2006 2:49:37 AM GMT
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2006-04-09 03:21
    Kaos Kidd,

    Something I over looked, and just now caught myself. The power on the servo header needs to be swapped.
    The outside is ground and signal, the middle is your positive supply.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • jammajamma Posts: 33
    edited 2006-04-09 04:48
    Wow! You guys are working fast. Great stuff. I thought 96 might be the upper limit. The question now is how/if a group of 96 can be strung together (multiple propellers, obviously) to effectively control 256 servos (or potentially more!).
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-04-09 19:04
    Beau:
    I found out about the header last night, so I'll be swapping the gnd and vcc for the servo headers.
    My idea was multi-servo objects, each running a set of 32 servos in a private cog, with the controll lines
    being shared between all servo objects. Then one cog running the servo command objects.

    The delay would be so the main loop could be synced (all servo objects start outputting at the same time).
    By going to a dedicated SER object board, with your suggested command set from the Parallax Servo controller, you could string quite a few boards to achieve quite a lot of servos.

    I'll work up another board with the corrected servo headers, seperate power lines for the servo, chips, propeller & it's hardware.
    Hmmm, from a 7.5 vold power supply (for the servos),a 5v regulator for the 573's, 3.3v regulator for the propeller and it's stuff.
    A complete servo object board.
    After reviewing the Parallax Servo Controller, I'll have to modify the board so a jumper to set that board's servo space is included, and to provide chaining other servo controller boards onto it.· I'm thinking of using a simple 4-16 decoder with jumpers to provide the address decode, and provide connections for the ser data & clock to chain them.· short, sweet and simple...· suggestions ?



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK


    Post Edited (Kaos Kidd) : 4/10/2006 1:38:51 PM GMT
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-04-11 18:15
    Ok, here it is, in all it's ... {insert a word}...

    The following board design incorprates the ability to assign 8 addresses (0~7) into the controller.· This is accomplished in software.· By using bi-laterial switches to toggle the servo controll lines between servo controll and a jumper block.· When the program starts up, it will, only once, switch the servo controll lines to the jumper block, read in the three bit pattern, then switch it back to the servo controll.· The three bit value is multiplied by 96 to give a "servo offset" value for the board.· During run time, when a servo command is recieved, the "servo offset" value is subtracted from the "target" servo.· If the resulting value is less then 0, then the target servo doesn't exist on this board, and is ignored.

    Next, the ability to reprogram the board is being introduced.· The idea being is simple:· Clip the Propeller clip onto the board, and you have full access to the board.· The board logic is simple:· By using bi-lateral switches, in one mode, isolate the Clip connections, and connect the SCL and SDA lines to the input header, in the other mode, isolate the input header and connect the clip connections as needed.· I do know the Xtal and various caps and reistors aren't shown in this drawing, Digital Works is a pure Digital simulation.

    Ok every or any one, comments, crits...?



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    1074 x 670 - 172K
  • jammajamma Posts: 33
    edited 2006-04-11 19:47
    Nice! Now we can all play with up to 768 servos! Note to self: find supplier of cheap servos in bulk.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-04-11 20:02
    And don't forget to buy a 100-amp-plus DC supply for all those motors! smile.gif

    -Phil
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-04-11 20:23
    http://cgi.ebay.com/20-pcs-of-Standard-Servos-35g-as-good-as-JR-Futaba_W0QQitemZ6621062843QQcategoryZ26425QQrdZ1QQcmdZViewItem
    ...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • jammajamma Posts: 33
    edited 2006-04-12 08:28
    Yeah, probably need 100 amps. However, this isn't that hard to do, given you can drive them at 5v. 5v/50A supplies are quite common surplus items.

    As for cheap servos in bulk, direct from China is probably the way to go, e.g.:
    http://www.microservo.com.cn/index1.htm
  • Rob7Rob7 Posts: 275
    edited 2006-04-12 14:07
    Great, KK

    Do you have a pic of you'r work in progress ?
    What does you propeller code look like, being that we are awaiting for our propeller chips to arrive ?

    Rob7
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-04-12 18:58
    Beau:
    I had already started working on the 96 servo version of what you described to me when I saw your 48 version post.
    I had just continued with what I had. Functionally they are both identicale.
    I'm going to redraw mine in simular fassion as yours.
    And your right: In my drawing I would need 8 propellers running 4 cogs each (3 for servos, 1 for command) for 768 servos.
    Yours would require the same, but only running in three cogs (2 for servos, 1 for command).

    Rob7:
    Right now, I had Digital Works drawings of the logic, which work. Next step is the actuall artwork. My intention is to use Beau's code, and add a 2 wire communication command set to it. All this on a dedicated board. Never again shall I run out of Servo space.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2006-04-13 21:25
    Here is an update:

    This object will control up to 96 servos or devices requiring a similar signal from one Propeller.

    Refer to using two of these schematics if you want 96 servos:
    Note: The power supplied to the 74xx573's will work at 3.3V or 5V... Servo's must have at least 5V

    attachment.php?attachmentid=41246

    In Spin code, this is very simple to setup....

    OBJ
      SERVO : "Servo96"                                  'Associate the alias SERVO with "Servo96"  
    
    PUB
        SERVO.Start0                                        'Start Servo handler  0-47
        SERVO.Start1                                        'Start Servo handler 48-95
    
    



    ...You initializes the above commands only once depending on if you are controlling 48 servos or 96 servos.
    As far as the SERVO.Start commands, you can use one or the other or both.

        SERVO.Set( {servo number 0-95} , {servo width 50uS to 3300uS} )
    
    



    ...That's it! you set the above value and forget it, the correct pulse width continues to be generated.
    If you need to change the position, simply issue the command again with the change.

    attachment.php?attachmentid=41234

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 4/14/2006 2:22:58 PM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-04-13 21:34
    Beau,

    You always post such nice-looking schematics. What CAD program do you use to produce them?

    -Phil
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2006-04-13 21:39
    Phil,

    Thanks, I use Protel for the schematics, and PhotoStyler for any graphic manipulation.

    Usually, I convert the Protel to a Gray scale image, and then adjust the tone to generate my black&white's ( <--Originally to save bandwidth )

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-04-14 13:26
    Beau:
    This is great! Awesome!
    One question: Why didn't you share the LE's between the two objects?
    All that would be needed is a way to "sync" the two objects. This way, it reduces the pin requirements by 6 pins.
    EDITED: After reading most of the assembly code:Nevermind about the shared LE's.... it would really complicate things trying to sync the two cogs, and keep the in sync


    I'm so ready to make this project....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK


    Post Edited (Kaos Kidd) : 4/14/2006 1:41:26 PM GMT
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-04-14 14:16
    Quick Q:
    I'm using EAGLE lite to draw this board, and I'm having a problem finding a part to use for the servo header(s)...
    Suggestions anyone?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2006-04-14 14:38
    Kaos Kidd,

    " I'm using EAGLE lite to draw this board, and I'm having a problem finding a part to use for the servo header(s)... Suggestions anyone?"

    A 3-pin SIP (Single Inline package)



    Kaos,

    I made a small change to the schematic.... http://forums.parallax.com/attachment.php?attachmentid=41246
    Basically, the ZoneSelect lines need a weak pull-down. The reason, I noticed last night, when the board is powered up and the program
    has not loaded, the I/O's are ALL inputs which makes the 74xx573's susceptible to 60Hz AC. 60Hz AC (16.667mS) is within the acceptable
    period for the servo's. Placing a 100K resistor here to GND keeps the 74xx573 latches disabled.


    Kaos,

    Is there anyway you can bread board your design, before you submit your EAGLE artwork? I would feel better about this in case there are
    other changes that need to happen or in case something was missed in the schematic translation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-04-18 21:17
    Here it is, for all who are interested, the first of two boards.
    ·
    The “Master Servo Controller Board”, (still under design) will contain the following:
    • Propeller
    • 3.3 Voltage regulator (for the Propeller chip and Servo Driver Board chips)
    • 3 power terminal connectors (one for each Servo Driver board)
    • Propeller clip (for updating the software)
    • (All required hardware for the Propeller to operate correctly “standalone&#8221[noparse];)[/noparse]
    • The Master Servo Controller Board will derive its power from the first Servo Driver Board’s servo power supply.
    • Three connectors to connect·a Servo Driver Board.
    ·
    The Servo Driver Board, pictured here, has the following:
    • Six groups of eight servo headers, labeled G1 ~ G8, Servos 1~ 8
    • 1 Connection header, to connect to the Master Servo Controller Board.
    ·
    As Designed (and coded) by Beau Schwabe, drawn by Fred Kerber.

    EDITED
    ·
    A New image was added, with the suggested changes...·
    Also reworked the pin outs and relocated the power supply for the servos to each board.
    Included is the EAGLE board... (sorry, no schmatic... I'm still learning this stuff...)



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK


    Post Edited (Kaos Kidd) : 4/19/2006 7:20:47 PM GMT
    733 x 671 - 124K
    627 x 677 - 124K
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2006-04-18 22:01
    Kaos,

    Power and Ground should be as THICK as possible perhaps doubling up on some of the header pins at the top.
    For each driver board you should characterize the maximum load of eight servo's at once. I will try get some
    real numbers by the end of the week as to what this should be.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Don DDon D Posts: 27
    edited 2006-04-19 18:08
    Have you thought of using a string of 74595 shift registers instead?

    Could they not be clocked at full speed using a cog to send out the pulse samples (possibly with reduced positional resolution)
    using three output pins for as many registers as you are ever likely to need?

    Seems to me a good application for one of the counters to evenly spread out the pulses over the 20ms repetition rate.

    Just a thought...
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-04-19 20:53
    ... I've edited my previous post with an updated image and the actual EAGLE file...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2006-04-25 05:26
    Here is an update on the MEGA servo controller.

    Refer to the 48-servo controller for a schematic. For additional groups of 48, the Zone lines are shared.
    http://forums.parallax.com/attachment.php?attachmentid=41246

    Features:
    1) Only 1 COG used
    
    2) Control up to 144-Servos
    
    3) Set and forget
    
    4) Wide input range of acceptable pulse widths (50uS to 3300uS)
    
    5) (3x6x8 = 144 total servos)
            Three Groups
                  Six Zones
                        Eight servos per Zone
    
    6) 20mS (19.998mS) period for each servo.
    
    7)  2 I/O's available for communication with mode 2 operation (144 servo's or less)
       10 I/O's available for communication with mode 1 operation (96 servos or less)
       18 I/O's available for communication with mode 0 operation (48 servos or less)
        
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 4/25/2006 5:41:36 AM GMT
    1005 x 553 - 129K
    1118 x 3820 - 692K
    609 x 557 - 210K
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-04-25 17:17
    This is HOT...
    I'm working on a "main" board for this project as well...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • jammajamma Posts: 33
    edited 2006-04-26 00:11
    Looks great, Beau. I thought this would top out at 96, but you managed 144. Nicely done. Still, is there a way to chain multiple controllers together (to get, say, 4*144=576 servos)?
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2006-04-26 02:34
    jamma,

    There is a minimum of 2 I/O's left over if you are using all 144 servo's. My intention would be to use them to communicate
    serially to the slave servo controller (main board) accepting commands similar to the existing PSC we have. What you could
    do within each slave servo controller is to hard code a unique controller ID. This way a master servo controller (could be
    a PC) talks to ALL of the slave servo controllers and only if the ID matches, changes are made to the specific slave servo
    controller.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
Sign In or Register to comment.