Anda di halaman 1dari 91

The Airman Trout

MAE 311 Final Project

Authors: Taylor Gilbert


Shaun Greising
Davis Hunter
Kaitlin Russell
Ashley Scharfenberg
Group Number: 12
Due Date: April 25, 2017
Table of Contents
1. Abstract ............................................................................................................... 3
2. Device Production ................................................................................................ 3
2.1. Electronics .................................................................................................... 3
2.2. Mechanical .................................................................................................... 8
a. Acrylic Tube.................................................................................................. 8
b. Foam Payload Box ....................................................................................... 13
c. Payload Clamp............................................................................................. 14
2.3. Arduino Code .............................................................................................. 16
2.4. MATLAB Code ........................................................................................... 22
3. Operations Manual.............................................................................................. 24
3.1. Arming the Device ....................................................................................... 24
3.2. Attaching the Balloon ................................................................................... 25
3.3. Post-Flight Data Processing........................................................................... 26
3.4. Trouble Shooting Code ................................................................................. 26
4. Theory of Operation ............................................................................................ 27
4.1. Sensor ......................................................................................................... 27
4.2. Arduino Interface ......................................................................................... 29
4.3. MATLAB Interface ...................................................................................... 30
5. Tasks and Costs .................................................................................................. 31
5.1. Group Member Tasks ................................................................................... 31
a. All Members ............................................................................................... 31
b. Taylor Gilbert .............................................................................................. 31
c. Shaun Greising ............................................................................................ 32
d. Davis Hunter ............................................................................................... 32
e. Kaitlin Russell ............................................................................................. 32
f. Ashley Scharfenberg .................................................................................... 32
5.2. Project Costs ............................................................................................... 32
5.3. Project Schedule .......................................................................................... 34
6. Calibration and Uncertainty ................................................................................. 36
6.1. Calibration .................................................................................................. 36
a. Pressure Calibration ..................................................................................... 36
b. Temperature Calibration ............................................................................... 41

Airman Trout | Group 12 Page 1 of 90


6.2. Uncertainty.................................................................................................. 43
a. Sensor Uncertainty ....................................................................................... 43
b. Variability of Measurement ........................................................................... 43
c. Arduino Uncertainty ..................................................................................... 44
d. Data Processing Uncertainty.......................................................................... 44
e. Total Uncertainty ......................................................................................... 45
7. Lessons Learned ................................................................................................. 45
7.1. General ....................................................................................................... 45
7.2. Preliminary Design ....................................................................................... 46
7.3. Possible Improvements ................................................................................. 48
7.4. Failure to Fly ............................................................................................... 49
8. Acknowledgements ............................................................................................. 49
9. References ......................................................................................................... 50
10. Appendix ........................................................................................................ 51

Airman Trout | Group 12 Page 2 of 90


1. Abstract
The goal of this project is to create a device that measures and records two pressure
values. One reading will be taken within a high-altitude balloon to record the internal
pressure the other reading will record the external pressure outside of the balloon. This
project seeks to evaluate the relationship between the internal pressure of a high-altitude
balloon to the external air pressure around that balloon in order to determine at what
altitude and pressure the balloon will burst. The goal of the project was met as the Airman
Trout was successfully created. This device records the two pressure values desired
within calibrated uncertainty limits. The device has an accuracy of +/- 350 Pa for pressure
and +/- 4.0 C for temperature. It operates by using an Arduino Due board and two
MS5607 sensors within a machined casing that is equipped to attach to a high-altitude
balloon and to connect to a payload line with parachute. While this project was unable to
fly on an actual balloon launch, the device was calibrated and tested within a vacuum
chamber that simulated a 30,480 m high-altitude balloon flight. The Airman Trout is
considered a successful project that may be used to obtain accurate readings within its
uncertainty.

2. Device Production
2.1. Electronics
The electronics package design was primarily driven by desire to use a digital
pressure sensor, particularly the MS5607-02BA03 Barometric Pressure Sensor, shown
in Figure 1.

Figure 1: MS5607-02BA03 Barometric Pressure Sensor [1]

This sensor is a surface mount and therefore requires either a commercial breakout
board or custom printed circuit board. The sensor supports both SPI and I2C
communication protocols and has the resolution and range necessary to make the
measurement. The MS5607 is produced by MEAS Switzerland. Data output by this
sensor is discussed in Section 2.3 and the connection of this sensor to the circuit board
is discussed later within this section.

Airman Trout | Group 12 Page 3 of 90


In order to store the sensor output data on an easily accessible and usable device, a
microSD card and reader are used. Specifically, the Sparkfun microSD breakout, shown
in Figure 2, is used to write the data.

Figure 2: Sparkfun MicroSD Breakout [2]

This breakout only uses the SPI protocol. For this reason, SPI protocol is used for
electronic wiring and programming. More details on SPI can be found in Section 4.
For this project, an Arduino Due was chosen as the programming board. This was
chosen because the pressure sensors operate at 3V which is the output voltage of the
Due. A picture of the board used is shown in Figure 3.

Figure 3: Arduino Due

Airman Trout | Group 12 Page 4 of 90


The Arduino Dues Pin assignments are shown in Figure 4 below.

Figure 4: Arduino Due Pins [3]

Pin assignments for wiring the pressure sensor are shown in Table 1 and Figure 5. In
order to use the SPI protocol, pin 2 must be connected to GND, all other pins are
connected to the Arduino Due as labeled in Table 1. The location of each pin is shown in
Figure 5.

Airman Trout | Group 12 Page 5 of 90


Table 1: MS5607 Pin Configuration [1]

Figure 5: MS5607 Pin Configuration [1]

The team elected to manufacture the entire electronic subsystem so a custom printed
circuit board (PCB) was chosen over a commercially available sensor breakout board.
DesignSpark was used to design the printed circuit board shown in Figure 6, because it
is free and easy to use. In addition to the pads for the MS5607, accommodations were
made for an LED, Thermistor (Thrm), the microSD breakout, and necessary resistor
(RES) and capacitor (100). In order to fit within the neck of the balloon, the board was
made to be round, with a 1 inch diameter.

Airman Trout | Group 12 Page 6 of 90


Figure 6: Custom PCB Design

Internal wiring design of the custom PCB is shown below in Figure 7.

Figure 7: Custom PCB Wiring design

In the payload, there are two boards; one measures the internal pressure of the
balloon, and the other measures the atmospheric conditions for altitude determination
and stores data from both boards to the microSD card. To avoid crowding the data storage
board and risk accidentally shorting the circuit, the nodes connecting all 3 sets of SPI pins,
MISO, MOSI, voltage input (VCC), and ground, are formed by clusters of soldered wires
which can be easily disconnected for troubleshooting. Chip select pins for both pressure
sensors and the SD reader are each individually wired to the Arduino board. Additionally,
the LED mounted to the board was only used during testing; in order to make the LED
visible outside the payload, it was wired directly to the Arduino Due. The layout of the
entire circuit is shown in Figure 8.

Airman Trout | Group 12 Page 7 of 90


Figure 8: Large wiring diagram including PCBs

In addition to the wiring of the PCBs and LED, three Surefire 123A batteries within
battery casings are wired in series to a switch. The mechanical switch is then wired to the
power plug for the Arduino Due. When the switch is closed, the wiring is connected and
the board receives 3V of power.

2.2. Mechanical
a. Acrylic Tube
In order to house the batteries and internal pressure sensor, an acrylic tube is used.
First, the capsule is made. The final capsule tube is shown in Figure 9. Where a long side
is bored out to house the batteries, and a shallow side is bored out to house the internal
sensor board. These two sections of the tube are separated by un-bored acrylic.

Airman Trout | Group 12 Page 8 of 90


Figure 9: Acrylic Tube Casing

Beginning with at least 12 inches of solid 2 inch diameter acrylic rod, a portion is cut
to 7 and 7/8 of an inch in length using a band saw. Then, approximately 1/16 inch is
removed from both sides in order to remove the teeth marks left by the band saw, thus
leaving a 7 3/4 long workpiece. Next, one end is bored 7/8 inch deep using a 1 1/2 inch
diameter forstner bit as shown in Figure 10.

Figure 10: Boring with 1 1/2 inch Forstner Bit

The shallow end must be bored first to prevent clamping the hollowed out long side of
the tube and potentially causing damage to the casing. The solid long end is then clamped
into the lathe.

