Saturday, May 26, 2012

AirFish

A fish-shaped airship!
It's an Air Swimmers shark to which I've added a microcontroller, radio, and inertial sensors.

The airship turned out to have a much higher payload capacity than I expected. Out of the box, I was adding 29 grams of ballast to get it neutrally buoyant. Here's my electronics, including the 9 gram LiPo battery (which replaces the original AAA).
So we're in pretty good shape payload-wise.

Here's an annotated diagram of the electronics:
I should note that this was done for a course in system identification, so the primary goal of these modifications is to get flight data.

The inertial sensors (3-axis accelerometer + 3-axis gyro) are used by the Arduino to run a quaternion-based attitude estimator. We get good rotation rate measurements, great estimates of pitch and roll, and noisy estimates of acceleration (the hard part is removing the gravity vector). This telemetry data is then transmitted over the XBee radio to a computer running a serial terminal.

The Arduino also accepts input over this communication channel and can control two servos. This requires some additional circuitry to deal with the voltage mismatch (5V for servos, 3.3V for everything else). I also use the 5V to power a couple IR LEDs used by a ground-based position tracking system.

The servo setup is inspired by this guy's Air Swimmers mod. This servo replaces the original tail motor and actually drops in quite nicely:

The other servo rotates a rod with a weight at the end (rather than the original rack-and-pinion setup translating a gondola along a track). My original plan was to use some IR reflectance sensors to setup a linear encoder along the rack, but this was just so much simpler that I had to do it this way.
Here is the shark plugged in for charging. I guess I've gotten used to it by now, but everybody else always seems a little surprised to see a shark in the lab...

Anyways, I wish I could say it was a smashing success, but it turns out running both servos on this voltage converter (a LiPower board from SparkFun) is too much. Even with one servo, it can droop down to 4.6V, and with two it's sufficient to disrupt the PWM servo commands. I guess next time I'll be speccing out my own parts to build a boost converter; this was pretty stupid.

So in the video at the top of the page, I'm only running the tail servo. In order to control altitude, I've made the fish slightly heavier than air and biased it to positive pitch. So when it swims, it goes up, and if it stops swimming, it sinks.

The wiring used to connect everything together (not included in that 21 gram measurement) also turned out to be heavier than I anticipated. It was just barely buoyant (though the slow-but-steady deflation of the shark is also likely to be a contributing factor). Most of the wire here is 26 AWG, I'll have to try something thinner next time.

No comments:

Post a Comment