<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Arduino and the LIS3LV02DQ  Triple Axis Accelerometer</title>
	<atom:link href="http://www.nearfuturelaboratory.com/2006/09/22/arduino-and-the-lis3lv02dq-triple-axis-accelerometer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nearfuturelaboratory.com/2006/09/22/arduino-and-the-lis3lv02dq-triple-axis-accelerometer/</link>
	<description>Creating Implications</description>
	<lastBuildDate>Wed, 01 Jul 2009 17:53:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Julian</title>
		<link>http://www.nearfuturelaboratory.com/2006/09/22/arduino-and-the-lis3lv02dq-triple-axis-accelerometer/comment-page-1/#comment-25267</link>
		<dc:creator>Julian</dc:creator>
		<pubDate>Sat, 13 Jun 2009 17:16:09 +0000</pubDate>
		<guid isPermaLink="false">#comment-25267</guid>
		<description>Determining distance from acceleration requires some simple math. 

Distance = velocity * time
Velocity = acceleration * time.

So

Distance = acceleration * time * time.

Since the acceleration is time dependent — meaning that it is changing quite often, especially if a human is moving the device with the accelerometer — the best you can do is to integrate acceleration over time for tiny time intervals. In other words, take an acceleration reading as quickly as possible, note how much time has passed in that interval, and multiply the acceleration value by that time interval. That will give you the velocity (acceleration * time). Multiply that by the time interval _again_ and you&#039;ll get the displacement (distance) from where the reading first started.

That should do it. Note that this may likely be accurate initially, but will probably slip quickly over time, so if you have some other mechanism to reset the initial value to a known location, you&#039;ll be better off. Perhaps for small movements it will be accurate, but it would be interesting to see in your test case how much error gets introduced because of this method. Try using different time intervals to see the effects - 1 millisecond, 10 milliseconds, etc.

Let me know how it goes!