Airman Trout | Group 12 Page 9 of 90


Next, approximately 1 inch in on a new piece of acrylic, a portion is turned down evenly
by an 1/8 inch in order to make it fit snugly in the end of the first piece that was bored out.
This is shown in Figure 11.

Figure 11: End Plug

An 1/8 inch hole is then bored in the center of the turned down portion. Then, 1/2 inch
of the turned down portion is cut off with the band saw. Any tooth marks are removed with
a belt sander working up to 800 grit paper and are finished off with clean, denim shop
rags for a clear finish. The 1/2 inch plug is then placed into the short bored out portion of
the capsule where it fits snugly.
With the end plug placed inside, the bored end is clamped into the chuck. A 1 1/2 inch
forstner bit and a 5 inch extension are used to keep the chuck from hitting the part. The
solid end is then bored 6 inches deep, leaving slightly less than 1/8 inch of solid acrylic.
This is shown in Figure 12.

Figure 12: 1 Forstner Bit with Extension

Next, a wooden dowel and 80 grit stepping up to 800 grit sandpaper are used to
remove the roughness inside the bored portions and ends. The tube is finished off with
clean denim shop rags. Xylene and acetone are also used in order to speed up the
polishing process.
A notch approximately 1/16 inch wide by 1/16 inch deep is cut 3/4 of an inch up the
long hollowed out end of the tube. The edges are smoothed with 400 grit sandpaper so
that an O-ring can fit snugly half way down in this notch.

Airman Trout | Group 12 Page 10 of 90


The capsule is then flipped over and clamped it in the chuck. Then 1/16 inch by 1/16
inch notch is cut over the remaining solid portion. The edges are again smoothed with
400 grit sandpaper. This serves as the indent for the second O-ring.
A 1/4 inch hole is then bored in the center of the remaining solid portion, this is the
hole that the wires will pass through for the sensor inside the balloon. The capsule is now
complete exempting the screw holes.
The remaining solid acrylic piece is then placed into the lathe and the cut end used to
make the plug for the short side is faced and polished. A squared facing bit is used on
the side to turn it down 1/8 inch, 5/8 of an inch from the end so that it will fit the long-bored
side of the capsule. This side must be long enough for a screw to hold the base onto the
capsule but still have enough room for the battery pack to fit with the plug in the end.
From the turned down end, 1 1/4 inch is cutoff of the workpiece with the band saw. The
plug is clamped in a little metal lathe and 1/8 inch is faced off of the end to remove the
band saw tooth marks. This dimension is not critical because this end will be used to
attach the capsule to the foam box containing the Arduino.
The capsule is clamped in the drill press using rubber clamps, favoring the solid
portion in order to avoid crushing it. Both sides of the capsule wall are drilled using a
number 33 drill bit 1/4 inch in from the edge. Next the capsule is drilled 3/4 of the way
through the wall with an 1/8 inch bit. This process is then repeated for the opposite side.
The small plug is clamped in the drill press and approximately 1/2 inch is drilled into
one side using a number 36 drill bit. A 6-32 tap is then used to thread the hole in the plug.
The plug is placed into the end of the capsule and a 6-32 bolt is placed into the threaded
side to hold it in place. Then, the opposite side of the plug is drilled through the pre- drilled
hole with a number 36 drill bit to ensure the holes line up. Using a 6-32 tap, the new hole
in the plug is threaded. Using calipers, a circle is scribed on one side of the plug 1/4 inch
in from the outside edge. Then, an x is scribed evenly across the top of the plug being
sure to avoid the bolt holes. Next, a 3/16 inch bit is used to drill 4 holes where the scribe
lines cross the circle. When completed, the 1 1/2 plug will look like Figure 13 below.

Airman Trout | Group 12 Page 11 of 90


Figure 13: 1 1/2 inch Plug

On the plug with the 2 inch diameter bottom section, a line is marked straight across
the center of the 1 1/2 inch part. A straight line across the base of the 6 inch long bored
out section of the capsule is also marked. Measuring 1/4 inch in from the edge of the
capsule and 1/4 inch in from the small part of the plug, both sides of the capsule wall are
drilled through using a number 33 drill bit. Its drilled 3/4 of the way through the wall with
an 1/8 inch bit. This process is then repeated for the opposite side. The plug is then
clamped into the drill press and approximately 1/2 inch into one side is drilled using a
number 36 drill bit. A 6-32 tap is then used to thread the hole in the plug. The plug is
placed into the end of the capsule and a 6-32 bolt is placed into the threaded side to hold
it in place. The opposite side of the plug is drilled through the pre-drilled hole with a
number 36 drill bit in order to ensure it will line up. A 6-32 tap is again used to thread the
new hole in the plug. Next, the switch profile is traced onto the small side of the plug, with
the lever side oriented where one of the bolts will be able to compress the switch when
inserted into the hole. The traced figure is milled out with a 1/4nch mill so that the switch
is centered in height with the bolt hole. Then 3 separate 1/4 inch holes are drilled in the
solid portion next to the milled out switch hole, avoiding the bolts and milled hole. Finally,
the section between two of the holes is milled to allow for wires to be passed through to
the Arduino. The completed step plug is shown in Figure 14 below.

Airman Trout | Group 12 Page 12 of 90


Figure 14: Step Plug

b. Foam Payload Box


To make the foam capsule, a 2 inch thick block of Foamular 150 insulation foam is cut
into 3 rectangles 4 inch wide by 5 1/2 inch long, any saw may be used to cut the foam.
Gorilla glue is then used to stick 2 of the blocks together making a 4 inch thick block. The
single 2 inch thick piece is then clamped in the drill press and the center is marked. One
must be sure to clean any oil or other substances from the clamp and bits before use on
the foam block. Using a 1 7/8 forstner bit, a 1/2 inch deep hole is cut into the foam at the
center of the block, as shown in Figure 15.

Airman Trout | Group 12 Page 13 of 90


Figure 15: 1 7/8 inch Forstner Hole

Gorilla glue and water are then used to glue the step plug with the 2 inch diameter
side pressed snugly into the 1 7/8 hole in the foam. The plug will be snug and resist pulling
out of the hole. Testing the fit of the 2 inch rod is shown in Figure 16 below.

Figure 16: Press in Fitting

After the glue has dried, any excess glue is cleaned out by drilling through the wire
holes in the plug and all the way through the foam block. Next, the 2 inch thick foam block
is flipped over and a mark is made 1/2 inch in from all the sides of the block. The inside
of this marking is then milled out to 1 inch deep. The 4 inch thick block is then clamped in
the mill and 1/2 inch in from the sides is marked. 2 passes are used to mill the foam out
3 inches deep while staying inside the marked lines. A chisel is used to clean out any
leftover burrs inside the foam box. Finally, a file grater is used to round the edges and
corners of the foam box.

c. Payload Clamp
To make the secondary payload clamp, a 6 inch by 7 inch rectangle of 1/16 inch thick
tread plate aluminum is used. A section 3 inch wide by 7 inch long is marked and sheared.

Airman Trout | Group 12 Page 14 of 90


The edges and corners are rounded on a table sander. Then, 2 inches in from both sides,
leaving 3 inches in the middle, is marked. With the tread facing up, both sides are bent
up to 80 degrees then the 3 inch section in the middle is bent around a 2 inch diameter
tube. The 2 inch tabs will then sit flat when placed on a flat surface. Next, 1 1/2 inch in
from all sides is scribed and 1/2 inch in from all sides is also scribed. This will result in 3
crosses on each side of the clamp. Each of these crosses is then drilled out with a number
5 drill bit and deburred with a 3/8 inch bit. This process is repeated to make the opposite
side of the clamp. A 10-24 bolt is placed through each hole and a nut is placed on the
back of each bolt. The finished clamp is shown in Figure 17.

Figure 17 Secondary Payload Clamp

The fully assembled mechanical casing is shown below in Figure 18.

Figure 18: Completed Mechanical System

Airman Trout | Group 12 Page 15 of 90


The batteries are housed in the acrylic tube, the internal pressure sensor is placed in
the top of the tube under the 1 1/2 plug, the switch is housed within the step plug, and all
other electrical systems are kept within the foam blocks.

2.3. Arduino Code


