altos: Note that Lithium battery may be included with MicroPeak
[fw/altos] / doc / micropeak.xsl
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3   "/usr/share/xml/docbook/schema/dtd/4.5/docbookx.dtd">
4 <book>
5   <title>MicroPeak Owner's Manual</title>
6   <subtitle>A peak-recording altimeter for hobby rocketry</subtitle>
7   <bookinfo>
8     <author>
9       <firstname>Keith</firstname>
10       <surname>Packard</surname>
11     </author>
12     <copyright>
13       <year>2012</year>
14       <holder>Bdale Garbee and Keith Packard</holder>
15     </copyright>
16     <legalnotice>
17       <para>
18         This document is released under the terms of the
19         <ulink url="http://creativecommons.org/licenses/by-sa/3.0/">
20           Creative Commons ShareAlike 3.0
21         </ulink>
22         license.
23       </para>
24     </legalnotice>
25     <revhistory>
26       <revision>
27         <revnumber>0.1</revnumber>
28         <date>29 October 2012</date>
29         <revremark>
30           Initial release with preliminary hardware.
31         </revremark>
32       </revision>
33       <revision>
34         <revnumber>1.0</revnumber>
35         <date>18 November 2012</date>
36         <revremark>
37           Updates for version 1.0 release.
38         </revremark>
39       </revision>
40       <revision>
41         <revnumber>1.1</revnumber>
42         <date>12 December 2012</date>
43         <revremark>
44           Add comments about EEPROM storage format and programming jig.
45         </revremark>
46       </revision>
47     </revhistory>
48   </bookinfo>
49   <acknowledgements>
50     <para>
51       Thanks to John Lyngdal for suggesting that we build something like this.
52     </para>
53     <para>
54       Have fun using these products, and we hope to meet all of you
55       out on the rocket flight line somewhere.
56       <literallayout>
57 Bdale Garbee, KB0G
58 NAR #87103, TRA #12201
59
60 Keith Packard, KD7SQG
61 NAR #88757, TRA #12200
62       </literallayout>
63     </para>
64   </acknowledgements>
65   <chapter>
66     <title>Quick Start Guide</title>
67     <para>
68       MicroPeak is designed to be easy to use. Requiring no external
69       components, flying takes just a few steps
70     </para>
71     <itemizedlist>
72       <listitem>
73         <para>
74           Install the battery. Fit a CR1025 battery into the plastic
75           carrier. The positive (+) terminal should be towards the more
76           open side of the carrier. Slip the carrier into the battery
77           holder with the positive (+) terminal facing away from the
78           circuit board.
79         </para>
80       </listitem>
81       <listitem>
82         <para>
83           Install MicroPeak in your rocket. This can be as simple as
84           preparing a soft cushion of wadding inside a vented model payload
85           bay. Wherever you mount it, make sure you protect the
86           barometric sensor from corrosive ejection gasses as those
87           will damage the sensor, and shield it from light as that can
88           cause incorrect sensor readings.
89         </para>
90       </listitem>
91       <listitem>
92         <para>
93           Turn MicroPeak on. Slide the switch so that the actuator
94           covers the '1' printed on the board. MicroPeak will report
95           the maximum height of the last flight in decimeters using a
96           sequence of flashes on the LED. A sequence of short flashes
97           indicates one digit. A single long flash indicates zero. The
98           height is reported in decimeters, so the last digit will be
99           tenths of a meter. For example, if MicroPeak reports 5 4 4
100           3, then the maximum height of the last flight was 544.3m, or
101           1786 feet.
102         </para>
103       </listitem>
104       <listitem>
105         <para>
106           Finish preparing the rocket for flight. After the
107           previous flight data have been reported, MicroPeak waits for
108           30 seconds before starting to check for launch. This gives
109           you time to finish assembling the rocket. As those
110           activities might cause pressure changes inside the airframe,
111           MicroPeak might accidentally detect boost. If you need to do
112           anything to the airframe after the 30 second window passes,
113           make sure to be careful not to disturb the altimeter. The
114           LED will remain dark during the 30 second delay, but after
115           that, it will start blinking once every 3 seconds.
116         </para>
117       </listitem>
118       <listitem>
119         <para>
120           Fly the rocket. Once the rocket passes about 10m in height
121           (32 feet), the micro-controller will record the ground
122           pressure and track the pressure seen during the flight. In
123           this mode, the LED flickers rapidly. When the rocket lands,
124           and the pressure stabilizes, the micro-controller will record
125           the minimum pressure pressure experienced during the flight,
126           compute the height represented by the difference in air
127           pressure and blink that value out on the LED. After that,
128           MicroPeak powers down to conserve battery power.
129         </para>
130       </listitem>
131       <listitem>
132         <para>
133           Recover the data. Turn MicroPeak off and then back on. MicroPeak
134           will blink out the maximum height for the last flight. Turn
135           MicroPeak back off to conserve battery power.
136         </para>
137       </listitem>
138     </itemizedlist>
139   </chapter>
140   <chapter>
141     <title>Handling Precautions</title>
142     <para>
143       All Altus Metrum products are sophisticated electronic devices.  
144       When handled gently and properly installed in an air-frame, they
145       will deliver impressive results.  However, as with all electronic 
146       devices, there are some precautions you must take.
147     </para>
148     <para>
149       The CR1025 Lithium batteries have an
150       extraordinary power density.  This is great because we can fly with
151       much less battery mass... but if they are punctured
152       or their contacts are allowed to short, they can and will release their
153       energy very rapidly!
154       Thus we recommend that you take some care when handling MicroPeak
155       to keep conductive material from coming in contact with the exposed metal elements.
156     </para>
157     <para>
158       The barometric sensor used in MicroPeak is sensitive to
159       sunlight. Please consider this when designing an
160       installation. Many model rockets with payload bays use clear
161       plastic for the payload bay. Replacing these with an opaque
162       cardboard tube, painting them, or wrapping them with a layer of
163       masking tape are all reasonable approaches to keep the sensor
164       out of direct sunlight.
165     </para>
166     <para>
167       The barometric sensor sampling ports must be able to "breathe",
168       both by not being covered by foam or tape or other materials that might
169       directly block the hole on the top of the sensor, and also by having a
170       suitable static vent to outside air.
171     </para>
172     <para>
173       As with all other rocketry electronics, Altus Metrum altimeters must 
174       be protected from exposure to corrosive motor exhaust and ejection 
175       charge gasses.
176     </para>
177   </chapter>
178   <chapter>
179     <title>Technical Information</title>
180     <section>
181       <title>Barometric Sensor</title>
182       <para>
183         MicroPeak uses the Measurement Specialties MS5607 sensor. This
184         has a range of 120kPa to 1kPa with an absolute accuracy of
185         150Pa and a resolution of 2.4Pa.
186       </para>
187       <para>
188         The pressure range corresponds roughly to an altitude range of
189         -1500m (-4900 feet) to 31000m (102000 feet), while the
190         resolution is approximately 20cm (8 inches) near sea level and
191         60cm (24in) at 10000m (33000 feet).
192       </para>
193       <para>
194         Ground pressure is computed from an average of 16 samples,
195         taken while the altimeter is at rest. Flight pressure is
196         computed from an exponential IIR filter designed to smooth out
197         transients caused by mechanical stress on the barometer.
198       </para>
199     </section>
200     <section>
201       <title>Micro-controller</title>
202       <para>
203         MicroPeak uses an Atmel ATtiny85 micro-controller. This tiny
204         CPU contains 8kB of flash for the application, 512B of RAM for
205         temporary data storage and 512B of EEPROM for non-volatile
206         storage of previous flight data.
207       </para>
208       <para>
209         The ATtiny85 has a low-power mode which turns off all of the
210         clocks and powers down most of the internal components. In
211         this mode, the chip consumes only .1μA of power. MicroPeak
212         uses this mode once the flight has ended to preserve battery
213         power.
214       </para>
215     </section>
216     <section>
217       <title>Lithium Battery</title>
218       <para>
219         The CR1025 battery used by MicroPeak holes 30mAh of power,
220         which is sufficient to run for over 40 hours. Because
221         MicroPeak powers down on landing, run time includes only time
222         sitting on the launch pad or during flight.
223       </para>
224       <para>
225         The large positive terminal (+) is usually marked, while the
226         smaller negative terminal is not. Make sure you install the
227         battery with the positive terminal facing away from the
228         circuit board where it will be in contact with the metal
229         battery holder. A small pad on the circuit board makes contact
230         with the negative battery terminal.
231       </para>
232       <para>
233         Shipping restrictions may prevent us from including a CR1025
234         battery with MicroPeak. If so, many stores carry CR1025
235         batteries as they are commonly used in small electronic
236         devices such as flash lights.
237       </para>
238     </section>
239     <section>
240       <title>Atmospheric Model</title>
241       <para>
242         MicroPeak contains a fixed atmospheric model which is used to
243         convert barometric pressure into altitude. The model was
244         converted into a 469-element piece wise linear approximation
245         which is then used to compute the altitude of the ground and
246         apogee. The difference between these represents the maximum
247         height of the flight.
248       </para>
249       <para>
250         The model assumes a particular set of atmospheric conditions,
251         which while a reasonable average cannot represent the changing
252         nature of the real atmosphere. Fortunately, for flights
253         reasonably close to the ground, the effect of this global
254         inaccuracy are largely canceled out when the computed ground
255         altitude is subtracted from the computed apogee altitude, so
256         the resulting height is more accurate than either the ground
257         or apogee altitudes.
258       </para>
259     </section>
260     <section>
261       <title>Mechanical Considerations</title>
262       <para>
263         MicroPeak is designed to be rugged enough for typical rocketry
264         applications. It contains two moving parts, the battery holder
265         and the power switch, which were selected for their
266         ruggedness.
267       </para>
268       <para>
269         The MicroPeak battery holder is designed to withstand impact
270         up to 150g without breaking contact (or, worse yet, causing
271         the battery to fall out). That means it should stand up to
272         almost any launch you care to try, and should withstand fairly
273         rough landings.
274       </para>
275       <para>
276         The power switch is designed to withstand up to 50g forces in
277         any direction. Because it is a sliding switch, orienting the
278         switch perpendicular to the direction of rocket travel will
279         serve to further protect the switch from launch forces.
280       </para>
281     </section>
282     <section>
283       <title>On-board data storage</title>
284       <para>
285         The ATtiny85 has 512 bytes of non-volatile storage, separate
286         from the code storage memory. The MicroPeak firmware uses this
287         to store information about the last completed
288         flight. Barometric measurements from the ground before launch
289         and at apogee are stored, and used at power-on to compute the
290         height of the last flight.
291       </para>
292       <para>
293         In addition to the data used to present the height of the last
294         flight, MicroPeak also stores barometric information sampled
295         at regular intervals during the flight. This information can
296         be extracted from MicroPeak through any AVR programming
297         tool.
298       </para>
299       <table frame='all'>
300         <title>MicroPeak EEPROM Data Storage</title>
301         <tgroup cols='3' align='center' colsep='1' rowsep='1'>
302           <colspec align='center' colwidth='2*' colname='Address'/>
303           <colspec align='center' colwidth='*' colname='Size (bytes)'/>
304           <colspec align='left' colwidth='7*' colname='Description'/>
305           <thead>
306             <row>
307               <entry align='center'>Address</entry>
308               <entry align='center'>Size (bytes)</entry>
309               <entry align='center'>Description</entry>
310             </row>
311           </thead>
312           <tbody>
313             <row>
314               <entry>0x000</entry>
315               <entry>4</entry>
316               <entry>Average ground pressure (Pa)</entry>
317             </row>
318             <row>
319               <entry>0x004</entry>
320               <entry>4</entry>
321               <entry>Minimum flight pressure (Pa)</entry>
322             </row>
323             <row>
324               <entry>0x008</entry>
325               <entry>2</entry>
326               <entry>Number of in-flight samples</entry>
327             </row>
328             <row>
329               <entry>0x00a … 0x1fe</entry>
330               <entry>2</entry>
331               <entry>Instantaneous flight pressure (Pa) low 16 bits</entry>
332             </row>
333           </tbody>
334         </tgroup>
335       </table>
336       <para>
337         All EEPROM data are stored least-significant byte first. The
338         instantaneous flight pressure data are stored without the
339         upper 16 bits of data. The upper bits can be reconstructed
340         from the previous sample, assuming that pressure doesn't
341         change by more more than 32kPa in a single sample
342         interval. Note that this pressure data is <emphasis>not</emphasis>
343         filtered in any way, while both the recorded ground and apogee
344         pressure values are, so you shouldn't expect the minimum
345         instantaneous pressure value to match the recorded minimum
346         pressure value exactly.
347       </para>
348       <para>
349         MicroPeak samples pressure every 96ms, but stores only every
350         other sample in the EEPROM. This provides for 251 pressure
351         samples at 192ms intervals, or 48.192s of storage. The clock
352         used for these samples is a factory calibrated RC circuit
353         built into the ATtiny85 and is accurate only to within ±10% at
354         25°C. So, you can count on the pressure data being accurate,
355         but speed or acceleration data computed from this will be
356         limited by the accuracy of this clock.
357       </para>
358     </section>
359     <section>
360       <title>MicroPeak Programming Interface</title>
361       <para>
362         MicroPeak exposes a standard 6-pin AVR programming interface,
363         but not using the usual 2x3 array of pins on 0.1"
364         centers. Instead, there is a single row of tiny 0.60mm ×
365         0.85mm pads on 1.20mm centers exposed near the edge of the
366         circuit board. We couldn't find any connector that was
367         small enough to include on the circuit board.
368       </para>
369       <para>
370         In lieu of an actual connector, the easiest way to connect to
371         the bare pads is through a set of Pogo pins. These
372         spring-loaded contacts are designed to connect in precisely
373         this way. We've designed a programming jig, the MicroPeak
374         Pogo Pin board which provides a standard AVR interface on one
375         end and a recessed slot for MicroPeak to align the board with
376         the Pogo Pins.
377       </para>
378       <para>
379         The MicroPeak Pogo Pin board is not a complete AVR programmer,
380         it is an interface board that provides a 3.3V regulated power
381         supply to run the MicroPeak via USB and a standard 6-pin AVR
382         programming interface with the usual 2x3 grid of pins on 0.1"
383         centers. This can be connected to any AVR programming
384         dongle.
385       </para>
386       <para>
387         The AVR programming interface cannot run faster than ¼ of the
388         AVR CPU clock frequency. Because MicroPeak runs at 250kHz to
389         save power, you must configure your AVR programming system to
390         clock the AVR programming interface at no faster than
391         62.5kHz, or a clock period of 32µS.
392       </para>
393     </section>
394   </chapter>
395 </book>
396 <!--  LocalWords:  Altusmetrum MicroPeak
397 -->