{"id":1544,"date":"2020-10-14T02:23:29","date_gmt":"2020-10-14T06:23:29","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/?p=1544"},"modified":"2020-10-15T19:31:02","modified_gmt":"2020-10-15T23:31:02","slug":"im-your-fan","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/?p=1544","title":{"rendered":"I&#8217;m your fan"},"content":{"rendered":"<figure id=\"attachment_1549\" aria-describedby=\"caption-attachment-1549\" style=\"width: 798px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.15-PM.png\"><img loading=\"lazy\" class=\"wp-image-1549 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.15-PM-798x1024.png\" alt=\"\" width=\"798\" height=\"1024\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.15-PM-798x1024.png 798w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.15-PM-234x300.png 234w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.15-PM-768x986.png 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.15-PM.png 1064w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-1549\" class=\"wp-caption-text\">In counter-clockwise order, a fan, accelerometer, gas detector, and a PIR sensor.<\/figcaption><\/figure>\n<p>To an artist, one&#8217;s respiratory health is one of the priorities. Spray paint, paint fume, melting plastic&#8230; even with a mask on, the fume still enters my lungs. Right now, being able to work on my projects from home, I had to make a compromise with my parents and trade my ventilation with an at-home studio. The room has no windows other than a door. However, to have a fan in the room, the foam particles will fly everywhere and stick to my sculptures or get into my eyes, which is not an ideal situation. But just leaving a door open doesn&#8217;t do much to ventilation either.<\/p>\n<p>Therefore, I came up with a fan that interacts with my presence, action, and the gas level.<\/p>\n<p>Video demonstration:<\/p>\n<p><a href=\"https:\/\/drive.google.com\/file\/d\/1VG5g9sS6BtFTEqqUuGJY6JN5LMpSzvyK\/view?usp=sharing\">https:\/\/drive.google.com\/file\/d\/1VG5g9sS6BtFTEqqUuGJY6JN5LMpSzvyK\/view?usp=sharing<\/a><\/p>\n<p>If people had a hard time understanding since I was struggling to talk, film, move an accelerometer, and light a candle all at the same time, basically the fan works in this way:<\/p>\n<p>Fan gets activated:<\/p>\n<ul>\n<li>when it detects no movement in the room and the doorknob was pulled<\/li>\n<li>when the toxic gas level (flamable gas) is too high in the room, no matter of my presence in the room.<\/li>\n<\/ul>\n<p>Fan is off when:<\/p>\n<ul>\n<li>when it detects a movement in the room with a low gas level<\/li>\n<\/ul>\n<p>Now it is time to get real.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>The first demonstration is activating the fan with no movement and the door knob.<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.51-PM.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-1552\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.51-PM-776x1024.png\" alt=\"\" width=\"776\" height=\"1024\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.51-PM-776x1024.png 776w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.51-PM-227x300.png 227w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.51-PM-768x1014.png 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.51-PM.png 1074w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a><\/p>\n<p>So this is my dusty, non ventilated studio. Since I am moving in the room, the fan is off.<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.39-PM.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-1551\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.39-PM-776x1024.png\" alt=\"\" width=\"776\" height=\"1024\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.39-PM-776x1024.png 776w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.39-PM-227x300.png 227w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.39-PM-768x1013.png 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.39-PM.png 1072w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a><\/p>\n<p>Currently, there is a movement detected in the PIR sensor, so the fan is off.<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.04-PM.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-1548\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.04-PM-835x1024.png\" alt=\"\" width=\"835\" height=\"1024\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.04-PM-835x1024.png 835w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.04-PM-244x300.png 244w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.04-PM-768x942.png 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.04-PM.png 1066w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a><\/p>\n<p>So I opened the door, AKA activated the accelerometer.<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.56.05-PM.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-1553\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.56.05-PM-804x1024.png\" alt=\"\" width=\"804\" height=\"1024\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.56.05-PM-804x1024.png 804w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.56.05-PM-235x300.png 235w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.56.05-PM-768x978.png 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.56.05-PM.png 1080w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a><\/p>\n<p>The fan turns on and ventilates the room.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Now it&#8217;s time to test the flamable gas detecting interaction.<a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.39-PM.png\"><br \/>\n<img loading=\"lazy\" class=\"alignnone size-large wp-image-1551\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.39-PM-776x1024.png\" alt=\"\" width=\"776\" height=\"1024\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.39-PM-776x1024.png 776w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.39-PM-227x300.png 227w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.39-PM-768x1013.png 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.39-PM.png 1072w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a><\/p>\n<p>Now I am in the room again, and moved infront of the PIR sensor. The fan is off.<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.54.32-PM.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-1546\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.54.32-PM-1024x916.png\" alt=\"\" width=\"840\" height=\"751\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.54.32-PM-1024x916.png 1024w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.54.32-PM-300x268.png 300w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.54.32-PM-768x687.png 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.54.32-PM.png 1028w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>I give the toxic gas detector (flamable gas detector) a whiff of my spray foam,<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.25-PM.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-1550\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.25-PM-773x1024.png\" alt=\"\" width=\"773\" height=\"1024\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.25-PM-773x1024.png 773w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.25-PM-227x300.png 227w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.25-PM-768x1017.png 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/Screen-Shot-2020-10-14-at-2.55.25-PM.png 1068w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a><\/p>\n<p>The fan turns on, even though there is movement detected in the room.<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;Schematics&gt;<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/tinkercad.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-1554\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/tinkercad-1024x598.png\" alt=\"\" width=\"840\" height=\"491\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/tinkercad-1024x598.png 1024w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/tinkercad-300x175.png 300w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/tinkercad-768x449.png 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/tinkercad-1200x701.png 1200w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/tinkercad.png 1468w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>&lt;Code&gt;<\/p>\n<pre>int GasPin = A0;\r\nint PIR = 7;\r\nint motorPin = 8;\r\nint Ypin = A1;\r\n\r\n\r\nint yVal;\r\nint oldY;\r\nint dif;\r\n\r\nvoid setup()\r\n{\r\npinMode(GasPin, INPUT);\r\npinMode(PIR, INPUT); \r\npinMode(Ypin, INPUT);\r\npinMode(motorPin, OUTPUT);\r\nSerial.begin(9600);\r\nanalogWrite(motorPin, 0);\r\n}\r\nvoid loop()\r\n{\r\noldY= yVal;\r\nyVal = analogRead(Ypin);\r\ndif = abs(oldY - yVal);\r\n\/\/ delay(250);\r\n\/\/Serial.println(dif);\r\n\r\n\r\nif (digitalRead(PIR) == LOW &amp;&amp; dif&gt;5){ \r\n\r\n\/*Serial.println(dif);\r\nSerial.println(\"PIR OFF\");\r\nSerial.println(analogRead(GasPin));\r\nSerial.println();\r\ndelay(1000);*\/\r\nanalogWrite(motorPin, 255);\r\n}\r\nif(digitalRead(PIR) == HIGH){\r\n\/*Serial.println(dif);\r\nSerial.println(\"PIR: ON\");\r\nSerial.println(analogRead(GasPin));\r\nSerial.println();\r\ndelay(1000);*\/\r\nanalogWrite(motorPin, 0);\r\n\/\/delay(4000);\r\n}\r\nif(analogRead(GasPin) &gt; 330){\r\n\/*Serial.println(analogRead(GasPin));\r\nSerial.println(\"PIR: ON\");\r\ndelay(1000);*\/\r\nanalogWrite(motorPin, 255);\r\n\/\/delay(4000);\r\n}\r\n}<\/pre>\n<p>&lt;Reflection&gt;<\/p>\n<p>Hardships:<\/p>\n<ul>\n<li>initially I had an LCD display, yet for some reason it was glitching not by itself, but also making the whole arduino glitch, and even my computer. The wiring was correct and everything, and that gave me a hardship of setting the range of gas level, because the serial monitor was already showing so many values from different sensors.<\/li>\n<li>the both ground and vcc wire of my fan got detached. I didn&#8217;t have soldering equipments or anything so I took a knife and peeled some of the wire and used a piece of tape to hold them together.<\/li>\n<\/ul>\n<p>For future:<\/p>\n<ul>\n<li>Buy a bigger fan and actually use it.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To an artist, one&#8217;s respiratory health is one of the priorities. Spray paint, paint fume, melting plastic&#8230; even with a mask on, the fume still enters my lungs. Right now, being able to work on my projects from home, I had to make a compromise with my parents and trade my ventilation with an at-home &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/?p=1544\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;I&#8217;m your fan&#8221;<\/span><\/a><\/p>\n","protected":false},"author":20,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,1],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts\/1544"}],"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\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1544"}],"version-history":[{"count":3,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts\/1544\/revisions"}],"predecessor-version":[{"id":1617,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts\/1544\/revisions\/1617"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}