The two MS5607 pressure sensors and the SD card writer are coded and wired to the
Arduino Due using the SPI interface. In using Arduino to code the three SPI devices, two
libraries are used. The SPI library allows for the code to read the SPI interface on the two
sensors while the SD library allows for the results received by the devices to be written
on a micro SD card. In Figure 19 below, the code begins with including the two libraries
and defining the global variables to be used in the program.

Figure 19: Libraries and Global Variables

The constant integers represent the specific pin numbers each individual device is
connected to while the 16 bit integers are the factory calibrated 16 bit PROM coefficients
included in the memory of the MS5607 digital pressure sensors. First, the PROM
coefficients need to be read in order for the code to read the pressure and temperature
values given by the sensors. Also, a file is defined in order to print to the SD card.
Following the Arduino format, the next section of the code is included in the setup
function. This is a void function that only runs once and therefore includes the parts of the

Airman Trout | Group 12 Page 16 of 90


program that need to be run only once. Figure 20 below outlines the beginning of the
function where the SD and SPI libraries are set to begin and each devices corresponding
pin number is set to output. Also included in this section, is the initialization of the SD card
so that if the card is not detected the sketch outputs an error. The SPI begin transaction
tells the devices to use the SPI settings and that a transaction is about to occur between
the master and slave pins.

Figure 20: Begin Setup

The rest of the code included in the setup function is based on what is outlined in the
datasheet for an MS5607 sensor [1]. First the two sensors need to transfer the 16 reset
bits followed by the 6 PROM factory coefficients needed to correct the raw temperature
and pressure found by the sensor later on in the code. Figure 21 below shows the section
of code written to reset the external pressure sensor before reading the 6 coefficients.

Figure 21: External Pressure Reset

Setting the external pressure pin to LOW selects the pin, then a transfer of reset bytes
occurs, and finally, the outside pressure pin is deselected by setting the pin to HIGH. A
delay of 500 milliseconds is set before the program could move on to allow the sensor to
process the commands.
Next, the 6 factory calibrated PROM coefficients are read in order to correct the raw
external pressure and temperature found later on. Just like with the reset, the outside
pressure slave pin needs to be set to LOW in order to select it. Then a transfer of the
PROM coefficient byte as indicated by three bits located in the command byte. Where
0b10100010 is C1 and 0b10101100 is C6. The purpose of this code is to transfer the

Airman Trout | Group 12 Page 17 of 90


command byte from the master to the slave pin 8 bits at a time. First, the byte command
is transferred to the slave and then 8 bits of filler code are transferred so that there are
16 total bits. The filler code then shifts over 8 bits and is compared to the new incoming
filler 8 bits so that C1 is equal to the command byte. Finally, the pin is deselected with
HIGH. This process is then repeated for the next five coefficients. An example of this
section of code is represented in Figure 22 and 23 below.

Figure 22: Outside Coefficients C1-C4

Airman Trout | Group 12 Page 18 of 90


Figure 23: Outside Coefficients C5 and C6

This same code is repeated the for the inside pressure sensor. The setup function is
then closed after the last coefficient.
Next in the Arduino format is the loop function, which will loop continuously until the
circuit has been disconnected or a break appears to end it. In this code, the loop function
will continuously loop until an outside switch disconnects from the circuit from voltage
input by the batteries. As seen in Figure 24 below, the loop function begins by setting the
LED pin to HIGH in order to turn it on. This allows the team to physically see whether the
program is running or not. Next, a counter is set up in order to keep track of time. The
program has been coded to run every second.

Figure 24: LED and Counter

Next, the code asks for the outside raw pressure and then reads its value. As seen in
Figure 25 below, first the raw temperature and pressure are defined as a 32-bit variable
since the datasheet calls for the variables to be 24 bits [1]. Then the outside pressure pin
is selected and the command byte of the OSR 4096 D1 variable, which is the pressure,
and the OSR 4096 D2, which is the temperature variable, are transferred. The pin is
deselected and there is a delay of certain time given in the datasheet [1]. The variable is
then read by selecting the pin, transferring some filler bytes, shifting over some bytes,
and finally comparing them until raw pressure is equal to the digital number given off by
the sensor. At the end, the pin is deselected.

Airman Trout | Group 12 Page 19 of 90


Figure 25: Outside Raw Pressure

Next, raw temperature is found, by the same process used for finding the raw pressure.
The temperature is asked for and then read.
To finish the code for the outside MS5607 sensor, the code uses a series of equations
given in the datasheet as shown in Table 2 and 3 below [1]. These equations use the
factory calibrated PROM coefficients found in the setup function in order to correct the
values found by the sensor so that the pressure is received in Pascals and the
temperature is received in degrees Celsius times 100.

Table 2: Temperature Datasheet Equations [1]

Table 3: Pressure Datasheet Equations [1]

Airman Trout | Group 12 Page 20 of 90


The code for these equations using variables already defined in the program is shown
below in Figure 26.

Figure 26: Outside Pressure Equations

Since different sized variables are defined in the program, one must change the sizes
of the variables so that they are all the same size or the pressure value will be incorrect.
The values at the end will have pressure in Pascals and temperature in degrees Celsius.
The code for the external pressure sensor is then repeated for the internal pressure
sensor.
Finally, after finding the pressure and temperature readings using both MS5607
sensors, the results need to be printed on the micro SD card. The SD library is used and
the file name is defined. As seen in Figure 27 below, the file titled myFile is opened and
the settings are established to write to a text file entitled TEST. Then, the counter,
outside temperature and pressure, and then the inside temperature and pressure are
printed. The file is closed and there is a delay of 960 milliseconds so that each loop is
one second long. Finally, the loop function is ended.

Figure 27: Write to SD card

The Arduino sketch in its entirety is provided in the Appendix of this report.

Airman Trout | Group 12 Page 21 of 90


2.4. MATLAB Code
The data collected from the pressure sensors is recorded onto the micro SD card in
the form of a text file entitled TEST.txt. This file lists all the data in a singular column in
order of time, external temperature, external pressure, internal temperature, internal
pressure, and onto the next time recording as shown in Figure 28. Where time is given
is seconds, pressures are in pascals, and temperatures are in degrees Celsius.

Figure 28: Text File Output

This output file is analyzed using the MATLAB file MAE311.m. In order for the script
to run properly, TEST.txt and MAE311.m must be saved within the same folder.
The first step of code in the script extracts the data from the text file using MATLABs
csvread command. The extracted data is saved as matrix M with the total number of
rows equal to n. Integer n is found using MATLABs length command.
The data must then be separated into individual matrices containing each variables
data. This is done using a for loop as shown in Figure 29.

Figure 29: Separation of Variables

First, the desired variable is established as an empty matrix. Then, integer i is set to
an initial value of zero and integer s is set to an initial value of 1, this ensures that the first
recorded value is read from the top, or beginning, of the text file. The for loop is then

Airman Trout | Group 12 Page 22 of 90


established so that each desired variable data point is copied out of the text file and saved
in its own matrix. In Figure 29, the time matrix is created; this will be used as an example
of the variable extraction process. Since time is the first variable that occurs in the text
file, the for loop begins at i equal to one. Since there are five unique variables recorded
into the text file, i will increase by five each iteration so only time is extracted. During each
iteration of the loop, the value row s, column 1 of the time matrix will be set equal to row
i, column 1 of the output text file. Once this is done, s will increase by 1 so that the next
row of t will be filled during the next iteration of the loop. The loop continues to run until i
is equal to n minus four. When i is equal to this value the last value for time recorded in
the text file will be recorded as the last value in the t matrix. This for loop process can be
duplicated in order to find the external temperature (Te), external pressure(Pe), internal
temperature(Ti), and internal pressure (Pi) matrices. Time values are given in seconds,
temperature values are given in degrees Celsius, and pressure values are given in
pascals.
In order to find the altitude, external temperature must be converted from Celsius to
Kelvin. A kelvin conversion matrix, k, must be created. This is best done with another for
loop. Before the loop begins, integer r is set equal to the length of matrix Te, k is
established as an empty matrix, and i is reset to zero. The for loop runs from i equal to 1
through i equal to r with steps of 1. This ensures that the kelvin conversion matrix is the
same size as the external temperature matrix so that the two may be added together.
Each value within k is set equal to 273.15 within the for loop. The k matrix is then added
to the Te matrix and Tek, the external pressure in kelvin, matrix is output.
As discussed later in Section 6.1.a, the internal pressure reading must incorporate the
correction factor. This is done by creating a correction factor matrix, c. Using the same
for loop structure that was used to create the k matrix, the correction matrix is created the
same size, u, as the Pe matrix with every value equal to 5371. The c matrix is then
subtracted from the Pi matrix and the corrected values are saved into Pi.
Altitude is found using the Hypsometric Equation, Equation 1, which is input into
MATLAB. Where A is altitude in meters and P0 is the starting pressure in pascals. This
equation is taken from Reference 4: Ke!san Online Calculator.

