Shop OBEX P1 Docs P2 Docs Learn Events
Controlling standard (not parallax continuous rotation servos) servos. — Parallax Forums

Controlling standard (not parallax continuous rotation servos) servos.

TheZaXTheZaX Posts: 3
edited 2014-12-02 00:18 in General Discussion
So I went to radio shack and got some standard servos (part # 2730766) I assumed the pulse commands would be the same as the parallax continuous rotation servos, I ran it on some of the test programs in "robotics with the boe-bot" and it did not move. On the manual it says "Control the servo via pulse-width modulation (PWM) wave (50 Hz). The angle (counterclockwise) is proportional to the duty of logic high." then it has this table

duration of logic high (ms)
angle(in degrees
.6
0
.9
30
1.2
60
1.5
90
1.8
120
2.1
150

How do you suppose I control these servos? Is it even possible with the basic stamp? Or do you think I should just return the servos for parallax servos?

Comments

  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2014-11-29 22:57
    All R/C servos work the same as far as the pulses go, so they should function with test programs for the BOE-Bot. Of course, being standard angular, they won't rotate freely like the continuous rotation servos. They will go to their set point and stop.

    So-called "lesser brand" servos can consume more current than usual, so be absolutely positively sure you are not running the servos from the 9V battery powering your BOE board. You absolutely MUST power them from the separate AA battery holder. Be sure to set the jumpers for the servo terminals to Vin, so they don't run under the BOE's 5V regulator. For testing connect just one servo at a time. This limits the overall current consumption, and makes troubleshooting easier.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-11-30 00:28
    Yes, you can control your RS servos with a BasicStamp, but you will have to gather data.

    Parallax servos are re-branded OEM Futaba servos -- a good quality name in servo manufacturer.

    In general, all work on the same principle -- 50 times or more per second, a pulse of a certain width will control where the servo seeks position. Pulses width between 1ms and 2ms are considered the usual full range. All manufactures try to comply to these as they have to use their devices with R/C radio receivers that create pulses according to a standard.

    But the change to another brand (known or unknown) will mean that angles may not be exactly the same and quality control of where the middle position is might not be as tight. Also, some servos won't give you a full 180 degrees; while others with give you extra range.

    The only thing to do is to test your servos and create your own data.
    A. test for full range (seems yours is 150 degrees, not a full 180 degrees, and symmetrical for a range of 120)
    B. test for the location on middle position.
    C. test for where the angles are in relation to the pulses

    And, YES - be very, very careful to not attempt to run at excessive voltage. While some of the better quality servos have over-voltage protection, the cheaper ones might suffer a sudden death at anything over 5 volts DC or 6 volts DC. Good documentation from the maker is of extreme importance.

    Simply put, some servo makers low-ball the market and skimp on documentation or failure features; others (such as Futaba) charge a higher price and depend on their reputation for a value product.
  • TheZaXTheZaX Posts: 3
    edited 2014-12-01 11:18
    What command do you think I should use on the basic stamp? and as far as I know it is a 5v servo so could I use it in the motor ports on the board of education?
  • ercoerco Posts: 20,256
    edited 2014-12-01 14:46
    You'll use PULSOUTs and PAUSEs in a loop, just as described in the WAM and BoeBot manuals. Have you worked through either of those?

    The only way to fly.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2014-12-01 15:03
    TheZaX wrote: »
    What command do you think I should use on the basic stamp? and as far as I know it is a 5v servo so could I use it in the motor ports on the board of education?

    As long as you set the jumper to Vin, and use the AA batteries. Just like with a regular BOE-Bot.

    As Erco sez, consult the online manual for any other details.
  • TheZaXTheZaX Posts: 3
    edited 2014-12-01 16:06
    erco wrote: »
    You'll use PULSOUTs and PAUSEs in a loop, just as described in the WAM and BoeBot manuals. Have you worked through either of those?

    The only way to fly.

    I've tried using it with my other programs (that worked with the parallax servos) and it didn't work am I sending it the wrong frequency of signal? I tried it with a PULSOUT-PAUSE in a loop with the I tried it with multiple values in the is 850 or the right value to put in? I've even tried it with 50 per second (or so I think) this is what something it tried in my code:
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    DEBUG "Program Running"
    DO
    PULSOUT 13,50
    PAUSE 1000
    LOOP

    shouldn't this be 50Hz?
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2014-12-01 17:19
    Try the BS2 examples on this page:

    http://learn.parallax.com/KickStart/900-00008

    where the code moves the servo in short increments. You don't want to pause for so long between updates, and you want your test program to provide some change in the speed and direction. Otherwise, it's hard to know what you're looking at.

    This:
    PULSOUT 13,50
    PAUSE 1000
    

    should be more like:
    PULSOUT 13, 850
    PAUSE 20
    

    Remember that on a BS2 the values for things like PULSOUT and PAUSE are x2 milliseconds: 850 is really 850x2, or 1700 milliseconds.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-12-02 00:18
    More about over-voltage...

    These days, it seems most servos desire voltage limited to 6.0VDC or less, while micro servos may desire 4.8 volts or less.

    From what I can gather, older servos were more tolerant of higher voltages. So new servos require up-to-date info.

    The R/C community have seen newer ESCs (brushless motor speed controllers) provide a source of regulated voltage to avoid problems when using 7.4VDC or higher battery packs.

    My own personal experience is that i burned up a brand new pico servo by presuming that 6VDC would be fine. And at one time, Parallax was having a lot of users of 9VDC supplies on BS2 devices complain of damaged servos.

    I hate to see anyone damage a brand new device just because they don't quite understand what is involved. So here is some more info.

    www.horrorseek.com/home/halloween/wolfstone/Motors/svoint_RCServos.html
Sign In or Register to comment.