Shop OBEX P1 Docs P2 Docs Learn Events
BS1 Servo Controll — Parallax Forums

BS1 Servo Controll

BorgelBorgel Posts: 23
edited 2005-12-30 07:40 in BASIC Stamp
Hi again All,

I just recieved my BS1-USB in the mail, and let me say that it is really cool! turn.gif

I went to controll a set of servos for a small robot chassis I made, and I noticed that because the BS1 is slower then the BS2 I am used to working with, its Duration unit is 10 us instead of 2 us. So after some math, I came up with 150 as the value I needed to pulsout to make my servo center. I also checked it against a fomula in the "Robotics with the BOE-Bot" text and this number seems correct. However when I try this, my servo quickly rotates in one direction untill it hits its limit, then just strains. No matter what value I try, It turns in the same direction and does the same thing.

Can someone help?

What value should I use for center?

Comments

  • Vern GranerVern Graner Posts: 337
    edited 2005-12-29 05:20
    Borgel said...
    Hi again All,

    I just recieved my BS1-USB in the mail, and let me say that it is really cool! turn.gif

    I went to controll a set of servos for a small robot chassis I made, and I noticed that because the BS1 is slower then the BS2 I am used to working with, its Duration unit is 10 us instead of 2 us. So after some math, I came up with 150 as the value I needed to pulsout to make my servo center. I also checked it against a fomula in the "Robotics with the BOE-Bot" text and this number seems correct. However when I try this, my servo quickly rotates in one direction untill it hits its limit, then just strains. No matter what value I try, It turns in the same direction and does the same thing.

    Can someone help?

    What value should I use for center?
    I too had some strange results in my first experiments with operating a servo with a BS1. Through trial and error, and some help from the good folks on these forums, I ended up with workable code that is available here:

    http://www.spiderspreyground.com/howto/prop-1

    I was able to control 6 servos with one BS1 unit. smile.gif

    Hope this helps get you started!

    Vern

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Vern Graner CNE/CNA/SSE    | "If the network is down, then you're
    Senior Systems Engineer    | obviously incompetent so why are we
    Texas Information Services | paying you? Of course,if the network
    http://www.txis.com        | is up, then we obviously don't need
    Austin Office 512 328-8947 | you, so why are we paying you?" ©VLG
    
    
  • BorgelBorgel Posts: 23
    edited 2005-12-29 07:12
    Thanks! Thats some really cool code smile.gif .


    To add another question, could fluctuating or insufficent supply voltage cause a servo to behave erratically?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-12-29 07:27
    It certainly could.· Especially if it's causing the power supply to sag and brownout the Stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Tom WalkerTom Walker Posts: 509
    edited 2005-12-29 13:40
    So could not having a common ground. (Back to you, Chris <g>)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-12-29 17:59
    Thank you Tom, not only is that true, but I think one of us just pointed that out to another forum member in the last week or so who was having a similar problem.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Tom WalkerTom Walker Posts: 509
    edited 2005-12-29 18:37
    Chris,
    Yup...you elaborated for me in another thread, so I just returned the favor [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • BorgelBorgel Posts: 23
    edited 2005-12-29 18:53
    I'm using a common ground and common supply for the servos, but not the BS1 (Its a BS1-USB, so its supply is the computers USB port). So its possible that my voltage regulator or battery (a single 9 volt) cannot supply the current (or volage) that the servos want. I find this hard to believe, because the BOE-BOT can be powered by a single 9 volt, and have no problems.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-12-29 19:08
    The Vss connection from the USB-BS1 is available on the pins, and should be connected to the servo ground.· That's what we're saying.· Is this connected?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-12-29 19:18
    Chris -

    I have never tried this, nor do I expect that I will, so this is just a matter of sheer of curiosity, good practice, and nothing more. With a BS-1 USB-connected, is it legitimate to use the parasitic power for the Stamp, and other circuitry as well, so long as you stay within the rated mA rating of the USB hub to which it's connected?

    I've just not had all that much experience using the USB connection as a sole power source.
    I realize it was designed with that in mind, however.

    TIA

    Regards,

    Bruce Bates
  • BorgelBorgel Posts: 23
    edited 2005-12-30 07:40
    Ok, so the ground seems to have been the problem. For now, my BS1 can controll the servos. Thanks!

    Borgel
Sign In or Register to comment.