1
0 5.257
= (( ) 1) (1)
0.0065

In this analysis, the starting pressure is equal to the first pressure reading recorded by
the external pressure. Due to this, Equation 1 outputs the change in altitude from the
location of the first reading that is taken by the device.
In order to better visualize the data, four plots and one table are created using the
MATLAB plot function and the MATLAB table function within the script. The plots are
internal and external pressure (Pa) versus altitude (m), internal and external pressure
(Pa) versus time (s), external temperature (C) versus time (s), and altitude (m) versus
time (s). The table displays altitude (m), internal pressure (Pa), and external pressure
(Pa).
The MATLAB script in its entirety is provided in the Appendix of this report.

Airman Trout | Group 12 Page 23 of 90


3. Operations Manual
3.1. Arming the Device
Make sure the device has charged batteries. To replace the batteries: unscrew both
bottom screws to detach the acrylic tube from the bottom piece, pull out the battery
casings, and replace all three batteries with new Surefire 123A batteries. The battery
location is shown in Figure 30.

Figure 30: Batteries

To access the Arduino board, remove one side strips of tape. Insert the micro SD card
into the reader as shown in Figure 31.

Figure 31: Micro SD Card Insertion

Airman Trout | Group 12 Page 24 of 90


To arm the device, screw in the pin screw on the tube. The screw is on the bottom of
the tube close to the box. This is one of the screws one must unscrew to remove the
acrylic tube and is circled in Figure 30 above. Once the screw is tight and the switch is
pressed in, the device will turn on. A green LED on the side of the box will light when the
device is armed. If the LED is dim, the switch is not fully pressed and the screw must be
tightened, the batteries are low on power, or the Arduino board or voltage wires have
become unplugged. Ensure all wires are plugged in to the proper pins and that the
Arduino Due is connected to the power supply. A correctly wired board is shown in Figure
32.

Figure 32: Arduino Due Wiring

If the LED is lit brightly, the device is on and currently taking readings.
3.2. Attaching the Balloon
In order to attach the balloon, slide the O-ring from the top of the tube down to the
bottom of the tube. Place the filled and clamped balloon neck over the tube. Slide the O-
ring back up to the top, over the balloon neck. Place the payload clamp around middle of
tube to clamp the balloon to the tube, and screw in clamp screws tightly. Place duct tape
around the balloon neck for extra security if necessary. A properly attached balloon is
shown in Figure 33.

Airman Trout | Group 12 Page 25 of 90


Figure 33: Attaching the Balloon

Payload lines may then be attached to the flanges of the payload clamp.

3.3. Post-Flight Data Processing


The first step is to recover the device and unscrew the switch screw back out to turn
it off. Remove one side strip of tape to access the Arduino, and remove the micro SD card
from the SD reader. Insert the micro SD card into a computer, then save the flight data
TEST.txt file from the micro SD card. Place the file into the same folder as the MATLAB
data reader script, MAE311.m. Open MATLAB and run the data reading script
MAE311.m by pressing the green run button at the top. This will output the data graphs
and tables. There is no need to edit the script.

3.4. Trouble Shooting Code


In case the code does not work, it may be necessary to re-upload the code. To do this,
plug the Arduino into a computer, open the Arduino coding software, and re-upload the
code. The code must be uploaded using the programming com port on the Arduino board
with the Arduino Due programming port selected in the sketch editor as shown in Figure
34.

Airman Trout | Group 12 Page 26 of 90


Figure 34: Arduino Due Programming Port

Once the proper board is selected, the program can be uploaded to the board by
clicking the right arrow in the top left corner of the screen.

4. Theory of Operation
4.1. Sensor
The sensor used in this project is the MS5607-02BA03, which is a digital pressure and
temperature sensor. The MS5607 uses a piezo-resistive sensor and an IC sensor
interface. A piezo-resistive sensor changes the electrical resistivity of one or more of its
components when strain is applied to the device. Voltage that is output by a piezo-
resistive sensor therefore changes based on changes in mechanical strain. This
mechanical strain is caused by a difference in the ambient pressure and the pressure of
air stored inside the sensor. The MS5607 operates by converting the analog voltage
output from the piezo-resistive sensor into two 24-bit digital values, one for temperature
and one for pressure, that are then processed by the Arduino Due. This sensor can use
both SPI and I2C interface but for the purposes of this project the SPI interface was used.
The SPI interface for the MS5607 uses command bytes for the separate steps that need
to be read in order to find the pressure and temperature. There are three sequences the
code must take the sensor through before using equations to find the final pressure and

Airman Trout | Group 12 Page 27 of 90


temperature. The first sequence is the reset sequence, which must be sent once when
the device is turned on in order to make sure the calibrated PROM is loaded on the
internal register. Right after the reset sequence is the PROM read sequence that consists
of six factory-calibrated coefficients that will also be sent through only once. The purpose
of these coefficients is to correct the pressure and temperature values given by the digital
sensor because these values are based on 24 bits that have a minimum value of 0 and a
maximum of 16777216. This allows the pressure and temperature to be equated to have
values in Pascal and degrees Celsius instead of just a value between 0 and 16777216.
Then after the PROM sequence is the conversion sequence, which uses a conversion
command to find the variables D1 and D2. D1 stands for the uncompensated pressure
and D2 represents the uncompensated temperature. This sequence is set up in two parts,
the code must first ask for the value and then it reads the value of either the pressure or
temperature. Table 4 below shows a table of the different command bytes needed to do
the three different sequences. [1]

Table 4: MS5607 Command Table [1]

In this table, the D1 and D2 variable of the type OSR=4096 as used in the actual
programming of the project. Also for the PROM command bytes, the three bits indicated
in the table change based on what number of coefficient was used. If it was coefficient 1
then the command byte is 0b10100010 and for coefficient 2 the command byte will be
0b10100100 and so on. [1]
The datasheet states that the sensor reads each coefficient with a bit size of 16 with
its minimum value to be 0 and its maximum value at 65535, as seen in Table 5 below.

Airman Trout | Group 12 Page 28 of 90


Table 5: Datasheet Calibration Variables [1]

Additionally, the datasheet states that the D1 and D2 variables are both at 24 bits with
the min value at 0 and the maximum value at 16777216, as seen in Table 6 below.

Table 6: D1 and D2 Variables [1]

More details on Arduino processing of sensor data can be found below and in Section
2.3 of this report. Further details on the sensor itself can be found in Reference 1:
MS5607-02BA03 Barometric Pressure Sensor, with stainless steel cap.

4.2. Arduino Interface


This project uses the SPI interface to communicate with the MS5607 sensor. The SPI
librarys settings consist of the maximum SPI speed of the device used, whether the data
is shifted in Most Significant Bit (MSB) or Least Significant Bit (LSB), and which SPI clock
mode is the sensor compatible with. For the MS5607, the SPI settings consist of the
maximum speed at 20 Hz, the data being shifted in MSB, and the sensor using either
mode 0 or 3 [1]. Also, in order to use Arduinos SPI library, the Master Out Slave In (MOSI),
the Master In Slave Out (MISO), the Serial Clock (SCK), and the Slave Select Pins (SS)
on the sensor had to be wired to specific Arduino Due board pins. As seen below in Table
7, MOSI had to be connected to ICSP 4, MISO had to be connected to ICSP 1, SCK had
to be connected to ICSP 3 and the SS had to be connected to either pins 4, 10, or 52. [3]

Airman Trout | Group 12 Page 29 of 90


Table 7: Arduino Due pins [3]

In order to code the SD card, the Arduino SD library was used. Physically, the library
uses the same pins as the SPI library and thus the two were set in parallel with each other.
For the code, the SD card library has an SD begin that writes to an 8.3 size named file.
Further details on Wiring and electrical set up can be found in Section 2.1 and 2.3.

