<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Using nrf51822 board with adxl335 accelerometer (ADC)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6318/using-nrf51822-board-with-adxl335-accelerometer-adc</link><description>Hi, 
 I&amp;#39;m trying to use adxl335 accelerometer to detect motion. 
 I&amp;#39;m having trouble understanding what the output of the accelerometer means.
Obviously, it should tell me something about the acceleration but it&amp;#39;s in unit mV/g.
How do I interpret</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Apr 2018 12:33:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6318/using-nrf51822-board-with-adxl335-accelerometer-adc" /><item><title>RE: Using nrf51822 board with adxl335 accelerometer (ADC)</title><link>https://devzone.nordicsemi.com/thread/129946?ContentTypeID=1</link><pubDate>Thu, 26 Apr 2018 12:33:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:726bced7-4b53-48af-b978-667a54589834</guid><dc:creator>hanmanthm</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did you solve this ??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nrf51822 board with adxl335 accelerometer (ADC)</title><link>https://devzone.nordicsemi.com/thread/22043?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2015 06:03:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:236d2a00-6092-4c09-9560-13f42cc84614</guid><dc:creator>Clem Taylor</dc:creator><description>&lt;p&gt;Save yourself the pain and use a digital accelerometer with an I2C or SPI interface.&lt;/p&gt;
&lt;p&gt;The nrf51 ADC is fairly slow, is blocked SD events and isn&amp;#39;t overly accurate. Most digital accelerometers are factory trimmed and will be significantly more accurate. With the the slow nrf51 ADC and software overhead the on time between measuring one axis and the next will make extracting useful data from the accelerometer somewhat difficult.&lt;/p&gt;
&lt;p&gt;Most digital accelerometers will have 3 ADCs and latch the data so your measurements are taken at the same time. They also tend to have FIFOs and can be configured to automatically sample at a fixed rate and dump the measurements to the FIFO. That way even when the SD takes over the processor you won&amp;#39;t loose samples.&lt;/p&gt;
&lt;p&gt;If you are just looking to detect change in motion, many digital accelerometers will provide an interrupt signal and hardware motion thresholds.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nrf51822 board with adxl335 accelerometer (ADC)</title><link>https://devzone.nordicsemi.com/thread/22044?ContentTypeID=1</link><pubDate>Wed, 01 Apr 2015 10:14:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcdc9c11-4118-4661-8a4f-7ff10b806b39</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;According to the datasheet, &lt;a href="http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL335.pdf"&gt;www.analog.com/.../ADXL335.pdf&lt;/a&gt;, the output is analog, hence the mV/g.&lt;/p&gt;
&lt;p&gt;0 g will output (typically) 1.5V on the z, x and y outputs, and the typical change in voltage is 300mV per g. So lying still on a table you could expect the x and y outputs to be 1.5V and the z axis to be 1.2V (1.5V - 300mV) because of the 1 g (=9.81 m/s^2) downward gravitational force from earth.&lt;/p&gt;
&lt;p&gt;To sample this information in the nrf51 you would need to use the ADC, since the output is analog. See the &lt;a href="https://www.nordicsemi.com/eng/nordic/download_resource/20337/12/24338220"&gt;reference manual&lt;/a&gt; section 31. Connect the three outputs to three of the analog input pins on the nRF51. Since the nRF51 only has one ADC you would need to multiplex between the 3 inputs. Change the input pin by changing the PSEL register, and read of the value, then the next pin and so on.&lt;/p&gt;
&lt;p&gt;Now you would need to do some math (and calibration) to convert the sampled value to a g value, knowing that a 300 mV offset equals a 1 g acceleration (or a 9.81 m/s^2 acceleration).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>