update docs
[web/altusmetrum] / AltOS / doc / micropeak.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <meta name="generator" content="Asciidoctor 2.0.10">
8 <meta name="author" content="Keith Packard, Bdale Garbee">
9 <meta name="copyright" content="Bdale Garbee and Keith Packard 2020">
10 <title>MicroPeak Owner&#8217;s Manual</title>
11 <link rel="stylesheet" href="./am.css">
12 </head>
13 <body class="book">
14 <div id="header">
15 <h1>MicroPeak Owner&#8217;s Manual</h1>
16 <div class="details">
17 <span id="author" class="author">Keith Packard</span><br>
18 <span id="email" class="email"><a href="mailto:keithp@keithp.com">keithp@keithp.com</a></span><br>
19 <span id="author2" class="author">Bdale Garbee</span><br>
20 <span id="email2" class="email"><a href="mailto:bdale@gag.com">bdale@gag.com</a></span><br>
21 <span id="revnumber">version v1.9.3,</span>
22 <span id="revdate">15 Jun 2020</span>
23 </div>
24 <div id="toc" class="toc">
25 <div id="toctitle">Table of Contents</div>
26 <ul class="sectlevel1">
27 <li><a href="#_license">License</a></li>
28 <li><a href="#_acknowledgements">Acknowledgements</a></li>
29 <li><a href="#_using_micropeak">1. Using MicroPeak</a></li>
30 <li><a href="#_the_micropeak_usb_adapter">2. The MicroPeak USB adapter</a>
31 <ul class="sectlevel2">
32 <li><a href="#_installing_the_micropeak_software">2.1. Installing the MicroPeak software</a></li>
33 <li><a href="#_downloading_micro_peak_data">2.2. Downloading Micro Peak data</a></li>
34 <li><a href="#_analyzing_micropeak_data">2.3. Analyzing MicroPeak Data</a></li>
35 <li><a href="#_setting_micropeak_preferences">2.4. Setting MicroPeak Preferences</a></li>
36 </ul>
37 </li>
38 <li><a href="#_protecting_micropeak_from_sunlight">3. Protecting MicroPeak from Sunlight</a></li>
39 <li><a href="#_handling_precautions">Appendix A: Handling Precautions</a></li>
40 <li><a href="#_technical_information">Appendix B: Technical Information</a>
41 <ul class="sectlevel2">
42 <li><a href="#_barometric_sensor">B.1. Barometric Sensor</a></li>
43 <li><a href="#_micro_controller">B.2. Micro-controller</a></li>
44 <li><a href="#_lithium_battery">B.3. Lithium Battery</a></li>
45 <li><a href="#_atmospheric_model">B.4. Atmospheric Model</a></li>
46 <li><a href="#_mechanical_considerations">B.5. Mechanical Considerations</a></li>
47 <li><a href="#_micropeak_programming_interface">B.6. MicroPeak Programming Interface</a></li>
48 </ul>
49 </li>
50 <li><a href="#_on_board_data_storage">Appendix C: On-board data storage</a></li>
51 </ul>
52 </div>
53 </div>
54 <div id="content">
55 <div id="preamble">
56 <div class="sectionbody">
57 <div id="logo" class="imageblock">
58 <div class="content">
59 <a class="image" href="https://altusmetrum.org"><img src="altusmetrum-oneline.svg" alt="Altus Metrum"></a>
60 </div>
61 </div>
62 </div>
63 </div>
64 <div class="sect1">
65 <h2 id="_license">License</h2>
66 <div class="sectionbody">
67 <div class="paragraph">
68 <p>Copyright © 2018 Bdale Garbee and Keith Packard</p>
69 </div>
70 <div class="paragraph">
71 <p>This document is released under the terms of the <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons ShareAlike 3.0 License</a></p>
72 </div>
73 </div>
74 </div>
75 <div class="sect1">
76 <h2 id="_acknowledgements">Acknowledgements</h2>
77 <div class="sectionbody">
78 <div class="paragraph">
79 <p>Thanks to John Lyngdal for suggesting that we build something
80 like this.</p>
81 </div>
82 <div class="paragraph">
83 <p>Have fun using these products, and we hope to meet all of you
84 out on the rocket flight line somewhere.</p>
85 </div>
86 <div class="verseblock">
87 <pre class="content">Bdale Garbee, KB0G
88 NAR #87103, TRA #12201</pre>
89 </div>
90 <div class="verseblock">
91 <pre class="content">Keith Packard, KD7SQG
92 NAR #88757, TRA #12200</pre>
93 </div>
94 </div>
95 </div>
96 <div class="sect1">
97 <h2 id="_using_micropeak">1. Using MicroPeak</h2>
98 <div class="sectionbody">
99 <div class="paragraph">
100 <p>MicroPeak is designed to be easy to use. Requiring no external
101 components, flying takes just a few steps</p>
102 </div>
103 <div class="dlist">
104 <dl>
105 <dt class="hdlist1">Install the battery</dt>
106 <dd>
107 <p>Fit a CR1025 battery into the plastic carrier. The positive
108 (+) terminal should be towards the more open side of the
109 carrier. Slip the carrier into the battery holder with the
110 positive (+) terminal facing away from the circuit board.</p>
111 </dd>
112 </dl>
113 </div>
114 <div class="imageblock">
115 <div class="content">
116 <img src="micropeak-back.jpg" alt="micropeak back" width="430">
117 </div>
118 <div class="title">Figure 1. MicroPeak and Battery</div>
119 </div>
120 <div class="dlist">
121 <dl>
122 <dt class="hdlist1">Install MicroPeak in your rocket</dt>
123 <dd>
124 <p>This can be as simple as preparing a soft cushion of wadding
125 inside a vented model payload bay. Wherever you mount it,
126 make sure you protect the barometric sensor from corrosive
127 ejection gasses as those will damage the sensor, and shield
128 it from light as that can cause incorrect sensor readings.</p>
129 </dd>
130 <dt class="hdlist1">Turn MicroPeak on</dt>
131 <dd>
132 <p>Slide the switch so that the actuator covers the '1' printed
133 on the board. MicroPeak will report the maximum height of
134 the last flight in decimeters using a sequence of flashes on
135 the LED. A sequence of short flashes indicates one digit. A
136 single long flash indicates zero. The height is reported in
137 decimeters, so the last digit will be tenths of a meter. For
138 example, if MicroPeak reports 5 4 4 3, then the maximum
139 height of the last flight was 544.3m, or 1786 feet.</p>
140 </dd>
141 <dt class="hdlist1">Finish preparing the rocket for flight</dt>
142 <dd>
143 <p>After the previous flight data have been reported, MicroPeak
144 waits for one minute before starting to check for
145 launch. This gives you time to finish assembling the
146 rocket. As those activities might cause pressure changes
147 inside the airframe, MicroPeak might accidentally detect
148 boost. If you need to do anything to the airframe after the
149 one minute window passes, make sure to be careful not to
150 disturb the altimeter. The LED will remain dark during the
151 one minute delay, but after that, it will start blinking
152 once every 3 seconds.</p>
153 </dd>
154 <dt class="hdlist1">Fly the rocket</dt>
155 <dd>
156 <p>Once the rocket passes about 30m in height (100 feet), the
157 micro-controller will record the ground pressure and track
158 the pressure seen during the flight. In this mode, the LED
159 flickers rapidly. When the rocket lands, and the pressure
160 stabilizes, the micro-controller will record the minimum
161 pressure pressure experienced during the flight, compute the
162 height represented by the difference in air pressure and
163 blink that value out on the LED. After that, MicroPeak
164 powers down to conserve battery power.</p>
165 </dd>
166 <dt class="hdlist1">Recover the data</dt>
167 <dd>
168 <p>Turn MicroPeak off and then back on. MicroPeak will blink
169 out the maximum height for the last flight. Turn MicroPeak
170 back off to conserve battery power.</p>
171 </dd>
172 </dl>
173 </div>
174 </div>
175 </div>
176 <div class="sect1">
177 <h2 id="_the_micropeak_usb_adapter">2. The MicroPeak USB adapter</h2>
178 <div class="sectionbody">
179 <div class="imageblock text-center">
180 <div class="content">
181 <img src="MicroPeakUSB-2.0.jpg" alt="MicroPeakUSB 2.0" width="430">
182 </div>
183 <div class="title">Figure 2. MicroPeak USB Adapter</div>
184 </div>
185 <div class="paragraph">
186 <p>MicroPeak stores barometric pressure information for the first
187 48 seconds of the flight in on-board non-volatile memory. The
188 contents of this memory can be downloaded to a computer using
189 the MicroPeak USB adapter.</p>
190 </div>
191 <div class="sect2">
192 <h3 id="_installing_the_micropeak_software">2.1. Installing the MicroPeak software</h3>
193 <div class="paragraph">
194 <p>The MicroPeak application runs on Linux, Mac OS X and
195 Windows. You can download the latest version from
196 <a href="http://altusmetrum.org/MicroPeak" class="bare">http://altusmetrum.org/MicroPeak</a></p>
197 </div>
198 <div class="paragraph">
199 <p>On Mac OS X and Windows, the FTDI USB device driver
200 needs to be installed. A compatible version of this
201 driver is included with the MicroPeak application, but
202 you may want to download a newer version from
203 <a href="http://www.ftdichip.com/FTDrivers.htm" class="bare">http://www.ftdichip.com/FTDrivers.htm</a></p>
204 </div>
205 </div>
206 <div class="sect2">
207 <h3 id="_downloading_micro_peak_data">2.2. Downloading Micro Peak data</h3>
208 <div class="ulist">
209 <ul>
210 <li>
211 <p>Plug the MicroPeak USB adapter in to your computer.</p>
212 </li>
213 <li>
214 <p>Start the MicroPeak application.</p>
215 </li>
216 </ul>
217 </div>
218 <div class="imageblock text-center">
219 <div class="content">
220 <img src="micropeak-nofont.svg" alt="micropeak nofont" width="50">
221 </div>
222 </div>
223 <div class="ulist">
224 <ul>
225 <li>
226 <p>Click on the Download button at the top of the
227 window.</p>
228 </li>
229 </ul>
230 </div>
231 <div class="imageblock text-center">
232 <div class="content">
233 <img src="micropeak-app.png" alt="micropeak app" width="430">
234 </div>
235 <div class="title">Figure 3. MicroPeak Application</div>
236 </div>
237 <div class="ulist">
238 <ul>
239 <li>
240 <p>Select from the listed devices. There will probably
241 be only one.</p>
242 </li>
243 </ul>
244 </div>
245 <div class="imageblock text-center">
246 <div class="content">
247 <img src="micropeak-device-dialog.png" alt="micropeak device dialog" width="220">
248 </div>
249 <div class="title">Figure 4. MicroPeak Device Dialog</div>
250 </div>
251 <div class="ulist">
252 <ul>
253 <li>
254 <p>The application will now wait until it receives
255 valid data from the MicroPeak USB adapter.</p>
256 </li>
257 </ul>
258 </div>
259 <div class="imageblock text-center">
260 <div class="content">
261 <img src="micropeak-download.png" alt="micropeak download" width="200">
262 </div>
263 <div class="title">Figure 5. MicroPeak Download Dialog</div>
264 </div>
265 <div class="ulist">
266 <ul>
267 <li>
268 <p>The MicroPeak USB adapter has a small
269 phototransistor under the hole in the center of the
270 box.  Locate this, turn on the MicroPeak and place
271 the orange LED on the MicroPeak directly inside the
272 hole, resting the MicroPeak itself on the box. You
273 should see the blue LED on the MicroPeak USB adapter
274 blinking in time with the orange LED on the
275 MicroPeak board itself.</p>
276 </li>
277 </ul>
278 </div>
279 <div class="imageblock text-center">
280 <div class="content">
281 <img src="MicroPeakUSB-2.0-inuse.jpg" alt="MicroPeakUSB 2.0 inuse" width="430">
282 </div>
283 <div class="title">Figure 6. MicroPeak Downloading</div>
284 </div>
285 <div class="ulist">
286 <ul>
287 <li>
288 <p>After the maximum flight height is reported,
289 MicroPeak will pause for a few seconds, blink the
290 LED four times rapidly and then send the data in one
291 long blur on the LED. The MicroPeak application
292 should receive the data. When it does, it will
293 present the data in a graph and offer to save the
294 data to a file. If not, you can power cycle the
295 MicroPeak board and try again.</p>
296 </li>
297 </ul>
298 </div>
299 <div class="imageblock text-center">
300 <div class="content">
301 <img src="micropeak-save-dialog.png" alt="micropeak save dialog" width="220">
302 </div>
303 <div class="title">Figure 7. MicroPeak Save Dialog</div>
304 </div>
305 <div class="ulist">
306 <ul>
307 <li>
308 <p>Once the data are saved, a graph will be displayed
309 with height, speed and acceleration values computed
310 from the recorded barometric pressure data. See
311 &lt;&lt;_analyzing_micropeak_data&gt; for more details on that.</p>
312 </li>
313 </ul>
314 </div>
315 </div>
316 <div class="sect2">
317 <h3 id="_analyzing_micropeak_data">2.3. Analyzing MicroPeak Data</h3>
318 <div class="paragraph">
319 <p>The MicroPeak application can present flight data in
320 the form of a graph, a collection of computed
321 statistics or in tabular form.</p>
322 </div>
323 <div class="paragraph">
324 <p>MicroPeak collects raw barometric pressure data which
325 is then used to compute the remaining data. Altitude
326 is computed through a standard atmospheric
327 model. Absolute error in this data will be affected by
328 local atmospheric conditions. Fortunately, these
329 errors tend to mostly cancel out, so the error in the
330 height computation is much smaller than the error in
331 altitude would be.</p>
332 </div>
333 <div class="paragraph">
334 <p>Speed and acceleration are computed by first smoothing
335 the height data with a Gaussian window averaging
336 filter. For speed data, this average uses seven
337 samples. For acceleration data, eleven samples are
338 used. These were chosen to provide reasonably smooth
339 speed and acceleration data, which would otherwise be
340 swamped with noise.</p>
341 </div>
342 <div class="paragraph">
343 <p>The File menu has operations to open existing flight
344 logs, Download new data from MicroPeak, Save a copy of
345 the flight log to a new file, Export the tabular data
346 (as seen in the Raw Data tab) to a file, change the
347 application Preferences, Close the current window or
348 close all windows and Exit the application.</p>
349 </div>
350 <div class="sect3">
351 <h4 id="_micropeak_graphs">2.3.1. MicroPeak Graphs</h4>
352 <div class="imageblock text-center">
353 <div class="content">
354 <img src="micropeak-graph.png" alt="micropeak graph" width="430">
355 </div>
356 <div class="title">Figure 8. MicroPeak Graph</div>
357 </div>
358 <div class="paragraph">
359 <p>Under the Graph tab, the height, speed and acceleration values
360 are displayed together. You can zoom in on the graph by
361 clicking and dragging to sweep out an area of
362 interest. Right-click on the plot to bring up a menu that will
363 let you save, copy or print the graph.</p>
364 </div>
365 </div>
366 <div class="sect3">
367 <h4 id="_micropeak_flight_statistics">2.3.2. MicroPeak Flight Statistics</h4>
368 <div class="imageblock text-center">
369 <div class="content">
370 <img src="micropeak-statistics.png" alt="micropeak statistics" width="430">
371 </div>
372 <div class="title">Figure 9. MicroPeak Flight Statistics</div>
373 </div>
374 <div class="paragraph">
375 <p>The Statistics tab presents overall data from
376 the flight. Note that the Maximum height value
377 is taken from the minumum pressure captured in
378 flight, and may be different from the apparant
379 apogee value as the on-board data are sampled
380 twice as fast as the recorded values, or
381 because the true apogee occurred after the
382 on-board memory was full. Each value is
383 presented in several units as appropriate.</p>
384 </div>
385 </div>
386 <div class="sect3">
387 <h4 id="_raw_flight_data">2.3.3. Raw Flight Data</h4>
388 <div class="imageblock text-center">
389 <div class="content">
390 <img src="micropeak-raw-data.png" alt="micropeak raw data" width="430">
391 </div>
392 <div class="title">Figure 10. MicroPeak Raw Flight Data</div>
393 </div>
394 <div class="paragraph">
395 <p>A table consisting of the both the raw barometric pressure
396 data and values computed from that for each recorded time.</p>
397 </div>
398 </div>
399 <div class="sect3">
400 <h4 id="_configuring_the_graph">2.3.4. Configuring the Graph</h4>
401 <div class="imageblock text-center">
402 <div class="content">
403 <img src="micropeak-graph-configure.png" alt="micropeak graph configure" width="430">
404 </div>
405 <div class="title">Figure 11. MicroPeak Graph Configuration</div>
406 </div>
407 <div class="paragraph">
408 <p>This selects which graph elements to show, and lets you
409 switch between metric and imperial units</p>
410 </div>
411 </div>
412 </div>
413 <div class="sect2">
414 <h3 id="_setting_micropeak_preferences">2.4. Setting MicroPeak Preferences</h3>
415 <div class="imageblock text-center">
416 <div class="content">
417 <img src="micropeak-preferences.png" alt="micropeak preferences" width="170">
418 </div>
419 <div class="title">Figure 12. MicroPeak Preferences</div>
420 </div>
421 <div class="paragraph">
422 <p>The MicroPeak application has a few user settings which are
423 configured through the Preferences dialog, which can be
424 accessed from the File menu.</p>
425 </div>
426 <div class="dlist">
427 <dl>
428 <dt class="hdlist1">Log Directory</dt>
429 <dd>
430 <p>The Log Directory is where flight data will be
431 saved to and loaded from by default. Of
432 course, you can always navigate to other
433 directories in the file chooser windows, this
434 setting is just the starting point.</p>
435 </dd>
436 <dt class="hdlist1">Imperial Units</dt>
437 <dd>
438 <p>If you prefer to see your graph data in feet
439 and miles per hour instead of meters and
440 meters per second, you can select Imperial
441 Units.</p>
442 </dd>
443 <dt class="hdlist1">Serial Debug</dt>
444 <dd>
445 <p>To see what data is actually arriving over the
446 serial port, start the MicroPeak application
447 from a command prompt and select the Serial
448 Debug option. This can be useful in debugging
449 serial communication problems, but most people
450 need never choose this.</p>
451 </dd>
452 <dt class="hdlist1">Font Size</dt>
453 <dd>
454 <p>You can adjust the size of the text in the
455 Statistics tab by changing the Font size
456 preference. There are three settings, with
457 luck one will both fit on your screen and
458 provide readable values.</p>
459 </dd>
460 <dt class="hdlist1">Look &amp; Feel</dt>
461 <dd>
462 <p>The Look &amp; feel menu shows a list of available
463 application appearance choices. By default,
464 the MicroPeak application tries to blend in
465 with other applications, but you may choose
466 some other appearance if you like.</p>
467 </dd>
468 </dl>
469 </div>
470 <div class="paragraph">
471 <p>Note that MicroPeak shares a subset of the
472 AltosUI preferences, so if you use both of
473 these applications, change in one application
474 will affect the other.</p>
475 </div>
476 </div>
477 </div>
478 </div>
479 <div class="sect1">
480 <h2 id="_protecting_micropeak_from_sunlight">3. Protecting MicroPeak from Sunlight</h2>
481 <div class="sectionbody">
482 <div class="paragraph">
483 <p>The MS5607 barometric sensor is sensitive to direct light. When light
484 shines through the holes in the cover to the components inside, the
485 reported pressure can vary wildly from the actual pressure. This
486 causes the reported altitude to have errors of thousands of
487 feet.</p>
488 </div>
489 <div class="paragraph">
490 <p>MicroPeak should be installed in an opaque compartment in the airframe
491 and not subjected to sunlight. Alternatively, a small piece of
492 adhesive-backed open-cell foam can be attached to the device so that
493 it covers the barometric sensor and protects it from direct light.</p>
494 </div>
495 <div class="paragraph">
496 <p>Here&#8217;s what happens when MicroPeak is exposed to sunlight. At apogee,
497 I exposed MicroPeak to varying amounts of sunlight and you can see the
498 wild swings in altitude resulting from that:</p>
499 </div>
500 <div class="imageblock">
501 <div class="content">
502 <img src="micropeak-flight-nofoam.png" alt="micropeak flight nofoam" width="430">
503 </div>
504 <div class="title">Figure 13. MicroPeak in Sunlight</div>
505 </div>
506 <div class="paragraph">
507 <p>You can carefully cutting a piece of adhesive-backed open-cell foam
508 and attach it to MicroPeak. It&#8217;s important to press the adhesive to
509 the circuit board and not to the top of the barometric sensor or the
510 sensor may become blocked and not operate at all. Once you&#8217;ve attached
511 the foam, you should test MicroPeak on the ground to make sure it&#8217;s
512 still working.</p>
513 </div>
514 <div class="imageblock">
515 <div class="content">
516 <img src="micropeak-foam.jpg" alt="micropeak foam" width="430">
517 </div>
518 <div class="title">Figure 14. MicroPeak with Foam</div>
519 </div>
520 <div class="paragraph">
521 <p>That MicroPeak was in the same barometric chamber as the one which
522 generated the above results and the resulting flight data looks
523 correct:</p>
524 </div>
525 <div class="imageblock">
526 <div class="content">
527 <img src="micropeak-flight-foam.png" alt="micropeak flight foam" width="430">
528 </div>
529 <div class="title">Figure 15. MicroPeak in Sunlight with Foam</div>
530 </div>
531 </div>
532 </div>
533 <div class="sect1">
534 <h2 id="_handling_precautions">Appendix A: Handling Precautions</h2>
535 <div class="sectionbody">
536 <div class="paragraph">
537 <p>All Altus Metrum products are sophisticated electronic
538 devices.  When handled gently and properly installed in an
539 air-frame, they will deliver impressive results.  However, as
540 with all electronic devices, there are some precautions you
541 must take.</p>
542 </div>
543 <div class="admonitionblock warning">
544 <table>
545 <tr>
546 <td class="icon">
547 <div class="title">Warning</div>
548 </td>
549 <td class="content">
550 The CR1025 Lithium batteries have an extraordinary power
551 density.  This is great because we can fly with much less
552 battery mass&#8230;&#8203; but if they are punctured or their contacts
553 are allowed to short, they can and will release their energy
554 very rapidly!  Thus we recommend that you take some care when
555 handling MicroPeak to keep conductive material from coming in
556 contact with the exposed metal elements.
557 </td>
558 </tr>
559 </table>
560 </div>
561 <div class="paragraph">
562 <p>The barometric sensor used in MicroPeak is sensitive to
563 sunlight. Please consider this when designing an
564 installation. Many model rockets with payload bays use clear
565 plastic for the payload bay. Replacing these with an opaque
566 cardboard tube, painting them, or wrapping them with a layer
567 of masking tape are all reasonable approaches to keep the
568 sensor out of direct sunlight.</p>
569 </div>
570 <div class="paragraph">
571 <p>The barometric sensor sampling ports must be able to
572 "breathe", both by not being covered by solid foam or tape or
573 other materials that might directly block the hole on the top
574 of the sensor, and also by having a suitable static vent to
575 outside air.</p>
576 </div>
577 <div class="paragraph">
578 <p>One good solution is to use a small rectangle of Poron
579 50-30031-12X12P or equivalent to cover the sensor.  This is an
580 open cell foam in 1/32" thickness with an adhesive backing.  It
581 seems to do a good job of blocking sun while still allowing
582 airflow to and from the sensor internals.</p>
583 </div>
584 <div class="paragraph">
585 <p>As with all other rocketry electronics, Altus Metrum
586 altimeters must be protected from exposure to corrosive motor
587 exhaust and ejection charge gasses.</p>
588 </div>
589 </div>
590 </div>
591 <div class="sect1">
592 <h2 id="_technical_information">Appendix B: Technical Information</h2>
593 <div class="sectionbody">
594 <div class="sect2">
595 <h3 id="_barometric_sensor">B.1. Barometric Sensor</h3>
596 <div class="paragraph">
597 <p>MicroPeak uses the Measurement Specialties MS5607
598 sensor. This has a range of 120kPa to 1kPa with an
599 absolute accuracy of 150Pa and a resolution of 2.4Pa.</p>
600 </div>
601 <div class="paragraph">
602 <p>The pressure range corresponds roughly to an altitude
603 range of -1500m (-4900 feet) to 31000m (102000 feet),
604 while the resolution is approximately 20cm (8 inches)
605 near sea level and 60cm (24in) at 10000m (33000 feet).</p>
606 </div>
607 <div class="paragraph">
608 <p>Ground pressure is computed from an average of 16
609 samples, taken while the altimeter is at rest. The
610 flight pressure used to report maximum height is
611 computed from a Kalman filter designed to smooth out
612 any minor noise in the sensor values. The flight
613 pressure recorded to non-volatile storage is
614 unfiltered, coming directly from the pressure sensor.</p>
615 </div>
616 </div>
617 <div class="sect2">
618 <h3 id="_micro_controller">B.2. Micro-controller</h3>
619 <div class="paragraph">
620 <p>MicroPeak uses an Atmel ATtiny85
621 micro-controller. This tiny CPU contains 8kB of flash
622 for the application, 512B of RAM for temporary data
623 storage and 512B of EEPROM for non-volatile storage of
624 previous flight data.</p>
625 </div>
626 <div class="paragraph">
627 <p>The ATtiny85 has a low-power mode which turns off all
628 of the clocks and powers down most of the internal
629 components. In this mode, the chip consumes only .1μA
630 of power. MicroPeak uses this mode once the flight has
631 ended to preserve battery power.</p>
632 </div>
633 </div>
634 <div class="sect2">
635 <h3 id="_lithium_battery">B.3. Lithium Battery</h3>
636 <div class="paragraph">
637 <p>The CR1025 battery used by MicroPeak holds 30mAh of
638 power, which is sufficient to run for over 40
639 hours. Because MicroPeak powers down on landing, run
640 time includes only time sitting on the launch pad or
641 during flight.</p>
642 </div>
643 <div class="paragraph">
644 <p>The large positive terminal (+) is usually marked,
645 while the smaller negative terminal is not. Make sure
646 you install the battery with the positive terminal
647 facing away from the circuit board where it will be in
648 contact with the metal battery holder. A small pad on
649 the circuit board makes contact with the negative
650 battery terminal.</p>
651 </div>
652 <div class="paragraph">
653 <p>Shipping restrictions may prevent us from including a
654 CR1025 battery with MicroPeak. If so, many stores
655 carry CR1025 batteries as they are commonly used in
656 small electronic devices such as flash lights.</p>
657 </div>
658 </div>
659 <div class="sect2">
660 <h3 id="_atmospheric_model">B.4. Atmospheric Model</h3>
661 <div class="paragraph">
662 <p>MicroPeak contains a fixed atmospheric model which is
663 used to convert barometric pressure into altitude. The
664 model was converted into a 469-element piece-wise
665 linear approximation which is then used to compute the
666 altitude of the ground and apogee. The difference
667 between these represents the maximum height of the
668 flight.</p>
669 </div>
670 <div class="paragraph">
671 <p>The model assumes a particular set of atmospheric
672 conditions, which, while a reasonable average, cannot
673 represent the changing nature of the real
674 atmosphere. Fortunately, for flights reasonably close
675 to the ground, the effect of this global inaccuracy
676 are largely canceled out when the computed ground
677 altitude is subtracted from the computed apogee
678 altitude, so the resulting height is more accurate
679 than either the ground or apogee altitudes.</p>
680 </div>
681 <div class="paragraph">
682 <p>Because the raw pressure data is recorded to
683 non-volatile storage, you can use that, along with a
684 more sophisticated atmospheric model, to compute your
685 own altitude values.</p>
686 </div>
687 </div>
688 <div class="sect2">
689 <h3 id="_mechanical_considerations">B.5. Mechanical Considerations</h3>
690 <div class="paragraph">
691 <p>MicroPeak is designed to be rugged enough for typical
692 rocketry applications. It contains two moving parts,
693 the battery holder and the power switch, which were
694 selected for their ruggedness.</p>
695 </div>
696 <div class="paragraph">
697 <p>The MicroPeak battery holder is designed to withstand
698 impact up to 150g without breaking contact (or, worse
699 yet, causing the battery to fall out). That means it
700 should stand up to almost any launch you care to try,
701 and should withstand fairly rough landings.</p>
702 </div>
703 <div class="paragraph">
704 <p>The power switch is designed to withstand up to 50g
705 forces in any direction. Because it is a sliding
706 switch, orienting the switch perpendicular to the
707 direction of rocket travel will serve to further
708 protect the switch from launch forces.</p>
709 </div>
710 </div>
711 <div class="sect2">
712 <h3 id="_micropeak_programming_interface">B.6. MicroPeak Programming Interface</h3>
713 <div class="paragraph">
714 <p>MicroPeak exposes a standard 6-pin AVR programming
715 interface, but not using the usual 2x3 array of pins
716 on 0.1" centers. Instead, there is a single row of
717 tiny 0.60mm × 0.85mm pads on 1.20mm centers exposed
718 near the edge of the circuit board. We couldn&#8217;t find
719 any connector that was small enough to include on the
720 circuit board.</p>
721 </div>
722 <div class="paragraph">
723 <p>In lieu of an actual connector, the easiest way to
724 connect to the bare pads is through a set of Pogo
725 pins. These spring-loaded contacts are designed to
726 connect in precisely this way. We&#8217;ve designed a
727 programming jig, the MicroPeak Pogo Pin board which
728 provides a standard AVR interface on one end and a
729 recessed slot for MicroPeak to align the board with
730 the Pogo Pins.</p>
731 </div>
732 <div class="paragraph">
733 <p>The MicroPeak Pogo Pin board is not a complete AVR
734 programmer, it is an interface board that provides a
735 3.3V regulated power supply to run the MicroPeak via
736 USB and a standard 6-pin AVR programming interface
737 with the usual 2x3 grid of pins on 0.1" centers. This
738 can be connected to any AVR programming dongle.</p>
739 </div>
740 <div class="paragraph">
741 <p>The AVR programming interface cannot run faster than ¼
742 of the AVR CPU clock frequency. Because MicroPeak runs
743 at 250kHz to save power, you must configure your AVR
744 programming system to clock the AVR programming
745 interface at no faster than 62.5kHz, or a clock period
746 of 32µS.</p>
747 </div>
748 </div>
749 </div>
750 </div>
751 <div class="sect1">
752 <h2 id="_on_board_data_storage">Appendix C: On-board data storage</h2>
753 <div class="sectionbody">
754 <div class="paragraph">
755 <p>The ATtiny85 has 512 bytes of non-volatile storage, separate
756 from the code storage memory. The MicroPeak firmware uses this
757 to store information about the last completed
758 flight. Barometric measurements from the ground before launch
759 and at apogee are stored, and used at power-on to compute the
760 height of the last flight.</p>
761 </div>
762 <div class="paragraph">
763 <p>In addition to the data used to present the height of the last
764 flight, MicroPeak also stores barometric information sampled
765 at regular intervals during the flight. This is the
766 information captured with the MicroPeak USB adapter. It can
767 also be read from MicroPeak through any AVR programming tool.</p>
768 </div>
769 <table class="tableblock frame-all grid-all stretch">
770 <caption class="title">Table 1. MicroPeak EEPROM Data Storage</caption>
771 <colgroup>
772 <col style="width: 20%;">
773 <col style="width: 10%;">
774 <col style="width: 70%;">
775 </colgroup>
776 <tbody>
777 <tr>
778 <td class="tableblock halign-left valign-top"><p class="tableblock">Address</p></td>
779 <td class="tableblock halign-left valign-top"><p class="tableblock">Size (bytes)</p></td>
780 <td class="tableblock halign-left valign-top"><p class="tableblock">Description</p></td>
781 </tr>
782 <tr>
783 <td class="tableblock halign-left valign-top"><p class="tableblock">0x000</p></td>
784 <td class="tableblock halign-left valign-top"><p class="tableblock">4</p></td>
785 <td class="tableblock halign-left valign-top"><p class="tableblock">Average ground pressure (Pa)</p></td>
786 </tr>
787 <tr>
788 <td class="tableblock halign-left valign-top"><p class="tableblock">0x004</p></td>
789 <td class="tableblock halign-left valign-top"><p class="tableblock">4</p></td>
790 <td class="tableblock halign-left valign-top"><p class="tableblock">Minimum flight pressure (Pa)</p></td>
791 </tr>
792 <tr>
793 <td class="tableblock halign-left valign-top"><p class="tableblock">0x008</p></td>
794 <td class="tableblock halign-left valign-top"><p class="tableblock">2</p></td>
795 <td class="tableblock halign-left valign-top"><p class="tableblock">Number of in-flight samples</p></td>
796 </tr>
797 <tr>
798 <td class="tableblock halign-left valign-top"><p class="tableblock">0x00a … 0x1fe</p></td>
799 <td class="tableblock halign-left valign-top"><p class="tableblock">2</p></td>
800 <td class="tableblock halign-left valign-top"><p class="tableblock">Instantaneous flight pressure (Pa) low 16 bits</p></td>
801 </tr>
802 </tbody>
803 </table>
804 <div class="paragraph">
805 <p>All EEPROM data are stored least-significant byte first. The
806 instantaneous flight pressure data are stored without the
807 upper 16 bits of data. The upper bits can be reconstructed
808 from the previous sample, assuming that pressure doesn&#8217;t
809 change by more more than 32kPa in a single sample
810 interval. Note that this pressure data is <strong>not</strong> filtered in
811 any way, while both the recorded ground and apogee pressure
812 values are, so you shouldn&#8217;t expect the minimum instantaneous
813 pressure value to match the recorded minimum pressure value
814 exactly.</p>
815 </div>
816 <div class="paragraph">
817 <p>MicroPeak samples pressure every 96ms, but stores only every
818 other sample in the EEPROM. This provides for 251 pressure
819 samples at 192ms intervals, or 48.192s of storage. The clock
820 used for these samples is a factory calibrated RC circuit
821 built into the ATtiny85 and is accurate only to within ±10% at
822 25°C. So, you can count on the pressure data being accurate,
823 but speed or acceleration data computed from this will be
824 limited by the accuracy of this clock.</p>
825 </div>
826 </div>
827 </div>
828 </div>
829 <div id="footer">
830 <div id="footer-text">
831 Version v1.9.3<br>
832 Last updated 2020-06-15 20:50:28 -0600
833 </div>
834 </div>
835 </body>
836 </html>