4.3. MATLAB Interface


As detailed in Section 2.4, MATLAB is used to process the data output by the Arduino
Due onto the micro SD card. The output text file is converted to matrices containing the
recorded values for each variable: time, external temperature, external pressure, internal
temperature, and internal pressure. The MATLAB code utilizes for loops to extract the
data from the text file and create matrices. A for loop works by repeating a certain set of
commands until a condition is met. In the case of Figure 29 in Section 2.4, a new value
is saved into the time matrix until all time values have been saved.
Altitude can be expressed in terms of pressure and temperature as shown in Equation
1. The altitude equation used in the MATLAB script is derived from the hydrostatic
equation and the ideal gas law. More information on this derivation can be found in
Reference 5: Atmospheric Science: An Introductory Survey. Due to the assumptions
made for the derivation, Equation 1 represents a simplified altitude calculation that is only
valid for up to 11km. When the balloon travels above this maximum, this equation may
be used as an approximation of the altitude and a more complex calculation must be done
to determine the precise altitude. This equation offers a good estimate for the altitude of
the balloon in order to identify a general relationship between internal balloon pressure

Airman Trout | Group 12 Page 30 of 90


and altitude. It is also important to note that the MATLAB code outputs the change in
altitude from the initial launch point and not the altitude above sea level. This is because
the first pressure reading of the device is used as P0 instead of sea level pressure.
Determining the change in altitude from launch point allows for a better understanding of
local properties without the need to reference current sea level conditions.

5. Tasks and Costs


5.1. Group Member Tasks
a. All Members
All members contributed to the project design and concept development. In addition,
all members aided in the testing and calibration of the device. Everyone contributed to
project documentation and report writing with specific sections detailed in each members
subsection below. All members contributed to Section 7 of this report. A picture of the
team members calibrating the device is shown in Figure 35.

Figure 35: Airman Trout Team Members

From left to right, team members shown above are Shaun Greising, Kaitlin Russell,
Taylor Gilbert (top), Ashley Scharfenberg, and Davis Hunter.

b. Taylor Gilbert
Taylor was responsible for the Arduino coding and testing of the Arduino code for the
device. In this report, she wrote Section 2.3, 4.1, and 4.2.

Airman Trout | Group 12 Page 31 of 90


c. Shaun Greising
Shaun was responsible for all of the mechanical design and fabrication of the device
casing and payload clamp. In this report, he wrote Section 2.2.

d. Davis Hunter
Davis acted as team lead of the group. He coordinated with the Space Hardware Club
in order to determine the feasibility of device design and to determine balloon launch
process. Davis was responsible for the electrical design and implementation of the circuit
and Printed Circuit Board. In this report, he wrote Section 2.1.

e. Kaitlin Russell
Kaitlin was also responsible for the electrical design and implementation of the circuit
and PCBs. She also assisted other team members with tasks associated with coding and
code testing. In addition, Kaitlin was responsible for the unification of the project proposal
report. In this report, she wrote Section 3 and 5.

f. Ashley Scharfenberg
Ashley was responsible for the MATLAB coding and MATLAB code testing. She also
performed the analysis of the calibration data. In addition, Ashley was responsible for the
unification of the final report. In this report, she wrote Section 1, 2.4, 4.3, and 6.

5.2. Project Costs


Total cost of the project is shown in Table 8.

Airman Trout | Group 12 Page 32 of 90


Table 8: Project Costs
Part Provider Cost (USD) Cost to the
group (USD)

Foam Home Depot .75 (.5 ft square) 0

Acrylic Rod Amazon 31.37 (per ft) 0

Screws (x4) Home Depot .02 each 0


(Size 6)

O-ring (x2) Amazon 4.89 (for 25) 0

Battery case Amazon .20 each 0

Arduino Due Arduino 37.40 0

Sensors (x4) Mouser 2.74 each 13.70


MS5607 Electronics

Tape Gorilla 4.29 (12 yard roll) 0

Capacitors 0.1uF (x8) Digi-Key 0.25 each


399-9786-ND

Hose Clamp Amazon 4.78 each 0

Dupont Jumper Wires Amazon 6.99 (per 120 0


(M/M,F/F,M/F) assorted types)

Jb weld JB Weld 7.99 0

Epoxy Walmart 2.97 0

Batteries (x3) Lowes 7.46 0


Surefire 123A 3V

Printed Circuit Board (x3) OSH Park 10.00 (per sq. in) 10.20

Green LED Joe Knows 14.99 (for 100) 0


Electronics

Omron Electronic Switch w/ SparkFun 1.78 each 0


external arm

SD reader SparkFun 9.90 each 9.90

Micro SD card SanDisk 6.49 each 6.49


16GB Micro SDHC (Amazon)

Resistor 10KOhm (x5) Digi-Key 3.80 each 0

Airman Trout | Group 12 Page 33 of 90


The project turned out to be much cheaper than anticipated, as many parts could be
acquired for free. The project proposal assumed paying for most materials, and did not
include some parts such as the SD card and reader that ended up being necessary for
the project. The cost for PCBs turned out to be almost half of what was predicted in the
proposal. The total cost to members in the proposal was $92.11, but actually ended up
being $42.09. More details on parts that were removed and the reasoning behind their
removal can be found in Section 7.2.

5.3. Project Schedule


The final project schedule is shown below in Figure 36.

Figure 36 is continued on the next page.

Airman Trout | Group 12 Page 34 of 90


Figure 36: Project Schedule

In this final version, the block schematic and wiring diagram from the proposal has
been removed. This is because a basic list of electrical parts needed was envisioned
during the design meetings to put into the proposal. The actual wiring schematic was
created during the beginning of the electrical work section. Parts acquisition started with
researching sites and comparing shipping costs for different parts. While this was in
progress, a block diagram was created. Parts orders were adjusted to accommodate the
changed parts needs from the block diagram. Before placing the orders, the team
searched the Space Hardware Club lab for parts that the club agreed to donate. Most of
the parts for this project could be found in the lab or procured for free by other means, so
very few things needed to be ordered. Electrical and mechanical work continued as soon
as parts were found, and so began before the ordered parts arrived. Mechanical work
started before parts order with material research and selection. Programming work also

Airman Trout | Group 12 Page 35 of 90


started when the block diagram was created. During the creation of the project, a sensor
fried and the team had to order new ones. This is included in the tail end of the electrical
work block. Testing and calibration lasted one week in the proposal, but ended up taking
less time. Three days were devoted to calibration and tests not part of debugging the
code. Two days were used for pressure testing, and one day for temperature calibration.
Deciphering the test data and creating charts is included in the report section. The overall
project took much longer than anticipated in the proposal. Every part lasted longer and
started later, except for set days such as project demonstration and update, which
occurred on different days based on what time slots were available. Also, due to weather
cancelling balloon launches on April 1, 7, 21, and 22 a launch is not shown in Figure 36.

6. Calibration and Uncertainty


6.1. Calibration
a. Pressure Calibration
In order to calibrate the MS5607 pressure sensors used aboard the Airman Trout
device, the payload was tested inside of the UAH Propulsion Research Centers vacuum
chamber.
The test chamber is shown in Figure 37.

Figure 37: Vacuum Chamber Testing

This chamber is able to create pressure environments ranging from atmospheric


pressure to near an absolute vacuum. It is equipped with a Series Worker Bee Convection

Airman Trout | Group 12 Page 36 of 90


Vacuum Gauge the reads the pressure of the chamber. The gauge is the yellow device
on the top of the chamber in Figure 37. The gauge works based on heat transfer
resistance changes within its circuitry. The range of the Worker Bee is from .013 Pa to
133 kPa. The device has a typical accuracy of +/- 10% of reading for pressures between
0.1 Pa and 53,329 Pa and a typical accuracy of +/- 2.5% of reading for 53,329 Pa to
133,322 Pa with a typical repeatability of +/- 2% of the reading. The sensor is
manufacturer calibrated and has been adjusted for the current altitude of the vacuum
chamber. [6]
To test the MS5607 sensors, the device was sealed inside the vacuum chamber and
the chamber was set to seven different constant pressures; three during pressure
reduction, one minimum value, and another three during pressure ascension. However,
one point during descent failed to be recorded from the Worker Bee and was therefore
discarded from the calibration. The data output by the Worker Bee was recorded in Excel
in Torr then converted to Pascals, and the data output by the device was saved onto the
micro SD card. The raw calibration readings were then processed through MATLAB, and
the results are shown in Figure 38.

