Shop OBEX P1 Docs P2 Docs Learn Events
Intro and servo hacking — Parallax Forums

Intro and servo hacking

ArchiverArchiver Posts: 46,084
edited 2000-12-19 05:06 in General Discussion
Hello all,

I've just joined this group and collected my first batch of messages. My
name is John, I live in Nottingham, England and I've recently discovered
the Basic Stamps. My main interest is to use them in robotics. I've
built simple wheeled robots from Lego Technik parts in the past, using
the PIC 16C84 as the processor. I haven't progressed far beyond line-
following devices yet, but I have built one with forward-looking 40kHz
sonar which moves forwards then stops when it senses an obstacle at
about 6 inches distance. If the obstacle (such as a hand) moves closer,
the robot backs away to maintain the distance. This robot has no
steering. The next stage will be to fit steering and sideways-looking
sonar so that it can move down a corridor following a wall at more or
less constant distance, or more ambitiously to fit sonar on both sides
so that it can centre itself as it moves down the corridor.

With this in mind I've bought and hacked two Futaba S3003 servos.
They're quite cheap here (£7.95, about $11.20 - how does that compare?).
My hacking went like this. I took one apart and cut off the tab which
prevents the main shaft from rotating 360 degrees. Next I removed the
feedback potentiometer and replaced it with a vertical preset (that is,
side-adjusting) of about the same value. I think it was 4k7. The middle
leg of the preset had to be bent slightly to make it line up with the
middle hole. Then I drilled a hole (1/8", 3.2mm) in the end wall of the
servo case to line up with the slot in the preset. This gave me access
to the preset when the servo was reassembled. Back in one piece, I
applied power and a train of 1.5ms pulses at 20ms intervals to the
servo. Then I adjusted the preset using a thin screwdriver until the
motor stopped running. This didn't happen with the preset at the middle
of its travel, so just fitting two equal-value fixed resistors wouldn't
give you a stationary motor at 1.5ms pulse width. Now I can make the
motor run (say) clockwise for pulses wider than 1.5ms and anticlockwise
for narrower pulses. For very small changes in pulse width the motor
runs slowly. For wider pulses (I can't remember the figures) the motor
runs at full speed. Once the adjustment was made I covered the hole with
tape to prevent dust getting inside.

I wanted a left and right matched pair of motors, so when I hacked the
second servo I also unsoldered the motor, turned it through 180 degrees
and soldered it back in place. The motor is held in by its solder
terminals. Being connected in reverse, this motor now runs in the
opposite direction. With the two modified servos driving the left and
right wheels, 2ms pulses mean forward motion on both sides, 1ms pulses
mean reverse.

I hope this helps. I'll let you know my progress when there's any to
report.

Best regards,

John
--
From John at Kanga Products.
Kits and components for the Amateur Radio enthusiast.
http://www.kanga.demon.co.uk

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-12-19 04:33
    Hi John,

    I am working on building an SX Tech Bot for a class. I am using the
    SX28 with the Parallax SX Key. I think I have Stamp II. I'm not
    really sure about the terminology (Stamp I/II, SX Key/Blitz!, Scenix
    chip = CPU = SX28AC/DP, etc). In class, everybody else used the
    servos that came with the kit that we all bought from Parallax, Inc.
    My servos were defective. I tried to get some servos from Parallax,
    Inc. but they didn't come through. I then bought 2 servos.

    > With this in mind I've bought and hacked two Futaba S3003 servos.
    > They're quite cheap here (£7.95, about $11.20 - how does that
    > compare?).

    In Schaumburg, IL @ Venture Hobbies, I bought 2 servos for about $15
    each. I'm planning on going out there so that they can help me fix my
    servos. Somebody there said that they would help me to sauter
    something together so that it would work. So...I hope that I don't
    have to figure out and use the method described below. Thanks for
    Everybody's help. Thanks, fractal.

    > My hacking went like this. I took one apart and cut off the tab
    > which prevents the main shaft from rotating 360 degrees. Next I
    > removed the feedback potentiometer and replaced it with a vertical
    > preset (that is, side-adjusting) of about the same value. I think it
    > was 4k7. The middle leg of the preset had to be bent slightly to
    > make it line up with the middle hole. Then I drilled a hole (1/8",
    > 3.2mm) in the end wall of the servo case to line up with the slot in
    > the preset. This gave me access to the preset when the servo was
    > reassembled. Back in one piece, I applied power and a train of 1.5ms
    > pulses at 20ms intervals to the servo. Then I adjusted the preset
    > using a thin screwdriver until the motor stopped running. This
    > didn't happen with the preset at the middle of its travel, so just
    > fitting two equal-value fixed resistors wouldn't give you a >
    stationary motor at 1.5ms pulse width. Now I can make the
    > motor run (say) clockwise for pulses wider than 1.5ms and
    > anticlockwise for narrower pulses. For very small changes in pulse
    > width the motor runs slowly. For wider pulses (I can't remember the
    > figures) the motor runs at full speed. Once the adjustment was made
    > I covered the hole with tape to prevent dust getting inside.
    >
    > I wanted a left and right matched pair of motors, so when I hacked
    > the second servo I also unsoldered the motor, turned it through 180
    > degrees and soldered it back in place. The motor is held in by its
    > solder terminals. Being connected in reverse, this motor now runs in
    > the opposite direction. With the two modified servos driving the
    > left and right wheels, 2ms pulses mean forward motion on both sides,
    > 1ms pulses mean reverse.
  • ArchiverArchiver Posts: 46,084
    edited 2000-12-19 05:06
    At 12:54 AM Tuesday 12/19/2000 +0000, you wrote:
    >Hello all,

    Hi John


    >I've just joined this group and collected my first batch of messages. My
    >name is John, I live in Nottingham, England and I've recently discovered
    >the Basic Stamps. My main interest is to use them in robotics. I've
    >built simple wheeled robots from Lego Technik parts in the past, using
    >the PIC 16C84 as the processor. I haven't progressed far beyond line-
    >following devices yet, but I have built one with forward-looking 40kHz
    >sonar which moves forwards then stops when it senses an obstacle at
    >about 6 inches distance. If the obstacle (such as a hand) moves closer,
    >the robot backs away to maintain the distance. This robot has no
    >steering. The next stage will be to fit steering and sideways-looking
    >sonar so that it can move down a corridor following a wall at more or
    >less constant distance, or more ambitiously to fit sonar on both sides
    >so that it can centre itself as it moves down the corridor.

    Outstanding ! You might consider mounting the sonar transducer on a rotatable
    platform (an r/c servo comes to mind). Alternative to that, you also might
    consider using the SHARP GP2D05 PSD sensor. This is used in the sensors
    supplied by HWV Tech [noparse][[/noparse] http://www.hvwtech.com/sensors ] and named AIRRS,
    IRODS and DIRRS. Which one to use, depends on your particular application.
    I suspect the IRODS would probably be the most appropriate for your use.

    >With this in mind I've bought and hacked two Futaba S3003 servos.
    >They're quite cheap here (£7.95, about $11.20 - how does that compare?).

    The S3003 in one off quantities is approx. $ 11.99 US at one national supplier,
    and may be available even more cheaply than that.

    >My hacking went like this. <particulars snipped>

    Nice job, and WELL described ! You might appreciate having this web reference
    and notes : [noparse][[/noparse] http://www.seattlerobotics.org/encoder/200009/S3003C.html ] where
    a similar thing was done. This is a local robotics group with a national
    reputation for excellence.

    >I wanted a left and right matched pair of motors, so when I hacked the
    >second servo I also unsoldered the motor, turned it through 180 degrees
    >and soldered it back in place. The motor is held in by its solder
    >terminals. Being connected in reverse, this motor now runs in the
    >opposite direction. With the two modified servos driving the left and
    >right wheels, 2ms pulses mean forward motion on both sides, 1ms pulses
    >mean reverse.
    The article and modification mentioned above seems to permit variable speed
    as well !

    >I hope this helps. I'll let you know my progress when there's any to
    >report.

    Please DO. IMHO, reporting like this is just what his list NEEDS.
    Unfortunately, we spend too much of our time here troubleshooting problems,
    and not enough time considering well implemented systems THAT WORK !

    >Best regards,
    >
    >John
    >--
    > >From John at Kanga Products.
    >Kits and components for the Amateur Radio enthusiast.
    >http://www.kanga.demon.co.uk

    You might also like to become aware of the new Stamp which Parallax has
    just announced. Check the What's New page of the Parallax web site
    [noparse][[/noparse] http://www.parallaxinc.com ]. The new Stamp executes faster than the BS-2SX
    and permits various advances in the areas of overlapped i/o use, and
    support for Dallas Semiconductor 1-wire products and iButtons
    [noparse][[/noparse]www.ibutton,com] . This new device support opens up a whole new world of
    devices and chips which the Stamp
    can easily use. There's much more too, but I'll save that for you to read.

    Regards,

    Bruce Bates
    Just a Fellow
    Stamper
Sign In or Register to comment.