[ Concept 60 hovering ]

autopilot: Do it yourself UAV

Home | Download | Mailing lists | Gallery | FAQ | Systems

Rev 2.2 construction details

[ Top view of unpopulated board ] Don't panic! The silkscreen is a bit of a mess due to the tight packing of the components. It really isn't as complicated as it appears.

Details on the capabilities of the rev 2.2 board are at the bottom of the page. Full source code is in onboard/rev2. There will be a packaged software release sometime after the boards have been sent out.

The PCB was made by ExpressPCB. If you want to have your own made, download the Rev 2.2 PCB file. Unfortunately I have no kits remaining, so you will have to either assemble your own from the parts lists and files or wait until the next rev of the control board.

This board has actually flown the helicopter on its own! You can see flight details in kahn.20020922. Joe Easly made movies of it hovering under software control.

[ Parts included in the kit ] Included in the package are the components shown here on the right.

You'll need to supply the following parts:

[ Voltage regulator ] The voltage regulator requires some difficult mounting, as you can see in this image. You will have to bend the leads as shown to get them to fit, and the decoupling capacitor goes through the same holes as the +V and ground pins. Click to zoom in.

[ Top view with stage 1 components ] The minimal set of components that will allow basic testing should be added first. With these, you will be able to program via the ISP port or the serial boot loader. Solder in the following pieces: Once these are in place, you should be able to hookup a serial port and power on the device. The board should produce NMEA-style data at 38400 N81 with no handshaking. You can use Minicom, cu, tip, stty/cat or HyperTerminal with a straight serial cable. Sample output looks like this:

[ Bottom view of the jumper to add ] The servo driver is just simply two 4017 decade counters and lots of 0.1" headers. Only populate the A side headers; the B servo bank is optional and will require a few more header pieces. If you received 20 headers, you'll be short two of them. If you received 25 headers, go ahead and fill it up. You will have to cut the headers to get the 2 pin header for the power supply.

There is a mistake (sorry!) in the 4017 power supply. You have to cut the two traces and solder on a jumper as shown. Zoom in to see the trace on the bottom that needs to be cut. The corresponding trace on the top also has to be cut. Zoom in on the next image to see the one to cut on top. Be sure that they are both fully severed; otherwise you will short the power supply and things won't work.

[ Top view with two gyros ] After testing the first pieces, the next step is to add the pitch and roll gyro filters. I apologize for the larger 1/2 W resistors -- I messed up on my DigiKey order. You can subsitute RadioShack 1/4 W 5% or 1/4 W 1% items if you have trouble fitting it together.

Note the orientation of the opamp -- it is upside down relative to the one above it. The silk screen image and schematic show it correctly. The schematic shows the yaw gyro filter as well, but for space reasons you may wish to wait until the yaw gyro connection is soldered inplace before attaching the filter components.
[ Gyro filter schematic ]

The gyro filters consists of:

Note that the orientation pin on the Tokin gyro is larger than Murata, so you will have to remove the pin or enlarge the mounting hole. Be careful when you solder the gyros onto the board -- too much heat can desolder the pin inside the gyro.

[ Top view with gyros, PPM and filters ] Finish populating the headers, including the LCD, the sensor inputs and so on. Add the two LEDs (not supplied) with yellow into 3 and green into 4; the longer lead is for power and goes into the left hole. The LEDs require a step-down, so solder a 1.0 k Ohm resistor in the two holes to the left of LED #3.

The PPM decoder uses an NPN transistor (not included) in the three holes. They are (from left to right) emitter, base, collector. When correctly oriented, the flat side of the transistor should face south. Just below the transistor are two holes for a 1.0 k Ohm resistor.

[ Schematic for the accelerometer filters ] The pitch and roll accelerometer filters are identical. Each consists of one opamp follower to buffer the output and a low pass filter with 3.2 times gain. The reference voltage is generated by a voltage divider that outputs Vcc/2 since the nomimal output of the accelerometers is 50%. The components are:

[ Top view with gyros, accelerometer and PPM ] Attach the accelerometer (not included). Either use the ADXL202-EB in the five through holes as shown, or surface mount an ADXL202-E. If you use the -EB model, you'll have to connect the Cfilt pins on the -EB to the holes labeled "X" and "Y" above the Cfilt holes. The easiest way to do this is to leave the long leads closest to the chip on the capacitors when you solder them to the -EB. When you start to solder the -EB to the Rev 2.2 board slide the leads through the holes marked "X" and "Y" above the Cfilt label. I haven't been able to get a good picture of this yet. The digital outputs are not used with the Rev 2.2 board.