Figure 38: Raw MS5607 Pressure Readings

In Figure 38, the regions of constant pressure can be seen as the flat horizontal lines
on the graph. The data produced within these sections is then extracted and the average
readings for each constant pressure are found. These average values are plotted against
the Worker Bee pressures in Figure 39 below, where WB is Worker Bee pressure, Pi is
the internal MS5607 sensor, and Pe is the external MS5607 sensor.

Airman Trout | Group 12 Page 37 of 90


120000.0

100000.0

80000.0
Pressure (Pa)

60000.0 WB
Pe
40000.0 Pi

20000.0

0.0
99325.2 6412.8 117.7 6452.8 29864.2 99325.2
Worker Bee Pressure (Pa)

Figure 39: Averaged Pressure Data

From Figure 39, it can be seen that the external pressure readings are near the Worker
Bee readings while there is a constant difference between the Pi and Pe. To correct for
this difference, the average difference between the internal and external pressure
readings is calculated. This correction factor is found to be equal to 5371 Pa. The
correction factor is subtracted from all Pi values in the averaged calibration pressure data
in order to produce corrected Pi values. The average data can then be re-plotted as
shown in Figure 40.

120000.0

100000.0

80000.0
Pressure

60000.0 WB
Pe
40000.0 Pi Corrected

20000.0

0.0
99325.2 6412.8 117.7 6452.8 29864.2 99325.2
Worker Bee Pressure (Pa)

Figure 40: Averaged Pressure Data Corrected

Airman Trout | Group 12 Page 38 of 90


In order to prove that the correction factor is valid for all pressure readings and not
just those shown by the average data, the correction factor is programmed into the
MATLAB script. Every internal pressure reading taken from the device output file will now
have 5371 Pa subtracted from it before MATLAB outputs the final values. Figure 41 shows
the MATLAB output with the correction factor incorporated into Pi.

Figure 41: Corrected MS5607 Output Readings

Figure 41 shows that that the correction factor is indeed valid for all pressure
measurements.
To better compare the MS5607 data to the Worker Bee data, the differences between
the two values at each constant pressure are found. The differences are graphed with
respect to Worker Bee pressure in Figure 42 below.

Airman Trout | Group 12 Page 39 of 90


1000.0

800.0

Output Pressure Difference (Pa)


600.0

400.0

200.0 WB-Pe
WB-Pi
0.0
99325.2 6412.8 117.7 6452.8 29864.2 99325.2
-200.0

-400.0

-600.0
Worker Bee Pressure (Pa)

Figure 42: Pressure Differences

The differences clearly vary with pressure. However, too few measurements were
taken to determine whether the error is random or bias. It is also unclear whether or not
the error is produced by the Worker Bee or the MS5607, but it is most likely a sum of
errors from both sensors. Since both the Worker Bee and MS5607 sensor are
manufacturer calibrated and based on the output shown in Figure 40, it can be determined
that the pressure differences contain acceptable error. Therefore, the differences fall into
the uncertainty of the device meaning no further correction factor will be incorporated into
the code.
Given the error of each device detailed on their respective datasheets, the average
error of each reading may be found. These errors in addition to averaged pressure
readings and differences are shown in Table 9 below.

Airman Trout | Group 12 Page 40 of 90


Table 9: Calibration Values
Worker Bee Pe
Pressure Pressure (Pa) Error % Error +/- Average Error +/- WB-Pe
(Torr) (Pa) Pressure (Pa) (Pa) (Pa)
745 99325.2 0.025 2483.1 100189.1 350 863.9
48.1 6412.8 0.1 641.3 6367.0 350 -45.8
0.883 117.7 0.1 11.8 97.2 350 -20.5
48.4 6452.8 0.1 645.3 6328.7 350 -124.1
224 29864.2 0.1 2986.4 29537.5 350 -326.7
745 99325.2 0.025 2483.1 100160.3 350 835.2
Worker Bee Pi Pi/Pe
Pressure (Pa) Average Error +/- WB-Pi Corrected Corrected Pi-Pe (Pa)
Pressure (Pa) (Pa) (Pa) Pressure (Pa) WB-Pi (Pa)
99325.16565 105578.1 350 6252.9 100206.9 881.7253 5389.1
6412.805997 11735.4 350 5322.6 6364.2 -48.5817 5368.491
117.7236527 5463.4 350 5345.6 92.1 -25.5503 5366.202
6452.802708 11689.9 350 5237.1 6318.7 -134.102 5361.224
29864.21088 34895.4 350 5031.2 29524.2 -339.954 5358.026
99325.16565 105544.7 350 6219.5 100173.5 848.3058 5384.368

Based on the above data, it can also be seen that the MS5607 measures show
minimal to no hysteresis. This means that the measurement accuracy does not
significantly vary based on whether pressure is increasing or decreasing. Further
discussion on device uncertainty is contained in Section 6.2 below.

b. Temperature Calibration
In order to calibrate the temperature readings of the MS5607, the sensor readings
were compared to the readings of a calibrated Thermometer. Two readings were taken,
one at ambient air temperature and on at cold temperature. The tip of the thermometer
was placed as close as possible to the temperature sensor as shown in Figure 43.

Figure 43: Thermometer Placement

Airman Trout | Group 12 Page 41 of 90


Placing the thermometer in this location helped to reduce uncertainty caused
inconsistent temperatures such as heat pockets or changes produced by airflow. With
this setup, the device and thermometer were then placed in the open air as far away from
airflow sources as possible. The devices were then left completely still for an hour. At the
end of that time, the thermometer reading was recorded and the last 10 minutes of device
temperature readings were averaged together. These recordings produced the ambient
air calibration data.
For the cold reading, the same configuration from Figure 43 was used, but this time
the device and thermometer were placed in the UAH World of Wings freezer. This specific
freezer was used because it contained a glass top that allowed the thermometer reading
to be recorded without removing the configuration from the freezer. Before the setup was
placed in the freezer, both the sensor and the thermometer were shut inside the foam
casing of the device to ensure no movement occurred. The thermometer was placed so
that the entire length below the immersion line was incased in the center space of the
foam. The device inside the freezer is shown below in Figure 44.

Figure 44: Freezer Calibration

The setup was again left still and as far from airflow as possible for an hour. During
this time, the freezer remained unopened. Again, at the end of that time, the thermometer
reading was recorded without opening the freezer, and the last 10 minutes of device
temperature readings were averaged together. The recorded values are shown below in
Table 10.

Table 10: Temperature Calibration


Ambient temperature (C) Error +/- (C) Cold Temperature (C) Error +/- (C)
Thermometer 25 1 4 1
MS5607 24 4 4 4

Airman Trout | Group 12 Page 42 of 90


The error of the MS5607 is taken from the MS5607 datasheet and the error of the
thermometer is taken from Reference 7: MAE 311 Lab 7: Calibration. It is clear that the
values are well within error of each other. The reading output by the MS5607 can
therefore be considered acceptable.
It is important to note that only the external sensor was calibrated for temperature as
no internal temperature readings are taken by the device. More details on the temperature
uncertainty can be found in Section 6.2 below.

6.2. Uncertainty
a. Sensor Uncertainty
Total MS5607 sensor uncertainty is given as +/- 350 Pa for pressure and +/- 4.0 C
for temperature [1]. All sensor uncertainties apply to both pressure sensors at 3V input.
The range for the sensor is -40 C to 85 C for temperature and 1,000 Pa to 120,000 Pa
for pressure, however, full accuracy is only guaranteed for 30,000 Pa to 110,000 Pa [1].
Readings taken beyond these ranges will contain error as the sensor is not designed to
take readings under such conditions. The sensor has a resolution error equal to +/- .5 Pa
and +/- .5 C due to the fact that its output reading is to the nearest Pascal for pressure
and the nearest degree Celsius for temperature. Another source of uncertainty is the
sensor sensitivity. If a change in either pressure or temperature is less than the devices
minimum detectable value error can occur as the device will not record a change in the
readout value. The sensor also has some random error that can be seen in Section 6.1.a.
Additionally, there is random error associated with the noise detected by the sensor, again
shown in Section 6.1.a. Noise is defined as readings picked up by the sensor that are not
precise measurements but instead contain error caused by random sensor error or by
external forces such as wind. Noise can be corrected for by averaging reading values
together. The sensors also have uncertainty associated with the calibration as detailed in
Section 6.1.a. However, it is useful to note that the sensor readings do not contain any
notable hysteresis. Further details on the pressure sensor specifications can be found in
Reference 1: MS5607-02BA03 Barometric Pressure Sensor, with stainless steel cap.

