<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Machinaut</title>
	<atom:link href="http://ajray.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ajray.wordpress.com</link>
	<description>into the machine</description>
	<lastBuildDate>Thu, 21 Apr 2011 23:13:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ajray.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Machinaut</title>
		<link>http://ajray.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ajray.wordpress.com/osd.xml" title="Machinaut" />
	<atom:link rel='hub' href='http://ajray.wordpress.com/?pushpress=hub'/>
		<item>
		<title>I do more electrical engineering on a day off than a day of class</title>
		<link>http://ajray.wordpress.com/2011/04/21/i-do-more-electrical-engineering-on-a-day-off-than-a-day-of-class/</link>
		<comments>http://ajray.wordpress.com/2011/04/21/i-do-more-electrical-engineering-on-a-day-off-than-a-day-of-class/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 23:13:04 +0000</pubDate>
		<dc:creator>ajray</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ajray.wordpress.com/2011/04/21/i-do-more-electrical-engineering-on-a-day-off-than-a-day-of-class/</guid>
		<description><![CDATA[Buck Regulator (12V LiPo to 5V for the PandaBoard): See the full gallery on Posterous And color-coded both to make it easier when we&#8217;re mucking about in the airframe (lots and lots of wires)&#8221; Jacob and Michael (fellow aerial robots club circuit wizards) did the board designs and sourced/ordered parts. Speaking of those guys&#8230; Dudes, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=218&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[
<a href='http://ajray.wordpress.com/2011/04/21/i-do-more-electrical-engineering-on-a-day-off-than-a-day-of-class/i-do-more-electrical-engineering-on-a-day-off-than-a-day-of-class-2/' title='I do more electrical engineering on a day off than a day of class'><img width="150" height="112" src="http://ajray.files.wordpress.com/2011/04/img_20110421_171413-scaled1000.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="I do more electrical engineering on a day off than a day of class" title="I do more electrical engineering on a day off than a day of class" /></a>
<a href='http://ajray.wordpress.com/2011/04/21/i-do-more-electrical-engineering-on-a-day-off-than-a-day-of-class/i-do-more-electrical-engineering-on-a-day-off-than-a-day-of-class-3/' title='I do more electrical engineering on a day off than a day of class'><img width="150" height="112" src="http://ajray.files.wordpress.com/2011/04/img_20110421_172510-scaled1000.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="I do more electrical engineering on a day off than a day of class" title="I do more electrical engineering on a day off than a day of class" /></a>
<a href='http://ajray.wordpress.com/2011/04/21/i-do-more-electrical-engineering-on-a-day-off-than-a-day-of-class/i-do-more-electrical-engineering-on-a-day-off-than-a-day-of-class-4/' title='I do more electrical engineering on a day off than a day of class'><img width="150" height="112" src="http://ajray.files.wordpress.com/2011/04/img_20110421_172948-scaled1000.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="I do more electrical engineering on a day off than a day of class" title="I do more electrical engineering on a day off than a day of class" /></a>
</div>
<p> Buck Regulator (12V LiPo to 5V for the <a href="http://pandaboard.org/">PandaBoard</a>):</span></p>
<p>
<div class='p_embed p_image_embed'> <a href="http://posterous.com/getfile/files.posterous.com/temp-2011-04-21/jHmfzetIfpDmrxrBcdxtsoBIoAxEmpxqDmfAJemllhsCAaoBoGHhqvzuHphD/IMG_20110421_184114.jpg.scaled1000.jpg"><img alt="Img_20110421_184114" height="375" src="http://posterous.com/getfile/files.posterous.com/temp-2011-04-21/jHmfzetIfpDmrxrBcdxtsoBIoAxEmpxqDmfAJemllhsCAaoBoGHhqvzuHphD/IMG_20110421_184114.jpg.scaled500.jpg" width="500" /></a> <a href="http://ajray.files.wordpress.com/2011/04/img_20110421_172948-scaled1000.jpg"><img alt="Img_20110421_172948" height="375" src="http://ajray.files.wordpress.com/2011/04/img_20110421_172948-scaled1000.jpg?w=500&#038;h=375" width="500" /></a>
<div class='p_see_full_gallery'><a href="http://machinaut.posterous.com/i-do-more-electrical-engineering-on-a-day-off">See the full gallery on Posterous</a></div>
</p></div>
</p>
<p><span style="font-size:small;">And color-coded both to make it easier when we&#8217;re mucking about in the airframe (lots and lots of wires)&#8221;</span></p>
<p>
<div class='p_embed p_image_embed'> <a href="http://posterous.com/getfile/files.posterous.com/temp-2011-04-21/EwfFbihrCIxJxntIimHdxfypeqamDicbqyxytmkwwEpgdakFdnqdIBkncbFE/IMG_20110421_185831.jpg.scaled1000.jpg"><img alt="Img_20110421_185831" height="375" src="http://posterous.com/getfile/files.posterous.com/temp-2011-04-21/EwfFbihrCIxJxntIimHdxfypeqamDicbqyxytmkwwEpgdakFdnqdIBkncbFE/IMG_20110421_185831.jpg.scaled500.jpg" width="500" /></a> </div>
</p>
<p>Jacob and Michael (fellow aerial robots club circuit wizards) did the board designs and sourced/ordered parts. Speaking of those guys&#8230;</p>
<p>Dudes, double check component sizes when ordering and change the schematic (if needed). &nbsp;Theres definitely an F size tantalum cap on an A size footprint, so i just had to tack one side down to the middle of the ground plane. &nbsp;Also, on the PoE injector, only one side had room to make mounting holes (for the connector). &nbsp;Lastly, on the mounting holes on both, could you mark those with X&#8217;s somehow next time? it makes hitting them with a drill a LOT easier. Thanks <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>And the schematic for the Buck reg didnt have component values, I had to reverse-engineer the Bill of Materials we ordered from to figure out what goes where.</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajray.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajray.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajray.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajray.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ajray.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ajray.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ajray.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ajray.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajray.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajray.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajray.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajray.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajray.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajray.wordpress.com/218/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=218&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ajray.wordpress.com/2011/04/21/i-do-more-electrical-engineering-on-a-day-off-than-a-day-of-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6e4ed3d8fe6536718b64054c30766622?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajray</media:title>
		</media:content>

		<media:content url="http://posterous.com/getfile/files.posterous.com/temp-2011-04-21/jHmfzetIfpDmrxrBcdxtsoBIoAxEmpxqDmfAJemllhsCAaoBoGHhqvzuHphD/IMG_20110421_184114.jpg.scaled500.jpg" medium="image">
			<media:title type="html">Img_20110421_184114</media:title>
		</media:content>

		<media:content url="http://ajray.files.wordpress.com/2011/04/img_20110421_172948-scaled1000.jpg?w=300" medium="image">
			<media:title type="html">Img_20110421_172948</media:title>
		</media:content>

		<media:content url="http://posterous.com/getfile/files.posterous.com/temp-2011-04-21/EwfFbihrCIxJxntIimHdxfypeqamDicbqyxytmkwwEpgdakFdnqdIBkncbFE/IMG_20110421_185831.jpg.scaled500.jpg" medium="image">
			<media:title type="html">Img_20110421_185831</media:title>
		</media:content>
	</item>
		<item>
		<title>H</title>
		<link>http://ajray.wordpress.com/2011/03/27/h/</link>
		<comments>http://ajray.wordpress.com/2011/03/27/h/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 08:45:33 +0000</pubDate>
		<dc:creator>ajray</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ajray.wordpress.com/2011/03/27/h/</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=215&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<div class='p_embed p_image_embed'> <img alt="653624019" height="306" src="http://ajray.files.wordpress.com/2011/03/653624019-scaled500.jpg?w=408&#038;h=306" width="408" /> </div>
</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajray.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajray.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajray.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajray.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ajray.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ajray.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ajray.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ajray.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajray.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajray.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajray.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajray.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajray.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajray.wordpress.com/215/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=215&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ajray.wordpress.com/2011/03/27/h/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6e4ed3d8fe6536718b64054c30766622?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajray</media:title>
		</media:content>

		<media:content url="http://ajray.files.wordpress.com/2011/03/653624019-scaled500.jpg?w=300" medium="image">
			<media:title type="html">653624019</media:title>
		</media:content>
	</item>
		<item>
		<title>Nothing is sacred in the robotics lab</title>
		<link>http://ajray.wordpress.com/2011/03/07/nothing-is-sacred-in-the-robotics-lab/</link>
		<comments>http://ajray.wordpress.com/2011/03/07/nothing-is-sacred-in-the-robotics-lab/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 22:00:09 +0000</pubDate>
		<dc:creator>ajray</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ajray.wordpress.com/2011/03/07/nothing-is-sacred-in-the-robotics-lab/</guid>
		<description><![CDATA[Just thought I&#8217;d post this. &#160;This is a Flip HD video camera getting gutted so NCSU High Powered Rocketry (who Aerial Robotics shares a lab with) can control it via a microcontroller. &#160;Awesome.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=212&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<p>Just thought I&#8217;d post this. &nbsp;This is a Flip HD video camera getting gutted so NCSU High Powered Rocketry (who Aerial Robotics shares a lab with) can control it via a microcontroller. &nbsp;Awesome. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>
<div class='p_embed p_image_embed'> <a href="http://ajray.files.wordpress.com/2011/03/img_20110304_182544-scaled1000.jpg"><img alt="Img_20110304_182544" height="375" src="http://ajray.files.wordpress.com/2011/03/img_20110304_182544-scaled1000.jpg?w=500&#038;h=375" width="500" /></a> </div>
</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajray.wordpress.com/212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajray.wordpress.com/212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajray.wordpress.com/212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajray.wordpress.com/212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ajray.wordpress.com/212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ajray.wordpress.com/212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ajray.wordpress.com/212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ajray.wordpress.com/212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajray.wordpress.com/212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajray.wordpress.com/212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajray.wordpress.com/212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajray.wordpress.com/212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajray.wordpress.com/212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajray.wordpress.com/212/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=212&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ajray.wordpress.com/2011/03/07/nothing-is-sacred-in-the-robotics-lab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6e4ed3d8fe6536718b64054c30766622?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajray</media:title>
		</media:content>

		<media:content url="http://ajray.files.wordpress.com/2011/03/img_20110304_182544-scaled1000.jpg?w=300" medium="image">
			<media:title type="html">Img_20110304_182544</media:title>
		</media:content>
	</item>
		<item>
		<title>HazardIMU&#8217;s Assembled and Working</title>
		<link>http://ajray.wordpress.com/2011/03/07/hazardimus-assembled-and-working/</link>
		<comments>http://ajray.wordpress.com/2011/03/07/hazardimus-assembled-and-working/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 21:40:26 +0000</pubDate>
		<dc:creator>ajray</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ajray.wordpress.com/2011/03/07/hazardimus-assembled-and-working/</guid>
		<description><![CDATA[Working with Trent Young (grad student in flight research, he&#8217;s basically awesome) I got to test all 6 Degrees of Freedom (dof) on the boards, and all of the (tediously soldered and resoldered) QFN sensor chips worked. &#160;After a little retouching all of the SD cards worked as well. &#160;There were (still more) errors on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=203&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[
<a href='http://ajray.wordpress.com/2011/03/07/hazardimus-assembled-and-working/hazardimus-assembled-and-working-2/' title='HazardIMU&#039;s Assembled and Working'><img width="150" height="112" src="http://ajray.files.wordpress.com/2011/03/img_20110304_163936-scaled1000.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="HazardIMU&#039;s Assembled and Working" title="HazardIMU&#039;s Assembled and Working" /></a>
<a href='http://ajray.wordpress.com/2011/03/07/hazardimus-assembled-and-working/hazardimus-assembled-and-working-3/' title='HazardIMU&#039;s Assembled and Working'><img width="150" height="112" src="http://ajray.files.wordpress.com/2011/03/img_20110304_163955-scaled1000.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="HazardIMU&#039;s Assembled and Working" title="HazardIMU&#039;s Assembled and Working" /></a>
<a href='http://ajray.wordpress.com/2011/03/07/hazardimus-assembled-and-working/hazardimus-assembled-and-working-4/' title='HazardIMU&#039;s Assembled and Working'><img width="150" height="112" src="http://ajray.files.wordpress.com/2011/03/img_20110304_181228-scaled1000.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="HazardIMU&#039;s Assembled and Working" title="HazardIMU&#039;s Assembled and Working" /></a>
<a href='http://ajray.wordpress.com/2011/03/07/hazardimus-assembled-and-working/hazardimus-assembled-and-working-5/' title='HazardIMU&#039;s Assembled and Working'><img width="150" height="112" src="http://ajray.files.wordpress.com/2011/03/img_20110304_181235-scaled1000.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="HazardIMU&#039;s Assembled and Working" title="HazardIMU&#039;s Assembled and Working" /></a>
<a href='http://ajray.wordpress.com/2011/03/07/hazardimus-assembled-and-working/hazardimus-assembled-and-working-6/' title='HazardIMU&#039;s Assembled and Working'><img width="150" height="112" src="http://ajray.files.wordpress.com/2011/03/img_20110304_181217-scaled1000.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="HazardIMU&#039;s Assembled and Working" title="HazardIMU&#039;s Assembled and Working" /></a>
</div>
</p>
<p>Working with Trent Young (grad student in flight research, he&#8217;s basically awesome) I got to test all 6 Degrees of Freedom (dof) on the boards, and all of the (tediously soldered and resoldered) QFN sensor chips worked. &nbsp;After a little retouching all of the SD cards worked as well. &nbsp;There were (still more) errors on the boards we fixed, and if we ever want to release this design I will fix all of those before we do.</p>
<p>Finally here is the previously only working HazardIMU here being lonely in the Plank UAV platform:</p>
<p>
<div class='p_embed p_image_embed'> <a href="http://ajray.files.wordpress.com/2011/03/img_20110304_181217-scaled1000.jpg"><img alt="Img_20110304_181217" height="375" src="http://ajray.files.wordpress.com/2011/03/img_20110304_181217-scaled1000.jpg?w=500&#038;h=375" width="500" /></a> <a href="http://ajray.files.wordpress.com/2011/03/img_20110304_181228-scaled1000.jpg"><img alt="Img_20110304_181228" height="375" src="http://ajray.files.wordpress.com/2011/03/img_20110304_181228-scaled1000.jpg?w=500&#038;h=375" width="500" /></a> <a href="http://ajray.files.wordpress.com/2011/03/img_20110304_181235-scaled1000.jpg"><img alt="Img_20110304_181235" height="375" src="http://ajray.files.wordpress.com/2011/03/img_20110304_181235-scaled1000.jpg?w=500&#038;h=375" width="500" /></a>
<div class='p_see_full_gallery'><a href="http://machinaut.posterous.com/hazardimus-assembled-and-working">See the full gallery on Posterous</a></div>
</p></div>
<p> Now the epilogue: In learning about the design, programming and actually building these IMU/autopilots, I&#8217;ve learned a lot about what *not* to do, and I think I&#8217;m going to point this out as a natural law:</p>
<p>Circuit hackers in UAV groups will eventually design their own autopilot, or circuits they design will tend towards becoming autopilots.</p>
<p>I only have to look around at the HUGE list of open-source or partially open-source hacked together autopilots available to the community as proof. &nbsp;Just at NC State here alone we have gone through several (FlightStix &#8211; a gumstix-based autopilot, Micropilot, OpenPilot, Ardupilot, and now we use the proprietary Piccolo LT by Cloudcap.)</p>
<p>I&#8217;m right now looking at making my own autopilot. &nbsp;Still figuring that out now.</p>
<p>Ciao.</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajray.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajray.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajray.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajray.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ajray.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ajray.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ajray.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ajray.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajray.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajray.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajray.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajray.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajray.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajray.wordpress.com/203/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=203&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ajray.wordpress.com/2011/03/07/hazardimus-assembled-and-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6e4ed3d8fe6536718b64054c30766622?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajray</media:title>
		</media:content>

		<media:content url="http://ajray.files.wordpress.com/2011/03/img_20110304_181217-scaled1000.jpg?w=300" medium="image">
			<media:title type="html">Img_20110304_181217</media:title>
		</media:content>

		<media:content url="http://ajray.files.wordpress.com/2011/03/img_20110304_181228-scaled1000.jpg?w=300" medium="image">
			<media:title type="html">Img_20110304_181228</media:title>
		</media:content>

		<media:content url="http://ajray.files.wordpress.com/2011/03/img_20110304_181235-scaled1000.jpg?w=300" medium="image">
			<media:title type="html">Img_20110304_181235</media:title>
		</media:content>
	</item>
		<item>
		<title>HazardIMU Daughter Boards (Part 2)</title>
		<link>http://ajray.wordpress.com/2011/03/03/hazardimu-daughter-boards-part-2/</link>
		<comments>http://ajray.wordpress.com/2011/03/03/hazardimu-daughter-boards-part-2/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 07:21:31 +0000</pubDate>
		<dc:creator>ajray</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ajray.wordpress.com/2011/03/03/hazardimu-daughter-boards-part-2/</guid>
		<description><![CDATA[Close up of the front of one of the boards: All three boards at the end of the night: And this is an idea what they&#8217;ll look like mated to the main board:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=196&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[
<a href='http://ajray.wordpress.com/2011/03/03/hazardimu-daughter-boards-part-2/hazardimu-daughter-boards-part-2-2/' title='HazardIMU Daughter Boards (Part 2)'><img width="150" height="112" src="http://ajray.files.wordpress.com/2011/03/img_20110303_011255-scaled1000.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="HazardIMU Daughter Boards (Part 2)" title="HazardIMU Daughter Boards (Part 2)" /></a>
<a href='http://ajray.wordpress.com/2011/03/03/hazardimu-daughter-boards-part-2/hazardimu-daughter-boards-part-2-3/' title='HazardIMU Daughter Boards (Part 2)'><img width="150" height="112" src="http://ajray.files.wordpress.com/2011/03/img_20110303_011338-scaled1000.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="HazardIMU Daughter Boards (Part 2)" title="HazardIMU Daughter Boards (Part 2)" /></a>
<a href='http://ajray.wordpress.com/2011/03/03/hazardimu-daughter-boards-part-2/hazardimu-daughter-boards-part-2-4/' title='HazardIMU Daughter Boards (Part 2)'><img width="150" height="112" src="http://ajray.files.wordpress.com/2011/03/img_20110303_011320-scaled1000.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="HazardIMU Daughter Boards (Part 2)" title="HazardIMU Daughter Boards (Part 2)" /></a>
<a href='http://ajray.wordpress.com/2011/03/03/hazardimu-daughter-boards-part-2/hazardimu-daughter-boards-part-2-5/' title='HazardIMU Daughter Boards (Part 2)'><img width="150" height="112" src="http://ajray.files.wordpress.com/2011/03/img_20110303_011500-scaled1000.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="HazardIMU Daughter Boards (Part 2)" title="HazardIMU Daughter Boards (Part 2)" /></a>

<p>Close up of the front of one of the boards:</p>
<p>
<div class='p_embed p_image_embed'> <a href="http://ajray.files.wordpress.com/2011/03/img_20110303_011338-scaled1000.jpg"><img alt="Img_20110303_011338" height="375" src="http://ajray.files.wordpress.com/2011/03/img_20110303_011338-scaled1000.jpg?w=500&#038;h=375" width="500" /></a> </div>
</p>
<p>All three boards at the end of the night:</p>
<p>
<div class='p_embed p_image_embed'> <a href="http://ajray.files.wordpress.com/2011/03/img_20110303_011320-scaled1000.jpg"><img alt="Img_20110303_011320" height="375" src="http://ajray.files.wordpress.com/2011/03/img_20110303_011320-scaled1000.jpg?w=500&#038;h=375" width="500" /></a> </div>
</p>
<p>And this is an idea what they&#8217;ll look like mated to the main board:</p>
<p>
<div class='p_embed p_image_embed'> <a href="http://ajray.files.wordpress.com/2011/03/img_20110303_011500-scaled1000.jpg"><img alt="Img_20110303_011500" height="375" src="http://ajray.files.wordpress.com/2011/03/img_20110303_011500-scaled1000.jpg?w=500&#038;h=375" width="500" /></a> </div>
</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajray.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajray.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajray.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajray.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ajray.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ajray.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ajray.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ajray.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajray.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajray.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajray.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajray.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajray.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajray.wordpress.com/196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=196&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ajray.wordpress.com/2011/03/03/hazardimu-daughter-boards-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6e4ed3d8fe6536718b64054c30766622?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajray</media:title>
		</media:content>

		<media:content url="http://ajray.files.wordpress.com/2011/03/img_20110303_011338-scaled1000.jpg?w=300" medium="image">
			<media:title type="html">Img_20110303_011338</media:title>
		</media:content>

		<media:content url="http://ajray.files.wordpress.com/2011/03/img_20110303_011320-scaled1000.jpg?w=300" medium="image">
			<media:title type="html">Img_20110303_011320</media:title>
		</media:content>

		<media:content url="http://ajray.files.wordpress.com/2011/03/img_20110303_011500-scaled1000.jpg?w=300" medium="image">
			<media:title type="html">Img_20110303_011500</media:title>
		</media:content>
	</item>
		<item>
		<title>Pseudo-Realtime in Ubuntu</title>
		<link>http://ajray.wordpress.com/2011/02/23/pseudo-realtime-in-ubuntu/</link>
		<comments>http://ajray.wordpress.com/2011/02/23/pseudo-realtime-in-ubuntu/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 07:23:43 +0000</pubDate>
		<dc:creator>ajray</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ajray.wordpress.com/2011/02/23/pseudo-realtime-in-ubuntu/</guid>
		<description><![CDATA[A few weeks ago I was given a simple problem by my Engineering Advisor: &#8220;Get an exact 8ms delay in Ubuntu.&#8221; He uses these machines for industrial automation in the startup he co-founded. &#160;My first answer was &#8220;that&#8217;s what a real-time operating system does&#8221;, but I figured I&#8217;d give it a shot. Testing timing with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=195&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<p>A few weeks ago I was given a simple problem by my Engineering Advisor:</p>
<p style="padding-left:30px;">&#8220;Get an exact 8ms delay in Ubuntu.&#8221;</p>
<p>He uses these machines for industrial automation in the startup he co-founded. &nbsp;My first answer was &#8220;that&#8217;s what a real-time operating system does&#8221;, but I figured I&#8217;d give it a shot.</p>
<p><strong>Testing timing with code</strong></p>
<p>The code I used is up on this <a href="https://gist.github.com/815525">gist of mine</a>. test-timer.c is his version, test-timer2.c is mine. (Note you&#8217;ll need -lrt to compile mine).</p>
<p><strong>test-timer.c</strong>&nbsp;- uses gettimeofday() for measurement, and usleep() for waiting. &nbsp;Both deal in microseconds</p>
<p><strong>test-timer2.c</strong>&nbsp;- uses clock_gettime() for measurement, and clock_nanosleep() for waiting. &nbsp;These use nanoseconds (hopefully higher precision).</p>
<p>There are 5 clocks available on Linux, and I used the CLOCK_REALTIME one for my implementation. &nbsp;I also noticed that it was regularly ~1% overshot, so i deliberately subtracted 1% from the commanded sleep time to make it more accurate.</p>
<p><strong>Results</strong></p>
<p>Here is the results of my run (on my Ubuntu 10.10 Desktop i386 machine):</p>
<p><span style="border-collapse:collapse;font-family:arial, sans-serif;"> </span></p>
<div>$ gcc -lrt test-timer2.c &amp;&amp; ./a.out &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
<div>Sampling interval = 396000000 nsec</div>
<p />
<div>Sample &nbsp;0: Time between samples = &nbsp;400024190 nanoseconds</div>
<div>Sample &nbsp;1: Time between samples = &nbsp;403113859 nanoseconds</div>
<div>Sample &nbsp;2: Time between samples = &nbsp;402139124 nanoseconds</div>
<div>Sample &nbsp;3: Time between samples = &nbsp;400572461 nanoseconds</div>
<div>Sample &nbsp;4: Time between samples = &nbsp;400491165 nanoseconds</div>
<div>Sample &nbsp;5: Time between samples = &nbsp;400263964 nanoseconds</div>
<div>Sample &nbsp;6: Time between samples = &nbsp;400136430 nanoseconds</div>
<div>Sample &nbsp;7: Time between samples = &nbsp;400748677 nanoseconds</div>
<div>Sample &nbsp;8: Time between samples = &nbsp;402653592 nanoseconds</div>
<div>Sample &nbsp;9: Time between samples = &nbsp;400528251 nanoseconds</div>
<p />
<div>Most of the samples are +/- 1%, but still others fall outside of the goal (not shown).</div>
<p />
<div><strong>Next Steps</strong></div>
<p />
<div>I think the next thing I&#8217;m going to do is install the -realtime kernel (there is a <a href="https://launchpad.net/~abogani/+archive/ppa">PPA</a> for it).<strong>&nbsp;</strong>I think that should have been the solution from the start, getting realtime results out of the -generic kernel is crazy talk.</div>
<p>&nbsp;</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajray.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajray.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajray.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajray.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ajray.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ajray.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ajray.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ajray.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajray.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajray.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajray.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajray.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajray.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajray.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=195&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ajray.wordpress.com/2011/02/23/pseudo-realtime-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6e4ed3d8fe6536718b64054c30766622?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajray</media:title>
		</media:content>
	</item>
		<item>
		<title>Building Hazard IMU/Autopilots</title>
		<link>http://ajray.wordpress.com/2011/02/22/building-hazard-imuautopilots/</link>
		<comments>http://ajray.wordpress.com/2011/02/22/building-hazard-imuautopilots/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 06:15:28 +0000</pubDate>
		<dc:creator>ajray</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ajray.wordpress.com/2011/02/22/building-hazard-imuautopilots/</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=183&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[
<a href='http://ajray.wordpress.com/2011/02/22/building-hazard-imuautopilots/building-hazard-imuautopilots-2/' title='Building Hazard IMU/Autopilots'><img width="89" height="150" src="http://ajray.files.wordpress.com/2011/02/imag0004-scaled1000.jpg?w=89&#038;h=150" class="attachment-thumbnail" alt="Building Hazard IMU/Autopilots" title="Building Hazard IMU/Autopilots" /></a>
<a href='http://ajray.wordpress.com/2011/02/22/building-hazard-imuautopilots/building-hazard-imuautopilots-3/' title='Building Hazard IMU/Autopilots'><img width="89" height="150" src="http://ajray.files.wordpress.com/2011/02/imag0003-scaled1000.jpg?w=89&#038;h=150" class="attachment-thumbnail" alt="Building Hazard IMU/Autopilots" title="Building Hazard IMU/Autopilots" /></a>
<a href='http://ajray.wordpress.com/2011/02/22/building-hazard-imuautopilots/building-hazard-imuautopilots-4/' title='Building Hazard IMU/Autopilots'><img width="89" height="150" src="http://ajray.files.wordpress.com/2011/02/imag0003-scaled10001.jpg?w=89&#038;h=150" class="attachment-thumbnail" alt="Building Hazard IMU/Autopilots" title="Building Hazard IMU/Autopilots" /></a>
<a href='http://ajray.wordpress.com/2011/02/22/building-hazard-imuautopilots/building-hazard-imuautopilots-5/' title='Building Hazard IMU/Autopilots'><img width="150" height="89" src="http://ajray.files.wordpress.com/2011/02/imag0007-scaled1000.jpg?w=150&#038;h=89" class="attachment-thumbnail" alt="Building Hazard IMU/Autopilots" title="Building Hazard IMU/Autopilots" /></a>
<a href='http://ajray.wordpress.com/2011/02/22/building-hazard-imuautopilots/building-hazard-imuautopilots-6/' title='Building Hazard IMU/Autopilots'><img width="150" height="89" src="http://ajray.files.wordpress.com/2011/02/imag0002-scaled1000.jpg?w=150&#038;h=89" class="attachment-thumbnail" alt="Building Hazard IMU/Autopilots" title="Building Hazard IMU/Autopilots" /></a>

<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajray.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajray.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajray.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajray.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ajray.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ajray.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ajray.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ajray.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajray.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajray.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajray.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajray.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajray.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajray.wordpress.com/183/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=183&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ajray.wordpress.com/2011/02/22/building-hazard-imuautopilots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6e4ed3d8fe6536718b64054c30766622?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajray</media:title>
		</media:content>
	</item>
		<item>
		<title>Architecture-support for pmcstat</title>
		<link>http://ajray.wordpress.com/2009/08/12/architecture-support-for-pmcstat/</link>
		<comments>http://ajray.wordpress.com/2009/08/12/architecture-support-for-pmcstat/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 06:08:03 +0000</pubDate>
		<dc:creator>ajray</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ajray.wordpress.com/?p=179</guid>
		<description><![CDATA[Pmcstat works! on my machine at least.  I have to communicate w/ Arun to make sure it works on his machines, but so far it looks promising. Usage: &#60;executable&#62; &#60;row index&#62; &#60;ctrspec&#62; executable &#8211; this is just the name&#38;path to the executable (pmcstat_p4, pmcstat_iaf, pmcstat_k8, etc.) row index &#8211; this is the counter index you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=179&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Pmcstat works! on my machine at least.  I have to communicate w/ Arun to make sure it works on his machines, but so far it looks promising.</p>
<p><strong>Usage: </strong>&lt;executable&gt; &lt;row index&gt; &lt;ctrspec&gt;</p>
<ul>
<li>executable &#8211; this is just the name&amp;path to the executable (pmcstat_p4, pmcstat_iaf, pmcstat_k8, etc.)</li>
<li>row index &#8211; this is the counter index you want to set.  For K8: 0 to 3.  For IAP: 0 or 1. For IAF: 0 to 2. For P4: 0 to 18 (but be wary of the restrictions).</li>
<li>ctrspec &#8211; this is a specification string with no spaces, and arguements are separated by commas</li>
</ul>
<p>Example Usage:</p>
<pre> ./pmcstat_p4 12 p4-branch-retired,mask=mmtm+mmnm</pre>
<p>You see that the ctrspec string can have key=value pairs, or just tags.  Generally just an event name will suffice (e.g. &#8216;p4-branch-retired&#8217;), but in this case we additionally supplied a mask to further refine the events counted.</p>
<p>There are some general events that are shared by (most) architectures, and are listed here: <a href="http://www.freebsd.org/cgi/man.cgi?query=pmc&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+8-current&amp;format=html">pmc</a></p>
<p>For the majority of events, you&#8217;ll use architecture-specific events, found here:</p>
<ul>
<li><a href="http://www.freebsd.org/cgi/man.cgi?query=pmc.p4&amp;sektion=3&amp;apropos=0&amp;manpath=FreeBSD+8-current">Pentium 4 (P4) pmc events</a></li>
<li><a href="http://www.freebsd.org/cgi/man.cgi?query=pmc.core2&amp;sektion=3&amp;apropos=0&amp;manpath=FreeBSD+8-current">Intel Architectural Programmable (IAP) pmc events</a></li>
<li><a href="http://www.freebsd.org/cgi/man.cgi?query=pmc.iaf&amp;sektion=3&amp;apropos=0&amp;manpath=FreeBSD+8-current">Intel Architectural Fixed (IAF) pmc events</a></li>
<li><a href="http://www.freebsd.org/cgi/man.cgi?query=pmc.k8&amp;sektion=3&amp;apropos=0&amp;manpath=FreeBSD+8-current">AMD K8 pmc events</a></li>
</ul>
<p>In addition, for now setting the event causes a side effect of initializing the counter to 0 before the event is enabled.</p>
<p>To read the counters, simply run `rdpmc &lt;rowindex&gt;` where rowindex is the row index of the counter you set the event to.  The exception to this is the IAF counters, to which you have to add 0x4000_0000 to the row index to read them.</p>
<p>For example, on a Core2 machine you would read the programmable counters with</p>
<ul>
<li>./rdpmc 0</li>
<li>./rdpmc 1</li>
</ul>
<p>And you could read the fixed-function counters with:</p>
<ul>
<li>./rdpmc 0&#215;40000000</li>
<li>./rdpmc 0&#215;40000001</li>
<li>./rdpmc 0&#215;40000002</li>
</ul>
<p>(Also, it goes without saying that you need to set the PCE bit of CR4 in order to read the counters as non-root).</p>
<p>These are using the most recent libpmc functions, including a re purposed general allocate function which reads the counterstring and extracts the event.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajray.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajray.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajray.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajray.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ajray.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ajray.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ajray.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ajray.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajray.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajray.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajray.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajray.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajray.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajray.wordpress.com/179/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=179&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ajray.wordpress.com/2009/08/12/architecture-support-for-pmcstat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6e4ed3d8fe6536718b64054c30766622?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajray</media:title>
		</media:content>
	</item>
		<item>
		<title>Pmcstat builds &#8230; now to add architecture support</title>
		<link>http://ajray.wordpress.com/2009/08/04/pmcstat-builds-now-to-add-architecture-support/</link>
		<comments>http://ajray.wordpress.com/2009/08/04/pmcstat-builds-now-to-add-architecture-support/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 09:47:13 +0000</pubDate>
		<dc:creator>ajray</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ajray.wordpress.com/?p=177</guid>
		<description><![CDATA[To those that know of xkcd, this may be familiar: http://xkcd.com/349/ .  Ironically, I am actually working with (Free)BSD software, so I get an additional kick out of that comic. I just pushed pmcstat that builds.  Let me tell you right now that even though it builds, right now it can&#8217;t do anything useful (without [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=177&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To those that know of xkcd, this may be familiar: http://xkcd.com/349/ .  Ironically, I am actually working with (Free)BSD software, so I get an additional kick out of that comic.</p>
<p>I just pushed pmcstat that builds.  Let me tell you right now that even though it builds, right now it can&#8217;t do anything useful (without the architecture specific support).  Here&#8217;s my upcoming plans for it (and libpmc, and some other things):</p>
<h3>Arch&#8217;s</h3>
<p>Add architecture-specific support for pmcstat.  Because the hwpmc/libpmc have been previously simplified, pmcstat needs to be told what architecture it&#8217;s on.  This is going to take the shape of some preprocessor macros at the top.  They will contain this (and possibly more):</p>
<ul>
<li>Allocation Functions (macros replace a generic allocator with the proper libpmc allocation function)</li>
<li>Number of PMCs</li>
<li>Bit-length of PMCs (used to calculate printouts)</li>
</ul>
<h3>libpmc</h3>
<p>In addition to these, two smaller functions need to be added for each architecture.  Some of the functionality of these is actually already covered by the allocation functions and can be separated.</p>
<ul>
<li>pmc_read() functions (while RDPMC is universal across all the x86 archs, the addressing scheme is not)</li>
<li>pmc_set() functions (instead of setting the event registers, this sets the counter value, used to initialize it to 0 or whatever you want)</li>
</ul>
<h3>debug wrap</h3>
<p>The last thing for right now is to take the debugging stuff I put in libpmc (mostly printf()s) and just put some conditional compilation around it.  This way the allocators will return just set the PMC events themselves (As opposed to the current setup, where libpmc outputs a value which an event-setter then uses).</p>
<p>The debugging compilation of the libpmc routines would allow the event-setters to still be used, but the regular routines (like those used by pmcstat) would just do the whole job of constructing event/control register values and WRMSR-ing them.</p>
<h3>sidenote</h3>
<p>I now have pages of notes on PMCTools on my tablet and around my workspace.  One of the conclusions I&#8217;ve come to in trying to decipher all of this is that even though I (myself, as a programmer) don&#8217;t like Object Orientation, this might have been well-suited for it.  I&#8217;ll be the first to admit that I&#8217;m must more comfortable with procedural programming, and it works for my (greatly simplified) PMCTools implementation, but for the FreeBSD PMCTools, I think it would make lots of things cleaner and easier to read.  Maybe it&#8217;s that I&#8217;m still an undergrad (and don&#8217;t get my coding powers til grad school) but it&#8217;s taken me often many MANY readthroughs and cross referencing both the FreeBSD kernel and the Minix kernel to make heads or tails of it.  (slightly less related to the OO problem, but in general readability has been a barrier for me) &lt;/rant&gt;</p>
<p>Some sleep. Back to coding.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajray.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajray.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajray.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajray.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ajray.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ajray.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ajray.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ajray.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajray.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajray.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajray.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajray.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajray.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajray.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=177&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ajray.wordpress.com/2009/08/04/pmcstat-builds-now-to-add-architecture-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6e4ed3d8fe6536718b64054c30766622?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajray</media:title>
		</media:content>
	</item>
		<item>
		<title>pmcstat update</title>
		<link>http://ajray.wordpress.com/2009/07/30/pmcstat-update/</link>
		<comments>http://ajray.wordpress.com/2009/07/30/pmcstat-update/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 06:35:21 +0000</pubDate>
		<dc:creator>ajray</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ajray.wordpress.com/?p=174</guid>
		<description><![CDATA[Well its 2AM here and unfortunately I&#8217;m having to give in for the night.  I had previously given myself seven days to finish the pmcstat port, and it looks like I was a bit off.  I will post now on the design, and put up the usage information in a later post. First off, because [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=174&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well its 2AM here and unfortunately I&#8217;m having to give in for the night.  I had previously given myself seven days to finish the pmcstat port, and it looks like I was a bit off.  I will post now on the design, and put up the usage information in a later post.</p>
<p>First off, because there are no interrupts, only counting modes are supported.  In addition only system-wide counting works for right now.  With a little hook in the scheduler/switcher process-virtual counting should be possible for one process at a time.  More on that later (in planning on the rest of the summer).  Cutting that functionality out for now works, because as I&#8217;m removing I see how strongly it&#8217;s tied to the FreeBSD kernel.  Adding that functionality would mostly be original code.</p>
<p>pmcstat is a convenient and clean interface to libpmc functionality, which is in turn a clean interface to hwpmc functionality, which is in turn a clean interface to the hardware&#8230; wait a minute.  For now pmcstat will work as follows:</p>
<ol>
<li>pmcstat is called from the command line w/ systemwide counting and some other options</li>
<li> either the options are bad (and it returns w/ an error) or it sets up the appropriate counters and starts counting events</li>
<li>pmcstat issues RDPMC&#8217;s at regular intervals to update it&#8217;s count (this is because depending on the frequency of the event, counters can overflow regularly)</li>
<li>this information is output to the user (or saved to a file)</li>
</ol>
<p>For process-virtual counting, is a bit more complicated, but still doable.  Mostly the same as above, with these differences:</p>
<ol>
<li>pmcstat fork()s off a child process which waits on a signal</li>
<li>pmcstat then sets up the counters/events for the child</li>
<li>pmcstat signals the child to start</li>
<li>the child process exec()s to the desired process</li>
<li>pmcstat monitors the counters at regular intervals (using RDPMC)</li>
</ol>
<p>More to come soon.</p>
<p>(As an informal note, I should say I gave this figure because pmcstat really is the simplest part of PMCTools so far, thankfully)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ajray.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ajray.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ajray.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ajray.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ajray.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ajray.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ajray.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ajray.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ajray.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ajray.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ajray.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ajray.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ajray.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ajray.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ajray.wordpress.com&amp;blog=6388456&amp;post=174&amp;subd=ajray&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ajray.wordpress.com/2009/07/30/pmcstat-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6e4ed3d8fe6536718b64054c30766622?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ajray</media:title>
		</media:content>
	</item>
	</channel>
</rss>