Julian</description>
		<content:encoded><![CDATA[<p>Determining distance from acceleration requires some simple math. </p>
<p>Distance = velocity * time<br />
Velocity = acceleration * time.</p>
<p>So</p>
<p>Distance = acceleration * time * time.</p>
<p>Since the acceleration is time dependent — meaning that it is changing quite often, especially if a human is moving the device with the accelerometer — the best you can do is to integrate acceleration over time for tiny time intervals. In other words, take an acceleration reading as quickly as possible, note how much time has passed in that interval, and multiply the acceleration value by that time interval. That will give you the velocity (acceleration * time). Multiply that by the time interval _again_ and you&#8217;ll get the displacement (distance) from where the reading first started.</p>
<p>That should do it. Note that this may likely be accurate initially, but will probably slip quickly over time, so if you have some other mechanism to reset the initial value to a known location, you&#8217;ll be better off. Perhaps for small movements it will be accurate, but it would be interesting to see in your test case how much error gets introduced because of this method. Try using different time intervals to see the effects &#8211; 1 millisecond, 10 milliseconds, etc.</p>
<p>Let me know how it goes!</p>
<p>Julian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pzzy</title>
		<link>http://www.nearfuturelaboratory.com/2006/09/22/arduino-and-the-lis3lv02dq-triple-axis-accelerometer/comment-page-1/#comment-25262</link>
		<dc:creator>pzzy</dc:creator>
		<pubDate>Fri, 12 Jun 2009 09:27:11 +0000</pubDate>
		<guid isPermaLink="false">#comment-25262</guid>
		<description>hi, 

can you show me (us) how you calculate the x,y,z data into distance?
i sort of need it. &#039;cause we using the accelerometer as a sensor for a mouse.

thanks.</description>
		<content:encoded><![CDATA[<p>hi, </p>
<p>can you show me (us) how you calculate the x,y,z data into distance?<br />
i sort of need it. &#8217;cause we using the accelerometer as a sensor for a mouse.</p>
<p>thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian</title>
		<link>http://www.nearfuturelaboratory.com/2006/09/22/arduino-and-the-lis3lv02dq-triple-axis-accelerometer/comment-page-1/#comment-24868</link>
		<dc:creator>Julian</dc:creator>
		<pubDate>Mon, 23 Feb 2009 15:00:47 +0000</pubDate>
		<guid isPermaLink="false">#comment-24868</guid>
		<description>Without knowing/seeing much more, it looks like you&#039;re not communicating with the accelerometer. The SDA line is not changing, it seems - it looks like it&#039;s staying logic high. I doubt anything seriously wrong is happening — just something overlooked, or a timing issue. My approach, which may be different from yours, would be to put a logic analyzer on it. Check to see that the clock like (SCL) actually looks like a clock. Check continuity across SDA from the Arduino and the actual Atmel chip to the accelerometer pin for SDA. Check power to the accelerometer. Voltage levels — are they consistent? Or are you running the accelerometer at 5v rather than the specified 3.3v? This could cause problems, as well and you may need to look into logic level adjustments.

Debug one thing at a time.

Good luck!</description>
		<content:encoded><![CDATA[<p>Without knowing/seeing much more, it looks like you&#8217;re not communicating with the accelerometer. The SDA line is not changing, it seems &#8211; it looks like it&#8217;s staying logic high. I doubt anything seriously wrong is happening — just something overlooked, or a timing issue. My approach, which may be different from yours, would be to put a logic analyzer on it. Check to see that the clock like (SCL) actually looks like a clock. Check continuity across SDA from the Arduino and the actual Atmel chip to the accelerometer pin for SDA. Check power to the accelerometer. Voltage levels — are they consistent? Or are you running the accelerometer at 5v rather than the specified 3.3v? This could cause problems, as well and you may need to look into logic level adjustments.</p>
<p>Debug one thing at a time.</p>
<p>Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eddy depoorter</title>
		<link>http://www.nearfuturelaboratory.com/2006/09/22/arduino-and-the-lis3lv02dq-triple-axis-accelerometer/comment-page-1/#comment-24865</link>
		<dc:creator>eddy depoorter</dc:creator>
		<pubDate>Sun, 22 Feb 2009 21:09:56 +0000</pubDate>
		<guid isPermaLink="false">#comment-24865</guid>
		<description>Hi, I&#039;be hooked up the accelerometer to an arduino diecimilia, double checked the wiring but all I get is this :


NEG_Xx_val=4095 y_val=-1 z_val=-1
WHO_AM_I [FF]
NEG_Xx_val=4095 y_val=-1 z_val=-1


can someone enlight me please ?</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;be hooked up the accelerometer to an arduino diecimilia, double checked the wiring but all I get is this :</p>
<p>NEG_Xx_val=4095 y_val=-1 z_val=-1<br />
WHO_AM_I [FF]<br />
NEG_Xx_val=4095 y_val=-1 z_val=-1</p>
<p>can someone enlight me please ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian</title>
		<link>http://www.nearfuturelaboratory.com/2006/09/22/arduino-and-the-lis3lv02dq-triple-axis-accelerometer/comment-page-1/#comment-24862</link>
		<dc:creator>Julian</dc:creator>
		<pubDate>Fri, 20 Feb 2009 08:11:46 +0000</pubDate>
		<guid isPermaLink="false">#comment-24862</guid>
		<description>That would be quite difficult in most cases without some much more complicated math to go along with it. It&#039;s actually a hard problem, requiring various kinds of statistics and mathematical filtering of the data. The formulas for even doing pedometer like calculations are closely held information by manufacturers, and even with that you&#039;d only be counting steps and would at best estimate distance.</description>
		<content:encoded><![CDATA[<p>That would be quite difficult in most cases without some much more complicated math to go along with it. It&#8217;s actually a hard problem, requiring various kinds of statistics and mathematical filtering of the data. The formulas for even doing pedometer like calculations are closely held information by manufacturers, and even with that you&#8217;d only be counting steps and would at best estimate distance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://www.nearfuturelaboratory.com/2006/09/22/arduino-and-the-lis3lv02dq-triple-axis-accelerometer/comment-page-1/#comment-24860</link>
		<dc:creator>john</dc:creator>
		<pubDate>Thu, 19 Feb 2009 15:10:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-24860</guid>
		<description>Hi,

            I was wondering how could you use the x, y and z axis for  the calculation of distance ?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>            I was wondering how could you use the x, y and z axis for  the calculation of distance ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mate Your Arduino With A 3 Axis Accelerometer &#124; only hacks</title>
		<link>http://www.nearfuturelaboratory.com/2006/09/22/arduino-and-the-lis3lv02dq-triple-axis-accelerometer/comment-page-1/#comment-19111</link>
		<dc:creator>Mate Your Arduino With A 3 Axis Accelerometer &#124; only hacks</dc:creator>
		<pubDate>Thu, 16 Oct 2008 18:18:26 +0000</pubDate>
		<guid isPermaLink="false">#comment-19111</guid>
		<description>[...] to learn about accelerometers and the SPI bus. He picked up an accelerometer over at Sparkfun and proceeded to make it work. He ultimately wanted to make it work with an Atmel AVR, but started out with the Arduino for [...]</description>
		<content:encoded><![CDATA[<p>[...] to learn about accelerometers and the SPI bus. He picked up an accelerometer over at Sparkfun and proceeded to make it work. He ultimately wanted to make it work with an Atmel AVR, but started out with the Arduino for [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian</title>
		<link>http://www.nearfuturelaboratory.com/2006/09/22/arduino-and-the-lis3lv02dq-triple-axis-accelerometer/comment-page-1/#comment-18966</link>
		<dc:creator>Julian</dc:creator>
		<pubDate>Fri, 10 Oct 2008 05:09:41 +0000</pubDate>
		<guid isPermaLink="false">#comment-18966</guid>
		<description>Hey Nareem — I&#039;m totally not following your question..what cf/mmc/sd card are you talking about? Best as I know, there is no mass storage attached to the Arduino, but I bet you can probably get one attached. If that&#039;s what you&#039;re talking about, the device probably has some API that&#039;ll allow the Arduino to talk to it. If there isn&#039;t, then you may have to write your own code to talk to a cf/mmc/sd card or whatever. &quot;Arduino&quot; is AVR; it&#039;s just a code wrapper and build environment that makes writing C/C++ for the AVR microcontrollers a little easier.  When you write code for the Arduino, you&#039;re writing code C/C++, so just put in your C/C++ as you normally would. 

I&#039;ve attached neither an Arduino or an AVR microcontroller to external storage except for smallish I2C flash chips, not storage cards so I can&#039;t help you specifically. For example, I&#039;ve used flash storage in this project: http://www.nearfuturelaboratory.com/projects/flavonoid/flavonoid-2nd-prototype/</description>
		<content:encoded><![CDATA[<p>Hey Nareem — I&#8217;m totally not following your question..what cf/mmc/sd card are you talking about? Best as I know, there is no mass storage attached to the Arduino, but I bet you can probably get one attached. If that&#8217;s what you&#8217;re talking about, the device probably has some API that&#8217;ll allow the Arduino to talk to it. If there isn&#8217;t, then you may have to write your own code to talk to a cf/mmc/sd card or whatever. &#8220;Arduino&#8221; is AVR; it&#8217;s just a code wrapper and build environment that makes writing C/C++ for the AVR microcontrollers a little easier.  When you write code for the Arduino, you&#8217;re writing code C/C++, so just put in your C/C++ as you normally would. </p>
<p>I&#8217;ve attached neither an Arduino or an AVR microcontroller to external storage except for smallish I2C flash chips, not storage cards so I can&#8217;t help you specifically. For example, I&#8217;ve used flash storage in this project: <a href="http://www.nearfuturelaboratory.com/projects/flavonoid/flavonoid-2nd-prototype/" rel="nofollow">http://www.nearfuturelaboratory.com/projects/flavonoid/flavonoid-2nd-prototype/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Naeem</title>
		<link>http://www.nearfuturelaboratory.com/2006/09/22/arduino-and-the-lis3lv02dq-triple-axis-accelerometer/comment-page-1/#comment-18965</link>
		<dc:creator>Naeem</dc:creator>
		<pubDate>Fri, 10 Oct 2008 04:50:30 +0000</pubDate>
		<guid isPermaLink="false">#comment-18965</guid>
		<description>Hi, 

Julian thanks for the code, accelerometer is giving cool readings. Now if I want to take the varying values of all the axis and store it directly on the cf/mmc/sd, is it possible to only store values on these memory cards using avr or arduino instead of having it in the arduino environment.

Any kind of help is appreciated thanks</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>Julian thanks for the code, accelerometer is giving cool readings. Now if I want to take the varying values of all the axis and store it directly on the cf/mmc/sd, is it possible to only store values on these memory cards using avr or arduino instead of having it in the arduino environment.</p>
<p>Any kind of help is appreciated thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian</title>
		<link>http://www.nearfuturelaboratory.com/2006/09/22/arduino-and-the-lis3lv02dq-triple-axis-accelerometer/comment-page-1/#comment-18902</link>
		<dc:creator>Julian</dc:creator>
		<pubDate>Wed, 08 Oct 2008 03:43:58 +0000</pubDate>
		<guid isPermaLink="false">#comment-18902</guid>
		<description>Hook up the accelerator to an Arduino. Read the data from the accelerometer using code like that above. If the data indicates a tilt to the left, turn on LED 1 using the Arduino, which would be hooked up on one of its digital outputs to LED 2 through a resistor.. If the data indicates a tilt to the right, turn on LED 2 using the Arduino, which would be hooked up on one of its digital outputs to LED 2 through a resistor. Etc. Pretty straightforward. You&#039;ll need to learn how to work the Arduino, which you can find more about at the Arduino website. You&#039;ll also need to learn how to hook up an LED to an Arduino, which you can find more about at the Arduino website. That&#039;s it. Easy-peasy. Try it, and learn.</description>
		<content:encoded><![CDATA[<p>Hook up the accelerator to an Arduino. Read the data from the accelerometer using code like that above. If the data indicates a tilt to the left, turn on LED 1 using the Arduino, which would be hooked up on one of its digital outputs to LED 2 through a resistor.. If the data indicates a tilt to the right, turn on LED 2 using the Arduino, which would be hooked up on one of its digital outputs to LED 2 through a resistor. Etc. Pretty straightforward. You&#8217;ll need to learn how to work the Arduino, which you can find more about at the Arduino website. You&#8217;ll also need to learn how to hook up an LED to an Arduino, which you can find more about at the Arduino website. That&#8217;s it. Easy-peasy. Try it, and learn.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