b. Variability of Measurement
For the variability of the actual quantity being measured, the external temperature and
pressure readings contains some uncertainty. The device is kept inside a foam casing in
order to protect the Arduino from low temperatures. However, the outside temperature
must be measured by the external sensor, so a hole was cut within the casing that allows
the sensor to be exposed to the outside air. Due to the casing around the sensor, it may
not be reading the exact external temperature at any given time because of the insulating
properties of the foam. In addition, the pressure contains some uncertainty since it is
exposed to the airflow around the payload. This airflow can lead to dynamic pressure
readings of the air instead of absolute pressure readings. The internal pressure sensor
may also pick up dynamic pressure readings from air movement within the balloon itself.

Airman Trout | Group 12 Page 43 of 90


c. Arduino Uncertainty
As for the uncertainty associated with the Arduino Due, the primary source of
uncertainty is resolution of the signal. Since the project uses a digital sensor, the Arduino
processes a digital signal. The digitalwrite() Arduino command therefore produces
resolution uncertainty. The Arduino Due has a clock speed of 84MHz. This speed
determines how quickly the Arduino can process and complete commands. Since the
sensors have a data collection rate of 1Hz, the uncertainty caused by clock speed
processing will be minimal. Further details on the specifications of the Arduino Due can
be found in Reference 8: Arduino Due.

d. Data Processing Uncertainty


Finally, the processing of the data within MATLAB incurs round off error and sensor
error propagation within the altitude calculation. Round off error is caused by the MATLAB
script only recording the data to a certain decimal point causing the output values to be
less accurate. Error propagation through the altitude calculation means that errors within
the sensor readings are carried through and multiplied when the readings are input into
the altitude equation or Equation 1. Based on the equations for error propagation of
addition and product given in Reference 9: Mechanical Measurements, an approximation
of the error propagation for the uncertainty of the altitude equation, Equation 8, can be
derived. Where u is the uncertainty of a given value.
1
0 5.257
= ( ) (2)
0.0065 0.0065
1
0 5.257
= ( ) (3)

1 0 2 1 2 2
, : = ( ) + ( ) +( ) (4)
5.257 0 5.257

1
0 5.257 1 0 2 1 2 2
: = ( ) ( ) + ( ) +( ) (5)
5.257 0 5.257


2, : = (6)
0.0065 0.0065

2 2
: = ( ) + ( ) (7)
0.0065 0.0065

Airman Trout | Group 12 Page 44 of 90


:
2
1 2
0 5.257 1 0 2 1 2 2
= ( ) [( ) + ( ) +( ) ] + 2 (8)
0.0065 5.257 0 5.257

Equation 8 can be used to approximate the uncertainty propagation through the


altitude equation given the uncertainty of the input values.

e. Total Uncertainty
The component that dominates system uncertainty is the uncertainty associated with
the sensor since it is propagated through the Arduino and through the MATLAB
processing code. Temperature presents a larger percent of uncertainty with respect to its
measured values. Therefore, temperature uncertainty contributes most to altitude
uncertainty. However, since the goal of this device is to measure pressure, the total
uncertainty may be reduced by simply analyzing pressure readings over time, thus
eliminating the need to output temperature data. With this simplification of output, the
uncertainty of the pressure sensor is the most significant cause of error in the outcome of
the project since it is the primary output value and is propagated through the Arduino and
MATLAB analysis.

7. Lessons Learned
7.1. General
As with most projects, the area in most need of improvement is time management.
Nearly every step of the design and implementation process took longer than expected.
Most notable was the testing and debugging of the code. The programming for the device
was finished long before the electronics and the team incorrectly assumed that the code
would work when uploaded and did not account for adequate debugging time. In the
future, programming and circuitry should be completed at the same time to allow for more
debug time. In general, more buffer should have been incorporated into all steps of the
project schedule.
When designing a PCB, it is vital to ensure that it is being created in the latest version
of the software. If this is done, when the file is transferred to another computer, the work
done so far will be safe and will properly load on the new computer instead of being
corrupted due to version differences.
When testing, one should be sure to remove any obstructions from the sensor, such
as tape, or else the sensors may not read properly. One of the teams sensors had the
protective tape left over it during testing and thus did not record data, so the test had to
be repeated after tape removal.

Airman Trout | Group 12 Page 45 of 90


7.2. Preliminary Design
The final design utilized an Arduino device instead of an Atmel. This change was made
in order to allow for more flexible coding. Arduino programming software is open source
and therefore anyone is able to download the sketch program onto any computer whereas
coding the Atmel board would have to be done exclusively on desktops located in the
Space Hardware Club Optics lab, equipped with Atmel Studio. Since members could
download the Arduino sketch software, the final code was able to be shared with all
members and allowed for mobile uploading onto the project device via laptop computers.
The change from Atmel Studio to Arduino dictated that the team also switch from using
the Atmel Xplained board to an Arduino board. Initially, an Arduino Uno was utilized.
However, on the Arduino Uno the digital pins output 5V, rather than 3.3V. When a sensor
that runs on 3.3V is given 5V without a protection circuit, it is immediately destroyed.
Having to replace two sensors certainly taught the team the importance of checking the
voltage on output pins before a sensor is attached to them. Figure 45 shows team
members testing the digital pins to discover their output voltage.

Figure 45: Testing Voltage Outputs

After this, the team elected to use an Arduino Due instead of an Uno since the Due
outputs 3V signals instead of 5V. On the upside, the Arduino boards include a voltage
regulator and extra pins for the LED, so it was not necessary to include the regulator or
MOSFET on the circuit, saving valuable space on the small printed circuit boards.
In the final design of the board, the team decided to remove the thermistor for
simplicity. The MS5607 sensors include temperature readings that must be taken within
the code in order for the device to function properly. To accommodate the MS5607 sensor,
instead of a thermistor, which can be on the end of a wire outside the payload, the board
measuring atmospheric pressure had to be better exposed. This was done by simply

Airman Trout | Group 12 Page 46 of 90


making a small cavity in the inner wall of the payload section above the Arduino with a
hole in the center allowing external air to reach the sensor.
The first attempt at making the capsule for the neck of the balloon was designed to fit
an inch and a half PCB which required the inside diameter of the capsule to be slightly
larger than the inch and a half forstner bit. This was going to be achieved by boring it out
to an inch and a half then expanding it by the use of an eight-inch boring bar, shown in
Figure 46.

Figure 46: 8 inch by inch Boring Bar

Having to use that long of a boring bar caused chatter that would go unnoticed if the
working material was opaque such as aluminum. When polishing the inside of the tube
with acetone, the liquid ran into the chatter cracks and due to the natural magnifying
characteristics of acrylic. the finished product looked unprofessional. The first capsule
with the chatter is shown in Figure 47.

Figure 47: Cleaned Chatter

In order to correct for this problem, the PCB was downsized to one inch diameter and
eliminated the need to use a boring bar.

Airman Trout | Group 12 Page 47 of 90