[ Top view with all three gyros ] The yaw gyro uses the same filter circuit as the other two. It also needs a jumper to connect the output of the opamp (labeled "Yaw") to the ADC input on the ATmega (labeled "Yaw" as well). The case is US$1.99 from the Container Store and makes it "iMAC compatible"... Zoom in on the image to see the highlighted solder points.

[ Close up of the Z-gyro mount ] The yaw gyro does require some tricks to mount. This is just a serving suggestion; we've also successfully mounted it to the side of the case. The small PCB is cut from a RadioShack part. I used a length of four conductor phone wire for the jumper.

The LCD and buttons are connected with the multi-color header. It should be oriented with the cable crossing over the Mega163 and the black wire at the bottom. You'll have to cut one side.
Port C    Cable    LCD  Function
------    -----    ---  --------
 Vcc      Black    2    Vcc
 Ground   White    1    Vdd
 0        Grey     4    Reg select
 1        Purple   6    Enable
 2        Blue     11   D4
 3        Green    12   D5
 4        Yellow   13   D6
 5        Orange   14   D7
 6        Red      15   Button A
 7        Brown    16   Button B
LCD pin 5 (R/W) should be shorted to ground. LCD pin 3 (Contrast) should be connected to the wiper of a 10k pot. Button A and B are included and should short to ground when closed.

[ Top view with LCD and RX ] You should now be able to hookup the LCD (included) and PPM receiver (not included) and generate output on the serial port, the LCD and the servos. Schematics for the LCD hookup need to be written.


Servo control

20 servo outputs with 13 bit resolution and two separate power buses. These are independent of the controller's power supply, so running high-amperage servos won't affect the analog voltage readings.

Inertial measurement

3 orthogonal angular rate gyros with 10 bit resolution and up to 90 deg/sec rotation. These are low-pass filtered to help eliminate engine noise and vibration.

2 orthogonal accelerometers with 10 bit resolution up to +/- 2g. These are also heavily low-pass filtered and produce good data for feeding into an attitude estimating Kalman filter.

PPM interface

The controller board decodes PPM signals from Futaba (and JR?) receivers to control eight of the servos. The control signals are output on the serial port for a flight control computer and can be modified by the controller before sending to the servos.

NMEA interface

Since the iPAQ only has one serial port, the control board will merge the NMEA data stream from a GPS into its NMEA-style output for the flight control software on the iPAQ. Both TTL and RS232 levels are supported by the control board. You can use the GPS of your choice.

Engine tach

A Hall effect sensor can be fitted to the engine flywheel or cooling fan to feed engine RPM data into the control board. It outputs the value on the serial port. With a little more programming, this can also feed into an engine governor to regulate the engine RPM at a preset speed.

LCD output

A 16x2 line minature LCD is included for status display and to help with engine tuning. It also has up to two push buttons for selecting output display or other input.

Serial boot loader

The control board can now be reflashed from the iPAQ without any special hardware. For debugging at the field, this allows reprogramming the Mega163 without removing it from the helicopter or even removing the canopy. Mid-air reprogrammings are not recommended at this time.

What it won't do yet

It won't hover the helicopter yet, or even hold a heading. We're still working on properly feeding the inertial data into the Kalman filter, much less running the full GPS aided INS on the iPAQ yet. However, this hardware and the iPAQ have all the capabilities necessary to do the job. It is a "simple matter of programming" to get there from where we are now...

As a data collection platform, we've had very good success with it. We've seen the right things from all the sensors. You can review all of the sensor data in the imu-data CVS repository.

Now that we have had some safe flights with it, we should be able to start giving more control to the iPAQ and control board. We'll probably start with doing yaw control / heading-hold, then attitude hold and finally navigation. The collective is likely to be manually controlled for quite a while, although we should have support for sonar range finders soon.

I'm anxious to see how the boards work with everyone's projects. Please feel free to send me any reports/photos/movies or whatever you produce, and I'll post them on the site. Send mail to the development mailing list to let everyone know how things work for you.

Autopilot Logo SourceForge HTML 4.0!
$Id: rev2.2.html,v 1.32 2002/10/20 16:24:37 tramm Exp $