<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="http://forum.robosavvy.com/feed.php?f=4&amp;t=1366" />

<title>RoboSavvy Forum</title>
<subtitle>Robosavvy Forum: The largest online community of Humanoid Robot Builders</subtitle>
<link href="http://forum.robosavvy.com/index.php" />
<updated>2007-05-23T22:16:57+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=4&amp;t=1366</id>
<entry>
<author><name><![CDATA[viper1]]></name></author>
<updated>2007-05-23T22:16:57+01:00</updated>
<published>2007-05-23T22:16:57+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9215#p9215</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9215#p9215"/>
<title type="html"><![CDATA[Accelerometer]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9215#p9215"><![CDATA[
I figured it out: For any other newbys that might be haveing similar questions , heres the code that  works great using an ADXL320 Accelerometer. Im using A/D port #7 <br /><br />'===============================================<br />robot_tilt:<br />A = AD(7)<br />IF A &gt; 250 THEN RETURN<br />  <br />IF A &lt;100&gt; 160 THEN GOTO tilt_high<br /><br />RETURN<br />tilt_low:<br />A = AD(7)<br />'IF A &lt; 30 THEN  GOTO forward_standup<br />IF A &lt; 100 THEN  GOTO backward_standup<br />RETURN<br />tilt_high:<br />A = AD(7)<br />'IF A &gt; 200 THEN GOTO backward_standup<br />IF A &gt; 160 THEN GOTO forward_standup<br />RETURN<br />'===============================================<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=614">viper1</a> — Wed May 23, 2007 10:16 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[viper1]]></name></author>
<updated>2007-05-21T00:32:14+01:00</updated>
<published>2007-05-21T00:32:14+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9164#p9164</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9164#p9164"/>
<title type="html"><![CDATA[Accelerometer]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9164#p9164"><![CDATA[
I finaaly stumbled my way through the code and Got the tilt_high to work for my RN1 to forward_standup, Thats with the X connected to AD(7) Now I have the Y connected to AD(6) but am stumped about how to configure the code for it, so that he will standup from his back??????????? This is what my code looks like now.<br /><br />robot_tilt:<br />A = AD(7)<br />A = AD(6)<br />IF A &gt; 250 THEN RETURN<br />  <br />IF A &lt;160&gt; 160 THEN GOTO tilt_high<br /><br />RETURN<br />tilt_low:<br />A = AD(6)<br />'IF A &lt; 30 THEN  GOTO forward_standup<br />IF A &lt; 160 THEN  GOTO backward_standup<br />RETURN<br />tilt_high:<br />A = AD(7)<br />'IF A &gt; 200 THEN GOTO backward_standup<br />IF A &gt; 160 THEN GOTO forward_standup<br />RETURN<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=614">viper1</a> — Mon May 21, 2007 12:32 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[viper1]]></name></author>
<updated>2007-05-21T00:30:46+01:00</updated>
<published>2007-05-21T00:30:46+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9163#p9163</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9163#p9163"/>
<title type="html"><![CDATA[Accelerometer]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9163#p9163"><![CDATA[
I finaaly stumbled my way through the code and Got the tilt_high to work for my RN1 to forward_standup, Thats with the X connected to AD(7) Now I have the Y connected to AD(6) but am stumped about how to configure the code for it, so that he will standup from his back???????????<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=614">viper1</a> — Mon May 21, 2007 12:30 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[viper1]]></name></author>
<updated>2007-05-20T21:12:10+01:00</updated>
<published>2007-05-20T21:12:10+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9161#p9161</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9161#p9161"/>
<title type="html"><![CDATA[Accelerometer]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9161#p9161"><![CDATA[
I think I've got it figured out, The only thing i'm confused about is, Why the extra AD port The original template only mentions one AD port int the program for both frwd and backward tilt what would be the other? The ADXL from sparkfun has X and Y. Cant I just use the X to sense if RN1 has fallen frw or backward? What would Y be for???<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=614">viper1</a> — Sun May 20, 2007 9:12 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[viper1]]></name></author>
<updated>2007-05-20T20:20:16+01:00</updated>
<published>2007-05-20T20:20:16+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9160#p9160</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9160#p9160"/>
<title type="html"><![CDATA[Accelerometer??]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9160#p9160"><![CDATA[
So if I plug X into A/D (6) and Y into A/D (7), I would Declare A(6) as a &quot;BYTE&quot; and A/D(7) as a &quot;BYTE&quot;? <br /><br />Then if he's standing up normally the reading at the two ports would be somewhere in the middle of 0-255? Say 126, So if Rn1 were to fall all the way forward X would be closer to 0 or 255 depending on the mounted position of the ADXL board? Could you post an example of what the code might look like? <img src="http://forum.robosavvy.com/images/smilies/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" />  HELP<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=614">viper1</a> — Sun May 20, 2007 8:20 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[viper1]]></name></author>
<updated>2007-05-15T18:44:02+01:00</updated>
<published>2007-05-15T18:44:02+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9076#p9076</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9076#p9076"/>
<title type="html"><![CDATA[Accelerometer]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9076#p9076"><![CDATA[
So if I plug X into A/D (6) and Y into A/D (7), I would Declare A(6) as a &quot;BYTE&quot; and A/D(7) as a &quot;BYTE&quot;?<br /><br />Then if he's standing up normally the reading at the two ports would be somewhere in the middle of 0-255? Say 126, So if Rn1 were to fall all the way forward X would be closer to 0 or 255 depending on the mounted position of the ADXL board? Could you post an example of what the code might look like?  <img src="http://forum.robosavvy.com/images/smilies/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=614">viper1</a> — Tue May 15, 2007 6:44 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2007-05-15T18:04:19+01:00</updated>
<published>2007-05-15T18:04:19+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9075#p9075</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9075#p9075"/>
<title type="html"><![CDATA[ACCELEROMETER]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9075#p9075"><![CDATA[
Since you have the Sparkfun board, the caps are already on the board.<br /><br />Looking at the ADXL datasheet, the output is 1.5V for 0g, 1.326V for - 1g and 1.674 for + 1 g. . This seems a little less sensitive than your example code.<br /><br />Your example does not say if A is a byte or an integer. If A is an Integer the AD output is in the range 0 to 1023 for a voltage of 0 to 5V. If it is a byte then it is 0 to 255.<br /><br />So make the if statements correspond to this.<br /><br />Also the orientataion of the sensor is also important.<br /><br />Finally, get just front / back working first.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Tue May 15, 2007 6:04 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[viper1]]></name></author>
<updated>2007-05-14T23:07:38+01:00</updated>
<published>2007-05-14T23:07:38+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9048#p9048</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9048#p9048"/>
<title type="html"><![CDATA[Accelerometer]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9048#p9048"><![CDATA[
Ok Im still a little confused, well allright then alot confused Ive got my four pin header soldered to the ADXL and Im getting ready to make my connections. You mentioned earlier about using Capacitors, will i actually need these to calibrate the bandwdth or can I leave it as is? And if I do, what type of caps do I use and do they go only on the X and Y leads? <br /><br />And the code that ive seen used only mentions a single AD, Example:<br /><br /> I know I'm asking alot but I am eager to learn. I Love Robotics and have just recently been able to really spend time with this favorite hobby of mine.<br /><br />robot_tilt<br /><br />robot_tilt: <br />A = AD(6) <br />IF A &lt;h40&gt; &amp;ha0 THEN GOTO tilt_front <br />RETURN <br />tilt_back: <br />A = AD(6) <br />'IF A &lt; 30 THEN GOTO forward_standup <br />IF A &lt; &amp;h40 THEN GOTO backward_standup <br />RETURN <br />tilt_front: <br />A = AD(6) <br />'IF A &gt; 200 THEN GOTO backward_standup <br />IF A &gt; &amp;ha0 THEN GOTO forward_standup <br />RETURN<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=614">viper1</a> — Mon May 14, 2007 11:07 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[viper1]]></name></author>
<updated>2007-05-14T22:26:35+01:00</updated>
<published>2007-05-14T22:26:35+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9047#p9047</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9047#p9047"/>
<title type="html"><![CDATA[ACCELEROMETER]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9047#p9047"><![CDATA[
Awsome! Thanks i-bot<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=614">viper1</a> — Mon May 14, 2007 10:26 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2007-05-14T22:06:49+01:00</updated>
<published>2007-05-14T22:06:49+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9046#p9046</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9046#p9046"/>
<title type="html"><![CDATA[ACCELEROMETER]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9046#p9046"><![CDATA[
Make no connection to the Z and ST pins.<br /><br />Take two servo cables (one only really needs one wire). The board is powered from the 3 wire servo cable using the centre pin to give VDD, and the pin at the outside ot the controller board to give GND. The X and Y outputs connect to the AD inputs closest to the centre of the board on both cables<br /><br />Read using the AD commands for the ports used.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Mon May 14, 2007 10:06 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[viper1]]></name></author>
<updated>2007-05-14T21:39:25+01:00</updated>
<published>2007-05-14T21:39:25+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9044#p9044</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9044#p9044"/>
<title type="html"><![CDATA[Acceleromter]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9044#p9044"><![CDATA[
Also Ive been searching everywhere and cant seem to find how to connect the ADXL to the MR3024. I have Six pins: VDD, GND, X, Y, Z, and ST. Any info about this would be greatly appreciated. I know VDD is power, do I connect this one to the center A/D port? But not sure about the others. <img src="http://forum.robosavvy.com/images/smilies/icon_confused.gif" alt=":?" title="Confused" /><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=614">viper1</a> — Mon May 14, 2007 9:39 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[viper1]]></name></author>
<updated>2007-05-14T21:24:22+01:00</updated>
<published>2007-05-14T21:24:22+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9043#p9043</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9043#p9043"/>
<title type="html"><![CDATA[Accelerometer]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9043#p9043"><![CDATA[
<blockquote><div><cite>i-Bot wrote:</cite><br />You don't say if you have a bare chip or if you are using a Sparkfun board. The Sparkfun board adds a couple of capacitors which are needed.<br /><br />If you need more detailed help, let us know.<br /></div></blockquote><br /><br />I have the ADXL320 from Sparkfun. I thought the caps were onboard the ADXL?? <br /><br />I did remove the Voltage sensing cicuit so now I have two Spare A/D ports<br /><br />If RN1 is running a subroutine such as &quot;push-ups&quot; wouldn't this trigger the ADXL to run the &quot;standup from front&quot; subroutine?<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=614">viper1</a> — Mon May 14, 2007 9:24 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2007-05-12T09:59:21+01:00</updated>
<published>2007-05-12T09:59:21+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9006#p9006</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9006#p9006"/>
<title type="html"><![CDATA[ACCELEROMETER]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9006#p9006"><![CDATA[
You really need two ports, one for each DOF, so I would drop off the voltage sensing and use that for the second port.<br /><br />This accelerometer appears to work direct from a 5V supply and give analog outputs directly compatible to the AD inputs.<br /><br />You don't say if you have a bare chip or if you are using a Sparkfun board. The Sparkfun board adds a couple of capacitors which are needed.<br /><br />Power on the centre pin of the C3024 AD connectors is 5V, and pin at outside of board is Gnd, so a couple of servo leads will connect the ADXL.<br /><br />Accelerometers are read using the AD() command<br /><br />If you need more detailed help, let us know.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Sat May 12, 2007 9:59 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[viper1]]></name></author>
<updated>2007-05-12T01:02:25+01:00</updated>
<published>2007-05-12T01:02:25+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9003#p9003</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9003#p9003"/>
<title type="html"><![CDATA[Accelerometer]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=9003#p9003"><![CDATA[
newby here: I have the ADXL320 and need help hooking it up. I only have one AD port available. Can I use just the one port? Where do I Connect for power? And What is the proper code for it to function? Thanks<br /><br />The R/C RCVR Gyro And Voltage sensing have left me with only one A/D Port <img src="http://forum.robosavvy.com/images/smilies/icon_confused.gif" alt=":?" title="Confused" /> [/b]<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=614">viper1</a> — Sat May 12, 2007 1:02 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2007-05-11T09:56:49+01:00</updated>
<published>2007-05-11T09:56:49+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=8992#p8992</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=8992#p8992"/>
<title type="html"><![CDATA[ACCELEROMETER]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1366&amp;p=8992#p8992"><![CDATA[
Unless there is something very special about this accelerometer, I would get an analog output one instead.<br /><br />The sensor appears to output a 100 Hz pulse, where the duty cycle indicates the g. You could integrate the pulse, though the response time would be slow for any reasonable accuracy.<br /><br />Timing through digital inputs would not be accurate or fast enough. Existing inputs (Sonar, motorin, RCIN), eiher have a specfic timing, or work in the range less than 3 millisec ( we need 10).<br /><br />We could write a new instruction to read this sensor ( a modification of RCIN), but like other time critical inputs, it would disable interrupts for the timer period. This means 10millisec dead time per read.<br /><br />An external conversion could be done, but likely would cost more than an analog accelerometer and be quite a lot of work.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Fri May 11, 2007 9:56 am</p><hr />
]]></content>
</entry>
</feed>