Shop OBEX P1 Docs P2 Docs Learn Events
newbie servo question — Parallax Forums

newbie servo question

Robert@HCCRobert@HCC Posts: 80
edited 2005-11-07 13:32 in Robotics
Alohas all,

We are planning to use two Hitec HS-55 servos ( they are a bit smaller than the Parallax ones - space is a major issue for us) to control direction of an airborne can satellite. Gps is also part of the solution. Basically, each servo horn has a string from the parachute attached. go about 90 deg. , pull the string and it allows the cansat to turn. direction depends on which servo pulls the string.

My questions are:
do we need a servo controller? Or can we just control the servos direct from the BASIC Stamp 2? And if we do need the controller, will the Hitecs work ok with the Parallax Servo Controller?

As I mentioned, space and weight is a major concern for us, so I would like to avoid the addition of the controller if possible.
hehe we are only allowed a max weight of a full can of soda, plus have to fit all components in a 12oz soda can - and at present we have the stamp, sensiron temp/humidity sensor, accelerometor, Aerocomm 4790 RF module, Trimble IQ Gps module, a pressure sensor and components for an altimeter,, the two micro servos mentioned, plus the antennas for RF and GPS...whoops, lets not forget batteries as well smilewinkgrin.gif

fun, interesting college project, but frustrating at times! tongue.gif

Thanks for any info or pointers in the right direction!

Aloha ,
Robert

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-05 06:20
    Robert,

    ·· You shouldn't have any trouble just controlling the servos from the BS2, but ultimately it depends on what else you need your code to do while refreshing and positioning these servos.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Robert@HCCRobert@HCC Posts: 80
    edited 2005-11-05 07:45
    Basically what the code will be doing is retreiving the data from the sensors and sending it off to a ground station computer via RF.
    Additionally, the servos need to work with the GPS data to change direction if it is not heading towards a predetermined set of coordinates. IE, I am *here now*, but need to get *over there*, cue one of the servos to pull on a parachute string and make a course correction. I assume that here is where the "refreshing and positioning" of the servos will have to be dealt with as well.

    Everything has to be autonomous to make the requirments for the ARLISS CanSat competition in Nevada next year. Once the CanSat is released from the rocket, its on its own...

    Sounds plausible re: the servos direct to the Stamp ? Or, if I understand what I have seen so far, perhaps this is to much load on the Stamp? Or am I , as I have often been of late, totally lost? smilewinkgrin.gif

    dont know much about servo controllers and what function they really serve aside from ..err.. controlling the servos and taking some of the load off the Stamp (?) but am learning every day...


    AHHH the joys of discovery!

    hehe

    Post Edited (Robert@HCC) : 11/5/2005 7:48:32 AM GMT
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2005-11-05 18:27
    What type of parachute are you using?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-05 19:10
    Basically your servos will need to be refreshed every 20 mS to 50 mS.· If in your main program loop this can be done, then you're set.· Refresh the servos based on a variable that can be updated on the fly, and the servos will move appropriately.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • bulkheadbulkhead Posts: 405
    edited 2005-11-05 19:23
    Servos are positioned using "pulses" of length between 1ms and 2ms. A 1.5ms pulse usually corresponds with a servo's "center" position. To change the position of a servo, you send it a different length "pulse." The refresh rate of a servo is how often you send these pulses (at least 20 times a second, i think). So no matter what size/brand servo you use, controlling it should be the same- the only difference may be slight variations among each's servo's center/max left/max right pulse length.

    Based on my understanding of a servo controller, it basically takes over the job of changing pulses and refreshing each servo away from the microcontroller. This is advantageous because you don't need to use up 5 pins on your stamp to control 5 servos. I believe there is also a limit to how many servos a stamp can control, something to do with keeping track of timing or something.

    I think if you are just using 2 servos, you should be fine without the PSC, unless you need to use up all of the BS2's pins (in which case, you gain only 1 or 2 pins by using the PSC).
  • Robert@HCCRobert@HCC Posts: 80
    edited 2005-11-06 03:41
    Excellent replies all, and I am most grateful!!

    Thank you Chris for your quick and informative responses. Its really great having Tech support so accessable here, plus the added bonus of knowlegable members more than willing to lend a helping hand, so the rest of us can catch up!

    Kevin, we are still working out the parachute - probably be a fairly small custom parachute, rectangular instead of round- based on a design Georgia Tech Uni. used successfully at ARLISS '03-'04. The main focus we have there is dealing with the 40-80 mph winds at the 9000-12000 foot release altitude.

    And thank you so much for that great explanation bulkhead! I kinda understood about positioning servos using pulses from browsing the BOE Bot manuals on the Parallax CD, but didnt catch anything about refreshing the servos. I now understand the purpose of the controller as well. You have my thanks and alohas!


    At first, I kinda was griping to my mentor for this project about having to dig through all the docs on the CD from Parallax ( all products are included). Now I thank God you guys put everything in (we had not planned for servos in the begining) because all the Robotics stuff is coming in mighty handy!

    Again my thanks,
    and Aloha!

    Robert
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-11-07 13:32
    And yes, the BS2 has enough horsepower to control 2 to 4 servo's all by itself. You'll have to code the 'main loop' in such a way that the servo's are 'refreshed' every 20 to 50 mSec -- but that's a reasonably long time with a processor that does an instruction every 100 uSec or so.
Sign In or Register to comment.