3D Robotics

Basic Stamp autopilot tutorial, part 1

Over in the discussion sidebar, Wayne Garris and James Hall have been working through the details of how to build a BASIC Stamp autopilot, which we use in in GeoCrawler3 (formerly 4--sorry for the confusion!). They're doing a great job of catching bugs and otherwise sharing tips, but this has been a reminder to me that I should post a tutorial on setting up the hardware. So this will be the first of several posts on assembling the board and components for this autopilot, and customizing the software for your own needs.

First, let's just set up the board to control a single servo with the FT639 chip on the Parallax development board (later on I'll show you how to do it using the Parallax servo controller board, if you prefer that). The single FT639 chip has the advantage of being small and easy to integrate into a single-board autopilot, but it's not the greatest servo controller in the world and doesn't handle high-speed applications well (we're just using it on the rudder, so it's fine for our purposes).

In this case I've connected the FT639's serial-in pin to the Stamp's pin 8 (yellow wire), and the FT639's servo 1 output pin to the signal pin to servo connector p15 (blue wire). The black and red are ground and power, of course. Couldn't be easier.

Here's the code that just tests this servo in several position. Once you get this working, the next step will be to read the R/C receiver input signals and pass them through to this servo. Go to this next post here.
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Thanks! That's good to know. I've experienced that problem with the BS2 and some wheeled robots I've built, but didn't know the work around.
  • 100KM
    a servo needs a 0.0005 to 0.0025 second duration pulse every 0.02 to 0.05 seconds the stamp can barley do this on a stand alone endless loop , put any other code after it and it cant put out the next pulse soon enough so a hardware solution is best check out the servopal from parallax you send it pulses when you can but it maintains the constant pulse streams leaving the controller free to ponder the universe
  • I'm new, sorry if this is a stupid question:

    The BS has the ability to drive servos with the "pulse out" command, so why do you use a separate servo controller? Is it a limitation of the Stamp that you are trying to work around?
  • 3D Robotics
    "the codes"? Do you mean the autopilot program? There are a lot of comments in the code itself that are meant to be an embedded tutorial. If you have specific questions about one line or another I can help...
  • Hello. I am a beginner working on this bs2 education board. I am not too familiar with the codes needed but am an okay RC pilot. Does anyone have a short video explaination of what the codes are actually doing in each program? I am very confused about the codes only. Can anyone help? Thank you.
  • Thanks Simon, I think I know what is going on with it now....Maybe.... :) I just ordered all the electronics, can't wait to start!
  • Sorry for double-posting, but I can't find the edit button.

    Anyway here is the documentation for the PSC (Serial)

    http://www.parallax.com/Portals/0/Downloads/docs/prod/motors/ServoC...
  • Scott, interfacing the Parallax Servo Controller is pretty easy, if you're using the Board of Education. You just plug the white/red/black cable into one of the servo ports.

    Did you try reading the documentation on Parallax's website? It is pretty helpful. If you are using the BOE and still have questions, I can help you out.

    If you aren't using the BOE, then I have no experience with that.
  • 3D Robotics
    Scott,

    I'm afraid I don't. I don't use the Parallax servo controller board, since the FT639 chip works great for me and is much smaller/cheaper. But I assume the wires aren't much different.

    As for replacing the dev board, the normal next step would be to switch to a "carrier board", which is designed for wire-wrapping or soldering.
    http://parallax.com/Store/Microcontrollers/BASICStampDevelopmentBoa...

    If that's too big or otherwise not what you want, I'm afraid the next step is custom PCBs, and you're on your own there. Not that hard, but we just haven't gotten there yet.
  • Hi Chris,
    Do you have any information / links on connecting the Parallax servo controller board? Also, is there a third party board to replace the development board. I am having nightmares of the wires falling out of the breadboard during flight. :) Thanks!
This reply was deleted.