Contents

  1. Barometric pressure sensor
  2. High-G Accelerometer
  3. EEPROM for data storage
  4. Separate power inputs for the microcontroller/sensors and output channels
  5. Two high-current output channels (9A)
  6. Serial data input/output

Microcontroller

Every CPU and Microcontroller has their own followers, and their detractors. In some ways, they are a lot like religions. I chose the Atmel AVR microcontrollers largely because of the availability of devices (easily ordered from Digi-Key) and of tools: specificly, support by the GNU C compiler. In fact, on my FreeBSD system the tools are easily installed using the "ports" software collection, and on my Fedora 9 system they're installed with Yum. No thinking required!

From the AVR family, I chose the ATmega168 microcontroller because it has a good collection of peripherals and a relatively large memory. Memory is cheap, and I see no reason to spend a lot of my free time packing assembly code into the minimum space just to use a chip that costs a dollar or five less. I'm making a few of these, not millions. Someone else can spend their time optimizing for space.

Pressure Sensor

The pressure sensor allows the microcontroller to calculate altitude. The Freescale (formerly Motorola) MPX-4xxx and MPXA-6xxx series of pressure sensors are readily available at a reasonable price. They have an internal op-amp that amplifies the signal giving an output of near 5v at sea level down to a fraction of a volt at 2psi, which based on the altitude equation I'm using is about 50,000'. Other sensors in this family have no internal op-amp and are apparently good down to a vacuum! The parrot altimeter uses one of these (I believe it's a Motorola MPXM2202), so if you need to fly to over 50,000' you will need to switch to that part (or buy a parrot).

An interesting option would be to invert the signal using an op-amp. With a sensor range of 0v-5v, I could set the A/D converter's reference to lower voltages (the ATmega168 has internal voltage references), increasing the precision.

Accelerometer

Why an accelerometer on an altimeter? Well, it's really not just an altimeter, it can also be a timer triggered by the accelerometer detecting launch. And accelerometers can be used to calculate altitude, also.

By intergrating the accelerometer during ascent, apogee can be found. The integration is nothing more than the summing of the accelerometer's values at some rate. While the motor is burning, the accelerometer is reading positive Gs, and when it's decelerating they're negative. When the sum hits zero, that's apogee. However, that only works correctly IF the rocket goes straight up. If the rocket has an angled trajectory, apogee detection will occur after the actual apogee.

Accelerometers are also great for analizing flight events after the fact. They can show an early or late ejection, for example.

Storage

I've been using serial (i2c) EEPROMs to store data since the first altimeter I built. This data has proven invaluable in tracking down software problems, analyzing what happened during strange flights, and making neat looking graphs! I started using the Microchip EEPROMs and I've stayed with them due to familiarity, having software to read and write them, and having a few of them in my parts drawer.

Today a better choice might be an SD or MicroSD card, but those require more space, and a LOT more software since they have an MS-DOS filesystem on them.

Power

The board has separate power connectors for the electronics and ejection charges.

Finding a good switch to use for the high-current ejection power has always been a problem for me. I'm currently using Honeywell Microswitch switches, which are large and inconvenient to mount. On this project, I decided to try using a mosfet for switching the high current, allowing me to use a smaller lower current switch. The mosfet's Gate input is connected to a .1" header, which should be grounded (by shorting the header pins) to turn the device on. This header can be wired to an off-board switch.

I don't know if this will satisfy the NAR L3 ejection disconnect requirement.

For the electronics, a diode is used for reverse polarity protection, and a small mosfet transistor is used to turn power on and off. Like the ejection power, the mosfet's Gate input is connected to a .1" header.

A 1,000uF capacitor will provide some capability for the electronics to ride through a momentary power glitch (possibly up to a second or so) due to battery or switch contacts opening momentarily under thrust.

If you want to use a single power source, you can solder a wire between the contacts on the bottom of the board. With a single power source, the capacitor will provide some ride-through capability in the event that the ejection charge causes the voltage to drop below the voltage regulator threshold (5.?v), and the diode will prevent the ejection charge from draining the capacitor. In this configuration, it may be prudent to reduce the frequency at which the micropcontroller wakes up and samples the pressure sensor. This will keep the CPU in it's low-power sleep mode as much as possible. Additionaly, a transistor could be put on the pressure sensor's power so that it can be turned off.

Alternatively, shorting J2 will bypass the diode and regulator, permitting the device to be powered from an external 5v source (such as a 5v boosted power source).

Outputs

The board has two hig-current output transistors (MOSFETs). The parts I selected is the FDS4435 and is rated at 9 amps. I expect the part's use to be heat-limited.

These mosfets are P-Channel mosfets, which means they're used for turning the voltage on and off, and are typicly used on the + side of a device, not on the ground side. That is, they source current, not sink current.

This is different than all of the altimeters I've encountered, but I have a reason for doing it: a lesson NASA learned on Gemini VIII. Gemini VII's mission was cut short when the spacecraft experienced an unexpected roll. In Chris Kraft's book "FLIGHT", he wrote about the capsule:

Engineers tore into the OAMS (Orbital Attitude and Maneuvering System) and fond a short circuit that made one thruster fire continuously. We learned an important lesson -- never put electrical power to any system unless it's supposed to be on. The OAMS was rewired so that a short circuit would always give us a dead thruster, not one that kept firing until a circuit breaker was opened by an astronaut.

P-Channel mosfets on battery + voltage leaves the igniter powered down.

This power configuration complicates continuity checking. When using an N-Channel mosfet, the ejection charge has power on it all of the time, and continuity can be measured using a low-current "tap" on the ground side (with the mosfet). Even better, a voltage divider to an analog input will permit measuring the actual resistance so a good connection can be differentiated from from a poor connection. I did some experimenting and came up with a simple power divider with a diode to ground.

The diode protects the power divider and CPU from the ejection voltage, whatever it happens to be. The power divider is two resistors, one to +5v, the other to ground through a diode. When there is good continuity, the voltage is below the AVR's threshold to read "0", and with no ground it will read "1". These lines are connected to ports that can also be read using the A/D converter. This permits measuring the actual resistance.

If you don't like some of these options, there are places to put jumpers to change them.

  1. Solder wires across the power control mosfet to remove it (I suggest using 20 guage or larger wire).
  2. Solder a wire across the power inputs to have a common power input
  3. The P-Channel mosfets can be replaced with N-Channel mosfets with some rewiring of the board, and changes to the software (the N channel mosfets turn 'on' with + voltage on their gate).

An interesting ejection charge igniter alternative (to e-matches) is RC Airplane glow plugs. There are two products on the market that use these: the NoMatch altimeter add-on, and the Aerotech Electronic Forward Closure (EFC). Glow plugs are about $7 for the low-end ones and are rated for 1.5v. I've found that they glow red hot when using a pair of 1.5v NiCD batteries. The FDS4435 should supply adequate current at 3v to use these.

Serial Data

There is a connector (with power) for connecting the Mega168's TxD and RxD to an RS232 level shifter.


DIY Altimeter Home

Glen Overby
Last updated: $Id: hwdescription.html,v 1.3 2009/02/15 18:47:01 glen Exp glen $