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

  • 3D Robotics
    Yes, the servo sockets on that board automatically provide +5v and ground.

    This is the board:
    http://parallax.com/Store/Microcontrollers/BASICStampDevelopmentBoa...
  • I am not that familiar with this dev board being used. In the picture and description there is a one wire signal going to the servo from the FT639. However a servo has 3 wires. Is the power and ground being supplied to the servo from the dev boards special socket?
  • 3D Robotics
    Mike,

    Yes, that's right. To ensure that we can fully integrate the RC and autopilot systems, we pass the RC commands through the Stamp while under RC control, and then the Stamp generates its own commands under autopilot control. In some other systems that we haven't revealed yet we do it differently, using a stand-alone board that switches the servos from RC to CPU control, which has some advantages in terms of being able to handle software crashes in the CPU, but it introduces a whole other layer of complexity. Doing it the way we do in this tutorial series--ie, all in software--is the simplest (and smallest, lightest, cheapest) way, and if you write your code properly it's plenty safe.
  • Friend at work directed me to this site. I got impressed very quickly about the topics and community participation.
    Decided today to sign up after seeing these tutorials.
    I have the ATOM microcontroller dev board that uses BASIC language and is very similar to the Basic Stamp. In following on to tutorial #2 I am not understanding why the receiver output goes to the the stamp? Is it a pass through until the autopilot is engaged?
  • Thank you Chris. As I have discovered. I had to remove my temperature IC to make room for two extra incoming channels for a total of 6 incoming channels from the Receiver. This time I have swaped out my futaba receiver for a FMA copilot receiver as its a bit smaller and will allow me to keep the flight stabilization sensors in place that where supplied with the Copilot. I now have all 6 channels, (heli) pulsing into the basic stamp 2p with a Parallax servo controller pass those signals onto each servo.

    Still waiting shipment on my Parallax datalogger and hitachi 3-axis accelorometer.

    Not sure at this point if I will need the FMA heat sensors for stabilization but it will be there if I need. I can disable it by unplugging the sensor for now. I will try to upload some pictures of my hardware setup thus so far.
This reply was deleted.