Rev 2.2 construction details
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
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
Joe Easly made movies of it hovering under software control.
Included in the package are the components shown here on the right.
- one 16x2 LCD
- one DIP-40 socket
- one Mega163
- two 4017 decade counters
- one MAX231 line transceiver
- two OPA4342 opamps
- two DIP-14 sockets
- one LM7805 voltage regulator
- one 8.000 MHz crystal
- four 1.0 uF caps
- two 22 pF caps
- five 0.1 uF caps
- one 10 pin header cable
- one DB9 feamel
- two buttons
- twenty 5 pin headers
- one circuit board
- a bunch of resistors
- three Tokin CG-16D gyros (not shown)
You'll need to supply the following parts:
- ADXL202-E or ADXL202-EB from Analog
- Three 3mm LEDs. One red, one yellow, one green.
- One NPN transistor (2N2222, 2N5808 or equivilant)
- One small perfboard for yaw gyro
- One 10k potentiometer for LCD contrast
- One 1.2 M Ohm resistor for Rset on ADXL202
- Two 0.1 uF caps for X/Y Filt on ADXL202
- One 0.1 uF cap for AVcc noise filter
- Jumper wires
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.
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:
- DIP-40 socket and ATMega163
- 8.000 Mhz crystal and two 22 pF capacitors
- The three 1.0 uF capacitors (charge pump, filtering bypass)
- DB9 serial port or 3 pin TTY header
- MAX231 line driver
- Two 5 pin headers for the ISP
- 1 * 1.0 k Ohm
- 1 * red LED (not supplied)
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
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.
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.
The gyro filters consists of:
- 14 DIP socket and OPA432 op amp
- 2 * 0.1 uF capacitor
- 2 * 1.0 k Ohm
- 2 * 4.7 k Ohm
- 2 * Tokin CG-16D
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.
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.
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:
- 2 * 33 k Ohm (feedback stage 1)
- 2 * 22 k Ohm (feedback stage 2)
- 2 * 6.8 k Ohm
- 2 * 1.0 k Ohm (voltage divider)
- 2 * 0.1 uF
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.