Merge branch 'master' of ssh://git.gag.com/scm/git/web/altusmetrum
[web/altusmetrum] / AltOS / doc / micropeak.html
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>MicroPeak Owner’s Manual</title><link rel="stylesheet" type="text/css" href="am.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /></head><body><div xml:lang="en" class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="idm45474891171088"></a>MicroPeak Owner’s Manual</h1></div><div><h2 class="subtitle">A recording altimeter for hobby rocketry</h2></div><div><h3 class="corpauthor">
3   <span class="inlinemediaobject"><img src="micropeak-oneline.svg" width="270" /></span>
4 </h3></div><div><div class="author"><h3 class="author"><span class="firstname">Keith</span> <span class="surname">Packard</span></h3><code class="email">&lt;<a class="email" href="mailto:keithp@keithp.com">keithp@keithp.com</a>&gt;</code></div></div><div><p class="copyright">Copyright © 2014 Keith Packard</p></div><div><div class="legalnotice"><a id="idm45474893066160"></a><p>
5     This document is released under the terms of the
6     <a class="ulink" href="http://creativecommons.org/licenses/by-sa/3.0/" target="_top">
7       Creative Commons ShareAlike 3.0
8     </a>
9     license.
10   </p></div></div><div><a href="micropeak-revhistory.html">Revision History</a></div></div><hr /></div><div class="dedication"><div class="titlepage"><div><div><h1 class="title"><a id="_acknowledgements"></a>Acknowledgements</h1></div></div></div><p>Thanks to John Lyngdal for suggesting that we build something
11 like this.</p><p>Have fun using these products, and we hope to meet all of you
12 out on the rocket flight line somewhere.</p><div class="blockquote"><blockquote class="blockquote"><div class="literallayout"><p>Bdale Garbee, KB0G<br />
13 NAR #87103, TRA #12201</p></div></blockquote></div><div class="blockquote"><blockquote class="blockquote"><div class="literallayout"><p>Keith Packard, KD7SQG<br />
14 NAR #88757, TRA #12200</p></div></blockquote></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="chapter"><a href="#_using_micropeak">1. Using MicroPeak</a></span></dt><dt><span class="chapter"><a href="#_the_micropeak_usb_adapter">2. The MicroPeak USB adapter</a></span></dt><dd><dl><dt><span class="section"><a href="#_installing_the_micropeak_software">2.1. Installing the MicroPeak software</a></span></dt><dt><span class="section"><a href="#_downloading_micro_peak_data">2.2. Downloading Micro Peak data</a></span></dt><dt><span class="section"><a href="#_analyzing_micropeak_data">2.3. Analyzing MicroPeak Data</a></span></dt><dd><dl><dt><span class="section"><a href="#_micropeak_graphs">2.3.1. MicroPeak Graphs</a></span></dt><dt><span class="section"><a href="#_micropeak_flight_statistics">2.3.2. MicroPeak Flight Statistics</a></span></dt><dt><span class="section"><a href="#_raw_flight_data">2.3.3. Raw Flight Data</a></span></dt><dt><span class="section"><a href="#_configuring_the_graph">2.3.4. Configuring the Graph</a></span></dt></dl></dd><dt><span class="section"><a href="#_setting_micropeak_preferences">2.4. Setting MicroPeak Preferences</a></span></dt></dl></dd><dt><span class="appendix"><a href="#_handling_precautions">A. Handling Precautions</a></span></dt><dt><span class="appendix"><a href="#_technical_information">B. Technical Information</a></span></dt><dd><dl><dt><span class="section"><a href="#_barometric_sensor">B.1. Barometric Sensor</a></span></dt><dt><span class="section"><a href="#_micro_controller">B.2. Micro-controller</a></span></dt><dt><span class="section"><a href="#_lithium_battery">B.3. Lithium Battery</a></span></dt><dt><span class="section"><a href="#_atmospheric_model">B.4. Atmospheric Model</a></span></dt><dt><span class="section"><a href="#_mechanical_considerations">B.5. Mechanical Considerations</a></span></dt><dt><span class="section"><a href="#_micropeak_programming_interface">B.6. MicroPeak Programming Interface</a></span></dt></dl></dd><dt><span class="appendix"><a href="#_on_board_data_storage">C. On-board data storage</a></span></dt></dl></div><div class="list-of-figures"><p><strong>List of Figures</strong></p><dl><dt>1.1. <a href="#idm45474890090832">MicroPeak and Battery</a></dt><dt>2.1. <a href="#idm45474888707168">MicroPeak USB Adapter</a></dt><dt>2.2. <a href="#idm45474891114272">MicroPeak Application</a></dt><dt>2.3. <a href="#idm45474889649952">MicroPeak Device Dialog</a></dt><dt>2.4. <a href="#idm45474889692256">MicroPeak Download Dialog</a></dt><dt>2.5. <a href="#idm45474890780960">MicroPeak Downloading</a></dt><dt>2.6. <a href="#idm45474888934272">MicroPeak Save Dialog</a></dt><dt>2.7. <a href="#idm45474890216176">MicroPeak Graph</a></dt><dt>2.8. <a href="#idm45474890210176">MicroPeak Flight Statistics</a></dt><dt>2.9. <a href="#idm45474888705120">MicroPeak Raw Flight Data</a></dt><dt>2.10. <a href="#idm45474887946960">MicroPeak Graph Configuration</a></dt><dt>2.11. <a href="#idm45474888384656">MicroPeak Preferences</a></dt></dl></div><div class="list-of-tables"><p><strong>List of Tables</strong></p><dl><dt>C.1. <a href="#idm45474893118336">MicroPeak EEPROM Data Storage</a></dt></dl></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="_using_micropeak"></a>Chapter 1. Using MicroPeak</h1></div></div></div><p>MicroPeak is designed to be easy to use. Requiring no external
15 components, flying takes just a few steps</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
16 Install the battery
17 </span></dt><dd>
18 Fit a CR1025 battery into the plastic carrier. The positive
19 (+) terminal should be towards the more open side of the
20 carrier. Slip the carrier into the battery holder with the
21 positive (+) terminal facing away from the circuit board.
22 </dd></dl></div><div class="figure"><a id="idm45474890090832"></a><p class="title"><strong>Figure 1.1. MicroPeak and Battery</strong></p><div class="figure-contents"><div class="mediaobject"><img src="micropeak-back.jpg" width="405" alt="micropeak-back.jpg" /></div></div></div><br class="figure-break" /><div class="variablelist"><dl class="variablelist"><dt><span class="term">
23 Install MicroPeak in your rocket
24 </span></dt><dd>
25 This can be as simple as preparing a soft cushion of wadding
26 inside a vented model payload bay. Wherever you mount it,
27 make sure you protect the barometric sensor from corrosive
28 ejection gasses as those will damage the sensor, and shield
29 it from light as that can cause incorrect sensor readings.
30 </dd><dt><span class="term">
31 Turn MicroPeak on
32 </span></dt><dd>
33 Slide the switch so that the actuator covers the <span class="emphasis"><em>1</em></span> printed
34 on the board. MicroPeak will report the maximum height of
35 the last flight in decimeters using a sequence of flashes on
36 the LED. A sequence of short flashes indicates one digit. A
37 single long flash indicates zero. The height is reported in
38 decimeters, so the last digit will be tenths of a meter. For
39 example, if MicroPeak reports 5 4 4 3, then the maximum
40 height of the last flight was 544.3m, or 1786 feet.
41 </dd><dt><span class="term">
42 Finish preparing the rocket for flight
43 </span></dt><dd>
44 After the previous flight data have been reported, MicroPeak
45 waits for one minute before starting to check for
46 launch. This gives you time to finish assembling the
47 rocket. As those activities might cause pressure changes
48 inside the airframe, MicroPeak might accidentally detect
49 boost. If you need to do anything to the airframe after the
50 one minute window passes, make sure to be careful not to
51 disturb the altimeter. The LED will remain dark during the
52 one minute delay, but after that, it will start blinking
53 once every 3 seconds.
54 </dd><dt><span class="term">
55 Fly the rocket
56 </span></dt><dd>
57 Once the rocket passes about 30m in height (100 feet), the
58 micro-controller will record the ground pressure and track
59 the pressure seen during the flight. In this mode, the LED
60 flickers rapidly. When the rocket lands, and the pressure
61 stabilizes, the micro-controller will record the minimum
62 pressure pressure experienced during the flight, compute the
63 height represented by the difference in air pressure and
64 blink that value out on the LED. After that, MicroPeak
65 powers down to conserve battery power.
66 </dd><dt><span class="term">
67 Recover the data
68 </span></dt><dd>
69 Turn MicroPeak off and then back on. MicroPeak will blink
70 out the maximum height for the last flight. Turn MicroPeak
71 back off to conserve battery power.
72 </dd></dl></div></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="_the_micropeak_usb_adapter"></a>Chapter 2. The MicroPeak USB adapter</h1></div></div></div><div class="figure"><a id="idm45474888707168"></a><p class="title"><strong>Figure 2.1. MicroPeak USB Adapter</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="MicroPeakUSB-2.0.jpg" align="middle" width="405" alt="MicroPeakUSB-2.0.jpg" /></div></div></div><br class="figure-break" /><p>MicroPeak stores barometric pressure information for the first
73 48 seconds of the flight in on-board non-volatile memory. The
74 contents of this memory can be downloaded to a computer using
75 the MicroPeak USB adapter.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_installing_the_micropeak_software"></a>2.1. Installing the MicroPeak software</h2></div></div></div><p>The MicroPeak application runs on Linux, Mac OS X and
76 Windows. You can download the latest version from
77 <a class="ulink" href="http://altusmetrum.org/MicroPeak" target="_top">http://altusmetrum.org/MicroPeak</a></p><p>On Mac OS X and Windows, the FTDI USB device driver
78 needs to be installed. A compatible version of this
79 driver is included with the MicroPeak application, but
80 you may want to download a newer version from
81 <a class="ulink" href="http://www.ftdichip.com/FTDrivers.htm" target="_top">http://www.ftdichip.com/FTDrivers.htm</a></p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_downloading_micro_peak_data"></a>2.2. Downloading Micro Peak data</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
82 Plug the MicroPeak USB adapter in to your computer.
83 </li><li class="listitem">
84 Start the MicroPeak application.
85 </li></ul></div><div class="informalfigure"><div class="mediaobject" align="center"><img src="micropeak-nofont.svg" align="middle" width="45" alt="micropeak-nofont.svg" /></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
86 Click on the Download button at the top of the
87 window.
88 </li></ul></div><div class="figure"><a id="idm45474891114272"></a><p class="title"><strong>Figure 2.2. MicroPeak Application</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="micropeak-app.png" align="middle" width="405" alt="micropeak-app.png" /></div></div></div><br class="figure-break" /><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
89 Select from the listed devices. There will probably
90 be only one.
91 </li></ul></div><div class="figure"><a id="idm45474889649952"></a><p class="title"><strong>Figure 2.3. MicroPeak Device Dialog</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="micropeak-device-dialog.png" align="middle" width="207" alt="micropeak-device-dialog.png" /></div></div></div><br class="figure-break" /><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
92 The application will now wait until it receives
93 valid data from the MicroPeak USB adapter.
94 </li></ul></div><div class="figure"><a id="idm45474889692256"></a><p class="title"><strong>Figure 2.4. MicroPeak Download Dialog</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="micropeak-download.png" align="middle" width="180" alt="micropeak-download.png" /></div></div></div><br class="figure-break" /><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
95 The MicroPeak USB adapter has a small
96 phototransistor under the hole in the center of the
97 box.  Locate this, turn on the MicroPeak and place
98 the orange LED on the MicroPeak directly inside the
99 hole, resting the MicroPeak itself on the box. You
100 should see the blue LED on the MicroPeak USB adapter
101 blinking in time with the orange LED on the
102 MicroPeak board itself.
103 </li></ul></div><div class="figure"><a id="idm45474890780960"></a><p class="title"><strong>Figure 2.5. MicroPeak Downloading</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="MicroPeakUSB-2.0-inuse.jpg" align="middle" width="405" alt="MicroPeakUSB-2.0-inuse.jpg" /></div></div></div><br class="figure-break" /><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
104 After the maximum flight height is reported,
105 MicroPeak will pause for a few seconds, blink the
106 LED four times rapidly and then send the data in one
107 long blur on the LED. The MicroPeak application
108 should receive the data. When it does, it will
109 present the data in a graph and offer to save the
110 data to a file. If not, you can power cycle the
111 MicroPeak board and try again.
112 </li></ul></div><div class="figure"><a id="idm45474888934272"></a><p class="title"><strong>Figure 2.6. MicroPeak Save Dialog</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="micropeak-save-dialog.png" align="middle" width="207" alt="micropeak-save-dialog.png" /></div></div></div><br class="figure-break" /><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
113 Once the data are saved, a graph will be displayed
114 with height, speed and acceleration values computed
115 from the recorded barometric pressure data. See
116 &lt;&lt;_analyzing_micropeak_data&gt; for more details on that.
117 </li></ul></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_analyzing_micropeak_data"></a>2.3. Analyzing MicroPeak Data</h2></div></div></div><p>The MicroPeak application can present flight data in
118 the form of a graph, a collection of computed
119 statistics or in tabular form.</p><p>MicroPeak collects raw barometric pressure data which
120 is then used to compute the remaining data. Altitude
121 is computed through a standard atmospheric
122 model. Absolute error in this data will be affected by
123 local atmospheric conditions. Fortunately, these
124 errors tend to mostly cancel out, so the error in the
125 height computation is much smaller than the error in
126 altitude would be.</p><p>Speed and acceleration are computed by first smoothing
127 the height data with a Gaussian window averaging
128 filter. For speed data, this average uses seven
129 samples. For acceleration data, eleven samples are
130 used. These were chosen to provide reasonably smooth
131 speed and acceleration data, which would otherwise be
132 swamped with noise.</p><p>The File menu has operations to open existing flight
133 logs, Download new data from MicroPeak, Save a copy of
134 the flight log to a new file, Export the tabular data
135 (as seen in the Raw Data tab) to a file, change the
136 application Preferences, Close the current window or
137 close all windows and Exit the application.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_micropeak_graphs"></a>2.3.1. MicroPeak Graphs</h3></div></div></div><div class="figure"><a id="idm45474890216176"></a><p class="title"><strong>Figure 2.7. MicroPeak Graph</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="micropeak-graph.png" align="middle" width="405" alt="micropeak-graph.png" /></div></div></div><br class="figure-break" /><p>Under the Graph tab, the height, speed and acceleration values
138 are displayed together. You can zoom in on the graph by
139 clicking and dragging to sweep out an area of
140 interest. Right-click on the plot to bring up a menu that will
141 let you save, copy or print the graph.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_micropeak_flight_statistics"></a>2.3.2. MicroPeak Flight Statistics</h3></div></div></div><div class="figure"><a id="idm45474890210176"></a><p class="title"><strong>Figure 2.8. MicroPeak Flight Statistics</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="micropeak-statistics.png" align="middle" width="405" alt="micropeak-statistics.png" /></div></div></div><br class="figure-break" /><p>The Statistics tab presents overall data from
142 the flight. Note that the Maximum height value
143 is taken from the minumum pressure captured in
144 flight, and may be different from the apparant
145 apogee value as the on-board data are sampled
146 twice as fast as the recorded values, or
147 because the true apogee occurred after the
148 on-board memory was full. Each value is
149 presented in several units as appropriate.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_raw_flight_data"></a>2.3.3. Raw Flight Data</h3></div></div></div><div class="figure"><a id="idm45474888705120"></a><p class="title"><strong>Figure 2.9. MicroPeak Raw Flight Data</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="micropeak-raw-data.png" align="middle" width="405" alt="micropeak-raw-data.png" /></div></div></div><br class="figure-break" /><p>A table consisting of the both the raw barometric pressure
150 data and values computed from that for each recorded time.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_configuring_the_graph"></a>2.3.4. Configuring the Graph</h3></div></div></div><div class="figure"><a id="idm45474887946960"></a><p class="title"><strong>Figure 2.10. MicroPeak Graph Configuration</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="micropeak-graph-configure.png" align="middle" width="405" alt="micropeak-graph-configure.png" /></div></div></div><br class="figure-break" /><p>This selects which graph elements to show, and lets you
151 switch between metric and imperial units</p></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_setting_micropeak_preferences"></a>2.4. Setting MicroPeak Preferences</h2></div></div></div><div class="figure"><a id="idm45474888384656"></a><p class="title"><strong>Figure 2.11. MicroPeak Preferences</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="micropeak-preferences.png" align="middle" width="162" alt="micropeak-preferences.png" /></div></div></div><br class="figure-break" /><p>The MicroPeak application has a few user settings which are
152 configured through the Preferences dialog, which can be
153 accessed from the File menu.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
154 Log Directory
155 </span></dt><dd>
156 The Log Directory is where flight data will be
157 saved to and loaded from by default. Of
158 course, you can always navigate to other
159 directories in the file chooser windows, this
160 setting is just the starting point.
161 </dd><dt><span class="term">
162 Imperial Units
163 </span></dt><dd>
164 If you prefer to see your graph data in feet
165 and miles per hour instead of meters and
166 meters per second, you can select Imperial
167 Units.
168 </dd><dt><span class="term">
169 Serial Debug
170 </span></dt><dd>
171 To see what data is actually arriving over the
172 serial port, start the MicroPeak application
173 from a command prompt and select the Serial
174 Debug option. This can be useful in debugging
175 serial communication problems, but most people
176 need never choose this.
177 </dd><dt><span class="term">
178 Font Size
179 </span></dt><dd>
180 You can adjust the size of the text in the
181 Statistics tab by changing the Font size
182 preference. There are three settings, with
183 luck one will both fit on your screen and
184 provide readable values.
185 </dd><dt><span class="term">
186 Look &amp; Feel
187 </span></dt><dd>
188 The Look &amp; feel menu shows a list of available
189 application appearance choices. By default,
190 the MicroPeak application tries to blend in
191 with other applications, but you may choose
192 some other appearance if you like.
193 </dd></dl></div><p>Note that MicroPeak shares a subset of the
194 AltosUI preferences, so if you use both of
195 these applications, change in one application
196 will affect the other.</p></div></div><div class="appendix"><div class="titlepage"><div><div><h1 class="title"><a id="_handling_precautions"></a>Appendix A. Handling Precautions</h1></div></div></div><p>All Altus Metrum products are sophisticated electronic
197 devices.  When handled gently and properly installed in an
198 air-frame, they will deliver impressive results.  However, as
199 with all electronic devices, there are some precautions you
200 must take.</p><div class="warning" style="margin-left: 0; margin-right: 10%;"><h3 class="title">Warning</h3><p>The CR1025 Lithium batteries have an extraordinary power
201 density.  This is great because we can fly with much less
202 battery mass… but if they are punctured or their contacts
203 are allowed to short, they can and will release their energy
204 very rapidly!  Thus we recommend that you take some care when
205 handling MicroPeak to keep conductive material from coming in
206 contact with the exposed metal elements.</p></div><p>The barometric sensor used in MicroPeak is sensitive to
207 sunlight. Please consider this when designing an
208 installation. Many model rockets with payload bays use clear
209 plastic for the payload bay. Replacing these with an opaque
210 cardboard tube, painting them, or wrapping them with a layer
211 of masking tape are all reasonable approaches to keep the
212 sensor out of direct sunlight.</p><p>The barometric sensor sampling ports must be able to
213 "breathe", both by not being covered by foam or tape or other
214 materials that might directly block the hole on the top of the
215 sensor, and also by having a suitable static vent to outside
216 air.</p><p>As with all other rocketry electronics, Altus Metrum
217 altimeters must be protected from exposure to corrosive motor
218 exhaust and ejection charge gasses.</p></div><div class="appendix"><div class="titlepage"><div><div><h1 class="title"><a id="_technical_information"></a>Appendix B. Technical Information</h1></div></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_barometric_sensor"></a>B.1. Barometric Sensor</h2></div></div></div><p>MicroPeak uses the Measurement Specialties MS5607
219 sensor. This has a range of 120kPa to 1kPa with an
220 absolute accuracy of 150Pa and a resolution of 2.4Pa.</p><p>The pressure range corresponds roughly to an altitude
221 range of -1500m (-4900 feet) to 31000m (102000 feet),
222 while the resolution is approximately 20cm (8 inches)
223 near sea level and 60cm (24in) at 10000m (33000 feet).</p><p>Ground pressure is computed from an average of 16
224 samples, taken while the altimeter is at rest. The
225 flight pressure used to report maximum height is
226 computed from a Kalman filter designed to smooth out
227 any minor noise in the sensor values. The flight
228 pressure recorded to non-volatile storage is
229 unfiltered, coming directly from the pressure sensor.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_micro_controller"></a>B.2. Micro-controller</h2></div></div></div><p>MicroPeak uses an Atmel ATtiny85
230 micro-controller. This tiny CPU contains 8kB of flash
231 for the application, 512B of RAM for temporary data
232 storage and 512B of EEPROM for non-volatile storage of
233 previous flight data.</p><p>The ATtiny85 has a low-power mode which turns off all
234 of the clocks and powers down most of the internal
235 components. In this mode, the chip consumes only .1μA
236 of power. MicroPeak uses this mode once the flight has
237 ended to preserve battery power.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_lithium_battery"></a>B.3. Lithium Battery</h2></div></div></div><p>The CR1025 battery used by MicroPeak holds 30mAh of
238 power, which is sufficient to run for over 40
239 hours. Because MicroPeak powers down on landing, run
240 time includes only time sitting on the launch pad or
241 during flight.</p><p>The large positive terminal (+) is usually marked,
242 while the smaller negative terminal is not. Make sure
243 you install the battery with the positive terminal
244 facing away from the circuit board where it will be in
245 contact with the metal battery holder. A small pad on
246 the circuit board makes contact with the negative
247 battery terminal.</p><p>Shipping restrictions may prevent us from including a
248 CR1025 battery with MicroPeak. If so, many stores
249 carry CR1025 batteries as they are commonly used in
250 small electronic devices such as flash lights.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_atmospheric_model"></a>B.4. Atmospheric Model</h2></div></div></div><p>MicroPeak contains a fixed atmospheric model which is
251 used to convert barometric pressure into altitude. The
252 model was converted into a 469-element piece-wise
253 linear approximation which is then used to compute the
254 altitude of the ground and apogee. The difference
255 between these represents the maximum height of the
256 flight.</p><p>The model assumes a particular set of atmospheric
257 conditions, which, while a reasonable average, cannot
258 represent the changing nature of the real
259 atmosphere. Fortunately, for flights reasonably close
260 to the ground, the effect of this global inaccuracy
261 are largely canceled out when the computed ground
262 altitude is subtracted from the computed apogee
263 altitude, so the resulting height is more accurate
264 than either the ground or apogee altitudes.</p><p>Because the raw pressure data is recorded to
265 non-volatile storage, you can use that, along with a
266 more sophisticated atmospheric model, to compute your
267 own altitude values.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_mechanical_considerations"></a>B.5. Mechanical Considerations</h2></div></div></div><p>MicroPeak is designed to be rugged enough for typical
268 rocketry applications. It contains two moving parts,
269 the battery holder and the power switch, which were
270 selected for their ruggedness.</p><p>The MicroPeak battery holder is designed to withstand
271 impact up to 150g without breaking contact (or, worse
272 yet, causing the battery to fall out). That means it
273 should stand up to almost any launch you care to try,
274 and should withstand fairly rough landings.</p><p>The power switch is designed to withstand up to 50g
275 forces in any direction. Because it is a sliding
276 switch, orienting the switch perpendicular to the
277 direction of rocket travel will serve to further
278 protect the switch from launch forces.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_micropeak_programming_interface"></a>B.6. MicroPeak Programming Interface</h2></div></div></div><p>MicroPeak exposes a standard 6-pin AVR programming
279 interface, but not using the usual 2x3 array of pins
280 on 0.1" centers. Instead, there is a single row of
281 tiny 0.60mm × 0.85mm pads on 1.20mm centers exposed
282 near the edge of the circuit board. We couldn’t find
283 any connector that was small enough to include on the
284 circuit board.</p><p>In lieu of an actual connector, the easiest way to
285 connect to the bare pads is through a set of Pogo
286 pins. These spring-loaded contacts are designed to
287 connect in precisely this way. We’ve designed a
288 programming jig, the MicroPeak Pogo Pin board which
289 provides a standard AVR interface on one end and a
290 recessed slot for MicroPeak to align the board with
291 the Pogo Pins.</p><p>The MicroPeak Pogo Pin board is not a complete AVR
292 programmer, it is an interface board that provides a
293 3.3V regulated power supply to run the MicroPeak via
294 USB and a standard 6-pin AVR programming interface
295 with the usual 2x3 grid of pins on 0.1" centers. This
296 can be connected to any AVR programming dongle.</p><p>The AVR programming interface cannot run faster than ¼
297 of the AVR CPU clock frequency. Because MicroPeak runs
298 at 250kHz to save power, you must configure your AVR
299 programming system to clock the AVR programming
300 interface at no faster than 62.5kHz, or a clock period
301 of 32µS.</p></div></div><div class="appendix"><div class="titlepage"><div><div><h1 class="title"><a id="_on_board_data_storage"></a>Appendix C. On-board data storage</h1></div></div></div><p>The ATtiny85 has 512 bytes of non-volatile storage, separate
302 from the code storage memory. The MicroPeak firmware uses this
303 to store information about the last completed
304 flight. Barometric measurements from the ground before launch
305 and at apogee are stored, and used at power-on to compute the
306 height of the last flight.</p><p>In addition to the data used to present the height of the last
307 flight, MicroPeak also stores barometric information sampled
308 at regular intervals during the flight. This is the
309 information captured with the MicroPeak USB adapter. It can
310 also be read from MicroPeak through any AVR programming tool.</p><div class="table"><a id="idm45474893118336"></a><p class="title"><strong>Table C.1. MicroPeak EEPROM Data Storage</strong></p><div class="table-contents"><table class="table" summary="MicroPeak EEPROM Data Storage" cellpadding="4px" style="border-collapse: collapse;border-top: 1px solid #78079a; border-bottom: 1px solid #78079a; border-left: 1px solid #78079a; border-right: 1px solid #78079a; "><colgroup><col class="col_1" /><col class="col_2" /><col class="col_3" /></colgroup><tbody><tr><td style="border-right: 1px solid #78079a; border-bottom: 1px solid #78079a; " align="left" valign="top"><p>Address</p></td><td style="border-right: 1px solid #78079a; border-bottom: 1px solid #78079a; " align="left" valign="top"><p>Size (bytes)</p></td><td style="border-bottom: 1px solid #78079a; " align="left" valign="top"><p>Description</p></td></tr><tr><td style="border-right: 1px solid #78079a; border-bottom: 1px solid #78079a; " align="left" valign="top"><p>0x000</p></td><td style="border-right: 1px solid #78079a; border-bottom: 1px solid #78079a; " align="left" valign="top"><p>4</p></td><td style="border-bottom: 1px solid #78079a; " align="left" valign="top"><p>Average ground pressure (Pa)</p></td></tr><tr><td style="border-right: 1px solid #78079a; border-bottom: 1px solid #78079a; " align="left" valign="top"><p>0x004</p></td><td style="border-right: 1px solid #78079a; border-bottom: 1px solid #78079a; " align="left" valign="top"><p>4</p></td><td style="border-bottom: 1px solid #78079a; " align="left" valign="top"><p>Minimum flight pressure (Pa)</p></td></tr><tr><td style="border-right: 1px solid #78079a; border-bottom: 1px solid #78079a; " align="left" valign="top"><p>0x008</p></td><td style="border-right: 1px solid #78079a; border-bottom: 1px solid #78079a; " align="left" valign="top"><p>2</p></td><td style="border-bottom: 1px solid #78079a; " align="left" valign="top"><p>Number of in-flight samples</p></td></tr><tr><td style="border-right: 1px solid #78079a; " align="left" valign="top"><p>0x00a … 0x1fe</p></td><td style="border-right: 1px solid #78079a; " align="left" valign="top"><p>2</p></td><td style="" align="left" valign="top"><p>Instantaneous flight pressure (Pa) low 16 bits</p></td></tr></tbody></table></div></div><br class="table-break" /><p>All EEPROM data are stored least-significant byte first. The
311 instantaneous flight pressure data are stored without the
312 upper 16 bits of data. The upper bits can be reconstructed
313 from the previous sample, assuming that pressure doesn’t
314 change by more more than 32kPa in a single sample
315 interval. Note that this pressure data is <span class="strong"><strong>not</strong></span> filtered in
316 any way, while both the recorded ground and apogee pressure
317 values are, so you shouldn’t expect the minimum instantaneous
318 pressure value to match the recorded minimum pressure value
319 exactly.</p><p>MicroPeak samples pressure every 96ms, but stores only every
320 other sample in the EEPROM. This provides for 251 pressure
321 samples at 192ms intervals, or 48.192s of storage. The clock
322 used for these samples is a factory calibrated RC circuit
323 built into the ATtiny85 and is accurate only to within ±10% at
324 25°C. So, you can count on the pressure data being accurate,
325 but speed or acceleration data computed from this will be
326 limited by the accuracy of this clock.</p></div></div></body></html>