<?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>Nerdy Texts of Analog and Embedded Systems Wizardry</title>
	<atom:link href="http://blog.narrat1ve.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.narrat1ve.com</link>
	<description>My favorite programming language is still solder, but C ain&#039;t all bad</description>
	<lastBuildDate>Thu, 07 Jul 2011 18:16:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Component Variation, Or, The Least Sexy Electronics Problem Evar</title>
		<link>http://blog.narrat1ve.com/2011/07/07/component-variation-or-the-least-sexy-electronics-problem-evar/</link>
		<comments>http://blog.narrat1ve.com/2011/07/07/component-variation-or-the-least-sexy-electronics-problem-evar/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 18:14:52 +0000</pubDate>
		<dc:creator>TBailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Analog]]></category>
		<category><![CDATA[Parts Sourcing]]></category>
		<category><![CDATA[VCOs / VFCs]]></category>
		<category><![CDATA[WTPA]]></category>
		<category><![CDATA[WTPA v2.0]]></category>

		<guid isPermaLink="false">http://blog.narrat1ve.com/?p=431</guid>
		<description><![CDATA[Analog is sexy, we all agree, right? Embedded systems on the other hand, are full of lots of unglamorous problems. Filesystems, say. Inherently un-sexy. But I think component variation is maybe the best, most un-sexy problem there ever was. The unsexy cherry on the diet sundae. Like, you HAVE to solve it if you are [...]]]></description>
			<content:encoded><![CDATA[<p>Analog is sexy, we all agree, right?  Embedded systems on the other hand, are full of lots of unglamorous problems.  Filesystems, say.  Inherently un-sexy.</p>
<p><img src="http://www.narrat1ve.com/images/ComponentVariation_Jul072011.JPG" alt="Yawnz" /></p>
<p>But I think component variation is maybe the best, most un-sexy problem there ever was.  The unsexy cherry on the diet sundae.  Like, you HAVE to solve it if you are making lots of something or that thing as a population will suck, even though the one on your bench always ruled.</p>
<p>All the pots in WTPA2 are these custom Taiwan Alpha jobbies.  There are two values, 10kA and 100kA.  The <a href="http://blog.narrat1ve.com/tag/vcos-vfcs/">VCO</a> uses one of the 10kAs as a coarse control, and it sets the voltage into a current sink which in turn sets the frequency.  I&#8217;d been messing with the op amps in this circuit to try and get some performance improvements and &#8220;all of a sudden&#8221; one of the DUTs didn&#8217;t work correctly.  At first I figured it was the opamp change, but after a lot of measurement and desoldering and component testing, it turned out one of the 10k pots was really 11.4k.  This was a greater than 10% variation!</p>
<p>I&#8217;d built a margin in for error, but this was above it, and the current sink was getting too high of a voltage.  I tested a dozen pots or so from the bin, and all of them were much less off.  Still, since one was off, probably another one could be as well.  It could even have been a result of the soldering process.  I actually bothered to do a DC simulation at this point (using <a href="http://qucs.sourceforge.net/">qucs</a>) and fiddled with the component values until they were all as off as I could imagine them possibly being, and then resized the scaling resistor that sets the upper range of the VCO.  It was a really crappy annoying unsatisfying solution, because it means that MOST of the units will be operating at a slower maximum clock than they need to.  But that one in twelve or one in 100 will work correctly.  Serves me right for getting the cheap pots, but there you go.  Margin.  Component variation.</p>
<p>Least Sexy Problem Evar.</p>
<p>TB</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.narrat1ve.com/2011/07/07/component-variation-or-the-least-sexy-electronics-problem-evar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WTPA2 Clock Characterization &amp; Pulse Shaping</title>
		<link>http://blog.narrat1ve.com/2011/07/06/wtpa2-clock-characterization-pulse-shaping/</link>
		<comments>http://blog.narrat1ve.com/2011/07/06/wtpa2-clock-characterization-pulse-shaping/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 17:39:35 +0000</pubDate>
		<dc:creator>TBailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Analog]]></category>
		<category><![CDATA[Discrete]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[VCOs / VFCs]]></category>
		<category><![CDATA[WTPA]]></category>
		<category><![CDATA[WTPA2]]></category>

		<guid isPermaLink="false">http://blog.narrat1ve.com/?p=424</guid>
		<description><![CDATA[So, after getting back to client work for a minute, I decided to try and nail the clock pulse shaping circuit problem with a more viable solution than throwing in an extra $5 op amp. The problem with the original pulse shaper circuit was simply that it was designed with a function generator and not [...]]]></description>
			<content:encoded><![CDATA[<p>So, after getting back to client work for a minute, I decided to try and nail the clock pulse shaping circuit problem with a more viable solution than throwing in an extra $5 op amp.<br />
The problem with the original <a href="http://blog.narrat1ve.com/2011/05/23/wtpa2-work-resumed/">pulse shaper circuit</a> was simply that it was designed with a function generator and not a 20 cent opamp in a RC oscillator.  The idea was sound (I think) but the values were not.</p>
<p>The real problem is that the square-to-pulse converter has to shape two different clocks &#8212; it&#8217;s always driving the same IRQ pin, but it can be hooked up to WTPA2&#8242;s 4046 based VCO, or the LM358 based on a user switch.  The 4046 is HC logic, and has really square edges.  The LM358&#8242;s edges are not square, and their slew rate seems frequency dependent also.  So, you could optimize components for one or the other, but not both.  I did some bench tests to figure out what I needed to change to get this right.</p>
<p>Check it.  Here&#8217;s the rising edge of the output from the VCO:<br />
<img src="http://www.narrat1ve.com/images/4046_Rising_Edge_Any_Freq.JPG" alt="4046_Edge" /></p>
<p>And the corresponding output from the pulse shaping network:<br />
<img src="http://www.narrat1ve.com/images/Pulse_Shaper_Out_4046_Any_Freq.JPG" alt="4046_pulse" /></p>
<p>Since we aren&#8217;t changing the VCO, this is what we&#8217;re gonna call &#8220;normal&#8221;.  The top trace shows a risetime of about 0.1uS (scope is 0.1uS/div, 2v/div) which is quite fast (50V/uS in opamp terms).  The ringing here probably has to do with the long ground connection on my probe, and it doesn&#8217;t hurt anything except my pride.  The bottom trace (the output from the pulse shaper) shows a clean low pulse which is about 6uS long total (2uS/div)<br />
Now, here&#8217;s the LM358:</p>
<p><img src="http://www.narrat1ve.com/images/LM358_Rising_Edge_Low_Freq.JPG" alt="358_Edge" /></p>
<p>And the corresponding output from the pulse shaping network:<br />
<img src="http://www.narrat1ve.com/images/Pulse_Shaper_Out_LM358_Low_Freq.JPG" alt="358_Pulse" /></p>
<p>Waaay different!  This is the LM358 at its best incidentally &#8212; tested at low oscillator frequencies.  At higher clock frequencies it slews even more slowly.<br />
The top trace is 10uS/div, and shows a rise time of about 25uS (it&#8217;s 60uS with the clock cranked up to 25kHz).  Annoyingly, it has that characteristic LM358 style crossover mess.  AND it only gets up to about 4v.  The rise time is really what matters though, and it is orders of magnitude slower than the 74hc4046.  The bottom trace shows the output of the pulse shaper, trying but not quite making it.  That dip never makes zero volts and might last 0.25uS.  This doesn&#8217;t consistently trigger our interrupt-on-change IRQ.</p>
<p>So, the question was what to do.  I tested a TLV2462 opamp (my goto op amp for embedded stuff, made by TI, a tank) and it performed equivalently to the 4046, and the pulses worked great.  It&#8217;s slew rate was rated at 1.6V/uS, which is about 5 times faster than the LM358&#8242;s 0.3 V/uS.  So it was faster, but not by orders of magnitude.  If I could find an opamp which cost about the same as the LM358 and had a better slew rate, that seemed appealing rather than trying to hack up a circuit on 300 already-fabbed boards.  The question was how fast we needed to go.</p>
<p>I settled on three opamps for the test:  The Microchip MCP6002 (0.6V/us), the Microchip MCP602 (2.3V/uS) and the Texas Instruments TLC272 (5.3V/uS).  A few days later I had them all from Digikey.  I tested the MCP6002 first, since it was the cheapest.  (0.27 at quantity, as opposed to the LM358&#8242;s 0.20)  Surprise surprise!  It worked great on the first try.<br />
Although I didn&#8217;t measure the rise time, it looked clean on a scope.  The ouptut from the pulse shaper was 6-7uS which is as good as (and more importantly in line with) the logic chip in the VCO.  This was also consistent with the TLV2462.</p>
<p>In conclusion, the cheapest and easiest way to solve this problem is (I think) to eat 0.27 per kit and throw in another opamp.  Further, the results are interesting because they show that above a certain rise time, performance remains the same.  My guess is that there&#8217;s a knee point in that filter, and as long as the dominant frequency of the edge is above it, we&#8217;re good to go.  In this case, a clean 0.6V/uS output was enough to trigger the shaper reliably.</p>
<p>Now that the results are consistent and I&#8217;m in tweak mode anyway, I&#8217;ll probably try and get those pulse times down by half or so, just in case the ISR gets faster.</p>
<p>Analog is fun, yo.<br />
xoxox<br />
TB</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.narrat1ve.com/2011/07/06/wtpa2-clock-characterization-pulse-shaping/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WTPA2: Straight Up Struggle</title>
		<link>http://blog.narrat1ve.com/2011/06/26/wtpa2-straight-up-struggle/</link>
		<comments>http://blog.narrat1ve.com/2011/06/26/wtpa2-straight-up-struggle/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 15:48:20 +0000</pubDate>
		<dc:creator>TBailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Acrylic]]></category>
		<category><![CDATA[Enclosures]]></category>
		<category><![CDATA[Kits]]></category>
		<category><![CDATA[Parts Sourcing]]></category>
		<category><![CDATA[Straight Up Struggle]]></category>
		<category><![CDATA[WTPA]]></category>
		<category><![CDATA[WTPA v2.0]]></category>

		<guid isPermaLink="false">http://blog.narrat1ve.com/?p=418</guid>
		<description><![CDATA[Last week was hellish. Srrsly, yo. I forgot how much work this is. I flew my buddy Nick out from Chicago to be in charge of kitting and assembly, and my job was to get the firmware rocking. We had from June 20 to June 24 to stuff 300 kits, 100 jack boards, 100 drilled [...]]]></description>
			<content:encoded><![CDATA[<p>Last week was hellish.<br />
Srrsly, yo.  I forgot how much work this is.  I flew my buddy <a href="http://www.thrilljockey.com/artists/index.html?id=12502">Nick</a> out from Chicago to be in charge of kitting and assembly, and my job was to get the firmware rocking.  We had from June 20 to June 24 to stuff 300 kits, 100 jack boards, 100 drilled and tapped enclosure kits, build and test 100 microSD daughterboards, build a dozen assembled units, and get ready for Bent and our Solid Sound panel talk with Moog!</p>
<p>Woes, take 1:<br />
China called and were like, yo man, your main boards are gonna be late.  I blame myself for letting it get so close to the wire, and to be fair they were totally sports about shipping the paste stencils and small boards early.  Still, with no main boards, I would have nothing to show at the festivals.  Eff that.  So I called up Advanced Circuits and was like, hook a brother up in the meantime, and they were like BLING BLING.  So, I got 27 &#8220;Limited Edition&#8221; green pcbs, and made some acrylic enclosures to match.  Financially, it was retarded.  But I have my pride.</p>
<p>Woes 2:<br />
Joe at <a href="http://www.prototope.com/">Prototope</a> really nailed it cutting a ton of enclosures.  <a href="http://www.plasticland.com/">T&#038;T PlasticLand</a> over by Canal also came through in the clutch with like 100 pounds of fluorescent acrylic with prices that McMaster can&#8217;t hang with.  However, some dumbass specified that all these enclosures should be drilled and tapped, and those operations alone took DAYS, even with my fancy drill jig:<br />
<img src="http://www.narrat1ve.com/images/DrillJigs_Jun192011.JPG" alt="Fancy" /></p>
<p>Here&#8217;s Nick hating life:<br />
<img src="http://www.narrat1ve.com/images/Nick_Drill_Jun202011.JPG" alt="Zzzzz" /></p>
<p>Woes 3:<br />
That effing pulse shaper circuit (see the last couple posts) was wrong.  Of course we didn&#8217;t figure this out until an hour before Bent.  It was borderline such that it worked _a little_ even though the circuit had not changed since the prototype.  The routing and components (though not the component values) had changed, and that was enough.  Basically the LM358 had shitty rise times into whatever load the circuit presented, and the effective edge frequency (what the pulse shaper really looks at) was too low to work.  I threw a handful of expensive TI opamps into some kits and dragged them out anyway, determined to have something to sell, but I only thought of this after Bent (but before we drove to North Adams for the festival).  The new opamps slewed a lot faster and were an effective (if again, expensive, bandaid).</p>
<p>Woes 4:<br />
The microSD card.  I came up with new swears for these things:<br />
<img src="http://www.narrat1ve.com/images/uSD_Debug_Jun202011.JPG" alt="More 0xFF plz" /><br />
Originally for this project I bought a crappy Kingston 2GB uSD card for testing from a pre-paid cellphone store near my house.  FOR WHATEVER REASON, it turned out to be the fastest, most forgiving device ever.  This week, on a whim, I ordered every crappy uSD card between 512MB and 2GB that I could find on Ebay.  They all behaved differently.  It took days to test my drivers to make sure that all the cards behaved correctly, and there are definitely exchanges in there that you have to do which have pretty much zero to do with the SD spec (or at least the free one).  This sucked, to say nothing of then trying to make a filesystem and buffers to read audio in realtime.  While card access was rock solid for all tested cards by Bent, I kinda though my sample read-write routines sucked.  In the end I threw them out.  The devices at Bent could format an SD to the WTPA filesystem (which is NOT FAT16, but a more real-timey system that I think makes more sense) and that&#8217;s about it.</p>
<p>Woes 5:<br />
Driving to North Adams after Bent with a trunk full of expensive, lovely, VERY PROTOTYPE-EY WTPA2s was the worst experience ever.  I&#8217;d been up for about 72 hours on about 4 total hours of sleep (none the night before) and I seriously saw animals that do not exist in this world.  Anybody who can&#8217;t afford bad acid should try writing device drivers for three days while inhaling plastic fumes and then driving through a woods full of deer at midnight.</p>
<p>But then we got there, pounded a bunch of beers with our nerd friends, got pocket protectors from eminent wizard <a href="http://pro-music-news.com/html/04/e51024mo.htm">Cyril Lance</a> of Moog and generally had a great time.</p>
<p>And, oh yeah, in the process we made THIS:<br />
<img src="http://www.narrat1ve.com/images/WTPA2_Green_ON_FIYAH.JPG" alt="Hot shiz" /></p>
<p>Bent looked like this:<br />
<img src="http://www.narrat1ve.com/images/Bent_Talk_2011_Small.jpg" alt="It cost a lot to talk to these 20 nerds" /></p>
<p>Shop aftermathz:<br />
<img src="http://www.narrat1ve.com/images/Kit_Population_Jun222011.JPG" alt="Counting to 10 a million times" /><br />
<img src="http://www.narrat1ve.com/images/Chip_Aftermath_Jun262011.JPG" alt="Many tubes dies that we might live." /></p>
<p>WTPA2 is not ready to sell, but I have 300 of them and they&#8217;re pretty f&#8217;ing close.  Expect to see the sales link by the end of July.<br />
TB</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.narrat1ve.com/2011/06/26/wtpa2-straight-up-struggle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WTPA2 Prototype &#8220;B&#8221; Totally Running Shiz</title>
		<link>http://blog.narrat1ve.com/2011/06/09/wtpa2-prototype-b-totally-running-shiz/</link>
		<comments>http://blog.narrat1ve.com/2011/06/09/wtpa2-prototype-b-totally-running-shiz/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 15:28:00 +0000</pubDate>
		<dc:creator>TBailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Enclosures]]></category>
		<category><![CDATA[MicroSD]]></category>
		<category><![CDATA[Tap Magic]]></category>
		<category><![CDATA[WTPA]]></category>
		<category><![CDATA[WTPA v2.0]]></category>

		<guid isPermaLink="false">http://blog.narrat1ve.com/?p=412</guid>
		<description><![CDATA[Prototype B is up and running&#8211; MicroSD, well, fits at least and the card-detect switch works: The enclosure getting tapped: And the pretty views of the done project: I&#8217;ve found at least two dumb problems so far. The Audio In/Out jacks were interchanged in the harness, and the clock select switch was in the wrong [...]]]></description>
			<content:encoded><![CDATA[<p>Prototype B is up and running&#8211;<br />
MicroSD, well, fits at least and the card-detect switch works:<br />
<img src="http://www.narrat1ve.com/images/WTPA2_ProtoB_MicroSD_Installed_Jun082011.JPG" alt="Present." /></p>
<p>The enclosure getting tapped:<br />
<img src="http://www.narrat1ve.com/images/WTPA2_ProtoB_Tapping_Enclosure_Jun092011.JPG" alt="Don't crack please." /></p>
<p>And the pretty views of the done project:<br />
<img src="http://www.narrat1ve.com/images/WTPA2_Proto_Back_Jun092011.JPG" alt="From da back" /><br />
<img src="http://www.narrat1ve.com/images/WTPA2_Proto_Top_Jun092011.JPG" alt="Proto B Top" /></p>
<p>I&#8217;ve found at least two dumb problems so far.  The Audio In/Out jacks were interchanged in the harness, and the clock select switch was in the wrong place in line for the pulse shaper (only the RC oscillator was getting its pulses shaped before heading to the IRQ pin).  Also I cannot seem to find a screw that is meant to mate with those MIDI jack mounting holes.  There&#8217;s probably more that&#8217;s wrong.  Once I am sure I&#8217;ve found all the bogeymen, I can pull the trigger on the final PCB order.<br />
The uSD card is already being a bitch.<br />
Holler,<br />
TB</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.narrat1ve.com/2011/06/09/wtpa2-prototype-b-totally-running-shiz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WTPA2 Prototype B PCBs Arrive</title>
		<link>http://blog.narrat1ve.com/2011/06/07/wtpa2-prototype-b-pcbs-arrive/</link>
		<comments>http://blog.narrat1ve.com/2011/06/07/wtpa2-prototype-b-pcbs-arrive/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 15:12:01 +0000</pubDate>
		<dc:creator>TBailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[MicroSD]]></category>
		<category><![CDATA[PCB Layout]]></category>
		<category><![CDATA[WTPA]]></category>
		<category><![CDATA[WTPA v2.0]]></category>

		<guid isPermaLink="false">http://blog.narrat1ve.com/?p=410</guid>
		<description><![CDATA[So the boards got here for the next (and hopefully last) prototype of the WTPA2. Some exciting changes from the last proto &#8212; I not only fixed some dumb hardware bugs and changed some layouts to make more sense, but I added the pulse shaping circuit from the last post and&#8230; Added a Micro SD [...]]]></description>
			<content:encoded><![CDATA[<p>So the boards got here for the next (and hopefully last) prototype of the WTPA2.</p>
<p><img src="http://www.narrat1ve.com/images/WTPA2_ProtoB_BarePCBs_Jun022011.JPG" alt="Bare Board Mother Lode" /></p>
<p>Some exciting changes from the last proto &#8212; I not only fixed some dumb hardware bugs and changed some layouts to make more sense, but I added the pulse shaping circuit from the last post and&#8230;<br />
Added a Micro SD card interface!</p>
<p><img src="http://www.narrat1ve.com/images/WTPA2_ProtoB_MicroSD_Jun052011.JPG" alt="What big mems you have" /></p>
<p>Again I really owe Olivier over at <a href="http://mutable-instruments.net/">Mutable Instruments</a> for this, since he once again shamed me out of my sloven embedded ways.  Basically I didn&#8217;t want to have to deal with the SD spec (I did a little coding on MMC interfaces for the toy world and it sucked) and so I&#8217;d made the earlier daughterboard using a cheap SST flash IC.  The flash IC was easy to deal with, but was admittedly a cop out.  Olivier clowned me about this until I was embarrassed enough to change my ways.  Users like removable memory, and a micro SD card provides 2GB of memory for about a dollar (as opposed to my 8MB before).  So I sucked it up and made this board.  It will be available for sale as a daughterboard (it&#8217;s deeply SMT) although I may swear a lot getting the new interface done.</p>
<p><img src="http://www.narrat1ve.com/images/WTPA2_ProtoB_Main_Jun062011.JPG" alt="Proto B, close up" /></p>
<p>Here&#8217;s the main board populated.  And here&#8217;s the new Jack PCB added on:</p>
<p><img src="http://www.narrat1ve.com/images/WTPA2_ProtoB_Main_Jacks_Jun072011.JPG" alt="Proto B and jacks" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.narrat1ve.com/2011/06/07/wtpa2-prototype-b-pcbs-arrive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WTPA2 Work Resumed!!</title>
		<link>http://blog.narrat1ve.com/2011/05/23/wtpa2-work-resumed/</link>
		<comments>http://blog.narrat1ve.com/2011/05/23/wtpa2-work-resumed/#comments</comments>
		<pubDate>Mon, 23 May 2011 15:01:03 +0000</pubDate>
		<dc:creator>TBailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Analog]]></category>
		<category><![CDATA[Discrete]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[WTPA]]></category>
		<category><![CDATA[WTPA v2.0]]></category>

		<guid isPermaLink="false">http://blog.narrat1ve.com/?p=406</guid>
		<description><![CDATA[All right, so now that Cory&#8217;s biz is done and the art world is safe again, I can get back to God&#8217;s Work, by which I mean making samples that sound like farts. That&#8217;s right, WTPA2! WTPA2 has been promised now for like a million years. I&#8217;m shooting for actually having it ready by the [...]]]></description>
			<content:encoded><![CDATA[<p>All right, so now that Cory&#8217;s biz is done and the art world is safe again, I can get back to God&#8217;s Work, by which I mean making samples that sound like farts.  That&#8217;s right, WTPA2!<br />
WTPA2 has been promised now for like a million years.  I&#8217;m shooting for actually having it ready by the end of June for Bent Festival.</p>
<p>In that spirit, I dug out my old prototype.  There&#8217;s a lot wrong with it.  I found most of the hardware bugs way back when, and I added another input for a separate pitch control to the second sample bank.  The idea was to use the spare op-amp to make an RC oscillator and use it to clock the second sample bank and use the main oscillator to clock the first bank.  Clock sources could then be switched or interchanged in hard or software.</p>
<p>Problem is, the only uncommitted pins left that can trigger an IRQ are interrupt-on-change pins.  That means that I can&#8217;t only trigger on a rising or falling edge &#8212; the ISR will trigger on BOTH.  That means a 10kHz square wave will trigger 20k interrupts a second.  I could make the clock half as fast I guess, but that seems like it will confuse people.  For the time being I dealt with it by checking the state of the pin in the ISR, but that&#8217;s lame too.  It means we vector away from mainline code twice as often as we need to.  So I came up with this:</p>
<p><img src="http://narrat1ve.com/images/WTPA2_Pulse_Shaper_May232011.jpg" alt="Analog Wyzyrdry" /></p>
<p>It&#8217;s a pulse shaper.  It takes a clock input, and regardless of duty cycle, spits out a low-going pulse on every rising clock edge.  The diode and cap here are responsible for separating out the edges, and the transistor squares them up again (more or less).  Hooked up to the function generator (Agilent 33120A, 50ohm out) I can get a nice 0.5uS low going pulse really consistently!  I can use this to trigger an interrupt, and the pulse will ALWAYS rise again during the ISR (the fastest ISR in WTPA2 is like 9uS).  Then at the end of the ISR I can clear the interrupt flag.  Viola, rising edge interrupts with a couple cents worth of hardware!  I&#8217;ve rolled this and some other hardware changes into the next proto revision and will be ordering it soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.narrat1ve.com/2011/05/23/wtpa2-work-resumed/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Whitney Dancing Stand Development, Part 3</title>
		<link>http://blog.narrat1ve.com/2011/04/26/whitney-dancing-stand-development-part-3/</link>
		<comments>http://blog.narrat1ve.com/2011/04/26/whitney-dancing-stand-development-part-3/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 14:26:37 +0000</pubDate>
		<dc:creator>TBailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Art Shiz]]></category>
		<category><![CDATA[Cory Arcangel]]></category>
		<category><![CDATA[dancing stands]]></category>
		<category><![CDATA[encoders]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[whitney]]></category>

		<guid isPermaLink="false">http://blog.narrat1ve.com/?p=403</guid>
		<description><![CDATA[What a marathon. So, in the last week or so we solidified the designs and there is a horde of 20-somethings with cool haircuts in my apartment running power drills. CHANGES: &#8211; Nixed the PID loop in favor of a stepper specific approach. We now calculate error in steps once a turn and adjust for [...]]]></description>
			<content:encoded><![CDATA[<p>What a marathon.<br />
So, in the last week or so we solidified the designs and there is a horde of 20-somethings with cool haircuts in my apartment running power drills.<br />
CHANGES:<br />
&#8211; Nixed the PID loop in favor of a stepper specific approach.  We now calculate error in steps once a turn and adjust for it.<br />
&#8211; Added vibration dampening grommets to the motor mounts to keep noise down.<br />
&#8211; Added covers for the AC lines (so you can&#8217;t climb under the new media art and lick mains current)</p>
<p>Here&#8217;s one underway.  That vented thing is an enclosed switcher to run the stepper and electronics.</p>
<p><img src="http://narrat1ve.com/images/DancingStand_Assembly_Apr212011.JPG" alt="Building it..." /></p>
<p>And here&#8217;s good old Lucky Number 13, all set to go:</p>
<p><img src="http://narrat1ve.com/images/DancingStand_Assembled_Apr262011.JPG" alt="Built." /></p>
<p>Lastly, before kicking these things out the door I made some videos of them correcting for errors.  By which I mean &#8220;beating them up&#8221;.  If you get a chance to do this at the Whitney and the guard isn&#8217;t looking, you should do it.  More videos on the youtube channel.</p>
<p><iframe width="480" height="390" src="http://www.youtube.com/embed/kMAt1JXU078" frameborder="0" allowfullscreen></iframe></p>
<p>Beer o&#8217;clock,<br />
TB</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.narrat1ve.com/2011/04/26/whitney-dancing-stand-development-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Whitney Dancing Stand Development, Part 2</title>
		<link>http://blog.narrat1ve.com/2011/04/19/whitney-dancing-stand-development-part-2/</link>
		<comments>http://blog.narrat1ve.com/2011/04/19/whitney-dancing-stand-development-part-2/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 14:02:47 +0000</pubDate>
		<dc:creator>TBailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Art Shiz]]></category>
		<category><![CDATA[Cory Arcangel]]></category>
		<category><![CDATA[dancing stands]]></category>
		<category><![CDATA[encoders]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Sensors]]></category>

		<guid isPermaLink="false">http://blog.narrat1ve.com/?p=397</guid>
		<description><![CDATA[Sorry for the short posts. These are long days. The real dancing stand controller boards are here! The real magnetic position sensing encoders, too: The other side of those encoders is a magnet (read the datasheet if you&#8217;re curious &#8212; these parts are expensive and awesome and totally worth it), and that magnet has to [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry for the short posts.  These are long days.<br />
The real dancing stand controller boards are here!</p>
<p><img src="http://narrat1ve.com/images/DancingStand_Boards_Apr172011.JPG" alt="Legit Stand Boards" /></p>
<p>The real magnetic position sensing encoders, too:</p>
<p><img src="http://narrat1ve.com/images/DancingStand_Rotational_Sensor_Apr192011.JPG" alt="Legit Encoders" /></p>
<p>The other side of those encoders is a magnet (read the <a href="http://www.austriamicrosystems.com/eng/content/download/1288/7223">datasheet</a> if you&#8217;re curious &#8212; these parts are expensive and awesome and totally worth it), and that magnet has to be centered very precisely over the IC.  Any eccentricity or slop or variation in Z height will make for bad accuracy.  You wouldn&#8217;t guess from the datasheet but these parts are actually pretty forgiving.  Nonetheless, I had a buddy of mine (Joe, over at <a href="http://breadboxstudionyc.com/home.html">BreadBox Studio</a>) turn me some ABS magnet holders which keep the magnet aligned with the shaft of the stand.  They also space the magnet off the shaft itself (the shaft is steel and screws with the magnetic field as the encoder wants to see it) and provide some registration holes.  The magnets are press fit into the ABS turnings.  Like so:</p>
<p><img src="http://narrat1ve.com/images/DancingStand_MagHolder_Apr192011.JPG" alt="Magnet Holders" /></p>
<p>Thanks, Joe!  Now I gotta crank out 17 and make sure they all do what they should.  Wish me luck&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.narrat1ve.com/2011/04/19/whitney-dancing-stand-development-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Whitney Dancing Stand Development, Part 1</title>
		<link>http://blog.narrat1ve.com/2011/04/10/whitney-dancing-stand-development-part-1/</link>
		<comments>http://blog.narrat1ve.com/2011/04/10/whitney-dancing-stand-development-part-1/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 13:57:46 +0000</pubDate>
		<dc:creator>TBailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Art Shiz]]></category>
		<category><![CDATA[Cory Arcangel]]></category>
		<category><![CDATA[dancing stands]]></category>
		<category><![CDATA[encoders]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[motor control]]></category>
		<category><![CDATA[whitney]]></category>

		<guid isPermaLink="false">http://blog.narrat1ve.com/?p=394</guid>
		<description><![CDATA[So Cory has a bigass show coming up at the Whitney this summer, and I&#8217;ve got SEVENTEEN!! dancing stands to build. They&#8217;re different from the last batch in that they have to run synchronously. The idea is to use a PID control loop and sync them via RF. They run on steppers, mostly because it [...]]]></description>
			<content:encoded><![CDATA[<p>So Cory has a bigass show coming up at the Whitney this summer, and I&#8217;ve got SEVENTEEN!! dancing stands to build.  They&#8217;re different from the last batch in that they have to run synchronously.  The idea is to use a PID control loop and sync them via RF.  They run on steppers, mostly because it was easy to find steppers that were torquey enough for the application and still fit under the dancing stand easily.  The MCU is an Atmel, the RF link is by LINX, and the stepper driver is a TI DRV8xxx part.</p>
<p>Here&#8217;s the protos:</p>
<p><img src="http://narrat1ve.com/images/DancingStand_Controller_Proto_Apr062011.JPG" alt="Stand Controller Proto" /></p>
<p>The system has a lot of slop, and I decided to do positional feedback using an absolute position sensing magnetic rotary encoder.  This one is by Austria Microsystems.  The specs on these are INCREDIBLE, but mounting them takes serious care to get that accuracy.  I made a bunch of jigs, you can see this one all strung up under the stand&#8217;s driven leg.  We&#8217;ll see how well they work&#8230;</p>
<p><img src="http://narrat1ve.com/images/DancingStand_MagEncoder_Jig_Apr072011.JPG" alt="Encoder Jig" /></p>
<p>Oh, yeah.  And we made more bowling controllers.  Or mostly my assistant Daniel did.  These guys are really getting pretty cookie-cutter:</p>
<p><img src="http://narrat1ve.com/images/BowlingControllers_Apr102011.JPG" alt="Moar Bowling" /></p>
<p>I feel pretty good about the protos of those stands, but my crystal ball predicts something will be screwy.  We&#8217;ll see.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.narrat1ve.com/2011/04/10/whitney-dancing-stand-development-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cortex M3 Weezy</title>
		<link>http://blog.narrat1ve.com/2011/03/02/cortex-m3-weezy/</link>
		<comments>http://blog.narrat1ve.com/2011/03/02/cortex-m3-weezy/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 13:35:56 +0000</pubDate>
		<dc:creator>TBailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[Cortex]]></category>
		<category><![CDATA[Gerbers]]></category>
		<category><![CDATA[MCUs]]></category>

		<guid isPermaLink="false">http://blog.narrat1ve.com/?p=392</guid>
		<description><![CDATA[I had a slow week this week and laid out and ordered a &#8220;bare metal&#8221; PCB for an ARM Cortex M3 &#8212; the NXP LPC175x series. I spend too much time messing with 8-bit MCUs. It&#8217;s 2011 after all. I brought up an ARM7TDMI awhile back, and figured it was worth at least trying to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://narrat1ve.com/images/M3_Weezy_Gerbs_Mar2.png" alt="All teh pretty horses under the hood" /></p>
<p>I had a slow week this week and laid out and ordered a &#8220;bare metal&#8221; PCB for an ARM Cortex M3 &#8212; the NXP LPC175x series.  I spend too much time messing with 8-bit MCUs.  It&#8217;s 2011 after all.<br />
I brought up an ARM7TDMI awhile back, and figured it was worth at least trying to stay current.  One of these days I&#8217;ll populate this guy, and eventually hopefully even program it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.narrat1ve.com/2011/03/02/cortex-m3-weezy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

