doc: Update MicroPeak doc to include EEPROM and programming info
[fw/altos] / doc / micropeak.xsl
index 2faef41c25c4e3218f458c7af51ce51b5aa6360b..91126ce520a366d1842a4a52da70a06a91a7f1de 100644 (file)
          Initial release with preliminary hardware.
        </revremark>
       </revision>
+      <revision>
+       <revnumber>1.0</revnumber>
+       <date>18 November 2012</date>
+       <revremark>
+         Updates for version 1.0 release.
+       </revremark>
+      </revision>
+      <revision>
+       <revnumber>1.1</revnumber>
+       <date>12 December 2012</date>
+       <revremark>
+         Add comments about EEPROM storage format and programming jig.
+       </revremark>
+      </revision>
     </revhistory>
   </bookinfo>
   <acknowledgements>
@@ -70,7 +84,8 @@ NAR #88757, TRA #12200
          preparing a soft cushion of wadding inside a vented model payload
          bay. Wherever you mount it, make sure you protect the
          barometric sensor from corrosive ejection gasses as those
-         will damage the sensor.
+         will damage the sensor, and shield it from light as that can
+         cause incorrect sensor readings.
        </para>
       </listitem>
       <listitem>
@@ -83,15 +98,27 @@ NAR #88757, TRA #12200
          height is reported in decimeters, so the last digit will be
          tenths of a meter. For example, if MicroPeak reports 5 4 4
          3, then the maximum height of the last flight was 544.3m, or
-         1786 feet. After reporting the last flight, MicroPeak starts
-         waiting for launch. It will flash once every three seconds
-         in this mode.
+         1786 feet.
        </para>
       </listitem>
       <listitem>
        <para>
-         Fly the rocket. Once the rocket passes about 4m in height
-         (13 feet), the micro-controller will record the ground
+         Finish preparing the rocket for flight. After the
+         previous flight data have been reported, MicroPeak waits for
+         30 seconds before starting to check for launch. This gives
+         you time to finish assembling the rocket. As those
+         activities might cause pressure changes inside the airframe,
+         MicroPeak might accidentally detect boost. If you need to do
+         anything to the airframe after the 30 second window passes,
+         make sure to be careful not to disturb the altimeter. The
+         LED will remain dark during the 30 second delay, but after
+         that, it will start blinking once every 3 seconds.
+       </para>
+      </listitem>
+      <listitem>
+       <para>
+         Fly the rocket. Once the rocket passes about 10m in height
+         (32 feet), the micro-controller will record the ground
          pressure and track the pressure seen during the flight. In
          this mode, the LED flickers rapidly. When the rocket lands,
          and the pressure stabilizes, the micro-controller will record
@@ -103,8 +130,7 @@ NAR #88757, TRA #12200
       </listitem>
       <listitem>
        <para>
-         Recover the data. Turn MicroPeak off for a couple of seconds
-         (to discharge the capacitors) and then back on. MicroPeak
+         Recover the data. Turn MicroPeak off and then back on. MicroPeak
          will blink out the maximum height for the last flight. Turn
          MicroPeak back off to conserve battery power.
        </para>
@@ -129,14 +155,13 @@ NAR #88757, TRA #12200
       to keep conductive material from coming in contact with the exposed metal elements.
     </para>
     <para>
-      The barometric sensors used in MicroPeak is
-      sensitive to sunlight. Please consider this when
-      designing an installation, for example, in an air-frame with a
-      see-through plastic payload bay. Many model rockets with payload bays
-      use clear plastic for the payload bay. Replacing these with an opaque
-      cardboard tube, painting them, or wrapping them with a layer of masking
-      tape are all reasonable approaches to keep the sensor out of direct
-      sunlight.
+      The barometric sensor used in MicroPeak is sensitive to
+      sunlight. Please consider this when designing an
+      installation. Many model rockets with payload bays use clear
+      plastic for the payload bay. Replacing these with an opaque
+      cardboard tube, painting them, or wrapping them with a layer of
+      masking tape are all reasonable approaches to keep the sensor
+      out of direct sunlight.
     </para>
     <para>
       The barometric sensor sampling ports must be able to "breathe",
@@ -192,7 +217,7 @@ NAR #88757, TRA #12200
       <title>Lithium Battery</title>
       <para>
        The CR1025 battery used by MicroPeak holes 30mAh of power,
-       which is sufficient to run for over 15 hours. Because
+       which is sufficient to run for over 40 hours. Because
        MicroPeak powers down on landing, run time includes only time
        sitting on the launch pad or during flight.
       </para>
@@ -254,6 +279,118 @@ NAR #88757, TRA #12200
        serve to further protect the switch from launch forces.
       </para>
     </section>
