Shop OBEX P1 Docs P2 Docs Learn Events
Servos and the BS2 — Parallax Forums

Servos and the BS2

Buck RogersBuck Rogers Posts: 2,187
edited 2013-10-30 21:17 in BASIC Stamp
Hello!
I have here an older Hitec servo, its so old the vendor doesn't even keep it in its obsolete file. That being said I found out that the standard servo code, obviously written for the ones that Parallax selected, which are either Futaba or even Hitec or someone else's brands works on this one.


Oddly enough I bought it years ago, before I even heard of the Basic Stamps to construct something from a now closed hobby shop in Manhattan for about 10 Dollars. This is the first time I've done anything with it, in about twenty years. Perhaps even thirty years.


Oh and Chris you were very right about the color code on the cables that we were discussing for the LCD displays having the same color codes as the servos. I found a chart who confirms it, and I was able to make my widget work with the code after a fashion.
' CenterStdServo.bs2
' {$STAMP BS2}
' {$PBASIC 2.5}


counter VAR Word
servoPin PIN 0        ' change I/O pin for servo signal here


FOR counter = 1 TO 220


  PULSOUT servoPin, 750
  PAUSE 20


NEXT

All I did there was to swap a P0 for the P number displayed when I loaded the code. It worked. Thing is also rather noisy.

Okay here are some photos of the arrangement:
Photo_103013_001.jpg
Photo_103013_002.jpg
Photo_103013_003.jpg
Photo_103013_004.jpg



And one 45 second video. The soundtrack which the device didn't tell me it was recording is from my radio station WQXR-FM who is running down a pledge drive (It is a Public Radio Station.)
1024 x 768 - 124K
1024 x 768 - 127K
1024 x 768 - 136K
1024 x 768 - 139K

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-10-30 17:02
    So everything's working okay then?
  • ercoerco Posts: 20,257
    edited 2013-10-30 17:44
    The analog servo standard (50 hz PWM, 1-2 mS sets position) has been around a LONG time, prolly standardized in the 1970s or maybe before. Gordon?

    According to http://hitecrcd.com/company/about-us, HiTec was founded in 1973, so it's likely that most any servo made by them can be controlled by a BS2 with standard PULSOUTs.
  • Buck RogersBuck Rogers Posts: 2,187
    edited 2013-10-30 21:09
    So everything's working okay then?

    Hello!
    Actually yes. Since what I had shown there was done at 3AM yesterday (EDT) I promptly spent sometime later on yesterday confirming my suppositions regarding how the items were wired together, and of course appropriate purposed demonstration code. Each example with the appropriate Pin # set worked.

    Almost forgot, what does everyone think of my photos and the video sketch?
  • Buck RogersBuck Rogers Posts: 2,187
    edited 2013-10-30 21:17
    erco wrote: »
    The analog servo standard (50 hz PWM, 1-2 mS sets position) has been around a LONG time, prolly standardized in the 1970s or maybe before. Gordon?

    According to http://hitecrcd.com/company/about-us, HiTec was founded in 1973, so it's likely that most any servo made by them can be controlled by a BS2 with standard PULSOUTs.

    Hello!
    And right you are. I still can't recall why I bought the thing then, but given the particulars, yes. As it happens back a number of years ago, TI made an excellent analog to digital converter which translated an ordinary analog voltage of say five volts to zero, to the span in bits, and it was done in serial fashion. Forest M. Mims made use of one as a PWM tool and found that it would do much the same for a servo. I think that's why I bought it from that now closed hobby shop. It was never assembled as such, and I think I have two or three of these parts.

    And the stamps do much better with servos.

    Ideally my next purchase will be the excellent continuous rotation servo that Parallax makes to ascertain how to have it participate in running a tracked vehicle other then the BOE-Bot wearing tracks instead of its wheels.

    See this thread http://forums.parallax.com/showthread.php/151076-Website-problem as to where I'm off and running with this.
Sign In or Register to comment.