<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6741312189160902514</id><updated>2011-04-21T11:00:44.333-07:00</updated><title type='text'>Let's get physical</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ajphys.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6741312189160902514/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ajphys.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/00482938923995941683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6741312189160902514.post-8405770309605498918</id><published>2008-04-15T19:05:00.000-07:00</published><updated>2008-12-10T19:55:05.655-08:00</updated><title type='text'>flex sensors don't solder</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_aUZGp5nzhco/SAVhmATPAgI/AAAAAAAAAAk/-JlLI9P8G80/s1600-h/brokensensor1.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_aUZGp5nzhco/SAVhmATPAgI/AAAAAAAAAAk/-JlLI9P8G80/s320/brokensensor1.jpg" alt="" id="BLOGGER_PHOTO_ID_5189661451157963266" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;So for our wearable computing project I was planning on using two flex sensors to measure how straight someone's back was.  Using this information you could have a tiny led that would light up on a person's wrist near their watch whenever they did not have proper posture.&lt;br /&gt;they were loose so the professor suggested soldering for the finished project.  I successfully soldered both of the sensors to the wires, or so I thought.  After placing the sensors I put the shirt on.  When I hooked the arduino board up to my laptop I was getting no values from the sensors.  When I took the shirt off this is what I saw.  ForI ended up taping sensors to the wires for the first iteration of the project comparison a 'good' sensor looks like this.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_aUZGp5nzhco/SAViCQTPAhI/AAAAAAAAAAs/s6GXUFCiMTw/s1600-h/good.jpg"&gt;&lt;img style="cursor: pointer;" src="http://4.bp.blogspot.com/_aUZGp5nzhco/SAViCQTPAhI/AAAAAAAAAAs/s6GXUFCiMTw/s320/good.jpg" alt="" id="BLOGGER_PHOTO_ID_5189661936489267730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now although this happened to both of them the other one was in slightly better shape.  So I attempted to superglue the wiring to it.  This was by far not my best idea.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_aUZGp5nzhco/SAVi_wTPAiI/AAAAAAAAAA0/53EW8GFzbpA/s1600-h/brokensensor2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_aUZGp5nzhco/SAVi_wTPAiI/AAAAAAAAAA0/53EW8GFzbpA/s320/brokensensor2.jpg" alt="" id="BLOGGER_PHOTO_ID_5189662993051222562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The results don't look that bad.  However they do not get any consistent reading.  This has led me to realize that it is a good thing I do software for a living&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6741312189160902514-8405770309605498918?l=ajphys.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajphys.blogspot.com/feeds/8405770309605498918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6741312189160902514&amp;postID=8405770309605498918' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6741312189160902514/posts/default/8405770309605498918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6741312189160902514/posts/default/8405770309605498918'/><link rel='alternate' type='text/html' href='http://ajphys.blogspot.com/2008/04/flex-sensors-dont-solder.html' title='flex sensors don&apos;t solder'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/00482938923995941683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_aUZGp5nzhco/SAVhmATPAgI/AAAAAAAAAAk/-JlLI9P8G80/s72-c/brokensensor1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6741312189160902514.post-5373264621348924651</id><published>2008-03-25T19:07:00.000-07:00</published><updated>2008-03-25T19:09:02.371-07:00</updated><title type='text'>code for dead reckoning</title><content type='html'>&lt;span style="font-size:85%;"&gt; Here is the code to get raw print outs of the change in acceleration over the course of a second.  The results are a little jittery but are roughly correct&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt; * Accelerometer dead reckoning&lt;br /&gt; * by Arthur Johnston and Ryan Galgon&lt;br /&gt; *&lt;br /&gt; * Takes the acceleromter values and calculates the dead reckoning&lt;br /&gt; * how far it has gone&lt;br /&gt; *code assumes you are not moving in&lt;br /&gt; *Sol-3 gravity at approximately 1 atmosphere, code is not guaranteed&lt;br /&gt; *for non-standard operation or even standard operation&lt;br /&gt; */&lt;br /&gt;//pins to get input from&lt;br /&gt;int x = 0;    // select the input pin for the potentiometer&lt;br /&gt;int y = 1;&lt;br /&gt;int z = 2;   // variable to store the value coming from the sensor&lt;br /&gt;int st=4;&lt;br /&gt;//global value storage&lt;br /&gt;int oldval[]={0,0,0};&lt;br /&gt;int val[]={0,0,0};&lt;br /&gt;//distances&lt;br /&gt;//THESE MUST BE CHANGED TO int if anything but a second is&lt;br /&gt;//used as the period&lt;br /&gt;int xd=0;&lt;br /&gt;int yd=0;&lt;br /&gt;int zd=0;&lt;br /&gt;//time period in microseconds don't forget to change multiplier&lt;br /&gt;int period=1000;&lt;br /&gt;//time period in seconds&lt;br /&gt;int multiplier=1;&lt;br /&gt;//ignore changes in acceleration under this value&lt;br /&gt;int ignore=1;&lt;br /&gt;&lt;br /&gt;//initial acceleration, these may not be needed&lt;br /&gt;int ix;&lt;br /&gt;int iy;&lt;br /&gt;int iz;&lt;br /&gt;&lt;br /&gt;//current speeds, these may not be needed.&lt;br /&gt;int xs=0;&lt;br /&gt;int ys=0;&lt;br /&gt;int zs=0;&lt;br /&gt;void setup() {&lt;br /&gt; Serial.begin(9600);&lt;br /&gt; //initializes position&lt;br /&gt;  oldval[0] = analogRead(x);    // read the value from the sensor&lt;br /&gt;  oldval[1] = analogRead(y);    // read the value from the sensor&lt;br /&gt;  oldval[2] = analogRead(z);    // read the value from the sensor&lt;br /&gt;  //initilize all these speeds, code assumes you are not moving in&lt;br /&gt;  //Sol-3 gravity at approximately 1 atmosphere, code is not guaranteed&lt;br /&gt;  //for non-standard operation or even standard operation&lt;br /&gt;  ix=oldval[0];&lt;br /&gt;  iy=oldval[1];&lt;br /&gt;  iz=oldval[2];&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop() {&lt;br /&gt;  val[0] = analogRead(x);    // read the value from the sensor&lt;br /&gt;  val[1] = analogRead(y);    // read the value from the sensor&lt;br /&gt;  val[2] = analogRead(z);    // read the value from the sensor&lt;br /&gt;  print_out_raw();&lt;br /&gt;  calculate_speed_change();&lt;br /&gt;  calculate_position_change();&lt;br /&gt;  print_out_initial();&lt;br /&gt;  oldval[0]=val[0];&lt;br /&gt;  oldval[1]=val[1];&lt;br /&gt;  oldval[2]=val[2];&lt;br /&gt;  delay(period);  &lt;br /&gt;}&lt;br /&gt;/* Since acceleration is the derivative of speed this code is actually&lt;br /&gt;lying.  using the equation acceleration=((speed0+speed1)/delta t)&lt;br /&gt;and rewriting it gets the equation&lt;br /&gt;speed1=(acceleration*delta t)+speed0, which is what we use*/&lt;br /&gt;void calculate_speed_change(){&lt;br /&gt;&lt;br /&gt;xs=xs + ((val[0]-oldval[0])/ignore)*ignore  *multiplier;&lt;br /&gt;ys=ys + ((val[1]-oldval[1])/ignore)*ignore  *multiplier;&lt;br /&gt;zs=zs + ((val[2]-oldval[2])/ignore)*ignore  *multiplier;  &lt;br /&gt;//xs=xs + ((val[0]-iz)/ignore)*ignore  *multiplier;&lt;br /&gt;//ys=ys + ((val[1]-iy)/ignore)*ignore  *multiplier;&lt;br /&gt;//zs=zs + ((val[2]-iz)/ignore)*ignore  *multiplier;  &lt;br /&gt;print_out_speed();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void print_out_speed(){&lt;br /&gt;  Serial.print("speed ");&lt;br /&gt;  Serial.print(xs,DEC);&lt;br /&gt;  Serial.print(" ");&lt;br /&gt;  Serial.print(ys,DEC);&lt;br /&gt;  Serial.print(" ");&lt;br /&gt;  Serial.println(zs,DEC);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;void calculate_position_change(){&lt;br /&gt;xd=xd+xs;&lt;br /&gt;yd=yd+ys;&lt;br /&gt;zd=zd+zs;&lt;br /&gt;//xd=xd + ((xs)/ignore)*ignore  *multiplier;&lt;br /&gt;//yd=yd + ((ys)/ignore)*ignore  *multiplier;&lt;br /&gt;//zd=zd + ((zs)/ignore)*ignore  *multiplier; &lt;br /&gt;print_out_position();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void print_out_position(){&lt;br /&gt;  Serial.print("position ");&lt;br /&gt;  Serial.print(xd,DEC);&lt;br /&gt;  Serial.print(" ");&lt;br /&gt;  Serial.print(yd,DEC);&lt;br /&gt;  Serial.print(" ");&lt;br /&gt;  Serial.println(zd,DEC);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void print_out_raw(){&lt;br /&gt;  Serial.print("absolute ");&lt;br /&gt;  Serial.print(val[0]);&lt;br /&gt;  Serial.print(" ");&lt;br /&gt;  Serial.print(val[1]);&lt;br /&gt;  Serial.print(" ");&lt;br /&gt;  Serial.println(val[2]);&lt;br /&gt;  Serial.print("relative ");&lt;br /&gt;  Serial.print(val[0]-oldval[0]);&lt;br /&gt;  Serial.print(" ");&lt;br /&gt;  Serial.print(val[1]-oldval[1]);&lt;br /&gt;  Serial.print(" ");&lt;br /&gt;  Serial.println(val[2]-oldval[2]);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void print_out_initial(){&lt;br /&gt;  Serial.print("initial ");&lt;br /&gt;  Serial.print(ix,DEC);&lt;br /&gt;  Serial.print(" ");&lt;br /&gt;  Serial.print(iy,DEC);&lt;br /&gt;  Serial.print(" ");&lt;br /&gt;  Serial.println(iz,DEC);&lt;br /&gt;  }&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6741312189160902514-5373264621348924651?l=ajphys.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajphys.blogspot.com/feeds/5373264621348924651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6741312189160902514&amp;postID=5373264621348924651' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6741312189160902514/posts/default/5373264621348924651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6741312189160902514/posts/default/5373264621348924651'/><link rel='alternate' type='text/html' href='http://ajphys.blogspot.com/2008/03/code-for-dead-reckoning.html' title='code for dead reckoning'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/00482938923995941683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6741312189160902514.post-1909532343202523549</id><published>2008-03-23T15:06:00.000-07:00</published><updated>2008-03-23T15:10:27.371-07:00</updated><title type='text'>Fun with the accelerometer and headers</title><content type='html'>So while working with are accelerometer I discovered after a significant amount of trial and error that the header we were using to connect the breakout board to the breadboard  was not giving a good connection.  This meant that the reason we were getting 'wonky' values was because we were not getting any response.  So now that there are real values to work with I can start playing around.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6741312189160902514-1909532343202523549?l=ajphys.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajphys.blogspot.com/feeds/1909532343202523549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6741312189160902514&amp;postID=1909532343202523549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6741312189160902514/posts/default/1909532343202523549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6741312189160902514/posts/default/1909532343202523549'/><link rel='alternate' type='text/html' href='http://ajphys.blogspot.com/2008/03/fun-with-accelerometer-and-headers.html' title='Fun with the accelerometer and headers'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/00482938923995941683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6741312189160902514.post-7725241097772297084</id><published>2008-03-19T18:28:00.000-07:00</published><updated>2008-12-10T19:55:06.675-08:00</updated><title type='text'>Blink Project</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_aUZGp5nzhco/R-HCRd0E2MI/AAAAAAAAAAc/CnN-8tYr4ug/s1600-h/image.bmp"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 318px; height: 222px;" src="http://1.bp.blogspot.com/_aUZGp5nzhco/R-HCRd0E2MI/AAAAAAAAAAc/CnN-8tYr4ug/s320/image.bmp" alt="" id="BLOGGER_PHOTO_ID_5179634651769395394" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_aUZGp5nzhco/R-HBGt0E2LI/AAAAAAAAAAU/Fe_hpkO3HWo/s1600-h/blink.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_aUZGp5nzhco/R-HBGt0E2LI/AAAAAAAAAAU/Fe_hpkO3HWo/s320/blink.gif" alt="" id="BLOGGER_PHOTO_ID_5179633367574173874" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_aUZGp5nzhco/R-HAct0E2KI/AAAAAAAAAAM/-Cbj8XhxWgw/s1600-h/blink.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_aUZGp5nzhco/R-HAct0E2KI/AAAAAAAAAAM/-Cbj8XhxWgw/s320/blink.gif" alt="" id="BLOGGER_PHOTO_ID_5179632646019668130" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;For the blink project we simply had to create a LED that blinks based on both digital and analog inputs.  To do this I used a digital switch and a thermostat.  The digital switch determined if the LED could even be on, that was a hard control.&lt;br /&gt;The temperature control actually was a problem at first.  I wanted the the LED to blink based on the change in temperature. Unfortunately the change in temperature was very low so it had to be scaled so that the amount of time the LED was on was noticeable.  I also found that the project worked better when I took the ambient temperature at boot up and based all of  the  changes in temperature off of that. It can all be seen in the code.&lt;br /&gt;The second main problem was more of a logistics problem.  I foolishly did not cut a long enough piece of wire for power, although this did not cause a huge problem it made my wiring more confused.  As you can see in the picture it looks like there is no power running from the board.&lt;br /&gt;&lt;br /&gt;The main things I learned from this first project are that:&lt;br /&gt;1. Hardware takes longer than software&lt;br /&gt;2. Bring enough supplies for the project&lt;br /&gt;3. Temperature sensors are not as much fun as I though&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6741312189160902514-7725241097772297084?l=ajphys.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajphys.blogspot.com/feeds/7725241097772297084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6741312189160902514&amp;postID=7725241097772297084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6741312189160902514/posts/default/7725241097772297084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6741312189160902514/posts/default/7725241097772297084'/><link rel='alternate' type='text/html' href='http://ajphys.blogspot.com/2008/03/blink-project.html' title='Blink Project'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/00482938923995941683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_aUZGp5nzhco/R-HCRd0E2MI/AAAAAAAAAAc/CnN-8tYr4ug/s72-c/image.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6741312189160902514.post-5463131707566587967</id><published>2008-03-14T12:19:00.001-07:00</published><updated>2008-03-14T12:27:00.881-07:00</updated><title type='text'>first week</title><content type='html'>So in the first week of &lt;a href="http://www.it.rit.edu/%7Ewmh/pcomp/resources.html"&gt;Physical Computing&lt;/a&gt; we learned about basic electronics (which was helpful since the last time I did any was high school) and how to use our Arduino boards for programming projects.  We also reviewed Ohm's law which reminded me of a &lt;a href="http://xkcd.com/356/"&gt;problem&lt;/a&gt; I once spent about 4 hours on without any results. Class was interesting and I already have an idea for the wearable computing project, which involves using the Arduino board to correct posture.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6741312189160902514-5463131707566587967?l=ajphys.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajphys.blogspot.com/feeds/5463131707566587967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6741312189160902514&amp;postID=5463131707566587967' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6741312189160902514/posts/default/5463131707566587967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6741312189160902514/posts/default/5463131707566587967'/><link rel='alternate' type='text/html' href='http://ajphys.blogspot.com/2008/03/first-week.html' title='first week'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/00482938923995941683</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
