{"id":1838,"date":"2020-11-10T18:15:16","date_gmt":"2020-11-10T23:15:16","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/?p=1838"},"modified":"2020-11-13T01:23:06","modified_gmt":"2020-11-13T06:23:06","slug":"dont-trip-on-whats-in-front-of-you","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/?p=1838","title":{"rendered":"Don&#8217;t trip on what&#8217;s in front of you!"},"content":{"rendered":"<p><strong>Problem:<\/strong><\/p>\n<p>People often trip over small objects that are in their path that they may not be expecting, especially if the object isn&#8217;t very tall. This is because the object is well below their sight line unless they are looking towards the ground. If someone&#8217;s on their phone, they are also more likely to trip over a small object. Blind people also of course have to be able to navigate around things that they cannot see. While they have a cane that will help them to know if something is in front of them by it hitting it, but sounds to notify something within a stride could be helpful.<\/p>\n<p><strong>Proposed Solution:<\/strong><\/p>\n<p>To help people with this problem, I propose a small wearable device strapped to the ankle that will buzz at different intervals based on how far an object is. This device is made up of a servo motor, ultrasonic distance sensor, accelerometer, and pancake vibration motor. The servo, distance sensor, and accelerometer are all attached. The servo moves such that the accelerometer is level so that the distance sensor is pointed straight ahead. This is important because as you walk, your leg is at various angles and doesn&#8217;t stay vertical. The buzzing from the vibration motor is a good way to know how far you are from something because the sound is pretty distinctive and has the added bonus of being able to feel it on your leg. For an actual version of this, I would package this smaller so that it could be actually something small attached to your leg that isn&#8217;t cumbersome.\u00a0 This would go on both ankles so that you&#8217;d know if something was in your path for sure and not just on one side. I&#8217;d also use a bigger vibration motor so that the sound is a bit louder; with this, I could feel it and hear it fine, but if the house was louder, it would&#8217;ve been harder to hear. I also wish that I had soldered the leads of the vibration motor while I was in A10 because the wire kept coming loose while trying to take videos of me walking and I&#8217;d have to bend down to fix it and then when I stood up, it would come loose again; along the same vein, I wish I had been recording the whole time because a really good example while walking with the all different buzzing intervals happened when I forgot to restart it.<\/p>\n<p><strong>Proof of Concept:<\/strong><\/p>\n<div style=\"width: 368px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-1838-1\" width=\"368\" height=\"656\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/showing-the-different-sound-intervals-based-on-distance.mp4?_=1\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/showing-the-different-sound-intervals-based-on-distance.mp4\">https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/showing-the-different-sound-intervals-based-on-distance.mp4<\/a><\/video><\/div>\n<div style=\"width: 368px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-1838-2\" width=\"368\" height=\"656\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/showing-it-move-so-that-the-sensor-is-level.mp4?_=2\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/showing-it-move-so-that-the-sensor-is-level.mp4\">https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/showing-it-move-so-that-the-sensor-is-level.mp4<\/a><\/video><\/div>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1848\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/top-view-of-device-on-my-ankle-169x300.jpg\" alt=\"\" width=\"169\" height=\"300\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/top-view-of-device-on-my-ankle-169x300.jpg 169w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/top-view-of-device-on-my-ankle-576x1024.jpg 576w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/top-view-of-device-on-my-ankle-768x1365.jpg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/top-view-of-device-on-my-ankle-864x1536.jpg 864w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/top-view-of-device-on-my-ankle-1152x2048.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/top-view-of-device-on-my-ankle-1200x2133.jpg 1200w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/top-view-of-device-on-my-ankle-scaled.jpg 1440w\" sizes=\"(max-width: 169px) 85vw, 169px\" \/><img loading=\"lazy\" class=\"size-medium wp-image-1849 alignright\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/front-view-of-device-on-my-ankle-225x300.jpg\" alt=\"\" width=\"225\" height=\"300\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/front-view-of-device-on-my-ankle-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/front-view-of-device-on-my-ankle-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/front-view-of-device-on-my-ankle-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/front-view-of-device-on-my-ankle-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/front-view-of-device-on-my-ankle-1200x1600.jpg 1200w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/front-view-of-device-on-my-ankle-scaled.jpg 1920w\" sizes=\"(max-width: 225px) 85vw, 225px\" \/><\/p>\n<div style=\"width: 840px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-1838-3\" width=\"840\" height=\"473\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/walking-ex-1.mp4?_=3\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/walking-ex-1.mp4\">https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/walking-ex-1.mp4<\/a><\/video><\/div>\n<figure id=\"attachment_1863\" aria-describedby=\"caption-attachment-1863\" style=\"width: 840px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" class=\"wp-image-1863 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/sound-crit-schematic-1024x780.jpg\" alt=\"\" width=\"840\" height=\"640\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/sound-crit-schematic-1024x780.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/sound-crit-schematic-300x228.jpg 300w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/sound-crit-schematic-768x585.jpg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/11\/sound-crit-schematic.jpg 1053w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption id=\"caption-attachment-1863\" class=\"wp-caption-text\">Schematic<\/figcaption><\/figure>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\">\/\/changed smoothing example from https:\/\/www.arduino.cc\/en\/Tutorial\/BuiltInExamples\/Smoothing\r\n\r\n#include &lt;Servo.h&gt;\r\n\r\nServo myLittleMotor;\r\nconst int servoPin = 11;\r\nint servoPosition = 120;\r\n\r\n#include &lt;NewPing.h&gt;\r\nconst int triggerPin = 8;\r\nconst int echoPin = 9;\r\nint maxDistance = 400;\r\nNewPing sonar(triggerPin, echoPin, maxDistance);\r\nconst int footSize = 25.4;\/\/cm\r\nint distance;\r\n\r\nconst int numReadings = 10;\r\nint DISTreadings[numReadings];      \/\/ the readings from the analog input\r\nint readIndex = 0;              \/\/ the index of the current reading\r\nint DISTtotal = 0;                  \/\/ the running total\r\nint DISTaverage = 0;                \/\/ the average\r\n\r\nconst int yPin = A4;\r\nint yVal;\r\n\r\nconst int pancakePin = 6;\r\n\r\nvoid setup() {\r\n  myLittleMotor.attach(servoPin);\r\n\r\n\r\n  pinMode(yPin, INPUT);\r\n\r\n\r\n  pinMode(pancakePin, OUTPUT);\r\n\r\n  Serial.begin(9600);\r\n  myLittleMotor.write(servoPosition);\r\n  for (int thisReading = 0; thisReading &lt; numReadings; thisReading++) {\r\n    DISTreadings[thisReading] = 0;\r\n  }\r\n\r\n}\r\n\r\nvoid loop() {\r\n  myLittleMotor.write(servoPosition);\r\n  yVal = analogRead(yPin);\r\n\r\n  distance = sonar.ping_cm();\r\n  \/\/ subtract the last reading:\r\n  DISTtotal = DISTtotal - DISTreadings[readIndex];\r\n  \/\/ read from the sensor:\r\n  DISTreadings[readIndex] = distance;\r\n  \/\/ add the reading to the total:\r\n  DISTtotal = DISTtotal + DISTreadings[readIndex];\r\n  \/\/ advance to the next position in the array:\r\n  readIndex = readIndex + 1;\r\n\r\n  \/\/ if we're at the end of the array...\r\n  if (readIndex &gt;= numReadings) {\r\n    \/\/ ...wrap around to the beginning:\r\n    readIndex = 0;\r\n  }\r\n\r\n  \/\/ calculate the average:\r\n  DISTaverage = DISTtotal \/ numReadings;\r\n  \/\/ send it to the computer as ASCII digits\r\n  \/\/Serial.println(Yaverage);\r\n  if (yVal &gt; 352 &amp;&amp; servoPosition &gt; 0) {\r\n    servoPosition -= 1;\r\n  }\r\n  else if (yVal &lt; 348 &amp;&amp; servoPosition &lt; 180) {\r\n    servoPosition += 1;\r\n  }\r\n  if (DISTaverage &lt; (1.5 * footSize)) { \/\/1 footSize past your foot\r\n    static int start = millis();\r\n    \/\/Serial.println(\"closest\");\r\n    if ((millis() - start) &lt; 200) {\r\n      \/\/digitalWrite(speakerPin,HIGH);\r\n      digitalWrite(pancakePin, HIGH);\r\n    }\r\n    else if ((millis() - start) &lt; 400) {\r\n      digitalWrite(pancakePin, LOW);\r\n    }\r\n    else {\r\n      start = millis();\r\n    }\r\n  }\r\n  else if (DISTaverage &lt; (1.5 * footSize + footSize)) {\r\n    static int start2 = millis();\r\n    if ((millis() - start2) &lt; 200) {\r\n      digitalWrite(pancakePin, HIGH);\r\n    }\r\n    else if ((millis() - start2) &lt; 600) {\r\n      digitalWrite(pancakePin, LOW);\r\n    }\r\n    else {\r\n      start2 = millis();\r\n    }\r\n  }\r\n  else if (DISTaverage &lt; (1.5 * footSize + 2 * footSize)) {\r\n    static int start3 = millis();\r\n    if ((millis() - start3) &lt; 200) {\r\n\r\n      digitalWrite(pancakePin, HIGH);\r\n    }\r\n    else if ((millis() - start3) &lt; 1000) {\r\n      digitalWrite(pancakePin, LOW);\r\n    }\r\n    else {\r\n      start3 = millis();\r\n    }\r\n  }\r\n  else {\r\n    \/\/noTone(speakerPin);\r\n    digitalWrite(pancakePin, LOW);\r\n  }\r\n  Serial.print(yVal);\r\n  Serial.print('\\t');\r\n  Serial.println(DISTaverage);\r\n  delay(25);\r\n  \/\/38.1\r\n  \/\/63.1\r\n  \/\/88.9\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem: People often trip over small objects that are in their path that they may not be expecting, especially if the object isn&#8217;t very tall. This is because the object is well below their sight line unless they are looking towards the ground. If someone&#8217;s on their phone, they are also more likely to trip &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/?p=1838\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Don&#8217;t trip on what&#8217;s in front of you!&#8221;<\/span><\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[20,1],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts\/1838"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1838"}],"version-history":[{"count":6,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts\/1838\/revisions"}],"predecessor-version":[{"id":1864,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts\/1838\/revisions\/1864"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}