When making the end cap some minimal milling had to be done in order to fit the
switch and pass the amount of wires that were needed through the end cap to the Arduino.
This part was expected to be problematic due to the brittle qualities of acrylic. At first it
was slow going and milled similar to steel but then after the bit got hot the acrylic became
soft and almost rubber like in a localized area around the bit. This could be seen through
the side of the workpiece as it was machined. After the hot bit was removed, the hot area
went back to its original semi clear and brittle characteristics.
The insulation of the Arduino casing foam proved to be intolerant to common
household liquids such as oil, gasoline, and fiberglass epoxy. Some extra testing was
conducted in order to ensure that when sealing the capsule the epoxy would not leave
holes in the foam if it were to drip. Testing was also done to find a glue that would bond
to the foam and acrylic without dissolving the foam. Gorilla glue was found to meet the
teams requirements to attach the end plug to the foam box. The only drawback of the
glue was that when it expands, it flows up through any hole in the plug. This was fixed by
simply running a drill bit through the holes by hand after the glue was hardened. Any
excess foam on the flat surfaces could be easily removed with a chisel. The next problem
was the fiberglass resin used to seal the end of the capsule that will be placed inside the
balloon. Cheap Lowes fast hardening epoxy dissolved the foam until it was
unrecognizable. Low odor epoxy gotten for working in the bilge was available. West
System 105 resin with West System 206 slow hardener was found to be a suitable
replacement that would not dissolve the Foamular 150 insulation foam.
The first attempt at sealing the capsule used JB Weld to seal in the small drilled hole
that was required to get wires from the Arduino to the sensor inside the balloon. This
process was partially successful, but when the thinner epoxy was put on top of the JB
Weld, it was evident that the JB Weld was too thick and did not seal the center of the
bundle of wires, resulting in a drip of epoxy on the PCB. After the drip was noticed, the
capsule was placed on its side to prevent the epoxy from covering the pressure sensor
on the PCB. This problem fixed itself because after it hardened, the resin had sealed the
center of the bundle of wires. Just to ensure the capsule was sealed, another layer of
epoxy was placed on the opposite side of the seal. The downside to this extra step was
that it doubled the amount of resin in the capsule and increased the payload weight.

7.3. Possible Improvements


If this project were to be repeated, it could be improved by having more constant
pressure readings for device calibration. As detailed in Section 6.1.a, the device was
calibrated to four different pressure points. While this was sufficient to validate the device
for this project, it would have been better to test more points. More calibration points
would allow for greater accuracy in pressure readings.
The measurement device currently uses an MS5607 pressure sensor. To improve
upon this project in the future, it would be useful to incorporate a sensor with the ability to
measure lower pressures. The range of the current sensor, discussed in Section 6.2.a, is
higher than necessary for measuring the external pressure. This is because the highest
possible external pressure will be approximately equal to atmospheric pressure or
101kPa. However, the minimum reading of the sensor with full accuracy is only 30 kPa.
An ideal pressure sensor for this device would be more accurate for lower pressures and

Airman Trout | Group 12 Page 48 of 90


read pressures closer to 1kPa, which is the approximate pressure at the maximum
altitude of the balloon, 30,480 m. It would also be more effective for the internal pressure
sensor to be capable of lower pressure readings. For both pressure sensors, a lower
temperature range would also be useful as the temperature of air at the maximum altitude
of the balloon can reach below -50 C where the MS5607 does not function at less than
-40 C.

7.4. Failure to Fly


Originally, the team had planned to fly the Airman Trout payload on a Space Hardware
Club BalloonSat launch. Launches were scheduled for April 1, 7, 21, and 22.
Unfortunately, all four launches were cancelled due to inclement weather. After the final
opportunity was cancelled, the team attempted to schedule their own launch for April 23.
The Airman Trout device would be the only payload aboard the balloon, accompanied by
a parachute and tracker. However, since it would only be the Airman Trout team
participating in the launch, the idea was proven to be unrealistic. Due to the high cost,
lack of sufficient man power, and lack of supplies necessary for a personal balloon flight,
the team decided against the idea. From this failure, the team learned that you can never
have enough backups. Even with four launch dates, the project was still unable to fly. The
team also learned about cost versus benefit analysis when deciding whether or not they
should host their own launch.
Another attempt to launch will occur after this reports submittal on April 29 or May 6,
2017.

8. Acknowledgements
The Airman Trout Team would like to thank the following people who helped make
this project possible. Daniel Corey and Sarah Dangelo helped members understand how
SPI works within a code and how best to troubleshoot the Arduino sketch. Elena Pradhan
soldered the pressure sensors to the PCBs. Amit Patel and Dr. Gabe Xu aided team
members in using the Propulsion Research Center vacuum chamber. The Space
Hardware Club and Dr. Wessling donated materials and tools for the project. The UAH
World of Wings Employees allowed the team to use their freezer to calibrate temperature.
Finally, Dr. Daniel Armentrout taught the team all about uncertainty and measurement
and the reason for this project.

Airman Trout | Group 12 Page 49 of 90


9. References
1. Measurement Specialties, "MS5607-02BA03 Barometric Pressure Sensor, with
stainless steel cap," 26 September 2012. [Online]. Available:
http://www.farnell.com/datasheets/1756127.pdf. [Accessed 25 April 2017].
2. SparkFun, "SparkFun Level Shifting microSD Breakout," 2016. [Online].
Available: https://www.sparkfun.com/products/13743. [Accessed 25 April 2017].
3. Arduino, "Arduino," 2017. [Online]. Available: https://www.arduino.cc/. [Accessed
25 April 2017].
4. Ke!san Online Calculator, "Altitude from atmospheric pressure Calculator,"
CASIO Computer Co., LTD., 2017. [Online]. Available:
http://keisan.casio.com/exec/system/1224585971. [Accessed 2017 April 2017].
5. J. M. Wallace and P. V. Hobbs, in Atmospheric Science: An Introductory Survey,
Academic Press, 1977, pp. 55-57.
6. InstruTech, "Series 101 Worker Bee Convection Vacuum Gauge," February
2016. [Online]. Available:
http://www.instrutechinc.com/site/files/1082/126100/427478/756402/CVG101_Da
ta_Sheet.pdf. [Accessed 25 April 2017].
7. UAHuntsville, "MAE 311 Lab 7: Calibration," 2013. [Online]. Available:
file:///C:/Users/Ashley/Downloads/MAE_311L_7_Calibration.pdf. [Accessed 25
April 2017].
8. Arduino, "Arduino Due," 2016. [Online]. Available:
https://media.digikey.com/pdf/Data%20Sheets/Arduino%20PDFs/ArduinoDueBrd
_Web.pdf. [Accessed 25 April 2017].
9. T. G. Beckwith, R. D. Marangoni and J. H. Lienhard V, "3.10 Propagation of
Uncertainty," in Mechanical Measurements, Sixth Edition, Upper Saddle River,
NJ, Pearson Education, Inc., 2007, pp. 73-75.

Airman Trout | Group 12 Page 50 of 90


10. Appendix

Airman Trout | Group 12 Page 51 of 90


Airman Trout | Group 12 Page 52 of 90
Airman Trout | Group 12 Page 53 of 90
Airman Trout | Group 12 Page 54 of 90
Airman Trout | Group 12 Page 55 of 90
Airman Trout | Group 12 Page 56 of 90
Airman Trout | Group 12 Page 57 of 90
Airman Trout | Group 12 Page 58 of 90
Airman Trout | Group 12 Page 59 of 90
Airman Trout | Group 12 Page 60 of 90

Airman Trout | Group 12 Page 61 of 90


Airman Trout | Group 12 Page 62 of 90
Airman Trout | Group 12 Page 63 of 90
Airman Trout | Group 12 Page 64 of 90
Airman Trout | Group 12 Page 65 of 90
Airman Trout | Group 12 Page 66 of 90
Airman Trout | Group 12 Page 67 of 90
Airman Trout | Group 12 Page 68 of 90
Airman Trout | Group 12 Page 69 of 90
Airman Trout | Group 12 Page 70 of 90
Airman Trout | Group 12 Page 71 of 90
Airman Trout | Group 12 Page 72 of 90
Airman Trout | Group 12 Page 73 of 90
Airman Trout | Group 12 Page 74 of 90
Airman Trout | Group 12 Page 75 of 90
Airman Trout | Group 12 Page 76 of 90
Airman Trout | Group 12 Page 77 of 90
Airman Trout | Group 12 Page 78 of 90
Airman Trout | Group 12 Page 79 of 90
Airman Trout | Group 12 Page 80 of 90
Airman Trout | Group 12 Page 81 of 90
Airman Trout | Group 12 Page 82 of 90
Airman Trout | Group 12 Page 83 of 90
Airman Trout | Group 12 Page 84 of 90
Airman Trout | Group 12 Page 85 of 90
Airman Trout | Group 12 Page 86 of 90
Airman Trout | Group 12 Page 87 of 90
Airman Trout | Group 12 Page 88 of 90
Airman Trout | Group 12 Page 89 of 90
Airman Trout | Group 12 Page 90 of 90

Anda mungkin juga menyukai