<?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>Guy NXT door</title>
	<atom:link href="http://nxttime.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nxttime.wordpress.com</link>
	<description>A blog with personal NXT projects</description>
	<lastBuildDate>Tue, 24 Jan 2012 08:26:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='nxttime.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/ee2ed7541781a8b90c90d0241cc48ab0?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Guy NXT door</title>
		<link>http://nxttime.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://nxttime.wordpress.com/osd.xml" title="Guy NXT door" />
	<atom:link rel='hub' href='http://nxttime.wordpress.com/?pushpress=hub'/>
		<item>
		<title>9DOF IMU, my First results</title>
		<link>http://nxttime.wordpress.com/2012/01/23/9dof-imu-my-first-results/</link>
		<comments>http://nxttime.wordpress.com/2012/01/23/9dof-imu-my-first-results/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 21:11:31 +0000</pubDate>
		<dc:creator>Aswin</dc:creator>
				<category><![CDATA[Compass sensor]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[IMU sensor]]></category>
		<category><![CDATA[Nonlinear complementary filter]]></category>
		<category><![CDATA[axis accelerometer]]></category>
		<category><![CDATA[Gyro sensor]]></category>
		<category><![CDATA[magnetometer]]></category>
		<category><![CDATA[magnetometer data]]></category>
		<category><![CDATA[nonlinear complementary filter]]></category>
		<category><![CDATA[tilt data]]></category>

		<guid isPermaLink="false">http://nxttime.wordpress.com/?p=591</guid>
		<description><![CDATA[This time I&#8217;ll show you the first results of incorporating a 3-axis magnetometer (or compass) into my IMU filter. A quick round-up first. I have a IMU sensor that houses a 3-axis accelerometer and a 3-axis gyro sensor. Well, actually I got two, one that I built myself and one from Dexter Industries. To use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=591&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This time I&#8217;ll show you the first results of incorporating a 3-axis magnetometer (or compass) into my IMU filter.</p>
<p>A quick round-up first. I have a IMU sensor that houses a 3-axis accelerometer and a 3-axis gyro sensor. Well, actually I got two, one that I built myself and one from Dexter Industries. To use this type of sensor I have written a non-linear complementary filter (NLC-filter) who&#8217;s job it is to fuse the output of the two sensors to a drift free low noise attitude signal. The filter tells me the tilt over the x-axis and tilt over the y-axis. It also tells me the heading. The heading signal is not drift-free. The reason for this is that the accelerometer can provide tilt data but it cannot provide heading data. For this you need a compass.</p>
<p>A compass sensor should really be called an magnetometer because it doesn&#8217;t give you heading like a sailors compass does. Instead it gives you the force of the magnetic field over three axis. From this one can calculate heading.</p>
<p>It was technically not very difficult to incorporate the magnetometer data into the filter. Although it took me a long time to figure out how to do this. The main thing was to tune the PI-controller for the compass. I&#8217;m not finished with this but I can show you some first results of the filter anyway. The measurements were taken with the setup that you see in the picture.<a href="http://nxttime.files.wordpress.com/2012/01/img_7918.jpg"><img src="http://nxttime.files.wordpress.com/2012/01/img_7918.jpg?w=460&#038;h=306" alt="" title="Experimental setup" width="460" height="306" class="alignright size-full wp-image-592" /></a> The NXT is mounted on a platform some 20 cm above the ground. This is to minimize effects of the steel enforced concrete floor. It can rotate endlessly as it is mounted on a turn table and driven by a NXT motor and a worm wheel. The worm wheel in combination with a regulated motor gives a very stable rotation speed. The sensors are mounted 10 cm from the NXT to prevent disturbances from the NXT. Measurements are sent over bluetooth to the PC in real time.</p>
<p>this first graph was taken while the NXT was stationary. It shows how stable the filter signal is. <a href="http://nxttime.files.wordpress.com/2012/01/filter1.jpg"><img src="http://nxttime.files.wordpress.com/2012/01/filter1.jpg?w=460&#038;h=275" alt="" title="filter Stability" width="460" height="275" class="alignright size-full wp-image-593" /></a> <a href="http://nxttime.files.wordpress.com/2011/11/accelreview3.png"><img src="http://nxttime.files.wordpress.com/2011/11/accelreview3.png?w=150&#038;h=89" alt="" title="accelReview3" width="150" height="89" class="alignright size-thumbnail wp-image-518" /></a>Note that the scale of the vertical ax is 0.1 degree, the vertical axis ranging from -4 to 0 degrees. The roll and pitch signals are very stable. During the 15 minutes of the test these signals stayed within a bandwidth of 0.4 degrees. This is all that is left of the gyro drift. The yaw signal (that is controlled by the compass) is less stable, it floats between -0.8 and -2.0 degrees. But also in the yaw signal the gyro drift is eliminated to a large extend. I am very, very pleased with these noise levels as the bandwidth of noise from an accelerometer is around 5 degrees. </p>
<p>The second graph compares the output signal from the compass with that of the filter. This time the NXT was spinning around the Z-axis. The graph shows the results of a full spin. <a href="http://nxttime.files.wordpress.com/2012/01/compass1.jpg"><img src="http://nxttime.files.wordpress.com/2012/01/compass1.jpg?w=460&#038;h=275" alt="" title="compass1" width="460" height="275" class="alignright size-full wp-image-594" /></a>. You basically see two descending lines, indicating a constant movement of the sensors. The signal from the compass, in blue, is not exactly over the signal from the filter. There is a slight difference in the heading that these two report. The reason for this is that the setup of the NXT is not exactly level. The compass signal suffers from this. Its line is not really straight but it is like an S-curve due to this. The filter signal on the other hand is tilt compensated and almost straight. The smoother red line also indicates a lower noise level.</p>
<p>This last image shows the effect of a magnetical disturbance on the compass sensor and on the filter. While taking this graph I slowly moved a head phone along side of the sensor.<a href="http://nxttime.files.wordpress.com/2012/01/magneticaldisturbance.png"><img src="http://nxttime.files.wordpress.com/2012/01/magneticaldisturbance.png?w=460&#038;h=217" alt="" title="magneticalDisturbance" width="460" height="217" class="alignright size-full wp-image-595" /></a><br />
The compass suffers from this disturbance, at the peak the signal is over 10 degrees of. The filter on the other hand is not affected by the disturbance. It detects the disturbance and ignores the compass signal while it is disturbed. During this time the filter relies solely on the gyro to keep track of heading.</p>
<p>I think the low noise levels of the filter are nice. But the true advantages are in the tilt compensation and the robustness to magnetic disturbances. The filter is equally robust to disturbances in acceleration I think. This however I cannot show you using this setup.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxttime.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxttime.wordpress.com/591/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxttime.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxttime.wordpress.com/591/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nxttime.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nxttime.wordpress.com/591/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nxttime.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nxttime.wordpress.com/591/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxttime.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxttime.wordpress.com/591/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxttime.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxttime.wordpress.com/591/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxttime.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxttime.wordpress.com/591/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=591&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nxttime.wordpress.com/2012/01/23/9dof-imu-my-first-results/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/37d0207eb24f0e5789ab53d7d43d5305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Aswin</media:title>
		</media:content>

		<media:content url="http://nxttime.files.wordpress.com/2012/01/img_7918.jpg" medium="image">
			<media:title type="html">Experimental setup</media:title>
		</media:content>

		<media:content url="http://nxttime.files.wordpress.com/2012/01/filter1.jpg" medium="image">
			<media:title type="html">filter Stability</media:title>
		</media:content>

		<media:content url="http://nxttime.files.wordpress.com/2011/11/accelreview3.png?w=150" medium="image">
			<media:title type="html">accelReview3</media:title>
		</media:content>

		<media:content url="http://nxttime.files.wordpress.com/2012/01/compass1.jpg" medium="image">
			<media:title type="html">compass1</media:title>
		</media:content>

		<media:content url="http://nxttime.files.wordpress.com/2012/01/magneticaldisturbance.png" medium="image">
			<media:title type="html">magneticalDisturbance</media:title>
		</media:content>
	</item>
		<item>
		<title>A compass</title>
		<link>http://nxttime.wordpress.com/2012/01/22/586/</link>
		<comments>http://nxttime.wordpress.com/2012/01/22/586/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 01:45:33 +0000</pubDate>
		<dc:creator>Aswin</dc:creator>
				<category><![CDATA[Compass sensor]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[IMU sensor]]></category>
		<category><![CDATA[LEJOS]]></category>
		<category><![CDATA[Nonlinear complementary filter]]></category>
		<category><![CDATA[PID controller]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nxttime.wordpress.com/?p=586</guid>
		<description><![CDATA[I have included a compass into my INS filter. It now is drift-free and accurate over all three axis. It also is very robust to magnetic disturbances. The compass itself is not. It gives me great pleasure to see the first results. Tuning the filter is difficult though. I have used the NXJChartingLogger that will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=586&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have included a compass into my INS filter. It now is drift-free and accurate over all three axis. It also is very robust to magnetic disturbances. The compass itself is not. It gives me great pleasure to see the first results.</p>
<p>Tuning the filter is difficult though. I have used the NXJChartingLogger that will be part of Lejos 0.9.1 a lot. The filter provides all kinds of output that is displayed real time on the pc. Different parameters are logically grouped into different graphs. The graphs provide information on the state of the filter and thus help in tuning.<br />
I have also included a method to introduce errors in the sensor data. This enables me to examine the performance of the filter.</p>
<p>As a last thing I have made the filter calculate the initial state of the filter. With this the filter settles accurately (&lt;.5degrees) within half a second.</p>
<p>The performance dropped to 97 Hertz with three sensors attached. But I haven&#039;t optimized the compass code yet. </p>
<p>In later posts I&#039;ll demonstrate the performance of the filter.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxttime.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxttime.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxttime.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxttime.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nxttime.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nxttime.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nxttime.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nxttime.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxttime.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxttime.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxttime.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxttime.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxttime.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxttime.wordpress.com/586/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=586&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nxttime.wordpress.com/2012/01/22/586/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/37d0207eb24f0e5789ab53d7d43d5305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Aswin</media:title>
		</media:content>
	</item>
		<item>
		<title>IMU filter speed improvement</title>
		<link>http://nxttime.wordpress.com/2012/01/11/imu-filter-speed-improvement/</link>
		<comments>http://nxttime.wordpress.com/2012/01/11/imu-filter-speed-improvement/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 17:16:02 +0000</pubDate>
		<dc:creator>Aswin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nxttime.wordpress.com/?p=579</guid>
		<description><![CDATA[Today I accomplished a big speed improvement of my IMU filter. The filter frequency used to be maximal 140 Hertz. It now is 240 Hertz. What is the effect of this speed improvement you might wonder? Well the main thing is that one iteration of the filter takes less processing time. This leaves more processing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=579&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today I accomplished a big speed improvement of my IMU filter. The filter frequency used to be maximal 140 Hertz. It now is 240 Hertz.</p>
<p>What is the effect of this speed improvement you might wonder? Well the main thing is that one iteration of the filter takes less processing time. This leaves more processing time for other processes. Another effect is that the integration error is less. So the filter should be more accurate.</p>
<p>How did I realize the speed improvement? The filter uses vectors and matrices and a lot of lineair algebra. Before I had a 3&#215;3 matrices based on a 2 dimensional array of 3&#215;3 elements and vectors based on one dimensional arrays of 3 elements. I replaced the arrays with variables and I got rid of the loops around the arrays. So what used to be something like this:<br />
<code><br />
For (int i=0;i&lt;3;i++)<br />
  val[i]+=x;<br />
</code><br />
Now has become something like this:<br />
<code><br />
val0+=x;<br />
val1+=x;<br />
val2+=x;<br />
</code><br />
It makes the code ugly and a bit harder to maintain. But who cares.</p>
<p>Soon to come. Compass integration in the IMU filter! This makes it a 9DOF filter and will prevent filter drift over the Z-axis.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxttime.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxttime.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxttime.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxttime.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nxttime.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nxttime.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nxttime.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nxttime.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxttime.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxttime.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxttime.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxttime.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxttime.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxttime.wordpress.com/579/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=579&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nxttime.wordpress.com/2012/01/11/imu-filter-speed-improvement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/37d0207eb24f0e5789ab53d7d43d5305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Aswin</media:title>
		</media:content>
	</item>
		<item>
		<title>Winner of the dIMU</title>
		<link>http://nxttime.wordpress.com/2011/12/08/winner-of-the-dimu/</link>
		<comments>http://nxttime.wordpress.com/2011/12/08/winner-of-the-dimu/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 08:54:19 +0000</pubDate>
		<dc:creator>Aswin</dc:creator>
				<category><![CDATA[IMU sensor]]></category>
		<category><![CDATA[NXT]]></category>

		<guid isPermaLink="false">https://nxttime.wordpress.com/?p=574</guid>
		<description><![CDATA[I am proud to announce the winner of the dIMU giveaway. And the winner is Ray McNamara with his Mars Rotacaster rover. This is what Ray is going to do with the sensor. I’m currently working on my Mars Rotacaster Rover (http://www.rjmcnamara.com/?p=4571), based on the latest NASA Rovers sent to Mars. Currently I’m using a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=574&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am proud to announce the winner of the <a href="http://nxttime.wordpress.com/2011/11/21/dimu-giveaway/">dIMU giveaway</a>. And the winner is Ray McNamara with his Mars Rotacaster rover. This is what Ray is going to do with the sensor. </p>
<blockquote><p>I’m currently working on my Mars Rotacaster Rover (http://www.rjmcnamara.com/?p=4571), based on the latest NASA Rovers sent to Mars. Currently I’m using a HiTechnic Accelerometer to keep the Chassis Horizontal at all times, independent of the ‘Roker-Bogie’ Suspension.</p>
<p>With access to the Dexter Industries IMU sensor, I could not only control chassis alignment, but also regulate the heading of the robot travels. The drive/power from the wheel motors could be controlled, in order to keep the robots direction of travel constant, even if the wheels on one side are forced to travel further due to uneven terrain.</p></blockquote>
<p>I choose Ray&#8217;s entry for a number of reasons. His idea uses both the accelerometer, to keep level, and gyro, to keep direction. Also, the robot has an innovative suspension system and it does exists already. So there is a good chance that we&#8217;ll be seeing the robot delivering a glass of water over rough terrain without spilling any soon. I&#8217;m looking forward to the video. Ray, congratulations!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxttime.wordpress.com/574/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxttime.wordpress.com/574/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxttime.wordpress.com/574/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxttime.wordpress.com/574/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nxttime.wordpress.com/574/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nxttime.wordpress.com/574/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nxttime.wordpress.com/574/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nxttime.wordpress.com/574/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxttime.wordpress.com/574/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxttime.wordpress.com/574/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxttime.wordpress.com/574/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxttime.wordpress.com/574/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxttime.wordpress.com/574/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxttime.wordpress.com/574/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=574&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nxttime.wordpress.com/2011/12/08/winner-of-the-dimu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/37d0207eb24f0e5789ab53d7d43d5305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Aswin</media:title>
		</media:content>
	</item>
		<item>
		<title>IMU sensor software</title>
		<link>http://nxttime.wordpress.com/2011/11/22/imu-sensor-software/</link>
		<comments>http://nxttime.wordpress.com/2011/11/22/imu-sensor-software/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 16:04:23 +0000</pubDate>
		<dc:creator>Aswin</dc:creator>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[IMU sensor]]></category>
		<category><![CDATA[LEJOS]]></category>
		<category><![CDATA[Nonlinear complementary filter]]></category>
		<category><![CDATA[PID controller]]></category>

		<guid isPermaLink="false">http://nxttime.wordpress.com/?p=546</guid>
		<description><![CDATA[By request I will publish the Lejos software for the dIMU sensor. The software contains of drivers for the Dexter Industries IMU sensor, programs to calibrate the sensor and the IMU filter that I wrote about on this blog before. The filter can be used for other IMU sensors as well. Also included is the sample program [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=546&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>By request I will publish the Lejos software for the dIMU sensor.</p>
<p>The software contains of drivers for the <a href="http://dexterindustries.com/manual/imu-sensor/">Dexter Industries IMU sensor</a>, programs to calibrate the sensor and the IMU filter that I wrote about on this blog before. The filter can be used for other IMU sensors as well. Also included is the sample program that utilizes this filter. It is the very same program I used in the video&#8217;s published in a <a href="http://nxttime.wordpress.com/2011/11/17/imu-filter-transformation-matrix/">previous post</a>. There is no formal support and no warranty. If you are going to use it you will have to rely on your own wit, the javadoc and on this blog.</p>
<h1>Download and install</h1>
<p>You can download the software from <a href="http://www.totan.nl/IMU.zip" target="_blank">this link</a>. After downloading you will have to extract it keeping the directory structure intact. Make sure yor compiler can find the code.</p>
<h1>Using the IMU drivers</h1>
<p>The dIMU consists of two sensors, a gyroscope and a accelerometer, each has it&#8217;s own driver.  The gyroscope driver is called L3G4200D and the driver for the accelerometer is MMA7455L. (I use the technical names of the sensors a driver names.) On top of these drivers I made  user interfaces that allowes you to examine, configure and calibrate the sensors. The user interfaces are called L3G4200D_E and MMA7455L_E respectively. You can use these programs as driver as well. It gives your programs access to the additional functionality but it needs the NXT screen and might result in larger programs. There is a sample program included that gives access to the user interfaces, it is called testDIMU.</p>
<p>This is how you enable the drivers in your code,</p>
<p><pre class="brush: java;">
SensorPort.S4.i2cEnable(I2CPort.HIGH_SPEED);
MMA7455L accel = new MMA7455L(SensorPort.S4);
L3G4200D gyro = new L3G4200D(SensorPort.S4);
</pre></p>
<p>The first line instructs Lejos to use high speed I2C. The sensors support this.</p>
<p>This is how you get data (rate, acceleration and tilt) from the sensors.</p>
<p><pre class="brush: java;">
float[] rate = new float[3];
gyro.fetchAllRate(rate);

float[] accel = new float[3];
accel.fetchAllAccel(accel);

float[] tilt = new float[3];
accel.fetchAllTilt(tilt);
</pre></p>
<p>As you can see the drivers return data from all three axis is one call. If you just need data from one axis you can get it from the arrays. The order is X, Y, Z. The gyro returns degrees per second by default. The accelerometer returns Milli-G for acceleration and Degrees for tilt, also by default. If you want to use other units in your programs you can change the default values like this.</p>
<p><pre class="brush: java;">
gyro.setRateUnit(RateUnits.RPS);
accel.setAccelUnit(AccelUnits.MS2);
accel.setTiltUnit(TiltUnits.RADIANS);
</pre></p>
<p>This changes the default units to radians per second, meter per second^2 and radians respectively. Other units are available, check the javaDoc. The default unit can be overridden per data request by specifying the desired unit as second parameter in the FetchAll&#8230; methods.</p>
<h1>Configuring the sensors</h1>
<p>The gyro can be configured for dynamic range and sample rate using the setRange and setSampleRate methods. As a rule one should select the lowest value that your application allows for. This gives data of best possible quality.</p>
<p>The accelerometer cannot be configured. I found this  of little use.</p>
<h1>Calibrating the sensors</h1>
<p>The gyro of my dIMU doesn&#8217;t really need calibrating. however there is the possibility to do so. Calibration is started b  calling gyro.calculateOffset(). During calibration the sensor should remain motionless. Calibration settings of the gyro are not stored, so they are lost when your program terminates.  (Storing calibration settings of gyro sensors is of no use as the calibration values depend on environmental factors and are not stable over time.)</p>
<p>The accelerometer needs calibration. The user interface driver provides functionality to calibrate the sensor and to store the calibration settings. The (base) driver looks for stored calibration settings upon initialization and loads these automatically when they are available. Calibration settings of the accelerometer are stable over time so you&#8217;ll need to do this just once. Each of the three axes has to be calibrated separately. To calibrate an axis one has to point it straight up first and hold still while the calibration routine collects data samples.  Then the axis has to be pointed straight down and held still for some time. Follow the on screen instructions and do not forget to save the settings after calibration.</p>
<h1>Using the IMU filter</h1>
<p>The IMU filter can be used with any three-axis gyro and any three-axis accelerometer as long as their drivers implement the RataData and TiltData interfaces. This is how you initialise the filter</p>
<p><pre class="brush: java;">
NLCFilter attitude = new NLCFilter(gyro, accel);
attitude.start();
</pre></p>
<p>The two parameters to the filter constructor are the gyro driver and accelerometer driver. One could leave out the accelerometer, the filter will work but values will drift over time. The second line of code starts the filter. The filter needs 2 to 5 seconds to settle at start up, therefore you need to keep the sensor motionless and more or less level for a few seconds. You can find out if the filter is ready settling with the Initializing() method.</p>
<p>The IMU filter keeps track of the attitude, or pose, of your sensor/robot. You can query the roll, pitch and yaw angles this way</p>
<p><pre class="brush: java;">
attitude.setTiltUnit(TiltUnits.RADIANS);
float roll=attitude.getRoll();
float pitch=attitude.getPitch();
float yaw=attitude.getYaw();
</pre></p>
<p>or</p>
<p><pre class="brush: java;">
float[] tilt = new float[3];
attitude.fetchAllTilt(tilt);
</pre></p>
<p>By default these methods return angles in radians. You can change this by setting a different unit with the setTiltUnit() method.</p>
<p>You can also use the filter to transform data from a body frame to a world frame. This is useful if another sensor returns data that needs to be corrected for the robots current attitude. the next example transforms a distance returned by a UltraSonic sensor to world coordinates. The example assumes the us and IMU sensors are aligned and that the US sensor measures along the X-axis.</p>
<p><pre class="brush: java;">
Matrix usBody=new Matrix(1,3);
Matrix usWorld=null;
us = new UltrasonicSensor(SensorPort.S1);
usBody.set(0,0,us.getDistance());
usWorld=attitude.transformToWorld(usBody);
</pre></p>
<p>The matrix usWorld now contains the distance from sensor to the detected object over the X, Y and Z axis.</p>
<h1>Configuring and tuning the IMU filter</h1>
<p>By default the IMU filter updates as often as possible. It&#8217;s update frequency is over 100 Hertz. To free computer resources one can lower the update frequency by using the setFrequency() method. The filter will try to match the specified frequency. A parameter value of 0 will run the filter at maximum speed.</p>
<p>The filter can be tuned to increase the quality of its output. I advise you not to tune the filter until you are familiar with it and understand its inner workings. Tuning consists of altering the P and I values of it&#8217;s internal PI controller. The I value takes care of gyro drift cancellation and the P value controls how fast attitude is corrected by use of tilt data from the accelerometer. The values can be modified by using the setKp() and setKi() methods.</p>
<p>There are two ways the filter can assist you in  tuning. It keeps track of the integral of absolute errors, or absI. This is a measure of the total error of the filter over time. The smaller the error (given a fixed period) the better the filter performs. <span style="color:#999999;">/* The filter also allows you to send data over bluetooth to the pc for examination. For this one has to use the NXTChartingLogger on the pc that is part of the Lejos distribution. You instruct the filter to send its state to the pc by supplying  a NXTDataLogger object with the setDataLogger() method. */</span></p>
<h1>Running the demo program</h1>
<p>The demo program is called testIMU.  At startup of this program the sensor must be horizontal and motionless. The sensor is assumed to be aligned ith the NXT brick with the sensor plug facing to the same direction as the sensor ports. Once you see the wire frame you can start moving the sensor.The demo has four display modes:</p>
<ul>
<li>Wire frame. Here it shows a wire frame of the sensor on the NXT screen</li>
<li>Rotation matrix. The screen will show the content of the rotation matrix. In  this matrix the current attitude is stored. The matrix is also used to convert body coordinates to world coordinates by matrix multiplication..</li>
<li>Roll, Pitch, Yaw. The screen shows the Roll, Pitch, Yaw angles of the sensor.</li>
<li>Update speed. The screen shows the actual update speed of the filter.</li>
</ul>
<p>You can browse through the display modes by using the arrow keys. The enter key resets the filter.  The clip below shows the demo program in action in wire frame mode.<br />
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='460' height='289' src='http://www.youtube.com/embed/FrS-zk2s1Gs?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxttime.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxttime.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxttime.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxttime.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nxttime.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nxttime.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nxttime.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nxttime.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxttime.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxttime.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxttime.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxttime.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxttime.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxttime.wordpress.com/546/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=546&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nxttime.wordpress.com/2011/11/22/imu-sensor-software/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/37d0207eb24f0e5789ab53d7d43d5305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Aswin</media:title>
		</media:content>
	</item>
		<item>
		<title>dIMU giveaway</title>
		<link>http://nxttime.wordpress.com/2011/11/21/dimu-giveaway/</link>
		<comments>http://nxttime.wordpress.com/2011/11/21/dimu-giveaway/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 21:03:07 +0000</pubDate>
		<dc:creator>Aswin</dc:creator>
				<category><![CDATA[IMU sensor]]></category>
		<category><![CDATA[Sensors]]></category>

		<guid isPermaLink="false">https://nxttime.wordpress.com/?p=538</guid>
		<description><![CDATA[It is time for another giveaway. This time you can win an IMU sensor from Dexter Industries. It is the same sensor DI sent me for evaluation purposes. I got it for free, and now you can! It probably is the best tested sensor available. Do you have a nice application for this sensor? Submit [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=538&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It is time for another giveaway. This time you can win an <a href="http://dexterindustries.com/blog/category/products/dimu/">IMU sensor</a> from Dexter Industries. It is the same sensor DI sent me for evaluation purposes. I got it for free, and now you can! It probably is the best tested sensor available.</p>
<p><img src="http://dexterindustries.com/manual/wp-content/uploads/2011/05/dIMU-300x223.gif" alt="dIMU" /></p>
<p>Do you have a nice application for this sensor? Submit your plan in a reply to this blog. The most original or inspiring  idea will be rewarded with this advanced sensor. I am to judge the submitted idea&#8217;s and to point out the winner. If you like a particular submission very much you can respond to this. You might be able to influence my decision.</p>
<p>Dexter Industries currently has a dIMU week. They to give some IMU&#8217;s away. So, you can increase your chance of winning one on <a href="http://dexterindustries.com/blog/2011/11/21/dimu-giveaway/">their site</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxttime.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxttime.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxttime.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxttime.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nxttime.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nxttime.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nxttime.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nxttime.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxttime.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxttime.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxttime.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxttime.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxttime.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxttime.wordpress.com/538/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=538&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nxttime.wordpress.com/2011/11/21/dimu-giveaway/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/37d0207eb24f0e5789ab53d7d43d5305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Aswin</media:title>
		</media:content>

		<media:content url="http://dexterindustries.com/manual/wp-content/uploads/2011/05/dIMU-300x223.gif" medium="image">
			<media:title type="html">dIMU</media:title>
		</media:content>
	</item>
		<item>
		<title>IMU filter, Transformation Matrix</title>
		<link>http://nxttime.wordpress.com/2011/11/17/imu-filter-transformation-matrix/</link>
		<comments>http://nxttime.wordpress.com/2011/11/17/imu-filter-transformation-matrix/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 09:40:08 +0000</pubDate>
		<dc:creator>Aswin</dc:creator>
				<category><![CDATA[IMU sensor]]></category>
		<category><![CDATA[Nonlinear complementary filter]]></category>

		<guid isPermaLink="false">http://nxttime.wordpress.com/?p=527</guid>
		<description><![CDATA[Some time ago I wrote about transformation matrices. This time I want to show you how to use it. You&#8217;ll see how much you can benefit from it. I wrote a small class that can draw a compass rose on the NXT screen. The class contains a collection of points that are the start and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=527&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some time ago I wrote about transformation matrices. This time I want to show you how to use it. You&#8217;ll see how much you can benefit from it.</p>
<p>I wrote a small class that can draw a compass rose on the NXT screen. The class contains a collection of points that are the start and end points of the lines that make the compass rose. It has a method to draw these lines. But before drawing the lines they are transformed using the current attitude of the IMU sensor. The transformation is a matrix multiplication of the compass rose definition and the attitude matrix that the IMU filter maintains. This is done in line 4 of the code example below. R is the transformation matrix, rose is the compass definition. The function toScreen on the same line centers the image on the screen.</p>
<p><pre class="brush: java;">
public void draw(Matrix R) {
 Matrix ss;
 Graphics g=new Graphics();
 ss=toScreen(R.times(rose));
 for (int i=0;i&lt;elements;i++) {
 g.drawLine((int)ss.get(0,i*2),(int)ss.get(1,i*2),(int)ss.get(0,i*2+1),(int)ss.get(1,i*2+1));
 }
}
</pre></p>
<p>As you can see the transformation matrix allows you to perform very complex functionality, three rotations, using a very simple function, times().</p>
<p>Below is a video of the application in action. You might want to play this video in HD as it is quite hard to see the details on the NXT screen.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='460' height='289' src='http://www.youtube.com/embed/VyzTUzFEih4?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<p>This application just shows a compass rose. But the same technique can be used in a wide variety of applications. One such application could be to transform data from range sensors to world coordinates. This will ease the process of mapping the environment. As the matrix maintained by the IMU filter is 3 dimensional you can even make a 3D map.</p>
<p>Transformation matrices are also very useful for robots with holonomic wheels. Here they can be used to transform robot speed into wheel speed.</p>
<p>Here is another video. This time it features the <a href="http://dexterindustries.com/dIMU.html" target="_blank">dIMU from Dexter Industries</a>.<br />
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='460' height='289' src='http://www.youtube.com/embed/FrS-zk2s1Gs?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxttime.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxttime.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxttime.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxttime.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nxttime.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nxttime.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nxttime.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nxttime.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxttime.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxttime.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxttime.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxttime.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxttime.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxttime.wordpress.com/527/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=527&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nxttime.wordpress.com/2011/11/17/imu-filter-transformation-matrix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/37d0207eb24f0e5789ab53d7d43d5305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Aswin</media:title>
		</media:content>
	</item>
		<item>
		<title>Dexter Industries IMU, part II</title>
		<link>http://nxttime.wordpress.com/2011/11/16/dexter-industries-imu-part-ii/</link>
		<comments>http://nxttime.wordpress.com/2011/11/16/dexter-industries-imu-part-ii/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 15:35:59 +0000</pubDate>
		<dc:creator>Aswin</dc:creator>
				<category><![CDATA[Accelerometer]]></category>
		<category><![CDATA[IMU sensor]]></category>
		<category><![CDATA[Sensors]]></category>

		<guid isPermaLink="false">http://nxttime.wordpress.com/?p=513</guid>
		<description><![CDATA[Last time I reviewed the gyro of Dexter Industries IMU sensor. This time I&#8217;ll take a look at the accelerometer of the IMU. I&#8217;ll compare this one to the MindSensors accelerometer and to the one on my custom IMU. The three accelerometers in the test all all 3-axis digital sensors that support hi-speed I2C. They [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=513&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last time I reviewed the gyro of Dexter Industries IMU sensor. This time I&#8217;ll take a look at the accelerometer of the IMU. I&#8217;ll compare this one to the MindSensors accelerometer and to the one on my custom IMU.</p>
<p>The three accelerometers in the test all all 3-axis digital sensors that support hi-speed I2C. They all allow you to set dynamic range, the MindSensors sensor supports 1.5, 2, 4 and 6G. The dIMU supports 2, 4 and 8G and my cIMU supports 2,4,8 and 16G. On the NXT you would normally use 2 or 4G dynamic range.</p>
<p>I tested the sensors at 6 and 8G. The resolution (the minimum difference between to samples) of the Mindsensors accelerometer is 1 milli-G for all ynamic ranges, the dIMU and the cIMU both have  16 milli-G at 8G. The MindSensors sensor has the best resolution. Later, I&#8217;ll explain why.</p>
<p>The test protocol is very simple. The sensors are tested at the same time. First they are horizontal, then they are tilted manually to an angle of 90 degrees and then they are turned back. The test tells something about the accuracy and noise levels of the sensors.</p>
<p><img class="alignright size-full wp-image-520" style="color:#0000ee;text-decoration:underline;border-color:initial;border-style:initial;" title="accelReview1" src="http://nxttime.files.wordpress.com/2011/11/accelreview1.png?w=460&#038;h=275" alt="" width="460" height="275" /></p>
<p>The first graph shows the unprocessed output of the Z-axis of each of the sensors. You would expect a value of 1000 milli-G when the sensor is horizontal and 0 milli-G when tilted. As you can see in the graph the three lines are quite different. The MindSensor gives smooth output with little noise. My sensor is very noisy, the line goes up and down. And the dIMU has some noise. What is more, the three lines are on different heights and none is on the expected level. Apparantly the sensors need calibration, to get the lines on the expected level, and the two IMU&#8217;s need some smoothing as well. My IMU allows to set the internal sample rate, lowering this to 100 Hz removed some of the noise. In later tests I used the lower sample rate.</p>
<p><span style="color:#0000ee;"><span style="text-decoration:underline;"><br />
</span></span></p>
<div><span style="color:#0000ee;"><span style="text-decoration:underline;"><br />
</span></span><a href="http://nxttime.files.wordpress.com/2011/11/accelreview2.png"><img class="alignright size-full wp-image-519" style="border-color:initial;border-style:initial;" title="accelReview2" src="http://nxttime.files.wordpress.com/2011/11/accelreview2.png?w=460&#038;h=275" alt="" width="460" height="275" /></a>Calibration of accelerometers is quite easy. The MindSensors sensor has an on board calibration routine but I advise you not to use it and to write your own instead (or use the program that MindSensors provide on their website). Calibration consists of determining an offset and a scale factor. The offset is a value that you substract from the raw value. It is equal to the value the sensor returns when it experiences zero G. For the MindSensors sensor used in the test this is about 125 milli-G. For the other two sensors it is a lot harder to find the offset value as the returned values are not stable at all. One has to take the average of multiple measurements to find the offset. Offset values of accelerometers are quite stable, once you found it you can keep using it. But keep in mind that each of the axes has its unique offset value.Then there is scale. After an offset correction has been applied to the signal one gets a zero at zero gravity conditions. This does not mean that one gets 1000 Milli-G under earth&#8217;s gravity. Normally this is a few percent off. A scale factor can correct for this. The scale factor equals 1000 divided by the offset-corrected-value the sensor returns under earth&#8217;s gravity. The formula to get a calibrated acceleration signal is:<br />
value=(raw_value-offset) * scale<br />
That&#8217;s all there is to it. Scale too is quite stable. You can hard code it in your programs once you calculated it.  You&#8217;ll have to calculate it for each of the axes though. The next graph shows calibrated output of the three sensors.<br />
Apart from the noise levels, all sensors perform very well after calibration.</p>
<p><a href="http://nxttime.files.wordpress.com/2011/11/accelreview5.png"><img class="alignright size-full wp-image-517" title="accelReview5" src="http://nxttime.files.wordpress.com/2011/11/accelreview5.png?w=460&#038;h=275" alt="" width="460" height="275" /></a>The MindSensors sensor has a lower noise level and a better resolution than the other two sensors. This clearly is a big advantage of this sensor. But how come this sensor is so good? I suspect it is not the sensor itself but some on board filter that stabilizes the signal. Therefore I decided to write a filter for the other two sensors as well. At first I tried  a low pass filter as this is very easy to program and uses little memory, but this filter added a delay in the response, so I abandoned this idea. Then I tried a technique called over-sampling. Basically this means that one tries to get measurements as often as the sensor allows and then calculate a moving average from it. This did the trick, the noise levels of both IMU sensors dropped dramatically and the resolution rose.  Both IMU still are more noisy that the MindSensors accelerometer, the difference however is acceptable.</p>
<p>Of course a filter like this does come with some extra costs. One has to program it, It will have to run in a separate task, so that your program can still do the other useful things it is meant to do.  And the filter consumes processor time.</p>
<p>The test I perormed was limited and not scientifically sound. However I conclude that all sensors perform well under test conditions. The MindSensors accelerometer is the best accelerometer for most of us as its signals are most easy to use.  It does not have a gyro sensor on board as IMU sensors do. So if you also want a 3-axis gyro then you should consider an IMU sensor. The price dIMU is just 15$ more than the MindSensors accelerometer. This could be a good reason to go for the IMU straight away.</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxttime.wordpress.com/513/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxttime.wordpress.com/513/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxttime.wordpress.com/513/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxttime.wordpress.com/513/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nxttime.wordpress.com/513/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nxttime.wordpress.com/513/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nxttime.wordpress.com/513/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nxttime.wordpress.com/513/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxttime.wordpress.com/513/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxttime.wordpress.com/513/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxttime.wordpress.com/513/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxttime.wordpress.com/513/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxttime.wordpress.com/513/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxttime.wordpress.com/513/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=513&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nxttime.wordpress.com/2011/11/16/dexter-industries-imu-part-ii/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/37d0207eb24f0e5789ab53d7d43d5305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Aswin</media:title>
		</media:content>

		<media:content url="http://nxttime.files.wordpress.com/2011/11/accelreview1.png" medium="image">
			<media:title type="html">accelReview1</media:title>
		</media:content>

		<media:content url="http://nxttime.files.wordpress.com/2011/11/accelreview2.png" medium="image">
			<media:title type="html">accelReview2</media:title>
		</media:content>

		<media:content url="http://nxttime.files.wordpress.com/2011/11/accelreview5.png" medium="image">
			<media:title type="html">accelReview5</media:title>
		</media:content>
	</item>
		<item>
		<title>MindSensors sensors cheap</title>
		<link>http://nxttime.wordpress.com/2011/11/09/mindsensors-sensors-cheap/</link>
		<comments>http://nxttime.wordpress.com/2011/11/09/mindsensors-sensors-cheap/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 08:50:43 +0000</pubDate>
		<dc:creator>Aswin</dc:creator>
				<category><![CDATA[NXT]]></category>

		<guid isPermaLink="false">https://nxttime.wordpress.com/2011/11/09/mindsensors-sensors-cheap/</guid>
		<description><![CDATA[Trossen Robotics sells some Sensors from MindSensors at a discount rate. The accelerometer for example is $29.99 instead of $49.95. The Sumo eyes go for $29.99, you pay $39.95 on the MindSensors website. Here you find the NXT related products they sell.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=524&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Trossen Robotics sells some Sensors from MindSensors at a discount rate. The accelerometer for example is $29.99 instead of $49.95. The Sumo eyes go for $29.99, you pay $39.95 on the MindSensors website.<br />
<a href="http://www.trossenrobotics.com/store/Search.aspx?searchTerms=Nxt&amp;submit=true">Here</a> you find the NXT related products they sell.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxttime.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxttime.wordpress.com/524/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxttime.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxttime.wordpress.com/524/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nxttime.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nxttime.wordpress.com/524/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nxttime.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nxttime.wordpress.com/524/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxttime.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxttime.wordpress.com/524/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxttime.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxttime.wordpress.com/524/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxttime.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxttime.wordpress.com/524/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=524&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nxttime.wordpress.com/2011/11/09/mindsensors-sensors-cheap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/37d0207eb24f0e5789ab53d7d43d5305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Aswin</media:title>
		</media:content>
	</item>
		<item>
		<title>Winner of the Hitechnic gyro</title>
		<link>http://nxttime.wordpress.com/2011/10/31/winner-of-the-hitechnic-gyro/</link>
		<comments>http://nxttime.wordpress.com/2011/10/31/winner-of-the-hitechnic-gyro/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 07:08:12 +0000</pubDate>
		<dc:creator>Aswin</dc:creator>
				<category><![CDATA[Gyro sensor]]></category>
		<category><![CDATA[Omniwheel robot]]></category>
		<category><![CDATA[Sensors]]></category>

		<guid isPermaLink="false">https://nxttime.wordpress.com/2011/10/31/winner-of-the-hitechnic-gyro/</guid>
		<description><![CDATA[Hi, Some time ago I asked you to come up with a name of my omniwheel robot. Now, It is time to announce the winner. the name of the robot is Koios, after one of the Greek Titans. Stephen, aka PigsCanFly, suggested the name Coeus, translated into Dutch gives Koios. So Stephen is the winner. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=511&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Some time ago I asked you to come up with a name of my omniwheel robot. Now, It is time to announce the winner.</p>
<p>the name of the robot is <strong>Koios</strong>, after one of the Greek Titans. Stephen, aka <a href="http://pigscanreallyfly.blogspot.com/">PigsCanFly</a>, suggested the name Coeus, translated into Dutch gives Koios. So Stephen is the winner.</p>
<p>The prize, A second hand Hitechnic gyro, will be sent by airpig to Stephen. Congratulations.</p>
<p>Thanks to everybody that participated.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxttime.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxttime.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxttime.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxttime.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nxttime.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nxttime.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nxttime.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nxttime.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxttime.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxttime.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxttime.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxttime.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxttime.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxttime.wordpress.com/511/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxttime.wordpress.com&amp;blog=10436341&amp;post=511&amp;subd=nxttime&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nxttime.wordpress.com/2011/10/31/winner-of-the-hitechnic-gyro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/37d0207eb24f0e5789ab53d7d43d5305?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Aswin</media:title>
		</media:content>
	</item>
	</channel>
</rss>