+    <section>
+      <title>On-board data storage</title>
+      <para>
+       The ATtiny85 has 512 bytes of non-volatile storage, separate
+       from the code storage memory. The MicroPeak firmware uses this
+       to store information about the last completed
+       flight. Barometric measurements from the ground before launch
+       and at apogee are stored, and used at power-on to compute the
+       height of the last flight.
+      </para>
+      <para>
+       In addition to the data used to present the height of the last
+       flight, MicroPeak also stores barometric information sampled
+       at regular intervals during the flight. This information can
+       be extracted from MicroPeak through any AVR programming
+       tool.
+      </para>
+      <table frame='all'>
+       <title>MicroPeak EEPROM Data Storage</title>
+       <tgroup cols='3' align='center' colsep='1' rowsep='1'>
+         <colspec align='center' colwidth='2*' colname='Address'/>
+         <colspec align='center' colwidth='*' colname='Size (bytes)'/>
+         <colspec align='left' colwidth='7*' colname='Description'/>
+         <thead>
+           <row>
+             <entry align='center'>Address</entry>
+             <entry align='center'>Size (bytes)</entry>
+             <entry align='center'>Description</entry>
+           </row>
+         </thead>
+         <tbody>
+           <row>
+             <entry>0x000</entry>
+             <entry>4</entry>
+             <entry>Average ground pressure (Pa)</entry>
+           </row>
+           <row>
+             <entry>0x004</entry>
+             <entry>4</entry>
+             <entry>Minimum flight pressure (Pa)</entry>
+           </row>
+           <row>
+             <entry>0x008</entry>
+             <entry>2</entry>
+             <entry>Number of in-flight samples</entry>
+           </row>
+           <row>
+             <entry>0x00a … 0x1fe</entry>
+             <entry>2</entry>
+             <entry>Instantaneous flight pressure (Pa) low 16 bits</entry>
+           </row>
+         </tbody>
+       </tgroup>
+      </table>
+      <para>
+       All EEPROM data are stored least-significant byte first. The
+       instantaneous flight pressure data are stored without the
+       upper 16 bits of data. The upper bits can be reconstructed
+       from the previous sample, assuming that pressure doesn't
+       change by more more than 32kPa in a single sample
+       interval. Note that this pressure data is <emphasis>not</emphasis>
+       filtered in any way, while both the recorded ground and apogee
+       pressure values are, so you shouldn't expect the minimum
+       instantaneous pressure value to match the recorded minimum
+       pressure value exactly.
+      </para>
+      <para>
+       MicroPeak samples pressure every 96ms, but stores only every
+       other sample in the EEPROM. This provides for 251 pressure
+       samples at 192ms intervals, or 48.192s of storage. The clock
+       used for these samples is a factory calibrated RC circuit
+       built into the ATtiny85 and is accurate only to within ±10% at
+       25°C. So, you can count on the pressure data being accurate,
+       but speed or acceleration data computed from this will be
+       limited by the accuracy of this clock.
+      </para>
+    </section>
+    <section>
+      <title>MicroPeak Programming Interface</title>
+      <para>
+       MicroPeak exposes a standard 6-pin AVR programming interface,
+       but not using the usual 2x3 array of pins on 0.1"
+       centers. Instead, there is a single row of tiny 0.60mm ×
+       0.85mm pads on 1.20mm centers exposed near the edge of the
+       circuit board. We couldn't find any connector that was
+       small enough to include on the circuit board.
+      </para>
+      <para>
+       In lieu of an actual connector, the easiest way to connect to
+       the bare pads is through a set of Pogo pins. These
+       spring-loaded contacts are designed to connect in precisely
+       this way. We've designed a programming jig, the MicroPeak
+       Pogo Pin board which provides a standard AVR interface on one
+       end and a recessed slot for MicroPeak to align the board with
+       the Pogo Pins.
+      </para>
+      <para>
+       The MicroPeak Pogo Pin board is not a complete AVR programmer,
+       it is an interface board that provides a 3.3V regulated power
+       supply to run the MicroPeak via USB and a standard 6-pin AVR
+       programming interface with the usual 2x3 grid of pins on 0.1"
+       centers. This can be connected to any AVR programming
+       dongle.
+      </para>
+      <para>
+       The AVR programming interface cannot run faster than ¼ of the
+       AVR CPU clock frequency. Because MicroPeak runs at 250kHz to
+       save power, you must configure your AVR programming system to
+       clock the AVR programming interface at no faster than
+       62.5kHz, or a clock period of 32µS.
+      </para>
+    </section>
   </chapter>
 </book>
 <!--  LocalWords:  Altusmetrum MicroPeak