Entry #1: An idea, and where it's taken me.

By: emckee

2011-04-02 19:16:54

So I'm trying to build an accelerometer to launch in a rocket, but this world (embedded electronics/physical computing) is completely new to me. I've been to a few DorkbotPDX meetings with a friend and have met a lot of interesting people and seen nifty ideas, but I'm still just about as close to a newbie as one can be when it comes right down to it.

So the general idea: Put an accelerometer and data logger into a rocket, launch them, then recover and analyze data. Why? you may ask? Ummm, no idea. Because it's possible? Because I don't know how to do it? Because I want to have something to show each time I spend $2-4 for a rocket engine (talk about watching your money go up in a puff of smoke!). Yeah, basically there's no good reason, except for my own edification and desire to learn something new.

I picked up an ADXL345 breakout board and an OpenLog logger from Sparkfun. The Openlog device is powered by an ATMEGA328, so I had been hoping that this could be programmed to directly interface with the accel board. Of course, that's several steps beyond my current knowledge, so I'm sticking with a dorkboard to interface the two.

But then there's the small issue of powering everything. The accel will take up to 3.6V (3.7V?), and the logger requires at least 3.3V. So there's a small window of acceptable voltages between 3.3 - 3.6V. The Dorkboard covers the entire range, but with speed limitations (i.e. if you're at 3.3V, you can't operate at 16 MHz).

As such, task #1 became coming up with an acceptable power supply that would power everything. There were three ideas: 1) Use a 3.3V Zener diode to drop an overvoltage to 3.3V. Works fine, but this means I need more than 3.3V to start with. OK, but since this is going up in a rocket, we need to minimize weight. As I learned later, AAA batteries are ~11g each. AA's, double that. This makes the idea unusable. 2) Order a step-up board from Sparkfun. Sure, I could do that, but where's the fun? Also, piecemeal orders will kill you on shipping. 3) Build my own step-up board. I found the BBBoost PTH Breadboard Power Supply, based on LadyAda's MintyBoost under the "Circuit Boards" and ran with it. There's a secondary option to make use of ON Semi's NCP1400A chip (as per the Sparkfun device), but this is an SMT part, so I haven't tackled it yet. The schematic is considerably smaller (fewer parts), so I'm guessing it'll weigh substantially less.

Since that decision, I've learned a fair amount about Eagle design software, ordering sample parts from willing vendors, and making PCB's (cool!).

Revision one of the power supply made use of a CR2032 battery and measured 1" x 2". I'm sure that others could improve on the design (since I have minimal idea what I'm doing), but I was pretty pleased with myself. Unfortunately, as another friend later informed me, the button cell batteries have a high internal resistance, and while OK for supplying one or two mA, don't work too well when you try to pull 20-40. I think it lasted ~20s when I hooked it up to the dorkboard and logger.

Revision two makes use of the same general design, but with a AAA battery. Dimensions are ~1.25" x 2", and it weighs in at 24g. Not ideal, but launchable. I haven't tested it yet, but here's hoping that it'll last long enough for a rocket flight.  :) If anyone has ideas on how to improve this (mass, dimensions, power capacity, etc), by all means, let me know! Eagle Schematic and Board files attached, below.

Next issue that I'm trying to come to grips with is the Dorkboard: As mentioned earlier, 3.3V is insufficient to drive the ATMEGA328 at 16MHz, so I would like to run it at 8MHz, on the internal oscillator. I can even find the section of the datasheet (yes, I've started reading these) that tells you (basically) which bits/fuses to set in order to use the internal osc. However, figuring out exactly how to do that is something I, well... haven't figured out yet.

I normally interface/upload sketches onto the dorkboard using a Duce/Benito, courtesy of the Arduino cult induction workshop. If I understand correctly, this won't allow you to flash the bootloader, which is where I believe these "fuses" for the clock selection are. I've poked around and found AVR ISP from ATMEL (which requires a parallel port), and others which need serial/parallel ports. LadyAda's USBTiny ISP appears to have the capability to flash/write the bootloader area, but I'm hoping someone out there can confirm this... Any takers?

Once I can pull the dorkboard down to 8MHz, I think I've got the programs to put the whole thing together. And of course, I'll post my data here once I get some :)

-e

Back to archive index