add another worthy quote
[web/gag.com] / bdale / blog / posts / Batteries_and_Pyro_Circuits.mdwn
1 [[!tag tags/rockets]]
2 Keith and I have discovered a change in the behavior of the protection 
3 circuits integrated in the LiPo batteries we sell for use with 
4 [Altus Metrum](http://altusmetrum.org) products that poses a risk for 
5 our customers.  This post is meant to document what we now know, communicate 
6 changes we're planning as a result, and explain what we think flyers of our 
7 existing electronics and batteries may want to do to maximize their chances 
8 of successful flights.
9
10 Background
11 ==========
12
13 Choosing batteries and designing pyro circuits for high power rocketry avionics
14 involves a variety of trade-offs.  Reliability is the highest concern, both 
15 because nobody wants to lose an airframe due to a failed pyro event, and
16 also because airframes recovering anomalously have safety implications.  But
17 we also care about other factors including cost and weight, and usually 
18 want to minimize the complexity of both the electronics and the overall 
19 installation.
20
21 The objective of a pyro circuit is to dump enough energy rapidly into an 
22 electric match to cause it to catch fire.  We need batteries both to power
23 the electronics that decide when to fire the charge, and to provide the
24 energy that actually ignites the match.  
25
26 The two most common battery types seen in the rocketry hobby are alkaline 
27 cells, often the nominal 9V rectangular variety, and rechargeable batteries 
28 based on Lithium Polymer (LiPo) chemistry.  LiPo cells are 3.7 volts per 
29 cell nominal voltage, are very light, and have a high energy density.  
30
31 LiPo capacity is measured in units of current times time, so an 850mAh
32 cell should be able to deliver 850 milliamps for an hour.  The battery
33 industry also uses something called a "C rate" to describe how fast the 
34 battery can be usefully discharged, wich is a multiplier relative to the 
35 battery capacity.  So a battery with 850mAh capacity and a "2C" rating can 
36 deliver current at a sustained rate of 1700mA until discharged, while the 
37 same capacity at a "5C" rating can deliver 4250mA.  
38
39 By comparison, most 9V alkaline batteries are actually composed of 6 
40 individual 1.5V cells enclosed in a wrapper.  It's hard to get hard numbers
41 for capacity and discharge rate, since in an alkaline cell the two are not
42 independent, and the discharge rate is related to the volume of each 
43 individual cell.  The 
44 [data sheet for an Energizer 522](http://data.energizer.com/PDFs/522.pdf) 
45 shows just over 600mAh at a 25mA discharge rate, dropping to about 300mAh 
46 at a 500mA discharge rate.
47
48 Importantly for use in pyro circuits, LiPo cells have a *very* low source 
49 impedance, which means they can source immense amounts of current.  It's not
50 unusual for cells in the 1000mAh range to have ratings in excess of 
51 30C!  Because this rapid discharge ability can pose a risk of fire, it's common
52 for LiPo cells to come with a "protection board" integrated into the battery 
53 assembly that is designed to limit the current to some rate such as 2C
54 continuous duty.
55
56 In large airframes, or projects that involve staging, air-starts, or other
57 complex pyro event sequences, the most reliable approach will always be 
58 to use separate batteries for the control electronics and the source of 
59 pyro firing power.  In the limit, having separate pyro batteries for each 
60 pyro charge with the control electronics only providing the switching to 
61 connect the batteries to the charges could even make sense.  But for most 
62 airframes, this is overkill, and the increases in mass, volume, and wiring 
63 complexity just don't make sense.
64
65 The challenge, then, is how to design electronics that will robustly initiate 
66 pyro events without negatively affecting the rest of the electronics when
67 operating from a single shared battery. 
68
69 Altus Metrum Pyro Circuits
70 ==========================
71
72 The very first prototypes of [TeleMetrum](http://altusmetrum.org/TeleMetrum/)
73 were designed to use a single-cell LiPo battery, and had an on-board 100mA 
74 charging circuit.  Because we needed 5 volts to power the accelerometer, we 
75 had a small switching regulator that up-converted the LiPo voltage, and we 
76 used some of that regulator's output to charge a 1000uF capacitor.  The pyro 
77 circuit used Fairchild FDN335N N-channel MOSFET switches in a low-side 
78 switching configuration to dump the energy stored in the capacitor through 
79 an attached ematch.  Those FETs had an on resistance of under a tenth of an 
80 ohm in our operating conditions.  The circuit worked very reliably, but the 
81 1000uF electrolytic cap was huge and we struggled with the mechanics of such 
82 a large part hanging off the board...
83
84 It turns out that 3.7 volts is way more than enough to fire a typical 
85 low-current e-match or equivalents like the 
86 [Quest Q2G2](http://www.questaerospace.com/cgi-bin/commerce.exe?search=action&category=OJ) 
87 igniters.  In fact, 
88 bench testing with a good digital oscilloscope showed that a typical e-match 
89 with resistance of 1.3-1.8 ohms will fire in approximately 13 microseconds 
90 when hit with the nominal 3.7 volts from a LiPo.
91
92 So, starting with our v0.2 boards, we switched to using the LiPo battery 
93 voltage directly to fire the pyro charges, eliminating the clunky electrolytic
94 capacitor entirely.  We also switched to the Fairchild FDS9926A dual N-channel
95 MOSFET whose specs are better in all regards for our application.  The on
96 resistance is down around 40 milli-ohms in our circuit, such that the current
97 ratings are much higher (FET current limits are primarily driven by how much
98 heat is generated due to current flowing through the channel's on resistance).
99
100 Because using the LiPo voltage directly means we're effectively temporarily
101 putting a very low resistance across the battery during the pyro events, the
102 input voltage to the voltage regulator gets pulled down.  To ensure the 
103 processor could "ride through" these events, we added a 100uF surface mount
104 bulk capacitor on the 3.3 volt regulated voltage rail, which bench testing
105 demonstrated was more than sufficient to maintain processor operation through
106 pyro events.  And that is essentially the same pyro circuit on all the boards,
107 both [TeleMetrum](http://altusmetrum.org/TeleMetrum) and 
108 [TeleMini](http://altusmetrum.org/TeleMini), that we have shipped to date.
109
110 What's Changed
111 ==============
112
113 The LiPo batteries we source and sell with our electronics come with a
114 protection board and cable terminated in a 2-pin, 2mm "JST" connector.  The
115 specs on the protection board have always been "2C continuous", but we 
116 observed the 
117 ability to source much higher currents for short periods such as the 13
118 micro-seconds or so required to fire an e-match.  Thus these protection 
119 circuits seemed just fine .. we could fire e-matches with a burst of current
120 but were protected against short circuits in the wiring or our boards by
121 the 2C continuous limit.
122
123 Unfortunately, the most recent batch of batteries we sourced seem to have a
124 much "twitchier" protection circuit.  We can draw more than 2C for short
125 bursts, but not as much as with prior boards, and not for as long an interval.
126 With a 1 ohm power resistor on the pyro terminals of one of our boards, we
127 get about 9 milliseconds of power before the protection circuit cuts in and
128 shuts the battery down.  The power stays down until *all* load is removed,
129 which at least means the board is turned off and back on again, and in some
130 cases could even mean the battery is unplugged and re-plugged since we draw
131 trace current to keep the GPS memory alive even when the power is turned off,
132 and at least some of the new batteries see that as enough to keep the power
133 turned off after an over-current event.
134
135 For many e-matches, this isn't an issue, since 9 milliseconds is *way* longer
136 than the 13 microseconds needed to fire the charge.  Unfortunately, we've
137 discovered that many of the e-matches bought and used in the rocketry hobby 
138 are actually made for use in the fireworks industry, where it is desireable 
139 to retain continuity
140 after firing so that series connections of e-matches all can fire even if
141 some fire faster than others!  This means that while the resistance goes
142 up some after firing, *sometimes* the drain on the battery remains sufficient
143 to cause the protection circuit to kick in even after the pyro charge has 
144 fired.
145
146 What We're Doing About It
147 =========================
148
149 If we remove the protection circuit from the LiPo (or jumper around it), all
150 existing Altus Metrum products will operate successfully with pyro charges
151 thave have an effective resistance of as low as 1 ohm.  That's lower than 
152 any e-match or Q2G2 we've ever seen, so in effect what this means is that
153 if you have an existing Altus Metrum flight computer, and you remove the LiPo
154 protection circuit, you're good to go.  This does not really make things any
155 more "dangerous", since our battery chargers are all current limited and our
156 discharge patterns will never cause heating of the battery.  Frankly, in a 
157 rocket, the most likely way to cause a problem with a LiPo is by smashing or 
158 puncturing the actual battery during bench work or during a crash... and 
159 those cause the same problems with or without a protection board present.
160
161 In the future, we will ship batteries that have either a much higher C rating
162 on the protection circuit, or have no protection circuit at all.
163
164 The number of problems reported by actual customers that we think should be
165 attributed to LiPo protection circuit boards is *very* low, and we 
166 suspect most of our customers who are happily flying their boards can continue
167 to do so.  Ground testing where you fire pyro charges (or at least e-matches) 
168 using RF to issue the commands (not USB, since the LiPo charger is running 
169 any time USB is connected!) will confirm whether there's a problem.  If the 
170 board resets (does startup beeps) after a pyro event, or shuts down completely 
171 (no LED activity), then you have a problem.  If the matches light and the
172 board keeps running, you're good to go.
173
174 However, *any* Altus Metrum customer with LiPo batteries sourced from us or 
175 our distributors who is worried about this problem (even if you haven't seen 
176 problems in ground testing or previous flights), and who doesn't want to try 
177 soldering on the battery circuit board yourself, is welcome to contact us 
178 about removing the protection circuit for you.  We won't charge anything 
179 other than shipping.  
180
181 To take advantage of this offer, just send email to 
182 fixmybattery@altusmetrum.org telling us how many of which capacity batteries
183 you have that you'd like updated, and we'll respond with an RMA number and
184 shipping details.
185
186 Going Even Further
187 ==================
188
189 As previously indicated, with the LiPo protection circuits removed, all of 
190 our current products will work reliably with at least 1 ohm across the pyro
191 terminals.  That should cover all real-world flying conditions just fine,
192 but we're not satisfied yet.
193
194 We've designed a new pyro control circuit that transfers the maximum possible 
195 energy to the load regardless of battery voltage without ever allowing the 
196 voltage to the processor to droop at all.  We're testing this new circuit in 
197 various prototypes now, and if it pans out it will probably show up first in 
198 [MegaMetrum](http://altusmetrum.org/MegaMetrum) and then trickle down to 
199 [TeleMetrum](http://altusmetrum.org/TeleMetrum) and 
200 [TeleMini](http://altusmetrum.org/TeleMini) as those products
201 are updated later this year.  The new pyro circuit tolerates 0 ohms (dead 
202 shorts) on the pyro terminals for as long as the battery can provide 
203 current, which is as good as it gets.  We think the circuit is clever enough 
204 that we'll probably write more about it once we're finished validating it.
205