<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>geeks have feelings</title>
	<atom:link href="http://www.geekshavefeelings.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.geekshavefeelings.com</link>
	<description>xo wang</description>
	<lastBuildDate>Wed, 01 May 2013 04:36:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Letters Spelled Without Themselves</title>
		<link>http://www.geekshavefeelings.com/posts/letters-spelled-without-themselves</link>
		<comments>http://www.geekshavefeelings.com/posts/letters-spelled-without-themselves#comments</comments>
		<pubDate>Wed, 01 May 2013 04:14:58 +0000</pubDate>
		<dc:creator>Xo Wang</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.geekshavefeelings.com/?p=1597</guid>
		<description><![CDATA[Letter Spelling A eh B - C see D - E yi1 F eph G jee H - I eye (also &#8220;uy&#8221; or &#8220;aye&#8221;) J zhay K cay L - M - N - O eau2 P - Q cue R - S ehce T - U yew V - W dubya3 X ecks Y [...]]]></description>
				<content:encoded><![CDATA[<table>
<tbody>
<tr>
<th>Letter</th>
<th>Spelling</th>
</tr>
<tr>
<td>A</td>
<td>eh</td>
</tr>
<tr>
<td>B</td>
<td>-</td>
</tr>
<tr>
<td>C</td>
<td>see</td>
</tr>
<tr>
<td>D</td>
<td>-</td>
</tr>
<tr>
<td>E</td>
<td>yi<sup><a href="http://www.geekshavefeelings.com/posts/letters-spelled-without-themselves#footnote_0_1597" id="identifier_0_1597" class="footnote-link footnote-identifier-link" title="Arguable since normally you&#039;d say &quot;e&quot; from a closed glottis but &quot;yi&quot; from an open glottis.">1</a></sup></td>
</tr>
<tr>
<td>F</td>
<td>eph</td>
</tr>
<tr>
<td>G</td>
<td>jee</td>
</tr>
<tr>
<td>H</td>
<td>-</td>
</tr>
<tr>
<td>I</td>
<td>eye (also &#8220;uy&#8221; or &#8220;aye&#8221;)</td>
</tr>
<tr>
<td>J</td>
<td>zhay</td>
</tr>
<tr>
<td>K</td>
<td>cay</td>
</tr>
<tr>
<td>L</td>
<td>-</td>
</tr>
<tr>
<td>M</td>
<td>-</td>
</tr>
<tr>
<td>N</td>
<td>-</td>
</tr>
<tr>
<td>O</td>
<td><a href="http://en.wiktionary.org/wiki/eau" title=""Water"" target="_blank">eau</a><sup><a href="http://www.geekshavefeelings.com/posts/letters-spelled-without-themselves#footnote_1_1597" id="identifier_1_1597" class="footnote-link footnote-identifier-link" title="The whole point of this exercise is to abuse the language, so give me a break.">2</a></sup></td>
</tr>
<tr>
<td>P</td>
<td>-</td>
</tr>
<tr>
<td>Q</td>
<td>cue</td>
</tr>
<tr>
<td>R</td>
<td>-</td>
</tr>
<tr>
<td>S</td>
<td>ehce</td>
</tr>
<tr>
<td>T</td>
<td>-</td>
</tr>
<tr>
<td>U</td>
<td>yew</td>
</tr>
<tr>
<td>V</td>
<td>-</td>
</tr>
<tr>
<td>W</td>
<td>dubya<sup><a href="http://www.geekshavefeelings.com/posts/letters-spelled-without-themselves#footnote_2_1597" id="identifier_2_1597" class="footnote-link footnote-identifier-link" title="Fine; &quot;dubyu.&quot;">3</a></sup></td>
</tr>
<tr>
<td>X</td>
<td>ecks</td>
</tr>
<tr>
<td>Y</td>
<td>wei or wie<sup><a href="http://www.geekshavefeelings.com/posts/letters-spelled-without-themselves#footnote_3_1597" id="identifier_3_1597" class="footnote-link footnote-identifier-link" title="On the hope that you pronounce &quot;ei&quot; or &quot;ie&quot; as aɪ (aye); if your &quot;ei&quot; is eɪ and your &quot;ie&quot; is iː then you&#039;ll end up saying &quot;way&quot; and &quot;whee.&quot; Y is simply a much more reliable vowel for this sound than any of AEIOU, and so it accepts no substitutes. Also if you&#039;ve seen pinyin or speak German then &quot;wei&quot; or &quot;wie&quot; just look wrong here.">4</a></sup></td>
</tr>
<tr>
<td>Z</td>
<td>xee (See appendix.)</td>
</tr>
</tbody>
</table>
<p>Let me know if I missed anything.</p>
<h3>Appendix: A guide to pronouncing English words starting with X</h3>
<p>As we all know, there are no words in the English language starting with X. So when encountering such a dangerous beast (known to the select cadre of sporting professionals who seek them for thrills as &#8220;X-words&#8221;), it is vital to toss the pronunciation rules out the window. It becomes time to free flow it.</p>
<p>Here is a non-exhaustive guide to some of the better researched words starting with X, for those acolytes of English who need a few steady footholds on their journey towards becoming the masters of X.</p>
<p><strong>Xenon</strong>: JOY-nahn<br />
<strong>Xena</strong>: THEE-nah<br />
<strong>XOR</strong>: ECKS-clue-sieve ORE<br />
<strong><a href="http://www.youtube.com/watch?v=uprjmoSMJ-o#t=4m40s" title="This is a for reals Spanish Christian name." target="_blank">Ximenez</a></strong>: &lt;GARGLING SOUND&gt;EH-men-neth<br />
<strong>Xenophobe</strong>: &#8220;so but like really, where literally are you <em>actually</em> from, originally?&#8221;<br />
<strong>Xo</strong>: any of, or variants on</p>
<ul>
<li>ho</li>
<li>joe</li>
<li>so</li>
<li>show</li>
<li>shall</li>
<li>zao</li>
<li>extra old</li>
<li>jao</li>
<li>drao</li>
<li>zhao<sup><a href="http://www.geekshavefeelings.com/posts/letters-spelled-without-themselves#footnote_4_1597" id="identifier_4_1597" class="footnote-link footnote-identifier-link" title="Really stress that ʒ; I don&#039;t even know where we got that &quot;zh&quot; sounds like it&#039;s in &quot;beige seizure equation&quot;; I don&#039;t know any Romanization that uses that.">5</a></sup></li>
<li>&#8220;how do you say your name?&#8221;</li>
<li>eckso</li>
<li>ecks-oh</li>
<li>КСO<sup><a href="http://www.geekshavefeelings.com/posts/letters-spelled-without-themselves#footnote_5_1597" id="identifier_5_1597" class="footnote-link footnote-identifier-link" title="Yes, that&#039;s Cyrillic.">6</a></sup>&mdash;sounds like &#8220;k-so&#8221;</li>
<li>hug and kiss<sup><a href="http://www.geekshavefeelings.com/posts/letters-spelled-without-themselves#footnote_6_1597" id="identifier_6_1597" class="footnote-link footnote-identifier-link" title="Because XOXO would be plural.">7</a></sup></li>
</ul>
<p>Remember, these are simply guidelines, not hard-and-fast rules; fluent speakers know to interpret them as they please based on gut feelings, pulling additional phonemes from their bottoms as needed to battle some of the more monstrous among this list. This is a crucial skill drilled over and over again with words from lists like this one until the English practitioner is comfortable conquering even X-words never yet seen in the Anglosphere.
<ol class="footnotes">
<li id="footnote_0_1597" class="footnote">Arguable since normally you&#8217;d say &#8220;e&#8221; from a closed glottis but &#8220;yi&#8221; from an open glottis.</li>
<li id="footnote_1_1597" class="footnote">The whole point of this exercise is to abuse the language, so give me a break.</li>
<li id="footnote_2_1597" class="footnote">Fine; &#8220;dubyu.&#8221;</li>
<li id="footnote_3_1597" class="footnote">On the hope that you pronounce &#8220;ei&#8221; or &#8220;ie&#8221; as aɪ (aye); if your &#8220;ei&#8221; is eɪ and your &#8220;ie&#8221; is iː then you&#8217;ll end up saying &#8220;way&#8221; and &#8220;whee.&#8221; Y is simply a much more reliable vowel for this sound than any of AEIOU, and so it accepts no substitutes. Also if you&#8217;ve seen pinyin or speak German then &#8220;wei&#8221; or &#8220;wie&#8221; just look wrong here.</li>
<li id="footnote_4_1597" class="footnote">Really stress that ʒ; I don&#8217;t even know where we got that &#8220;zh&#8221; sounds like it&#8217;s in &#8220;beige seizure equation&#8221;; I don&#8217;t know any Romanization that uses that.</li>
<li id="footnote_5_1597" class="footnote">Yes, that&#8217;s Cyrillic.</li>
<li id="footnote_6_1597" class="footnote">Because XOXO would be plural.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.geekshavefeelings.com/posts/letters-spelled-without-themselves/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flapjack Stator Thoughts</title>
		<link>http://www.geekshavefeelings.com/posts/flapjack-stator-thoughts</link>
		<comments>http://www.geekshavefeelings.com/posts/flapjack-stator-thoughts#comments</comments>
		<pubDate>Mon, 04 Mar 2013 07:34:46 +0000</pubDate>
		<dc:creator>Xo Wang</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Flapjack]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[battlebots]]></category>
		<category><![CDATA[elec.engr]]></category>
		<category><![CDATA[flapjack]]></category>
		<category><![CDATA[gatech]]></category>
		<category><![CDATA[motor.design]]></category>
		<category><![CDATA[robots]]></category>

		<guid isPermaLink="false">http://www.geekshavefeelings.com/?p=1525</guid>
		<description><![CDATA[WARNING: THIS POST CONTAINS EXTREMELY SHADY ENGINEERING. HOLD NO ILLUSIONS ABOUT THE LEGITIMACY OF THE FIGURES AND METHODS. DO NOT TRY THIS AT HOME. I&#8217;ve been thinking about alternatives in constructing the stator for Flapjack, my latest 3 lb R/C combat bot, besides milling it out of 5 oz copper-clad circuit board material. I think [...]]]></description>
				<content:encoded><![CDATA[<p><em>WARNING: THIS POST CONTAINS EXTREMELY SHADY ENGINEERING. HOLD NO ILLUSIONS ABOUT THE LEGITIMACY OF THE FIGURES AND METHODS. DO NOT TRY THIS AT HOME.</em></p>
<p>I&#8217;ve been thinking about alternatives in constructing the stator for <a href="http://www.geekshavefeelings.com/posts/delicious-axial-flux-flapjack" title="Delicious Axial Flux Flapjack">Flapjack, my latest 3 lb R/C combat bot</a>, besides milling it out of 5 oz copper-clad circuit board material. I think I can wind coils that would be epoxied into the cutouts on a stator retainer plate like this one:</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/03/Stator-coil-retainer-plate.png"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/03/Stator-coil-retainer-plate-640x400.png" alt="Stator coil retainer plate" width="640" height="400" class="alignnone size-large wp-image-1526" /></a></p>
<h3>Physical fit</h3>
<p>The retainer is cut out of 1/8 in thick polycarbonate, and my windings would be four strands of 22 AWG magnet wire with double-thickness enamel. That would be 4 × 0.0276 in = 0.110 in tall within the cutout, save for the terminal of the coil which needs to come out somewhere, which makes this a 5 × 0.0276 in = <strong>0.138 in</strong> overall height coil. If I file some away some indents in plastic between windings, then they stick just 13 mil out of the retainer. Overall, there&#8217;s a hair<sup><a href="http://www.geekshavefeelings.com/posts/flapjack-stator-thoughts#footnote_0_1525" id="identifier_0_1525" class="footnote-link footnote-identifier-link" title="Coarse Asian hair ~170 &micro;m thick">1</a></sup> shy of <strong>1/16 in</strong> of clearance on either side of the stator with respect to the magnets on the stator.</p>
<p>I&#8217;m concerned that a vertical strike to the weapon can deform the mild steel rotor plates more than that and cause the magnets and magnet retainers to rub against the stator assembly.</p>
<h3>Weight</h3>
<p>To save weight and to increase Kv, I would use seven turns in each coil, versus the eight on the P.S. WTFLOLs. This should have less effect on the motor than it initially appears, as each loop of the wire coils is significantly larger (on average) than the spiraling trace coils in the P.S. WTFLOL.</p>
<p>Generously speaking, each turn of this coil is, on average, 3.0 in of wire (the perimeter of the cutout is about 3.4 in while the innermost loop will be just 2.6 in in perimeter).</p>
<p style="text-align: center;">
<img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-0d57aa1930b51f06dfca15f4c74d6d3b_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#92;&#99;&#102;&#114;&#97;&#99;&#123;&#40;&#51;&#46;&#48;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#92;&#32;&#105;&#110;&#125;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#55;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#92;&#32;&#116;&#117;&#114;&#110;&#115;&#125;&#32;&#43;&#32;&#50;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#92;&#32;&#105;&#110;&#125;&#41;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#49;&#50;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#92;&#32;&#99;&#111;&#105;&#108;&#115;&#125;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#52;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#92;&#32;&#115;&#116;&#114;&#97;&#110;&#100;&#115;&#125;&#125;&#123;&#53;&#48;&#49;&#46;&#53;&#32;&#92;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#102;&#116;&#125;&#125;&#123;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#108;&#98;&#125;&#125;&#125;&#32;&#61;&#32;&#50;&#46;&#57;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#92;&#32;&#111;&#122;&#125;" height="47" width="386" style="vertical-align: -20px;"/>
</p>
<p>Now, I&#8217;ve got about 3.5 oz of weight to spend on the stator excluding fasteners, so with the polycarbonate retainers at 0.18 oz each, that leaves me with a quarter ounce of epoxy and tape to secure and insulate the coils with. That seems shady<sup><a href="http://www.geekshavefeelings.com/posts/flapjack-stator-thoughts#footnote_1_1525" id="identifier_1_1525" class="footnote-link footnote-identifier-link" title="It&#039;s about three post-1982 US copper-clad nickel pennies">2</a></sup>; I might drop down to six turns or three strands in order to make weight.</p>
<h3>Resistance</h3>
<p>Now for the whole point of moving to wire-wound coils: lower resistance.</p>
<p style="text-align: center;">
<img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-2a0369323b67e87457a3e561e14f07fd_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#40;&#51;&#46;&#48;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#92;&#32;&#105;&#110;&#125;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#55;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#92;&#32;&#116;&#117;&#114;&#110;&#115;&#125;&#32;&#43;&#32;&#50;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#92;&#32;&#105;&#110;&#125;&#41;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#52;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#92;&#32;&#99;&#111;&#105;&#108;&#115;&#125;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#50;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#92;&#32;&#112;&#104;&#97;&#115;&#101;&#115;&#125;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#92;&#99;&#102;&#114;&#97;&#99;&#123;&#49;&#54;&#46;&#49;&#52;&#32;&#92;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#109;&#92;&#79;&#109;&#101;&#103;&#97;&#125;&#125;&#123;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#102;&#116;&#125;&#125;&#125;&#123;&#52;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#92;&#32;&#115;&#116;&#114;&#97;&#110;&#100;&#115;&#125;&#125;&#32;&#61;&#32;&#54;&#50;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#92;&#32;&#109;&#92;&#79;&#109;&#101;&#103;&#97;&#125;" height="41" width="468" style="vertical-align: -11px;"/>
</p>
<p>By the way, I&#8217;m adding 2 in to each coil for termination, connection to the next phase, etc. The overall phase-to-phase resistance of <strong>62 mΩ</strong> is a greater than 70% reduction in wye-terminated phase-to-phase resistance compared to the 0.226 Ω of the <a href="http://www.geekshavefeelings.com/posts/delicious-axial-flux-flapjack" title="Delicious Axial Flux Flapjack">P.S. WTFLOLs</a>.</p>
<h3>Summary</h3>
<p>Using these coils would remove a big &#8220;ass&#8221; component of the permanent magnet coreless axial flux synchronous motor shell and printed spiral wound trace flux linking outer loops (PMCAFSMS, P.S. WTFLOL). Namely, I lose the P.S. WTFLOL part, but I am confident a suitable replacement acronym will come up. Moreover, a bigger proportion of the air gap between rotor sets will be filled with torque-producing copper and make for a much more powerful, efficient motor.</p>
<p>Efficiency becomes a big deal when you consider how much power needs to be dissipated from such a compact robot, and the fact that the energy onboard is limited: the ~50 kJ stored in the batteries means I can draw less than <300 W average during a 3 minute match. Considering that probably 10 kJ is spent on just operating the drivetrain, blowing (10. A)² × 226 mΩ = <strong>23 W</strong> on copper heating is definitely something I worry about.</p>
<p>These windings I&#8217;m thinking of make for just <strong>6%</strong> of motor loss at 10 A × 11.1 V = 111 W input power, but that&#8217;s not including eddy current losses nor the high ripple currents sloshing around the motor due to PWM. That&#8217;s still a huge improvement over the trace windings, where that loss is <strong>20%</strong> at the same input power.</p>
<p>Eddy current losses would be much lower in comparison too, as each turn of copper is vertically oriented and separated into four conductors. However, unlike real <a href="http://en.wikipedia.org/wiki/Litz_wire" title="Litz wire at Wikipedia" target="_blank">litz wire</a>, these conductor sets are not twisted together. So, the slight differences in flux density axially (see <a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/pancake_sim_n52.png" title="FEMM simulation of airgap" target="_blank">simulation results</a>) mean that each strand produces a different EMF and that there will still some eddy currents between them.</p>
<h3>To do</h3>
<ul>
<li>Build test jig for motor testing</li>
<li>Print a new chassis which can hold the external <a href="http://www.digikey.com/product-detail/en/IHLP6767GZER100M11/541-1286-1-ND" title="Digi-Key" target="_blank">big-ass ass-inductors</a> for the motor</li>
<li>Build winding tool for coils</li>
<li>Wind, compact, pot, secure, and insulate coils into stator retainer plate</li>
</ul>
<p>Wah.
<ol class="footnotes">
<li id="footnote_0_1525" class="footnote">Coarse Asian hair ~170 µm thick</li>
<li id="footnote_1_1525" class="footnote">It&#8217;s about three post-1982 US copper-clad nickel pennies</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.geekshavefeelings.com/posts/flapjack-stator-thoughts/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delicious Axial Flux Flapjack</title>
		<link>http://www.geekshavefeelings.com/posts/delicious-axial-flux-flapjack</link>
		<comments>http://www.geekshavefeelings.com/posts/delicious-axial-flux-flapjack#comments</comments>
		<pubDate>Sun, 24 Feb 2013 22:08:02 +0000</pubDate>
		<dc:creator>Xo Wang</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Flapjack]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[battlebots]]></category>
		<category><![CDATA[elec.engr]]></category>
		<category><![CDATA[flapjack]]></category>
		<category><![CDATA[gatech]]></category>
		<category><![CDATA[motor.design]]></category>
		<category><![CDATA[robots]]></category>

		<guid isPermaLink="false">http://www.geekshavefeelings.com/?p=1442</guid>
		<description><![CDATA[WARNING: THIS POST CONTAINS EXTREMELY SHADY ENGINEERING. HOLD NO ILLUSIONS ABOUT THE LEGITIMACY OF THE FIGURES AND METHODS. DO NOT TRY THIS AT HOME. We&#8217;re back to über-technical posts again. Today I&#8217;m introducing my current project, a new beetleweight (3lb) combat bot called Flapjack. When complete, it will be a super-compact shell spinner where the [...]]]></description>
				<content:encoded><![CDATA[<p><em>WARNING: THIS POST CONTAINS EXTREMELY SHADY ENGINEERING. HOLD NO ILLUSIONS ABOUT THE LEGITIMACY OF THE FIGURES AND METHODS. DO NOT TRY THIS AT HOME.</em></p>
<p>We&#8217;re back to über-technical posts again. Today I&#8217;m introducing my current project, a new beetleweight (3lb) combat bot called Flapjack.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/pancake.png"><img class="alignnone size-large wp-image-1445" alt="pancake" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/pancake-640x373.png" width="640" height="373" /></a></p>
<p>When complete, it will be a super-compact shell spinner where the shell is a unique brushless motor. Here&#8217;s the skinny:</p>
<ul>
<li>Shell 140 mm in diameter constructed from steel disks separated by aluminum spacers and tool steel teeth</li>
<li>Custom axial flux 3-phase brushless motor built into the shell, driven by a stator made up of spiral coil traces on printed circuit boards (PCBs)</li>
<li>Electronics package featuring High Fructose, my custom controller integrating dual brushed direct current (DC) motor drivers, a three-phase brushless motor driver, and gyroscope steering correction</li>
<li>Four Sanyo-style <a title="30:1 Micro Metal Gearmotor HP" href="http://www.pololu.com/catalog/product/1093" target="_blank">Pololu gearmotors</a> driving waterjet-cut ultra high molecular weight (UHMW) polyethylene wheels with neoprene tires</li>
<li>Light, compact chassis made from 3D printed ABS, waterjet-cut polycarbonate and 7075 grade aluminum</li>
<li>Lithium ion polymer battery providing up to 300 W of power</li>
</ul>
<p>After watching Dragon*Con, Atlanta Mini Maker Faire, Geek Media Expo, and now Motorama, I&#8217;ve gotten just a bit bored of ultra-destructive spinning kinetic energy weapons. Wait, nah; the weapons are always a blast to watch in the arena. What I&#8217;m really bored with are the tiny incremental tweaks made to very solid designs that make weapons and armor harder, faster, and bigger, but only in itty bitty steps that aren&#8217;t relevant to anyone but other builders.</p>
<p>If I was going to get into the battlebots game, then I wanted to build a game changer. Or at least an attempt at a facsimile of a photo of a game changer. And it&#8217;s gotta be a real crowd pleaser too; my previous bot and my first real entry into the hobby, <a href="http://aaronbot3000.blogspot.com/p/gyro-king-meltybrain-beetleweight.html" title="Gyro King at Aaron's blog" target="_blank">Gyro King</a>, while destructive and nearly bulletproof, was just not that interesting to watch<sup><a href="http://www.geekshavefeelings.com/posts/delicious-axial-flux-flapjack#footnote_0_1442" id="identifier_0_1442" class="footnote-link footnote-identifier-link" title="Nor to pilot, really, since the drive system was fully automated and the operator just pushes a single joystick">1</a></sup>.</p>
<p>So I figured I could either produce a cool, effective design that doesn&#8217;t use rotational kinetic energy as a weapon (very unlikely) or I could try to make a Great Leap Forward in spinner design that makes previous hard hitting bot matches look like church. While I&#8217;ve actually achieved neither of those design goals, at least I drew up something where a comically enormous proportion of the weight, power, and space budgets are reserved by a bizarre-looking shell.</p>
<p>Let&#8217;s look at a cutaway view of Flapjack.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/pancake_cutaway.png"><img class="alignnone size-large wp-image-1447" alt="pancake_cutaway" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/pancake_cutaway-640x373.png" width="640" height="373" /></a></p>
<p>Here you can see two of the 28 <a title="N48 block magnets" href="http://www.magnet4less.com/product_info.php?cPath=1_5&amp;products_id=28" target="_blank">3/4″ × 1/2″ × 1/4″ neodymium-iron-boron (NdFeB) magnets</a> arrayed between low carbon 1018 steel plates, creating a 14-pole axial flux rotor. Also, check out the stainless steel standoffs used to support the internal chassis as well as serve as shafts for the weapon&#8217;s bearings to ride on. In addition, the shell has a <a title="VXB 5200ZZ" href="http://www.vxb.com/page/bearings/PROD/Kit7278" target="_blank">30mm diameter double-row angular contact bearing</a> that can take loads in axial directions (up and down in this case).</p>
<p>Nearly everything but the fasteners, standoffs, and magnets are designed for 2/3-axis waterjet cutting. The other exceptions include the lithium polymer battery (in blue), which had more or less determined the overall height and diameter of the shell. The stator (in green), a printed circuit board milled out from copper-clad fiberglass laminate, was designed to fit in the airgap of the rotor. Finally, the space inside of the chassis was filled by a 3D printed block (in yellow) holding down the gearmotors, battery, and High Fructose (not pictured).</p>
<p>Now, I was rushing (along with the rest of the Georgia Tech crew) to get Flapjack done in time for Motorama 2013, which was last weekend. And by rush, I mean I <em>really</em> beasted hardcore. High Fructose went from raw parts outta Digi-Key and PCB Unlimited to functional motor controller hooked up to a Hobby King radio set in about four days, and Flapjack went from fresh plates of material from McMaster-Carr and Online Metals to a driving 1290 g bot in about three days. Those timeframes are overlapping, too<sup><a href="http://www.geekshavefeelings.com/posts/delicious-axial-flux-flapjack#footnote_1_1442" id="identifier_1_1442" class="footnote-link footnote-identifier-link" title="Plus my laptop was out of commission for three days, I took daily showers, and I managed to do laundry four hours before we left on our road trip to Pennsylvania">2</a></sup>.</p>
<p>Documentation and rigor suffered. All I have to justify the designs are barely comprehensible scratches in my notebook. Almost all the hard parts were basically guesstimated. Blogging about Flapjack is my attempt to go back and legitimize some of the horribly back-of-napkinloped numbers I used. <a title="Hello Fan Engineer" href="http://hellofanengineer.blogspot.com/" target="_blank">Jeff</a> said it best when he pointed out that I basically built a legit-ish bot using <a title="Melty Butt" href="http://www.youtube.com/watch?v=-buqqEaRkHM" target="_blank">ass(bot)</a> techniques.</p>
<p>I&#8217;ll start with the glaringly obviously ass part, the permanent magnet coreless axial flux synchronous motor shell and printed spiral wound trace flux linking outer loops, known for short as</p>
<h3>PMCAFSMS, P.S. WTFLOL</h3>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/pancake_exploded.png"><img class="alignnone size-large wp-image-1453" alt="pancake_exploded" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/pancake_exploded-640x373.png" width="640" height="373" /></a></p>
<p>You can see in the cutaway that the rotor, while strictly speaking a shell, is designed more like a ring spinner. So, it really had to respect the outer diameter of the chassis &#8220;puck,&#8221; which was about 100mm. Given that constraint as well as the weight budget and the magnets available to me, I went with a 14-pole rotor where the lengths of the magnets were lined up tangentially.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/IMG_04311.jpg"><img class="alignnone size-large wp-image-1478" alt="Two rotor plates with magnets facing &quot;outwards&quot; so that they press against the steel as the epoxy cures" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/IMG_04311-e1361738148302-640x480.jpg" width="640" height="480" /></a></p>
<p>Sadly, I was only able to use 1/8″ of steel for my magnet back iron. According to my FEMM simulation (and real life testing), this means a few flux lines will leak out into the world, sucking up filings off of other bots and otherwise not contributing to torque production.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/pancake_sim_n52.png"><img class="alignnone size-large wp-image-1469" alt="pancake_sim_n52" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/pancake_sim_n52-640x376.png" width="640" height="376" /></a></p>
<p>Flux density in the 1/4″ airgap is about 0.8 Tesla, and increasing the back iron thickness to 3/16″ increases this by more than 10%, as does decreasing the airgap to 1/8″. Sadly, the former would make the weapon weigh over 2.5 pounds, while the latter compromises the low-hitting ability of the shell and tolerance to deformation.</p>
<p>Going with a 14-pole, 12-coil design is great for iron-stator motors because it kills cogging torque, but in this coreless motor it just provides a conveniently high Wickelfaktor according to the <a title="Windings calculator" href="http://i.caendle.de/dev/test2/" target="_blank">Bewicklungsrechner</a><sup><a href="http://www.geekshavefeelings.com/posts/delicious-axial-flux-flapjack#footnote_2_1442" id="identifier_2_1442" class="footnote-link footnote-identifier-link" title="Relax, I have no idea what I&#039;m talking about either">3</a></sup>, which helps to produce more torque with less current (I think). This comes into play because I figured that with my P.S. WTFLOLs, otherwise known as PCB trace windings, I won&#8217;t be able to have many turns and thus link a whole lotta flux. Instead, I&#8217;ll have to rely on my coil configuration &amp; termination as well as a high airgap flux density to get a reasonable amount of torque. Speaking of windings&#8230;</p>
<h3>What the Flux Linking Outer Loops?</h3>
<p>Occasionally you have a brainfart and carry it way too far. This whole robot is like that, except worse, because every component was taken the whole nine yards in terms of stupid.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/flapjack_batter.png"><img class="alignnone size-large wp-image-1476" alt="flapjack_batter" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/flapjack_batter-640x358.png" width="640" height="358" /></a></p>
<p>Yeah, that happened. It was formed by a bunch of EAGLE commands generated in an Excel worksheet that I scripted (sigh). I then milled it out on the GVU Prototyping Lab&#8217;s LPKF S62 circuit plotter:</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/IMG_04631.jpg"><img class="alignnone size-large wp-image-1471" alt="P.S. WTFLOL" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/IMG_04631-e1361735677815-640x480.jpg" width="640" height="480" /></a></p>
<p>Something of note here is that the board is actually 5 oz/ft² copper clad, which is to say that the copper on it is 175 µm thick as opposed to typical copper clad where it&#8217;s just 1 oz/ft² or 35 µm thick. The trace width is 1.7 mm, so if I cram 10 A through the coils, that&#8217;s about 34 A/mm² of current density, which is incredibly shady.</p>
<p>Also, I measured four of the coils to be 14 milliohms on each four-turn<sup><a href="http://www.geekshavefeelings.com/posts/delicious-axial-flux-flapjack#footnote_3_1442" id="identifier_3_1442" class="footnote-link footnote-identifier-link" title="&quot;Turn&quot; is used loosely here since it&#039;s a fat spiral coil and the active lengths aren&#039;t really equal">4</a></sup> side, with about 0.6 µH of inductance. Since the board is double sided (the other side is just the mirrored coil spiralling in reverse), and doubling turns (i.e. one coil on top of another) quadruples inductance, then each full double-sided coil will have 2.4 µH of inductance with 28 mOhm of resistance.</p>
<p>I&#8217;ll be connecting four of these in series<sup><a href="http://www.geekshavefeelings.com/posts/delicious-axial-flux-flapjack#footnote_4_1442" id="identifier_4_1442" class="footnote-link footnote-identifier-link" title="Probably; putting them in a 2S2P configuration puts half the current in each coil, solving the current density issue, but probably puts this motor out of High Fructose&#039;s class">5</a></sup>, so in a wye termination, I&#8217;ll have 0.226 Ohms of phase-to-phase resistance and 19 µH of inductance (I think; I don&#8217;t really know how to combine inductances in this case).</p>
<p>With inductance that low, I&#8217;m really thinking about adding external inductors to smooth out the current ripples in the motor, since otherwise Flapjack&#8217;s motor looks more like straight strips of copper and less like inductive coils.</p>
<p>Sadly, it&#8217;s also a (10 A)² × 0.226 Ohm = 22.6 W loss to just copper heating, and that&#8217;s not accounting for eddy current losses from using flat copper <i>oriented the wrong way</i> and not clearing excess copper off of the board. With that efficiency (80% max at 111 W input and 59% at 222W input), Flapjack won&#8217;t be driving solar cars any time soon. At least as a coreless motor, I won&#8217;t have any stator losses due to magnetic hysteresis, iron eddy currents, etc.</p>
<p>Aside from that, I just feel bad for completely destroying 10 mil and 15.7 mil end mills at the GVU while milling my ridiculous 5oz boards. Notice the difference in quality between that of a fresh end mill (from where I started on the board) and when it got a little less fresh (towards the end of the milling):</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/IMG_04651.jpg"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/IMG_04651-e1361741852568-400x356.jpg" alt="Trace begin" width="400" height="356" class="alignnone size-medium wp-image-1498" /></a><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/IMG_04661-e1361741930680.jpg"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/IMG_04661-e1361741930680-400x357.jpg" alt="Trace end" width="400" height="357" class="alignnone size-medium wp-image-1499" /></a></p>
<p>WTFLOL indeed.</p>
<h3>Numbers</h3>
<p>I didn&#8217;t really feel like setting up a fancier simulation for this thing, since there&#8217;s so much fudge to begin with and my controller has even less rigor applied to its numbers<sup><a href="http://www.geekshavefeelings.com/posts/delicious-axial-flux-flapjack#footnote_5_1442" id="identifier_5_1442" class="footnote-link footnote-identifier-link" title="Hell, I didn&#039;t even guesstimate anything for High Fructose; I just put some components down and said it looks about right">6</a></sup>. Instead I&#8217;ll just napkin it up here.</p>
<p>Running 10 A through eight of the twelve eight-turn coils yields, through nibbler (NIBLR):</p>
<p style="text-align: center;">
<img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-7b81e11c1e00cfe879c72954e256242b_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#92;&#116;&#97;&#117;&#32;&#61;&#32;&#52;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#52;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#56;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#49;&#48;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#65;&#125;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#48;&#46;&#56;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#84;&#125;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#56;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#109;&#109;&#125;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#54;&#48;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#109;&#109;&#125;&#32;&#61;&#32;&#48;&#46;&#52;&#57;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#78;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#109;&#125;" height="13" width="400" style="vertical-align: -1px;"/></p>
<p>If you&#8217;re on top of this, that&#8217;s a Kt of 49.2 millinewton-meter/A, or a Kv of 20.3 radian/second/V, also expressed as 194 RPM/V. Now, since I&#8217;m using spiral trace coils that don&#8217;t link flux nearly as well as normal circular-section wire wound coils, I&#8217;m just going to give my torque constant a fudge factor of 0.7, which makes the Kv 1.43 times higher.</p>
<p>Now we&#8217;re talking about a motor putting out 0.34 Nm of torque at 10 A and spinning 3080 RPM at no-load on a 11.1V battery (three-cell lithium). I know from SolidWorks that all the spinny parts of the shell<sup><a href="http://www.geekshavefeelings.com/posts/delicious-axial-flux-flapjack#footnote_6_1442" id="identifier_6_1442" class="footnote-link footnote-identifier-link" title="Two rotor plates, 28 magnets, two UHMW magnet retainers, two tool steel teeth, two aluminum tooth-like spacers, eight 8-32 screws, and a UHMW bearing retainer">7</a></sup> weigh just about 2 lb and has a moment of inertia of 3.32 g-m².</p>
<p>If I can control current (and thus torque) to be constant, then I can get to my no-load speed in:</p>
<p style="text-align: center;">
<img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-ad5cae393319787a6eb7edb673b95802_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#92;&#99;&#102;&#114;&#97;&#99;&#123;&#53;&#49;&#46;&#52;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#114;&#97;&#100;&#125;&#125;&#123;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#115;&#125;&#125;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#51;&#46;&#51;&#50;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#103;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#109;&#109;&#94;&#50;&#125;&#125;&#123;&#48;&#46;&#51;&#52;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#78;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#109;&#125;&#125;&#32;&#61;&#32;&#51;&#46;&#49;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#115;&#125;" height="43" width="203" style="vertical-align: -12px;"/></p>
<p>Also, the weapon kinetic energy would be:</p>
<p style="text-align: center;">
<img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-4f65bcf35f376dac7189c884fcc96964_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#125;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#51;&#46;&#51;&#50;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#103;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#109;&#109;&#94;&#50;&#125;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#92;&#108;&#101;&#102;&#116;&#40;&#53;&#49;&#46;&#52;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#114;&#97;&#100;&#125;&#125;&#123;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#115;&#125;&#125;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#94;&#50;&#32;&#61;&#32;&#49;&#55;&#51;&#32;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#74;&#125;" height="31" width="252" style="vertical-align: -9px;"/></p>
<p>which is comparable to just dropping the whole robot 5 stories.</p>
<h3>Current progress</h3>
<p>I actually beasted this thing to 90% completion in time for Motorama, but then blew it up the night before in the hotel (details later). With that deadline over, I&#8217;m taking some time to relax and go through some details with more rigor (or at least document the lack of rigor where it exists).</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/IMG_04341-e1361741038300.jpg"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2013/02/IMG_04341-e1361741038300-640x404.jpg" alt="Pancake progress" width="640" height="404" class="alignnone size-large wp-image-1495" /></a></p>
<p>With that said, it drives pretty well, the stators are milled and ready to be wired up, and I just need to make myself a little jig to hold the stator and rotor for testing (the actual chassis isn&#8217;t easy or safe to grab onto, for obvious reasons).</p>
<p>Await my next post on the electronics package I whipped up for Flapjack, High Fructose. If you&#8217;re really impatient, you can check out <a href="https://github.com/GHF/hfcs" title="GitHub GHF/hfcs" target="_blank">High Fructose&#8217;s GitHub firmware repository, hfcs</a> (High Fructose corn software).
<ol class="footnotes">
<li id="footnote_0_1442" class="footnote">Nor to pilot, really, since the drive system was fully automated and the operator just pushes a single joystick</li>
<li id="footnote_1_1442" class="footnote">Plus my laptop was out of commission for three days, I took daily showers, and I managed to do laundry four hours before we left on our road trip to Pennsylvania</li>
<li id="footnote_2_1442" class="footnote">Relax, I have no idea what I&#8217;m talking about either</li>
<li id="footnote_3_1442" class="footnote">&#8220;Turn&#8221; is used loosely here since it&#8217;s a fat spiral coil and the active lengths aren&#8217;t really equal</li>
<li id="footnote_4_1442" class="footnote">Probably; putting them in a 2S2P configuration puts half the current in each coil, solving the current density issue, but probably puts this motor out of High Fructose&#8217;s class</li>
<li id="footnote_5_1442" class="footnote">Hell, I didn&#8217;t even guesstimate anything for High Fructose; I just put some components down and said it looks about right</li>
<li id="footnote_6_1442" class="footnote">Two rotor plates, 28 magnets, two UHMW magnet retainers, two tool steel teeth, two aluminum tooth-like spacers, eight 8-32 screws, and a UHMW bearing retainer</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.geekshavefeelings.com/posts/delicious-axial-flux-flapjack/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Color Theory, with Cats: Part 1</title>
		<link>http://www.geekshavefeelings.com/posts/color-theory-with-cats-part-1</link>
		<comments>http://www.geekshavefeelings.com/posts/color-theory-with-cats-part-1#comments</comments>
		<pubDate>Wed, 06 Feb 2013 04:16:54 +0000</pubDate>
		<dc:creator>Xo Wang</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[cats]]></category>
		<category><![CDATA[color.theory]]></category>

		<guid isPermaLink="false">http://www.geekshavefeelings.com/?p=573</guid>
		<description><![CDATA[This was an unfinished draft meant to be published on April 3, 2010. Enjoy? Je kunt beter over je fiets lullen dan over je lul fietsen. –Dutch proverb. Translation: something about bicycles and some untranslatable stuff. Color Theory, with Cats: Or How to Really Understand Color Part 1 – Beyond RGB Color theory is really [...]]]></description>
				<content:encoded><![CDATA[<p><em>This was an unfinished draft meant to be published on April 3, 2010. Enjoy?</em></p>
<blockquote><p><em>Je kunt beter over je fiets lullen dan over je lul fietsen.</em></p>
<p style="text-align: right;">–Dutch proverb.<br />
Translation: something about bicycles and some untranslatable stuff.</p>
</blockquote>
<h2>Color Theory, with Cats: Or How to Really Understand Color</h2>
<p><em>Part 1 – Beyond RGB</em></p>
<p>Color theory is really complex. If you don&#8217;t think so, you are either somebody who doesn&#8217;t understand color or you&#8217;re a color scientist. Actually, scratch that, you&#8217;d have to be a supergenius color scientist (<em>respekt</em>), because the color scientists I know think color is complex too—and that&#8217;s not just an ego thing.</p>
<p>I realized that color theory was complex from the moment I accidentally hit a button on an old computer monitor and had no idea what any of the menus meant. From then on, I&#8217;ve had a fine education in physics and computer science (if I say so myself) and I dabbled in psychology and biology with a bit of reading as well. Even so, I never really put all the pieces together until now. Now, I think I finally have a coherent model of how we perceive color from light.</p>
<p>So, it really grills my cheese to hear people talking about just how simple color vision is. These range from regular people who never have to deal with the specifics of image capture or color reproduction to art majors who insist that the universe is made from the color wheel to web designers who have no idea what they are talking about: &#8220;Hey, you just have this hexadecimal thing that ranges from 00 to FF and it represents all the colors of the rainbow! I&#8217;m so pro at computers; Xo, allow me to teach you hexadecimal numbers!&#8221;</p>
<p>On second thought, no web designer knows what he/she is talking about, so that was a bad example.</p>
<p>Nonetheless, color ignorance (not to be confused with colorblindness) grills my cheese so much that I have to look at pictures of kittens when I think about all those people living in fear of the truth. In fact, it motivated me to write this series of articles on <em>really understanding</em> color—in Georgia springtime with a cat sleeping next to me:<br />
<a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2010/04/Towers-cat.jpg"><img class="alignnone size-medium wp-image-585" title="Towers cat" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2010/04/Towers-cat-225x300.jpg" alt="" width="225" height="300" /></a></p>
<p>And I can still feel my blood boiling a little when I think of the people who would say things like:</p>
<ul>
<li>&#8220;If you combine red, green, and blue, you can get all the colors of the rainbow!&#8221;</li>
<li>&#8220;The spectrum has every color visible to human eyes!&#8221;</li>
<li>&#8220;Octarine is the eighth color<sup><a href="http://www.geekshavefeelings.com/posts/color-theory-with-cats-part-1#footnote_0_573" id="identifier_0_573" class="footnote-link footnote-identifier-link" title="Ed: After receiving numerous corrections on this point, I&#039;d like to point out that &quot;octarine&quot; is indeed the &quot;eighth color,&quot; whatever that means.">1</a></sup>!&#8221;</li>
</ul>
<p>Look, my cheese just gets really grilled on this one, OK? I mean, just think of what a widespread understanding of color would do to progress racial equality!</p>
<p>But I digress. Here&#8217;s your damn article. With cats.</p>
<h3>Light</h3>
<p>I will be using numerous generalizations and assumptions in this part of the series; for a more in-depth look into specific topics, see the later parts of this article. Let&#8217;s start the generalizations of color with the thing that lets us see color: light.</p>
<p>Without specifics with respect to quantum mechanics <em>et al</em>, light is electromagnetic radiation that we humans can see. As you learn from any physics class, light is both a wave and a particle—it can do all of the funky things waves can do, like reflect off of mirrors or refract through lens, as well as all the things particles can do, like being easy to understand.</p>
<p>For the sake of this article, we&#8217;re going to think of light as particles. Light particles are usually known as photons, and can be visualized as little packets of energy that each have a direction and a speed. The speed is pretty much the same for all of them, and tends to be the speed of light <a href="http://www.google.com/search?q=c"><em>c</em></a> (not to be confused with my friend GS&#8217;s C, which is the stocker ticker for Citigroup).</p>
<p>This is a good way to visualize a collection of photons moving in roughly the same direction:<br />
<a title="Photons" href="http://www.geekshavefeelings.com/x/wp-content/uploads/2010/04/Photons.png"><img class="alignnone size-large wp-image-591" title="Photons" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2010/04/Photons-640x376.png" alt="" width="640" height="376" /></a></p>
<p>Except this article is called &#8220;Color Theory, with Cats,&#8221; not &#8220;Color Theory, with No Cats at All,&#8221; so here&#8217;s a better way to think of them:<br />
<a title="Photoncats" href="http://www.geekshavefeelings.com/x/wp-content/uploads/2010/04/Photoncats.png"><img class="alignnone size-large wp-image-593" title="Photoncats" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2010/04/Photoncats-640x376.png" alt="" width="640" height="376" /></a></p>
<p>This picture would be accurate if you just keep in mind that photons occupy no space at all, but are instead purely energy. That&#8217;s why they move so fast, and also why you can&#8217;t hear sunlight meowing.</p>
<p><em>a哦ihasofpouheuh哦哦ｉｊｏｉｏｉｍｋｊｈｏoph oia jodhwaiu</em>
<ol class="footnotes">
<li id="footnote_0_573" class="footnote">Ed: After receiving numerous corrections on this point, I&#8217;d like to point out that &#8220;octarine&#8221; is indeed the &#8220;eighth color,&#8221; whatever that means.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.geekshavefeelings.com/posts/color-theory-with-cats-part-1/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to teach how to PCB?</title>
		<link>http://www.geekshavefeelings.com/posts/how-to-teach-how-to-pcb</link>
		<comments>http://www.geekshavefeelings.com/posts/how-to-teach-how-to-pcb#comments</comments>
		<pubDate>Sat, 29 Dec 2012 21:42:53 +0000</pubDate>
		<dc:creator>Xo Wang</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[elec.engr]]></category>
		<category><![CDATA[gatech]]></category>
		<category><![CDATA[invention.studio]]></category>
		<category><![CDATA[pcb]]></category>

		<guid isPermaLink="false">http://www.geekshavefeelings.com/?p=1136</guid>
		<description><![CDATA[For someone graduating into tech, it&#8217;s a useful skill to be able to withstand the disinterested gaze—collimated through glasses thick and transparent as hockey pucks—of gathered young engineers listening with open mouths and a slightly hunched backs. Fortunately, I now have a solid decade&#8217;s head start in practice over most of my peers, thanks to having [...]]]></description>
				<content:encoded><![CDATA[<p>For someone graduating into tech, it&#8217;s a useful skill to be able to withstand the disinterested gaze—collimated through glasses thick and transparent as hockey pucks—of gathered young engineers listening with open mouths and a slightly hunched backs. Fortunately, I now have a solid decade&#8217;s head start in practice over most of my peers, thanks to having lead and taught various teams and organizations of proto-engineers since middle school.</p>
<p>The trick is to ignore the face of total boredom your audience seems to wear. Never forget that those people have smartphones; you can&#8217;t overestimate your patrons&#8217; fascination with you if you notice their touchscreens aren&#8217;t being poked at.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/photo.jpg"><img class="alignnone size-large wp-image-1147" title="Photo by Gabe Ochoa" alt="" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/photo-640x480.jpg" width="640" height="480" /></a></p>
<p>Most recently, I&#8217;m proud to have taught a three-part workshop on printed circuit board (PCB) fabrication as part of the <a href="http://inventionstudio.gatech.edu/news/workshop-schedule/" title="Workshop Schedule" target="_blank">GT Invention Studio/Makers Club fall series</a>. Among other records set this semester, this was the first time ever that the <a href="http://inventionstudio.gatech.edu/about/" title="Invention Studio" target="_blank">Invention Studio</a> was inhabited by an electrical engineering majority<sup><a href="http://www.geekshavefeelings.com/posts/how-to-teach-how-to-pcb#footnote_0_1136" id="identifier_0_1136" class="footnote-link footnote-identifier-link" title="Aside from when I&#039;m in there alone. &gt;.&gt;">1</a></sup>. It felt weird, but didn&#8217;t smell as bad as I expected.</p>
<p>On top of attendance, reception to the PCB workshop was great. People had all pulled out their laptops with EAGLE already installed, as if they had actually read the emails I had sent out. I was pleasantly surprised to hear that people had learned useful things through me.</p>
<p>The workshop was split over three days, and I had digital materials prepared for each one. The first and last sessions used Keynote presentations, while the in-between session had paper handouts. You can download these in PDF by clicking on them.</p>
<ul>
<li><strong>Day 1</strong>: overview of hacking hardware and EAGLE demo. I used my interpretation of the <a href="http://etotheipiplusone.net" title="equals zero (Charles's blog)" target="_blank">Charles</a> flavor of imparting knowledge—learning by facilitating projects. I disclosed my ideology and motivation, then deciphered jargon with a glossary, and finally provided a list of tools and vendors. At the end, I had everyone design a board on the spot.
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/PCB-Part-I-slides.pdf"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/PCB-workshop-I-640x360.png" alt="PCB workshop I" width="640" height="360" class="alignnone size-large wp-image-1139" style="border: 1px solid #868686;" /></a></li>
<li><strong>Day 2</strong>: how to create custom parts in EAGLE. I snuck in some keyboard shortcuts and best practices talks in here. This is the tricky part of hands-on teaching: to pass on knowledge through osmosis by working next to each other. Normally this is while working on similar projects, but that&#8217;s difficult to replicate for the sake of a workshop.
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/PCB-Part-II-handout.pdf"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/PCB-workshop-II-494x640.png" alt="PCB workshop II" width="494" height="640" class="alignnone size-large wp-image-1141" style="border: 1px solid #868686;" /></a></li>
<li><strong>Day 3</strong>: where and how to make boards or get boards made. Since I was sick and this was during <a href="http://en.wikipedia.org/wiki/Dead_week" title="Dead Week" target="_blank">Dead Week</a>, this became more of a round-table Q&#038;A session than a lecture. However, this worked out to be a great &#8220;wrap&#8221; for the workshop and I was able to get a bit of feedback through it.
<p>The slides I created for this session, however, are the most useful out of all the materials. The set contains tables of various PCB fabs that I&#8217;ve had some sort of experience with. They include poorly researched specs, lead times, and true costs<sup><a href="http://www.geekshavefeelings.com/posts/how-to-teach-how-to-pcb#footnote_1_1136" id="identifier_1_1136" class="footnote-link footnote-identifier-link" title="Using BabyCorntroller&#039;s 4.95&Prime;&times;4.95&Prime; power stage TinyHusk as an example.">2</a></sup> (setup fees, unit cost, shipping &#038; handling) along with some anecdotal notes.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/PCB-Part-III-slides.pdf"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/PCB-workshop-III-640x360.png" alt="PCB workshop III" width="640" height="360" class="alignnone size-large wp-image-1140" style="border: 1px solid #868686;" /></a></li>
</ul>
<p>I was a bit shocked that everything had gone so smoothly. The pacing was especially important in the first session&#8217;s EAGLE demo. There, I put up each part I used and its library on the whiteboard, and secondly I had prepared EAGLE libraries and finished schematics/layouts to be shared on Dropbox. The former meant everyone could follow regardless of their pace, and the latter meant I only needed to show EAGLE techniques once—after that, I&#8217;m free to pull out the neat, proofread design files like Rachel Ray pulls out chicken drumettes marinated overnight in lemon and soy sauce. In addition to avoiding Murphy&#8217;s Law demo breakdowns, it also gave me the chance to take a breather, walk around, and do one-on-one&#8217;s with anyone having trouble.</p>
<p>Obviously, what also helps pacing is having focused, eager students but not too many of them. With a class of about 10 to 15, it wasn&#8217;t impossible to make sure everyone was following.</p>
<p>By the last session, people were bringing in their projects and devkits they had bought to play with. That was great! I feel incredibly fortunate to have had such an excellent audience. I&#8217;m super motivated to try this again, hopefully with improvements.
<ol class="footnotes">
<li id="footnote_0_1136" class="footnote">Aside from when I&#8217;m in there alone. &gt;.&gt;</li>
<li id="footnote_1_1136" class="footnote">Using <a href="http://www.geekshavefeelings.com/posts/category/all/work/babycorntroller" title="BabyCorntroller">BabyCorntroller</a>&#8216;s 4.95″×4.95″ power stage TinyHusk as an example.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.geekshavefeelings.com/posts/how-to-teach-how-to-pcb/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Improvements</title>
		<link>http://www.geekshavefeelings.com/posts/site-improvements</link>
		<comments>http://www.geekshavefeelings.com/posts/site-improvements#comments</comments>
		<pubDate>Sat, 29 Dec 2012 17:17:53 +0000</pubDate>
		<dc:creator>Xo Wang</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://www.geekshavefeelings.com/?p=1340</guid>
		<description><![CDATA[After a long, harsh estrangement, I&#8217;ve reunited with this website. In addition to finally posting again, I&#8217;ve also overhauled it under the hood and made it more readable. The theme here? I should have known better and did know better Speed—I&#8217;ve been paying for a VPS for over a year now, but never had anything [...]]]></description>
				<content:encoded><![CDATA[<p>After a long, harsh estrangement, I&#8217;ve reunited with this website. In addition to finally posting again, I&#8217;ve also overhauled it under the hood and made it more readable. The theme here?</p>
<h2>I should have known better and did know better</h2>
<ul>
<li><strong>Speed</strong>—I&#8217;ve been paying for a VPS for over a year now, but never had anything running on the server. I finally got around to installing <a href="http://www.centos.org" title="CentOS" target="_blank">CentOS</a> + <a href="http://nginx.org" title="nginx HTTP server" target="_blank">nginx</a> + <a href="http://php-fpm.org" title="PHP-FPM" target="_blank">PHP-FPM</a> with <a href="http://php.net/manual/en/book.apc.php" title="Alternative PHP Cache" target="_blank">APC</a> + <a href="http://www.mysql.com" title="MySQL" target="_blank">MySQL</a> on it: a standard, stable but modern setup. With a few tweaks to get WordPress caching working and several nail-biting hours of DNS fiddling<sup><a href="http://www.geekshavefeelings.com/posts/site-improvements#footnote_0_1340" id="identifier_0_1340" class="footnote-link footnote-identifier-link" title="Friggin&#039; Google DNS cache is sooo slow at updating.">1</a></sup>, this site is officially off of shared hosting and <em>waaay</em> faster.</li>
<li><strong>Fonts</strong>—I had previously used a self-hosted embedded version of Lucida Grande, but this caused a lot of problems. For example, I didn&#8217;t include a true italic version<sup><a href="http://www.geekshavefeelings.com/posts/site-improvements#footnote_1_1340" id="identifier_1_1340" class="footnote-link footnote-identifier-link" title="Because none existed; Lucida Grande was licensed by Apple for its UI, except for the italic style. Presumably Apple didn&#039;t need any?">2</a></sup>, so browsers would skew my &lt;em&gt; text at an angle instead—a symptom that typographers are calling &#8220;<a href="http://www.smashingmagazine.com/2012/07/11/avoiding-faux-weights-styles-google-web-fonts/" title="Avoiding Faux Weights And Styles With Google Web Fonts" target="_blank">faux italic</a>.&#8221; I&#8217;ve now switched to <a href="http://www.latofonts.com/lato-free-fonts/" title="Lato" target="_blank">Lato</a> hosted at <a href="http://www.google.com/webfonts" title="Google Web Fonts" target="_blank">Google Web Fonts</a>. It&#8217;s an open-source <a href="http://en.wikipedia.org/wiki/Category:Grotesque_sans-serif_typefaces" title="Grotesque (sans-serif style)" target="_blank">Grotesque</a> typeface with tall geometric line figures that make years and figures pop out:<br />
<blockquote><p>As of 2012, geeks have feelings uses four (4) variants of Lato.</p></blockquote>
<p>Consistent line widths and classical proportions, such as a low x-height, keep it classy yet readable. Also, I&#8217;ve added <a href="http://levien.com/type/myfonts/inconsolata.html" title="Inconsolata" target="_blank">Inconsolata</a> as an <code>@font-face</code> to display my monospace text, in case you don&#8217;t have the more preferred <a href="http://www.microsoft.com/typography/fonts/family.aspx?FID=300" title="Consolas" target="_blank">Consolas</a>.</li>
<li><strong>Readability</strong>—I&#8217;ve upped the text size to 14px, from 11px. Having used very high-DPI displays—Thinkpad W500 15.4″ 1920×1200 and <a href="http://www.apple.com/macbook-pro/features-retina/" title="ExtremePro AirBook" target="_blank">ExtremePro AirBook</a> 15″ 2880×1800—I myself have had no shortage of complaints about this site, in terms of eyestrain. In addition, I&#8217;ve made the paragraphs justified, aided by a script to do <a href="http://en.wikipedia.org/wiki/Syllabification" title="Syllabification (hyphenation for American English)" target="_blank">hyphenation</a>.</li>
<li><strong>Spam/Security</strong>—turns out my site had been compromised, plus I had deleted my CAPTCHA plugin when I upgraded WordPress some time ago. So I found my comment queue full of spam, not to mention my server a probable source of additional outgoing spam. I&#8217;m working hard to prevent this from happening again.</li>
<li><strong>Backups</strong>—still not as good as I&#8217;d like my system to be. I&#8217;m thinking of backing up the database and media to Amazon S3 while keeping a Git repo somewhere of the site code.</li>
</ul>
<p>Hopefully I won&#8217;t stop updating my site again once I&#8217;m back to school/work.
<ol class="footnotes">
<li id="footnote_0_1340" class="footnote">Friggin&#8217; Google DNS cache is sooo slow at updating.</li>
<li id="footnote_1_1340" class="footnote">Because none existed; Lucida Grande was licensed by Apple for its UI, except for the italic style. Presumably Apple didn&#8217;t need any?</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.geekshavefeelings.com/posts/site-improvements/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixed-point atan2</title>
		<link>http://www.geekshavefeelings.com/posts/fixed-point-atan2</link>
		<comments>http://www.geekshavefeelings.com/posts/fixed-point-atan2#comments</comments>
		<pubDate>Thu, 27 Dec 2012 06:42:54 +0000</pubDate>
		<dc:creator>Xo Wang</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[atan2]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[comp.sci]]></category>

		<guid isPermaLink="false">http://www.geekshavefeelings.com/?p=1011</guid>
		<description><![CDATA[This was an unfinished draft meant to be published on February 6, 2012. Enjoy? atan2 is a freaking useful function: given some y and x12, it computes their &#8220;four-quadrant&#8221; arctangent, which is basically that coordinate&#8217;s angle in polar form. These two beautiful Wikipedia diagrams explain why it&#8217;s so much better than the naïve atan(y/x): It [...]]]></description>
				<content:encoded><![CDATA[<p><em>This was an unfinished draft meant to be published on February 6, 2012. Enjoy?</em></p>
<p><a title="atan2" href="http://en.wikipedia.org/wiki/Atan2" target="_blank"><code>atan2</code></a> is a freaking useful function: given some <a title="Cartesian coordinate system" href="http://en.wikipedia.org/wiki/Cartesian_coordinate_system" target="_blank">y and x</a><sup><a href="http://www.geekshavefeelings.com/posts/fixed-point-atan2#footnote_0_1011" id="identifier_0_1011" class="footnote-link footnote-identifier-link" title="Or a complex number, if you swing that way">1</a></sup><sup><a href="http://www.geekshavefeelings.com/posts/fixed-point-atan2#footnote_1_1011" id="identifier_1_1011" class="footnote-link footnote-identifier-link" title="In regular atan, you&#039;d write atan(y/x), so atan2&#039;s argument order is y then x.">2</a></sup>, it computes their &#8220;four-quadrant&#8221; arctangent, which is basically that coordinate&#8217;s angle in <a title="Polar coordinate system" href="http://en.wikipedia.org/wiki/Polar_coordinate_system" target="_blank">polar form</a>.</p>
<p>These two beautiful Wikipedia diagrams explain why it&#8217;s so much better than the naïve <code>atan(y/x)</code>:</p>
<p><a href="http://en.wikipedia.org/wiki/File:Atan2Diagram.png"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/Atan2Diagram-400x349.png" alt="Atan2Diagram" width="400" height="349" class="alignnone size-medium wp-image-1569" /></a><a href="http://en.wikipedia.org/wiki/File:AtanDiagram.png"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/AtanDiagram-400x349.png" alt="AtanDiagram" width="400" height="349" class="alignnone size-medium wp-image-1568" /></a></p>
<p>It also shows the two reasons why I suffered a stroke of unsanity and whipped up my own <code>atan2</code> function in Q15 fixed point/1.0.15/1.15/whycan&#8217;twehaveonenameforthis format that&#8217;s so commonly used by DSP chips:</p>
<ol>
<li>You see how smooth that thing is? That&#8217;s because it was generated in some high-falutin&#8217; floating point on a fancy machine with a sweet <a href="http://en.wikipedia.org/wiki/Floating-point_unit" title="Floating-point unit" target="_blank">FPU</a>. Well, I program itty-bitty embedded microcontrollers with nary a hardware integer divider, so I use <a title="Fixed-point arithmetic" href="http://en.wikipedia.org/wiki/Fixed-point_arithmetic" target="_blank">fixed-point arithmetic</a> for my math. One of the more popular fixed-point formats is Q15, which is taking a 16-bit signed two&#8217;s complement integer<sup><a href="http://www.geekshavefeelings.com/posts/fixed-point-atan2#footnote_2_1011" id="identifier_2_1011" class="footnote-link footnote-identifier-link" title="If that&#039;s confusing, look them up before continuing because it&#039;s about to get worse">3</a></sup> and instead of having it represent <img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-e4d36518286fda10a9c170374fa0978a_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#91;&#45;&#51;&#50;&#55;&#54;&#56;&#44;&#32;&#51;&#50;&#55;&#54;&#55;&#93;" height="16" width="110" style="vertical-align: -4px;"/>, have it represent <img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-a7f422ce91a1a9fe12f46880ed85203e_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#91;&#45;&#49;&#44;&#32;&#49;&#32;&#45;&#32;&#50;&#94;&#123;&#45;&#49;&#53;&#125;&#93;" height="20" width="92" style="vertical-align: -4px;"/><sup><a href="http://www.geekshavefeelings.com/posts/fixed-point-atan2#footnote_3_1011" id="identifier_3_1011" class="footnote-link footnote-identifier-link" title="Trust me, +1 really is missing from the range">4</a></sup>. I used it out of convenience since I knew a lot of the tips &amp; tricks for making Q15 computations go fast.</li>
<li>The range on <code>atan2</code> output is <img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-90b9a7da344c953b174ca501fb640ee9_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#91;&#45;&#92;&#112;&#105;&#44;&#32;&#92;&#112;&#105;&#93;" height="16" width="50" style="vertical-align: -4px;"/>. That&#8217;s nice and mathemagicatical, but not so useful an angle representation on a microcontroller. See, first, that doesn&#8217;t fit inside of a Q15 number. Then even if it did, it&#8217;d still be ridiculous to have your angle go from some arbitrary constant to some bigger arbitrary constant. You got only 16 bits! You want every possible 16-bit number to be a valid and useful angle, not just some subrange. So let&#8217;s map our 16-bit range <img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-a0b03f4eeb308aff24773ed341caba12_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#91;&#48;&#44;&#32;&#50;&#94;&#123;&#49;&#54;&#125;&#32;&#45;&#32;&#49;&#93;" height="20" width="73" style="vertical-align: -4px;"/> to a full turn of the circle <img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-4b011be2a0242934d324222883f034cb_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#91;&#48;&#32;&#123;&#92;&#114;&#109;&#32;&#116;&#117;&#114;&#110;&#115;&#125;&#44;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#50;&#94;&#123;&#49;&#53;&#125;&#125;&#123;&#54;&#53;&#53;&#51;&#54;&#125;&#32;&#123;&#92;&#114;&#109;&#32;&#116;&#117;&#114;&#110;&#125;&#93;" height="24" width="130" style="vertical-align: -6px;"/>.</li>
</ol>
<h2>Fixed point angular representation</h2>
<p>By using all 16 bits for representing angle, we can do wicked fast things like <code>sin</code> and <code>cos</code> lookup tables:</p>
<pre class="brush: cpp; title: ; notranslate">const int16_t sin_lut[4096]; // a 2^12 table of precomputed sin values
const uint16_t angle; // some angle in our 16-bit turn format
const int16_t sin_of_angle = sin_lut[angle &gt;&gt; 4];
// rshift because there are 16x possible angles as table entries
// we can round to the nearest entry: sin_lut[(angle + 8) &gt;&gt; 4]</pre>
<p>We also avoid having to wrap our calculations to stay within <img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-8d848bc51928138ba1681b689485215b_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#91;&#48;&#44;&#32;&#50;&#92;&#112;&#105;&#41;" height="17" width="44" style="vertical-align: -4px;"/>; instead, <a href="http://en.wikipedia.org/wiki/Integer_overflow" title="Integer overflow" target="_blank">integer underflow and overflow</a> does it automatically!</p>
<h2>Derivation for <code>atan2</code></h2>
<p>To implement <code>atan2</code>, I whipped out Chapter 18 from <a href="http://www.amazon.com/Streamlining-Digital-Signal-Processing-Guidebook/dp/0470131578" title="Streamlining DSP" target="_blank">Streamlining Digital Signal Processing</a>, which had several approximations for <code>atan</code>, including the following formula:</p>
<p><img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-534fea9d18ac21085fc738174b372cd5_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#123;&#92;&#114;&#109;&#32;&#97;&#114;&#99;&#116;&#97;&#110;&#125;&#40;&#120;&#41;&#32;&#92;&#97;&#112;&#112;&#114;&#111;&#120;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#105;&#125;&#123;&#52;&#125;&#120;&#32;&#43;&#32;&#48;&#46;&#50;&#55;&#51;&#32;&#120;&#32;&#40;&#49;&#32;&#45;&#32;&#124;&#120;&#124;&#41;" height="19" width="223" style="vertical-align: -6px;"/></p>
<p>That&#8217;s good to a worst-case error of 0.22° for <img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-60f7733e03e97ece860432da47869265_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#45;&#49;&#32;&#92;&#108;&#101;&#32;&#120;&#32;&#92;&#108;&#101;&#32;&#49;" height="13" width="75" style="vertical-align: -1px;"/>, which I&#8217;m cool with, but it only works for octants I and VIII. Also, the output ranges from <img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-865659dc623a05815d072e0d1abd0d63_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#91;&#45;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#105;&#125;&#123;&#52;&#125;&#44;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#105;&#125;&#123;&#52;&#125;&#93;" height="19" width="51" style="vertical-align: -6px;"/>, not <img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-c131f58e4e779f3586902554b869d6df_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#91;&#48;&#44;&#32;&#49;&#41;" height="17" width="33" style="vertical-align: -4px;"/> like we want. Let&#8217;s fix the range first:</p>
<p><img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-0d11c55d8e50ceb0676dccd7fba28640_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#50;&#92;&#112;&#105;&#125;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#112;&#105;&#125;&#123;&#52;&#125;&#120;&#32;&#43;&#32;&#48;&#46;&#50;&#55;&#51;&#32;&#120;&#32;&#40;&#49;&#32;&#45;&#32;&#124;&#120;&#124;&#41;&#92;&#114;&#105;&#103;&#104;&#116;&#41;" height="26" width="169" style="vertical-align: -9px;"/><br />
<img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-901fa3fbb30afcd2cdb26ae84da649e4_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#56;&#125;&#120;&#32;&#43;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#48;&#46;&#50;&#55;&#51;&#125;&#123;&#50;&#92;&#112;&#105;&#125;&#32;&#120;&#32;&#40;&#49;&#32;&#45;&#32;&#124;&#120;&#124;&#41;" height="23" width="144" style="vertical-align: -6px;"/><br />
<img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-233435c7d812a238a15939397b9b325e_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#61;&#32;&#120;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#56;&#125;&#32;&#43;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#48;&#46;&#50;&#55;&#51;&#125;&#123;&#50;&#92;&#112;&#105;&#125;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#48;&#46;&#50;&#55;&#51;&#125;&#123;&#50;&#92;&#112;&#105;&#125;&#124;&#120;&#124;&#41;&#92;&#114;&#105;&#103;&#104;&#116;&#41;" height="26" width="169" style="vertical-align: -9px;"/></p>
<p>The last form is the one you&#8217;d actually put in your code, since it requires only two multiplies and one add. Because I&#8217;m using Q15, which represents <img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-2b55cdd374d36b85741e3b397afff6b5_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#91;&#45;&#49;&#44;&#32;&#49;&#41;" height="17" width="44" style="vertical-align: -4px;"/> and I want <img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-c131f58e4e779f3586902554b869d6df_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#91;&#48;&#44;&#32;&#49;&#41;" height="17" width="33" style="vertical-align: -4px;"/>, I end up scaling the whole thing again by 2:</p>
<p><img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-9f135ff16a3340f1fdc5eca355986084_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#61;&#32;&#120;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#52;&#125;&#32;&#43;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#48;&#46;&#50;&#55;&#51;&#125;&#123;&#92;&#112;&#105;&#125;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#48;&#46;&#50;&#55;&#51;&#125;&#123;&#92;&#112;&#105;&#125;&#124;&#120;&#124;&#41;&#92;&#114;&#105;&#103;&#104;&#116;&#41;" height="26" width="169" style="vertical-align: -9px;"/></p>
<p>Now to handle Cartesian coordinate inputs not in octant I and VIII, I chose to manipulate the coordinates and exploit the symmetries of <code>atan2</code>. For example, if our input is in octants II and III, then we can flip the x and y coordinates to perform a reflection about <img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-717b953c44fa6c6469f826d2be446b4d_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#120;&#32;&#61;&#32;&#121;" height="13" width="39" style="vertical-align: -5px;"/>. If we do our range-restricted <code>atan(y/x)</code>, the result will be in octants I/VIII. Now, we gotta negate the result to account for the &#8220;flip&#8221; caused by the earlier reflection, and then we need to rotate by 90° to get it back to octants II/III, which is as simple as adding 0.25 turns to the angle.</p>
<p>[diagram goes here]</p>
<p>Unfortunately, my derivations here diverged from the four-quadrant formula in the book. It turns out the book is just wrong. asdf</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/02/bad_canada.png"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/02/bad_canada-300x219.png" alt="Never trust a Canadian" title="Streamlining DSP table" width="300" height="219" class="alignnone size-medium wp-image-1030" /></a></p>
<h2>Implementation details AKA <code>nabs</code> rocks</h2>
<p>So anyways, here&#8217;s the implementation. I should note that the code relies on a <code>q15_mul</code> function that perform rounding of the product from the 32-bit intermediate to 16-bit result for maximum accuracy. Also, <code>s16_nabs</code> is a function for <em>negative absolute value</em>. Why use <code>nabs</code>? Well, <code>abs</code> is undefined for the most negative number, and chances are if you plug the Q15 value for -1 into <code>abs</code>, you&#8217;ll get -1 back out. <em>Negative</em> absolute value, on the other hand, is pretty easy to keep fully defined.</p>
<p>To test my approximate arctangent, I tested all <img src="http://www.geekshavefeelings.com/x/wp-content/ql-cache/quicklatex.com-4b94e26dbe07bb45964ed3d272f472e3_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#50;&#94;&#123;&#49;&#54;&#125;&#92;&#116;&#105;&#109;&#101;&#115;&#50;&#94;&#123;&#49;&#54;&#125;&#61;&#52;&#50;&#57;&#52;&#57;&#54;&#55;&#50;&#57;&#54;" height="17" width="164" style="vertical-align: -1px;"/> possible inputs and computed their errors relative to the double-precision <code>atan2</code> implementation in the GNU C library. I got a worst-case error of 0.221°, which means I&#8217;m not losing much precision or introducing quantization error by using fixed-point, and there&#8217;s an root mean square (RMS) error of about 0.0004 turns.</p>
<p>What I&#8217;m saying is this: relax, this code was tested by brute force. <img src='http://www.geekshavefeelings.com/x/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </p>
<p><code>s16_nabs</code>, <code>q15_mul</code>, <code>q15_div</code>, and of course <code>fxpt_atan2</code> are all included in this MIT-licensed source file: <a href='http://www.geekshavefeelings.com/x/wp-content/uploads/2012/02/fxpt_atan2.c'>fxpt_atan2.c</a></p>
<p>A DSP library might have faster/better versions of some of those functions that may take advantage of your microcontroller&#8217;s DSP ALU.</p>
<h2>Codes!</h2>
<pre class="brush: cpp; collapse: true; light: false; title: fxpt_atan2 (click to expand); toolbar: true; notranslate">/**
 * 16-bit fixed point four-quadrant arctangent. Given some Cartesian vector
 * (x, y), find the angle subtended by the vector and the positive x-axis.
 *
 * The value returned is in units of 1/65536ths of one turn. This allows the use
 * of the full 16-bit unsigned range to represent a turn. e.g. 0x0000 is 0
 * radians, 0x8000 is pi radians, and 0xFFFF is (65535 / 32768) * pi radians.
 *
 * Because the magnitude of the input vector does not change the angle it
 * represents, the inputs can be in any signed 16-bit fixed-point format.
 *
 * @param y y-coordinate in signed 16-bit
 * @param x x-coordinate in signed 16-bit
 * @return angle in (val / 32768) * pi radian increments from 0x0000 to 0xFFFF
 */
uint16_t fxpt_atan2(const int16_t y, const int16_t x) {
    if (x == y) { // x/y or y/x would return -1 since 1 isn't representable
        if (y &gt; 0) { // 1/8
            return 8192;
        } else if (y &lt; 0) { // 5/8
            return 40960;
        } else { // x = y = 0
            return 0;
        }
    }
    const int16_t nabs_y = s16_nabs(y), nabs_x = s16_nabs(x);
    if (nabs_x &lt; nabs_y) { // octants 1, 4, 5, 8
        const int16_t y_over_x = q15_div(y, x);
        const int16_t correction = q15_mul(q15_from_double(0.273 * M_1_PI), s16_nabs(y_over_x));
        const int16_t unrotated = q15_mul(q15_from_double(0.25 + 0.273 * M_1_PI) + correction, y_over_x);
        if (x &gt; 0) { // octants 1, 8
            return unrotated;
        } else { // octants 4, 5
            return 32768 + unrotated;
        }
    } else { // octants 2, 3, 6, 7
        const int16_t x_over_y = q15_div(x, y);
        const int16_t correction = q15_mul(q15_from_double(0.273 * M_1_PI), s16_nabs(x_over_y));
        const int16_t unrotated = q15_mul(q15_from_double(0.25 + 0.273 * M_1_PI) + correction, x_over_y);
        if (y &gt; 0) { // octants 2, 3
            return 16384 - unrotated;
        } else { // octants 6, 7
            return 49152 - unrotated;
        }
    }
}</pre>
<ol class="footnotes">
<li id="footnote_0_1011" class="footnote">Or a complex number, if you swing that way</li>
<li id="footnote_1_1011" class="footnote">In regular <code>atan</code>, you&#8217;d write <code>atan(y/x)</code>, so <code>atan2</code>&#8216;s argument order is y then x.</li>
<li id="footnote_2_1011" class="footnote">If that&#8217;s confusing, look them up before continuing because it&#8217;s about to get worse</li>
<li id="footnote_3_1011" class="footnote">Trust me, +1 really is missing from the range</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.geekshavefeelings.com/posts/fixed-point-atan2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It Was Never About the Mileage</title>
		<link>http://www.geekshavefeelings.com/posts/it-was-never-about-the-mileage</link>
		<comments>http://www.geekshavefeelings.com/posts/it-was-never-about-the-mileage#comments</comments>
		<pubDate>Mon, 24 Dec 2012 03:06:42 +0000</pubDate>
		<dc:creator>Xo Wang</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[essays]]></category>
		<category><![CDATA[ev]]></category>
		<category><![CDATA[gatech]]></category>

		<guid isPermaLink="false">http://www.geekshavefeelings.com/?p=1206</guid>
		<description><![CDATA[I was dismayed and slightly infuriated to find that the GMC Sierra Hybrid has been axed for 20141, but wasn&#8217;t at all surprised. The problem with the Sierra Hybrid, a full-size pickup truck (and its nearly identical brother, the Yukon SUV), was that it was created for Americans and appreciated only by engineers. When you [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/2009-gmc-sierra-hybrid-crew-cab-03.jpg"><img class="alignnone size-large wp-image-1208" alt="2009 GMC Sierra Hybrid Crew Cab" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/2009-gmc-sierra-hybrid-crew-cab-03-640x392.jpg" width="640" height="392" /></a></p>
<p>I was dismayed and slightly infuriated to find that the <a title="Fox News: GM ending hybrid pickup truck production next year" href="http://www.foxnews.com/leisure/2012/12/13/gm-to-stop-building-hybrid-pickup-trucks-next-year/" target="_blank">GMC Sierra Hybrid has been axed for 2014</a><sup><a href="http://www.geekshavefeelings.com/posts/it-was-never-about-the-mileage#footnote_0_1206" id="identifier_0_1206" class="footnote-link footnote-identifier-link" title="By the way, how did we get to the point where cars are announced two years ahead of their model years?">1</a></sup>, but wasn&#8217;t at all surprised.</p>
<p>The problem with the Sierra Hybrid, a full-size pickup truck (and its nearly identical brother, the Yukon SUV), was that it was created for Americans and appreciated only by engineers. When you think about how little pickup-needing construction work most engineers do, that already-minuscule intersection makes for an pretty nonexistent market. In fact, considering GM vehicles are designed <em>by</em> American engineers<sup><a href="http://www.geekshavefeelings.com/posts/it-was-never-about-the-mileage#footnote_1_1206" id="identifier_1_1206" class="footnote-link footnote-identifier-link" title="A species becoming steadily endangered, as any current tech school student can attest to.">2</a></sup>, I&#8217;m surprised this kind of marketing disaster doesn&#8217;t happen more often<sup><a href="http://www.geekshavefeelings.com/posts/it-was-never-about-the-mileage#footnote_2_1206" id="identifier_2_1206" class="footnote-link footnote-identifier-link" title="As an aside, the vehicles in question are not only American, but USAian too: the hybrid continuously variable transmission (CVT) is produced in Baltimore, the Sierra is assembled at Fort Wayne and Flint, while the Yukon is assembled at Arlington.">3</a></sup>.</p>
<p>Let me demonstrate. What&#8217;s the question that&#8217;s been been on your mind since you found out about this <em>hybrid pickup truck</em>?</p>
<p>Yeah, &#8220;what kind of miles do you get to the gallon?&#8221;</p>
<p>But actually consider the Yukon Hybrid. Compared to a standard similarly-equipped good ol&#8217; internal-combustion Yukon, it&#8217;s somewhere between $3000–$6000 more and weighs 262lb. On top of a ~$50,000 sticker and 5694lb curb weight, those are nothing. Here&#8217;s what you get in return:</p>
<ul>
<li>Two 60kW electric motors, which produce maximum torque at a dead stop (no clutch needed, unlike the IC engine which produces peak torque at 4100RPM)</li>
<li>A NiMH battery pack that fits under the rear seats, taking up no additional space, and which can provide enough juice to get to 30mph under pure silent electric power</li>
<li>A <a title="Continuously variable transmission" href="http://en.wikipedia.org/wiki/Continuously_variable_transmission" target="_blank">continuously variable transmission (CVT)</a> that juggles the torques from the motors to optimize the output of the 6.0L V8</li>
</ul>
<p>It&#8217;s an engineer&#8217;s wet dream; the hybrid system truly <a title="GMC 2012 Yukon Hybrid" href="http://www.gmc.com/2012-yukon-hybrid-suv/features-specs/powertrain.html" target="_blank">enhances the vehicle performance</a> in areas that matter to people who buy trucks and SUVs: acceleration (torque) and towing capacity (torque, but also power), without compromise. Heck, older versions of the Sierra even had <a title="Edmunds GMC Sierra 1500 Hybrid Review" href="http://www.edmunds.com/gmc/sierra-1500-hybrid/" target="_blank">120VAC outlets</a>, which is hilariously like having the reverse of a <a title="Plug-in hybrid" href="http://en.wikipedia.org/wiki/Plug-in_hybrid" target="_blank">plug-in hybrid</a> system, but seems genuinely useful for e.g. a contractor with corded power tools or somebody living in a remote area with flakey power.</p>
<p><a href="http://www.motortrend.com/roadtests/oneyear/112_0604lt_2004_chevrolet_silverado_hybrid/photos/" target="_blank"><img class="alignnone size-full wp-image-1223" alt="HEV charging a BEV... wait, what?" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/04SilveradoHybrid.jpg" width="480" height="300" /></a></p>
<p>Sadly, consumers and journalists remain strapped to the myth that hybrids must be slow and small, and that their only reason to exist is to save gas, forcing carmakers to pander to that fiction. People simply don&#8217;t stop think <em>why</em> you&#8217;d build a second traction system into a car; instead, they file away hybrids as it were some expensive, heavy gadget that magically (and only) reduces the amount of gas used.</p>
<p>For example, people expect hybridizing to be appropriate only for vehicles small and light. I mean, if you&#8217;re buying a hybrid, you <em>must</em> only want to save gas, and to have extra capacity obviously <em>ruins</em> the entire vehicle. Truth is, it&#8217;s actually more difficult and less effective to hybridize a light vehicle—one of the reasons why you don&#8217;t see any motorcycles sporting extra batteries and motors—while throwing even a ton (1000 pounds) of batteries, motors, and motor controllers onto anything in our &#8220;<a title="Light truck" href="http://en.wikipedia.org/wiki/Light_truck" target="_blank">light truck</a>&#8221; category won&#8217;t really make a huge difference in weight and space.</p>
<p style="text-align: center;">&vellip;</p>
<p>My first knowledge of hybrid trucks was when I spoke to Jerry Meisel, who had advised the Georgia Tech FutureTruck team. For whatever reason, the Department of Energy (DOE) decided more than a decade ago<sup><a href="http://www.geekshavefeelings.com/posts/it-was-never-about-the-mileage#footnote_3_1206" id="identifier_3_1206" class="footnote-link footnote-identifier-link" title="When Hummer, then newly owned by GM, was all the rage.">4</a></sup> to invite university teams to build the most eco-friendly vehicles possible, given a toolkit consisting of a Ford Explorer<sup><a href="http://www.geekshavefeelings.com/posts/it-was-never-about-the-mileage#footnote_4_1206" id="identifier_4_1206" class="footnote-link footnote-identifier-link" title="At first a Chevy Suburban, to be fair. By the way, I&#039;m not really a GM fan, beyond hoping (as a taxpayer) that they do well enough in the next 12&ndash;15 months that we don&#039;t take a full $10 billion loss on the bailout.">5</a></sup> and $10,000.</p>
<p><a href="http://editorial.autos.msn.com/article.aspx?cp-documentid=435065" target="_blank"><img class="alignnone size-full wp-image-1218" alt="FT03" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/FT03.jpg" width="380" height="228" /></a></p>
<p>Three years after the competition began, the GT team began to miss the point completely<sup><a href="http://www.geekshavefeelings.com/posts/it-was-never-about-the-mileage#footnote_5_1206" id="identifier_5_1206" class="footnote-link footnote-identifier-link" title="As is fitting to tradition; I&#039;m pretty sure the whole point of the school is to miss it. I&#039;m proud of that.">6</a></sup> and <a title="Georgia Tech's FutureTruck Split-Parallel Hybrid SUV Design" href="http://papers.sae.org/2003-01-1270/" target="_blank">had instead crammed</a> a <a title="AC-150 motor" href="http://www.acpropulsion.com/datasheet/AC-150%20Motor.pdf" target="_blank">150kW motor</a> onto the front of their Explorer, then chose the &#8220;largest V6 that would fit&#8221; to power the rear axle. Although the &#8220;Future<a title="Ramblin' Wreck" href="http://en.wikipedia.org/wiki/Ramblin'_Wreck" target="_blank">Wreck</a>&#8221; showed it was capable of &#8220;takin&#8217; off like greased lightnin&#8217;&#8221; at the Michigan proving grounds, it took no higher than fourth place. I&#8217;ll let Jerry himself <a title="Student team finishes fourth in National FutureTruck Competition" href="http://www.whistle.gatech.edu/archives/03/jun/30/futuretruck.html" target="_blank">explain why</a>:</p>
<blockquote><p>&#8220;Even though [our entry] really performed better than any other powertrain, [the judges] were looking for designs that had some combination of a diesel engine, the use of an alternate fuel to gasoline and some aggressive weight reduction by replacing the stock steel frame,&#8221; said Professor Jerry Meisel. &#8220;We more than met the competition’s stated goals in actual operation, but had none of these unstated approaches in our design.&#8221;</p></blockquote>
<p>At least it took home the award for acceleration.</p>
<p><img class="alignnone size-full wp-image-1219" alt="Georgia Tech stirs up the precision portion of the off-road event" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/FT03_ModelGT.jpg" width="260" height="200" /></p>
<p style="text-align: center;">&vellip;</p>
<p>Why the market remains convinced that hybrid systems are for ugly featherweight cars with rubbish names is a mystery to me. Consider this: modern electric traction systems are so powerful, <a title="Jaguar C-X75" href="http://en.wikipedia.org/wiki/Jaguar_C-X75" target="_blank">Jaguar built a £1 million supercar</a> where they were the only source of propulsion. <a title="General Dynamics RST-V Series-Hybrid With Cool In-Wheel Motors" href="http://jalopnik.com/5220219/general-dynamics-rst+v-series+hybrid-with-cool-in+wheel-motors" target="_blank">General Dynamics</a> and BAE are <a title="Military Electric Vehicles - Where, Why, What Next?" href="http://media.idtechex.com/pdfs/en/W2355M4634.pdf" target="_blank">building armored military vehicles</a>, including even <a title="BAE Systems' Bid to Design a Greener, Next-Gen 'Tank'" href="http://www.greenbiz.com/blog/2011/10/21/bae-systems-bid-design-greener-next-gen-tank" target="_blank">battle tanks</a>, propelled by electric power. Their applications in the military especially highlight the subtler auxiliary benefits of modern motors beyond their unholy torque ratings: flexible power routing, whisper-quiet operation, low parts count, and solid reliability.</p>
<p><a title="Power Up GCV Infographic by BAESystemsInc, on Flickr" href="http://www.flickr.com/photos/baesystemsinc/8189488524/" target="_blank"><img alt="Power Up GCV Infographic" src="http://farm9.staticflickr.com/8339/8189488524_bcf5f269a1_z.jpg" width="320" height="201" /></a></p>
<p>In fact, I should note that somebody involved with the General Dynamics project was who had first filled me in on the Yukon. You know who you are—thanks man and sorry for ripping you off. Doing research on this was hard!</p>
<p style="text-align: center;">&vellip;</p>
<p>The knee-jerk conflation between &#8220;hybrid&#8221; and &#8220;fuel efficiency,&#8221; along with &#8220;weak performance&#8221; and &#8220;sissy,&#8221; lead almost directly to the downfall of every past hybrid or electric high-performance vehicle. It even plagues <a title="Audi R18 e-tron quattro" href="http://en.wikipedia.org/wiki/Audi_R18#R18_e-tron_quattro" target="_blank">championship-winning Le Mans</a> cars, where the advantage of the electric half isn&#8217;t one of fuel efficiency (though increased endurance obviously helps), but is in fact an incredible advantage in any race: the ability to absorb energy otherwise lost to braking, then use it as a boost say, at the exit of a corner. This use even has a name: <a title="Kinetic energy recovery system" href="http://en.wikipedia.org/wiki/Kinetic_energy_recovery_system" target="_blank">kinetic energy recovery system (KERS)</a>, otherwise known as &#8220;<a title="Regenerative brake" href="http://en.wikipedia.org/wiki/Regenerative_brake" target="_blank">regenerative braking</a>.&#8221;</p>
<p>Yet the journalists and the media jumps on the hybrid bit like it&#8217;s all about saving the planet. <a title="litorrally" href="http://www.websters-online-dictionary.org/definition/littorally" target="_blank">Literally</a>:</p>
<blockquote><p><a title="Audi's e-Tron becomes the first hybrid to win Le Mans, saves the planet at the same time" href="http://www.engadget.com/2012/06/18/audi-e-tron-wins-le-mans/" target="_blank">Engadget</a>: Audi&#8217;s e-Tron becomes the first hybrid to win Le Mans, saves the planet at the same time</p></blockquote>
<p>Guys, I think you still missed the part where they <em>won the race with this tech</em>. They didn&#8217;t throw a motor in there to wave their engineering penis around, proving they can win &#8220;despite&#8221; using a hybrid—even if they are Audi—it was there because <em>it made their car go faster</em>.</p>
<p style="text-align: center;">&vellip;</p>
<p>The sooner we embrace electric as the future of auto performance, whether on the racetrack or at the worksite, the sooner their other goal can be met: actually saving the planet. No matter how parsimonious Volts are with emissions, it won&#8217;t matter if BEVs and PHEVs are only 5% of the market by 2040. We need people to drive hybrids and then electrics in every sector of the market, from people-carrier commuters to hatchback hoonmobiles to soccer mom armored child delivery systems.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/eo2013_presentation.pdf" target="_blank"><img class="alignnone size-large wp-image-1252" alt="Light Duty Vehicle Sales &amp; Efficiency" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/vehicle_sale_breakdown-640x400.png" width="640" height="400" /></a></p>
<p>And that&#8217;s according to ExxonMobil.
<ol class="footnotes">
<li id="footnote_0_1206" class="footnote">By the way, how did we get to the point where cars are announced two years ahead of their model years?</li>
<li id="footnote_1_1206" class="footnote">A species <a title="NSF Science and Engineering Indicators 2012" href="http://www.nsf.gov/statistics/seind12/c2/c2h.htm" target="_blank">becoming steadily endangered</a>, as any current tech school student can attest to.</li>
<li id="footnote_2_1206" class="footnote">As an aside, the vehicles in question are not only American, but USAian too: the <a title="GM Baltimore Operations" href="http://media.gm.com/media/us/en/gm/company_info/facilities/powertrain/baltimore.html" target="_blank">hybrid continuously variable transmission (CVT) is produced in Baltimore</a>, the Sierra is assembled at <a title="GM Fort Wayne" href="http://media.gm.com/media/us/en/gm/company_info/facilities/assembly/ftw.html" target="_blank">Fort Wayne</a> and <a title="GM Flint" href="http://media.gm.com/media/us/en/gm/company_info/facilities/assembly/flint.html" target="_blank">Flint</a>, while the Yukon is assembled at <a title="GM Arlington" href="http://media.gm.com/media/us/en/gm/company_info/facilities/assembly/arlington.html" target="_blank">Arlington</a>.</li>
<li id="footnote_3_1206" class="footnote">When Hummer, then newly owned by GM, was all the rage.</li>
<li id="footnote_4_1206" class="footnote">At first <a title="DOE FutureTruck" href="http://helix.gatech.edu/Classes/ME4182/2001S3/FutureTruck/ProjectDescription.htm" target="_blank">a Chevy Suburban</a>, to be fair. By the way, I&#8217;m not really a GM fan, beyond hoping (as a taxpayer) that they do well enough in the next 12–15 months that we don&#8217;t take a full <a title="The US seems likely to take a $10 billion hit on its GM bailout" href="http://qz.com/37841/the-us-seems-likely-to-take-a-10-billion-hit-on-its-gm-bailout/" target="_blank">$10 billion loss on the bailout</a>.</li>
<li id="footnote_5_1206" class="footnote">As is fitting to tradition; I&#8217;m pretty sure the whole point of the school is to miss it. I&#8217;m proud of that.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.geekshavefeelings.com/posts/it-was-never-about-the-mileage/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Steak in a Dorm</title>
		<link>http://www.geekshavefeelings.com/posts/steak-in-a-dorm</link>
		<comments>http://www.geekshavefeelings.com/posts/steak-in-a-dorm#comments</comments>
		<pubDate>Tue, 11 Dec 2012 00:50:36 +0000</pubDate>
		<dc:creator>Xo Wang</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[essays]]></category>
		<category><![CDATA[food]]></category>
		<category><![CDATA[gatech]]></category>

		<guid isPermaLink="false">http://www.geekshavefeelings.com/?p=1156</guid>
		<description><![CDATA[College dorm kitchens are filled with third-world problems transcribed into extremely first-world contexts. These are defined by such questions as, &#8220;what food can I afford to eat?&#8221; or, &#8220;how can I cook with what I&#8217;ve got?&#8221; Unlike true third-world problems, these are then elaborated on by statements such as, &#8220;I&#8217;ve spent all my internship money [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0337.jpg"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0337-640x480.jpg" alt="Meat porn" width="640" height="480" class="alignnone size-large wp-image-1176" /></a></p>
<p>College dorm kitchens are filled with third-world problems transcribed into extremely first-world contexts. These are defined by such questions as, &#8220;what food can I afford to eat?&#8221; or, &#8220;how can I cook with what I&#8217;ve got?&#8221;</p>
<p>Unlike true third-world problems, these are then elaborated on by statements such as, &#8220;I&#8217;ve spent all my internship money on robots&#8221; or &#8220;my fully-equipped <a href="http://www.gatech.edu/newsroom/release.html?nid=74058" title="Former Olympic Village Gets the Gold - LEED Gold" target="_blank">Olympic Village suite</a> kitchen might get smokey, setting off the fire alarm.&#8221;</p>
<p>Regardless of how hurt your sense of entitlement may be by deep introspection into your position on Maslow&#8217;s pyramid, the answer is steak.</p>
<p>Steak is the perfect bachelor(ette) food: you take meat and add heat, then eat. It&#8217;s then delicious yet somehow classy, despite requiring all the culinary sophistication of a high school dropout caveman. In fact, the rest of this post is just garnish on top of the simple &#8220;meat + heat + eat&#8221; formula, and is just filler info to impress your friends with. Feel free to just scroll for meat porn.</p>
<h2>Step 1: Buy meat</h2>
<p><strong>Supermarket meat totally works</strong>—you&#8217;re not going to go out of your way to support small business and celebrate local farms by finding a butcher you can talk to, so you&#8217;ll be buying pre-cut, prepackaged steaks from the supermarket. Pro tip: Korean supermarkets price their beef according to Korean demand (i.e., kalbi or short rib), so they have great deals on traditional Western steak cuts. Plus, H-Marts and Assi Plazas are surgically clean. Damn, man.</p>
<p><strong>USDA Choice</strong>—the USDA system rates beef on how much marbling (in-muscle fat) is in the beef, and Prime (the highest level) is too expensive for you unless you&#8217;re <em>rolling in dough</em>.</p>
<p><a title="long life noodles by scott swigart, on Flickr" href="http://www.flickr.com/photos/smswigart/5613175711/" target="_blank"><img alt="long life noodles" src="http://farm6.staticflickr.com/5264/5613175711_8c430541c3_z.jpg" width="320" height="213" /></a></p>
<p>Meat flavor, especially &#8220;beefiness,&#8221; is conveyed by melted fat, and lean ol&#8217; USDA Select (the lowest level you&#8217;ll find at the meat aisle) just won&#8217;t deliver it. Choice, which is between Select and Prime, is a fine compromise between cost and deliciousness.</p>
<p><strong>Go boneless</strong>—You&#8217;re too lazy to cut out the bones yourself, and you don&#8217;t want to pay for bones anyways. Plus, since you&#8217;ll be cooking with a pan, you don&#8217;t want the bone to prop up the meat away from the pan&#8217;s surface.</p>
<p><strong>Cut?</strong>—I&#8217;ll rank your choices:</p>
<ol>
<li><strong>Ribeye</strong>: one of the most flavorful cuts of beef available. It&#8217;s not the most tender (but still very), but you&#8217;ll enjoy chewing it enough to not care. Comes from the ribs (duh).</li>
<li><strong>Strip</strong>: slightly more tender but slightly less flavorful than ribeye. Tends to cost the same, but works slightly better with my method. Comes from the short loin, which is between the ribs and butt of a cow.</li>
<li><strong>Sirloin</strong>: closer to the cow butt than the short loin, yet somehow has less fat. More tender than either of the above, but at great cost to flavor. When being snobbish about steak, remember to mix in political commentary about sirloin&#8217;s popularity in the US versus the prevalence of more flavorful, less easy-to-eat cuts in other countries. You&#8217;ll look so cool and avant-garde putting down Americans when it comes to food.</li>
<li><strong>Flank, skirt, hanger</strong>: traditionally cheap but very flavorful, tougher cuts from the bottom side of the cow. Thanks to Internet popularity, you&#8217;re unlikely to find them very cheap in a supermarket, so the best you can do is whine like a hipster about them<sup><a href="http://www.geekshavefeelings.com/posts/steak-in-a-dorm#footnote_0_1156" id="identifier_0_1156" class="footnote-link footnote-identifier-link" title="Not that I&#039;m a hipster.">1</a></sup>. For the most part, they tend to be too thin to cook in a dorm kitchen.</li>
<li><strong>T-bone &amp; Porterhouse</strong>: basically a strip steak with a bone and a slice of tenderloin. The bone is bad enough for cooking in a pan, but the leaner tenderloin cooks quicker and thus dries out by the time you&#8217;re done with the strip part. Also, stupidly expensive.</li>
<li>In fact, <strong>tenderloin</strong> in general should be avoided at the beginning of your steak experiments: it&#8217;s just too expensive to risk ruining.</li>
<li><strong>Chuck, brisket, round, blade</strong>: cuts which are too lean or have too much connective tissue to eaten as steak, unless you like your steak dry, tough, and gray.</li>
</ol>
<p><strong>Tri-tip</strong> is another option, but I&#8217;ve yet to experiment with it.</p>
<p><strong>Thick!</strong>—seriously, go for at least 1.25 inches of thickness. Steak is meant to be cooked unevenly; you want the inside to be medium rare (reddish-pink and juicy) and the outside charred and crusted. In between will be a region of well-done meat, and with a thicker slab of beef that region will be a smaller proportion of the total thickness.</p>
<h2>Step 2: Season meat</h2>
<p>Dump salt on it<sup><a href="http://www.geekshavefeelings.com/posts/steak-in-a-dorm#footnote_1_1156" id="identifier_1_1156" class="footnote-link footnote-identifier-link" title="Overnight in polyethylene wrap with coarse salt (e.g. Kosher salt) works best, but the difference won&#039;t be huge. Overnight because the salt will break down some connective tissue, and coarse salt because the larger grains can absorb more moisture before getting sucked into the meat. Also, it takes way more salt than you&#039;d expect to season a steak, but it&#039;s up to you.">2</a></sup>.</p>
<h2>Step 3: Heat meat</h2>
<p>For the purposes of this post, I&#8217;m using a 1.75-inch thick USDA Choice strip steak.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0325.jpg"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0325-640x480.jpg" alt="24oz strip steak from Publix—my hand is quite large, so this photo doesn&#039;t do it justice" width="640" height="480" class="alignnone size-large wp-image-1170" /></a></p>
<p>This is thick enough for it to stand on its edge. In fact, this is what exactly we&#8217;re going to do. Get your pan sizzling hot then smack the steak down edge-wise, fattest edge first.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0329.jpg"><img class="alignnone size-large wp-image-1171" alt="Steak standing on its edge" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0329-640x480.jpg" width="640" height="480" /></a></p>
<p>It looks stupid, but remember that fat is an insulator—it&#8217;s going to cook way slower than muscle will<sup><a href="http://www.geekshavefeelings.com/posts/steak-in-a-dorm#footnote_2_1156" id="identifier_2_1156" class="footnote-link footnote-identifier-link" title="Citation needed.">3</a></sup>. We&#8217;re giving it a head start by <a title="Trayrace" href="http://www.geekshavefeelings.com/projects/trayrace">rendering</a> the beef, letting the molten fat baste flavor into the steak. Meanwhile, the edge gets a nice sear<sup><a href="http://www.geekshavefeelings.com/posts/steak-in-a-dorm#footnote_3_1156" id="identifier_3_1156" class="footnote-link footnote-identifier-link" title="It would look kind of gray and weird at the edges if you had only seared the top and bottom sides.">4</a></sup>.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0331.jpg"><img class="alignnone size-large wp-image-1172" alt="OK this just looks weird" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0331-640x480.jpg" width="640" height="480" /></a></p>
<p>Next we&#8217;re going to go low and slow on the sides using butter as a cooking fat. If you&#8217;re a steak fanatic or a foodie, you&#8217;re probably about to call the cops, but just trust me on this; I&#8217;m an engineer.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0333.jpg"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0333-640x480.jpg" alt="Steak cooking on one side in butter" width="640" height="480" class="alignnone size-large wp-image-1173" /></a></p>
<p>Frying steak in butter will arouse the attentions of all mid-sized carnivores in a 50-meter radius. I am not responsible for any restraining orders or child support payments<sup><a href="http://www.geekshavefeelings.com/posts/steak-in-a-dorm#footnote_4_1156" id="identifier_4_1156" class="footnote-link footnote-identifier-link" title="Nor cases of acute cardiac arrest.">5</a></sup> resulting from your use of this method and your sexy neighbors&#8217; subsequent siege of your kitchen.</p>
<p>We flip the steak as it cooks and spoon the cooking oil all over the crust of the steak.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0334.jpg"><img class="alignnone size-large wp-image-1174" alt="Steak flipped over in pan" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0334-640x480.jpg" width="640" height="480" /></a></p>
<p>Remember that the strong emotions caused by basting the beautiful brown crust of your meat are not those of intense rage, as I initially thought, but merely extreme nonsexual<sup><a href="http://www.geekshavefeelings.com/posts/steak-in-a-dorm#footnote_5_1156" id="identifier_5_1156" class="footnote-link footnote-identifier-link" title="Typically speaking.">6</a></sup> arousal.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0335.jpg"><img class="alignnone size-large wp-image-1175" alt="Fresh butter for more cooking" src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0335-640x480.jpg" width="640" height="480" /></a></p>
<p>After eight to ten minutes, the beef and dairy solids in the cooking fat begin to darken and burn beyond what will richen the flavor of the steak. At this point, transfer the steak to paper towels and dump the grease. Then (carefully!) wipe the hot pan with more paper towels. We add more butter and return the steak to the pan for an agonizing period of more cooking.</p>
<h2>Step 4: Rest meat</h2>
<p>We remove the steak from heat and let it sit on a warm plate for half the time it took to cook. This is by far the most difficult part of making a steak, by dint of the despair at not being able to tuck into your perfect creation.</p>
<p>It is also one of those subtle points glossed over by &#8220;meat + heat + eat,&#8221; as it notably involves neither heat nor eat.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0336.jpg"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0336-640x480.jpg" alt="Resting steak in plate—just trust me on the chopsticks" width="640" height="480" class="alignnone size-large wp-image-1181" /></a></p>
<p>The bulging of the steak should give you some idea of why it needs to rest. Your steak is a butter-covered balloon ready to burst, and will do so with even a simple slice across the grain, spilling precious juices all over.</p>
<h2>Step 5: Eat meat</h2>
<p>Slice it up across the grain and go at it!</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0337.jpg"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0337-640x480.jpg" alt="Meat porn" width="640" height="480" class="alignnone size-large wp-image-1176" /></a></p>
<p>If you&#8217;re going to do do dorm steak, you might as well do a fancy dorm salad as well. I used the resting time to broil frozen shrimp in a toaster oven with oil, salt, cumin, and turmeric, then tossed them into a bed of kale drizzled with balsamic and olive oil. Dorm folks take note: shrimp and kale will keep for weeks to months in your freezer or fridge (resp.) without loss of flavor or texture.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0338.jpg"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/12/IMG_0338-640x480.jpg" alt="Steak, Spaten Optimator, and kale salad with turmeric/cumin shrimp" width="640" height="480" class="alignnone size-large wp-image-1182" /></a></p>
<p>Now, because you&#8217;re a filthy college student and your disgusting supermarket steak is only medium rare, it&#8217;s potentially <em>crawling</em> with bacteria. It&#8217;s best to use alcohol to disinfect your food as you eat. Given that you probably don&#8217;t like wine (yet), I recommend a Doppelbock or a strong lager.</p>
<h2>Epilogue</h2>
<p>I cooked dorm steak in a complex process involving ghetto sous vide, a hefty propane torch, and (just that once) a fire alarm. That is, I did until I read <a href="http://www.nytimes.com/2002/02/27/dining/the-chef-steak-with-style-easy-does-it.html" title="Alain Ducasse; Steak With Style: Easy Does It" target="_blank">Alain Ducasse&#8217;s column for the NY Times</a>:</p>
<blockquote><p>I do not use very high heat, because you get good caramelization in that amount of time. I&#8217;m not interested in carbonizing the surface of the meat. To me that ruins the flavor.</p></blockquote>
<p>His method, involving <a href="http://www.geekshavefeelings.com/projects/trayrace" title="Trayrace">rendering</a> and a frightening amount of <em>beurre</em> (butter), was mind-blowing to me. My skepticism was soon overcome when I flipped my first buttery slab of beef, and was driven to tears by a crust gorgeous beyond any of my wildest fantasies involving mammal flesh.</p>
<p>Thank you, M. Ducasse. I&#8217;m putting away the blowtorch.
<ol class="footnotes">
<li id="footnote_0_1156" class="footnote">Not that I&#8217;m a hipster.</li>
<li id="footnote_1_1156" class="footnote">Overnight in polyethylene wrap with coarse salt (e.g. Kosher salt) works best, but the difference won&#8217;t be huge. Overnight because the salt will break down some connective tissue, and coarse salt because the larger grains can absorb more moisture before getting sucked into the meat. Also, it takes way more salt than you&#8217;d expect to season a steak, but it&#8217;s up to you.</li>
<li id="footnote_2_1156" class="footnote">Citation needed.</li>
<li id="footnote_3_1156" class="footnote">It would look kind of gray and weird at the edges if you had only seared the top and bottom sides.</li>
<li id="footnote_4_1156" class="footnote">Nor cases of acute cardiac arrest.</li>
<li id="footnote_5_1156" class="footnote">Typically speaking.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.geekshavefeelings.com/posts/steak-in-a-dorm/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>BabyCorntrolling</title>
		<link>http://www.geekshavefeelings.com/posts/babycorntrolling</link>
		<comments>http://www.geekshavefeelings.com/posts/babycorntrolling#comments</comments>
		<pubDate>Sun, 06 May 2012 21:29:32 +0000</pubDate>
		<dc:creator>Xo Wang</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[BabyCorntroller]]></category>
		<category><![CDATA[Corntroller]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[babycorntroller]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[elec.engr]]></category>
		<category><![CDATA[ev]]></category>

		<guid isPermaLink="false">http://www.geekshavefeelings.com/?p=1087</guid>
		<description><![CDATA[So I totally ditched Corntroller for its hot redesigned (square!) little sister, BabyCorntroller. The control (corntrol?) logic board is called MiniCob1. I shrunk down Corntroller&#8217;s Tassel from credit card size (3.4″ × 2.1″) to just 1.95″ × 1.95″, while adding a wireless radio, doubling the number of power stages and analog frontends (so I can [...]]]></description>
				<content:encoded><![CDATA[<p>So I totally ditched <a title="Corntroller" href="http://www.geekshavefeelings.com/posts/category/all/work/corntroller">Corntroller</a> for its hot redesigned (square!) little sister, <a title="BabyCorntroller" href="http://www.geekshavefeelings.com/posts/category/all/work/babycorntroller">BabyCorntroller</a>.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/babycorntroller_slant.jpg"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/babycorntroller_slant-640x546.jpg" alt="" title="BabyCorntroller!" width="640" height="546" class="alignnone size-large wp-image-1104" /></a></p>
<p>The control (corntrol?) logic board is called MiniCob<sup><a href="http://www.geekshavefeelings.com/posts/babycorntrolling#footnote_0_1087" id="identifier_0_1087" class="footnote-link footnote-identifier-link" title="v2.0, since it&#039;s the second-gen board">1</a></sup>. I shrunk down Corntroller&#8217;s Tassel from credit card size (3.4″ × 2.1″) to just 1.95″ × 1.95″, while adding a wireless radio, doubling the number of power stages and analog frontends (so I can <strong>control two motors</strong>), and still keeping the micro-SD card slot. Oh, and going from a four-layer to two-layer layout yet keeping all components on one side.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/minicob_layout.png"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/minicob_layout-531x640.png" alt="" title="MiniCob layout" width="531" height="640" class="alignnone size-large wp-image-1095" /></a></p>
<p>To perform this miniaturization magic, I switched from the 100-pin <a title="STM32F103VG" href="http://www.st.com/internet/mcu/product/247492.jsp" target="_blank">STM32F103VG</a> to a 64-pin <a title="STM32F205RC" href="http://www.st.com/internet/mcu/product/250190.jsp" target="_blank">STM32F205RC</a>, which has more flexible pin assignments (every GPIO pin can be muxed to a variety of peripheral functions), supports bootloading on IO interfaces other than USART1, and is faster/has more SRAM for the same cost. Plus, it&#8217;s 100% pin-/code-compatible with STM32F4s which run even faster and have FPUs.</p>
<p>I actually managed to use every single pin on the STM32. Wow.</p>
<p>But why 1.95″ square? Well, so I can put the boards through <a title="ITead Studio" href="http://iteadstudio.com/store/index.php?main_page=index&amp;cPath=19_20" target="_blank">dirt cheap</a> <a title="Seeed Studio" href="http://www.seeedstudio.com/depot/fusion-pcb-service-p-835.html?cPath=185" target="_blank">Shenzhen-direct</a> PCB services, in case I want to make like, ten of these.</p>
<p>Meanwhile, the power stage/analog frontend board (HexHusk -&gt; TinyHusk) got a makeover as well. Though Corntroller is a blatant and outright intentional (and very poorly done) clone of <a title="3ph Duo v2.1" href="http://scolton.blogspot.com/p/motor-controllers.html#duo" target="_blank">3ph Duo</a>, BabyCorntroller is merely a blatant and accidental clone of <a title="Flying Flux v1.0" href="http://scolton.blogspot.com/search/label/FF" target="_blank">Flying Flux</a>. Shane and I had both started our boards before we realized we both had:</p>
<ul>
<li><strong><a title="DRV8301" href="http://www.ti.com/product/drv8301" target="_blank">TI DRV830X</a></strong> <a title="DRV8301" href="http://www.ti.com/product/drv8302" target="_blank">3-phase drivers/buck converters/dual low-side current differential amplifiers</a>. I chose the DRV8302, whose dead-time &amp; over-current are set with resistors rather than with the DRV8301&#8242;s SPI interface, because I didn&#8217;t have the pins to spare for SPI.</li>
<li>D2PAK-7 FETs (mine are 60V/3.4mΩ/100nC <strong><a title="Infineon OptiMOS" href="http://www.infineon.com/dgdl/IPB034N06N3_Rev2.5.pdf?folderId=db3a304313b8b5a60113cee8763b02d7&amp;fileId=db3a30431b3e89eb011b457fae6c7d64" target="_blank">Infineon IPB034N06N3</a></strong>s).</li>
<li><strong>FETs on both sides</strong> of the board, with power rails on opposite sides of the board. Unfortunately I did this retardedly, and ended up with motor terminals in the middle of the board.</li>
</ul>
<p>So of course, Shane &#038; I declared motor control design war on Facebook, and finished our boards in record time. Think hackathons, except with hardware, less sleeping, and a whole week in length.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/tinyhusk_layout.png"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/tinyhusk_layout-638x640.png" alt="" title="TinyHusk layout" width="638" height="640" class="alignnone size-large wp-image-1102" /></a></p>
<p>It also goes without saying that I&#8217;ve stuffed TinyHusk full of advanced BLDCM/PMSM controller things:</p>
<ul>
<li><strong>Six-input PWM</strong> so I can leave phases undriven (coasting, six-step commutation, etc). MiniCob is laid out so that its 6-output TIM1/TIM8 PWM modules with deadtime push into these pins.</li>
<li><strong>Dual-phase current sense (±66A)</strong> via <a title="ACS714" href="http://www.allegromicro.com/~/Media/Files/Datasheets/ACS714-Datasheet.ashx" target="_blank">ACS714 bidirectional hall-effect current sensors</a> in parallel with 1mΩ jumpers, <strong>simultaneously sampled</strong> (hells yeah triple ADC) with power bus current sense provided by two low-side 1mΩ resistors in parallel.</li>
<li><strong>Voltage sense on all three phases</strong>, laid out to hit different ADCs so I can simultaneous sampling as well (not very useful, but at least I did it &gt;.&gt;). This is great if I want to do traditional six-step sensorless control.</li>
<li>Eighteen multi-layer <strong>ceramic 1210 50V 10µF</strong> caps. These are placed right next to the FETs and serve as the L1 cache of bus capacitance, while two low-ESR/-ESL 680µF aluminum caps chill on the side of the board as my L2.</li>
</ul>
<p>All of this should allow me to do field-oriented control (sensored or sensorless) with current (torque-mode) control. Regenerative braking, as I understand, comes with the package.</p>
<p>So all this functionality is laid out onto 16 pins on the left side of TinyHusk. So what&#8217;s the right-side 16-pin header on MiniCob for? It&#8217;s a friggin&#8217; second motor&#8217;s worth of pins! It&#8217;s rotated 180 degrees so that I can stack two TinyHusks onto one MiniCob, and just rotate one husk board so that they use different headers.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/babycorntroller_stack.jpg"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/babycorntroller_stack-640x539.jpg" alt="" title="DAT STACK" width="640" height="539" class="alignnone size-large wp-image-1106" /></a></p>
<p>Unfortunately because of school, I didn&#8217;t have time to test BabyCorntroller until finals week. So I had less than a week to run them in the <a title="Georgia Tech Invention Studio" href="http://inventionstudio.gatech.edu/" target="_blank">Invention Studio</a> before I got shipped out to <s>war</s> an internship in Cali.</p>
<p>However, before that, I <em>done spanned a motor</em>! I implemented six-step sensored commutation with <a href="http://e2e.ti.com/group/motor/b/blog/archive/2012/04/04/so-which-pwm-technique-is-best-part-4.aspx" title="TI Motor Blog Bipolar 4Q" target="_blank">bipolar PWM</a> and ran it up to 32V on a pretty <a href="http://www.sciplus.com/recommend.cfm/recommendid/8348" title="Takeout Hitachis" target="_blank">boring BLDC motor</a>.</p>
<p><iframe width="420" height="315" src="http://www.youtube.com/embed/v9r7dk_m11U" frameborder="0" allowfullscreen></iframe></p>
<p>WOOO IT SPINS. By the way, notice that the motor setup isn&#8217;t actually connected to my computer. Wireless trolling opportunities abound. <img src='http://www.geekshavefeelings.com/x/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/TEK00009.png"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/TEK00009.png" alt="" title="Full duty commutation" width="480" height="234" class="alignnone size-full wp-image-1097" /></a></p>
<p>The phase waveforms look hot. Textbook BLDC, Shane says. I was little worried about the reverse voltage spikes when a phase goes undriven&mdash;turns out they&#8217;re inductive flyback from the field in the phase collapsing then dumping current into the controller, and not some weird PWM glitch.</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/TEK00006.png"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/TEK00006.png" alt="" title="Low duty commutation" width="480" height="234" class="alignnone size-full wp-image-1099" /></a></p>
<p>And some more waveforms at a lower duty cycle. Still a nice slope on the undriven phase, though noisier. Now this measured at the motor terminals&mdash;my controller&#8217;s voltage sampling is buffered and low-pass filtered, so what it sees will be a lot cleaner.</p>
<p>Regen braking works brilliantly, but big current changes (like full stop or full reverse) will spike the bus on my power supply and also cause my controller to get into a trap. I thought this could be the brownout detection kicking in, so I scoped my 5V and 3.3V logic buses with the switching waveform:</p>
<p><a href="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/TEK00005.png"><img src="http://www.geekshavefeelings.com/x/wp-content/uploads/2012/05/TEK00005.png" alt="" title="Logic power noise" width="480" height="234" class="alignnone size-full wp-image-1098" /></a></p>
<p>DAT NOISE. The top is 5V, the middle is 3.3V, and the bottom is PWM output going to the driver. Holy crap 3.20V peak-to-peak on my microcontroller power supply. Now granted this is relative to power ground, not logic ground near the microcontroller, so it&#8217;s a bit exaggerated, but still. I think this is my fault; there&#8217;s just 10µF of logic power capacitance coming out of my 3.3V LDO, plus a few 0.1µF caps the STM32 datasheet asked for. With a few cap upgrades I could make my logic supply a lot more stable.</p>
<p>What&#8217;s next? I&#8217;ll be implementing rotor angle extrapolation to do leading phase advance, writing a simultaneous sampling triple ADC driver for current control and sensorless six-step, and finding a nice electronics bench near Cupertino.
<ol class="footnotes">
<li id="footnote_0_1087" class="footnote">v2.0, since it&#8217;s the second-gen board</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.geekshavefeelings.com/posts/babycorntrolling/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.381 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-05-23 00:59:07 -->

<!-- Compression = gzip -->