{"id":1569,"date":"2022-10-25T00:24:22","date_gmt":"2022-10-25T04:24:22","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/?p=1569"},"modified":"2022-10-25T00:24:22","modified_gmt":"2022-10-25T04:24:22","slug":"person-in-time-informal-update","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/somanybugs\/10\/25\/person-in-time-informal-update\/","title":{"rendered":"Person in Time, Informal Update"},"content":{"rendered":"<p>Woarb update:\u00a0 the waorb is becoming warmer.<\/p>\n<p>Seriously though&#8230; Here&#8217;s the waorb prototype circuit.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-1570\" src=\"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/waorb-proto-484x480.jpg\" alt=\"\" width=\"484\" height=\"480\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/waorb-proto-484x480.jpg 484w, https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/waorb-proto-150x150.jpg 150w, https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/waorb-proto-768x762.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/waorb-proto.jpg 869w\" sizes=\"(max-width: 484px) 85vw, 484px\" \/><\/p>\n<p>As you can see it&#8217;s basically the circuit from the waorb proposal (missing the on\/off switch, heater being powered by an external power supply) with the addition of a momentary switch and a cockroft-walton ladder to power the MOSFET switching the heater.<\/p>\n<p>Let&#8217;s break it down a bit more!<\/p>\n<p><strong>HEATER ELEMENT TEST<\/strong><\/p>\n<p>The heater is made from 40 gauge steel wire (ie. about human hair width)&#8211;and in order to achieve the right resistance (~10 ohms). The batteries I intend to use in the final waorb should be able to create about a 6.6w heater so I tested the heating elements to determine how well they could heat the brass using A and V which would produce 6.6w.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-1571\" src=\"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/math2-640x480.jpg\" alt=\"\" width=\"640\" height=\"480\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/math2-640x480.jpg 640w, https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/math2-1024x767.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/math2-768x575.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/math2.jpg 1076w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/> <img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-1572\" src=\"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/math1-622x480.jpg\" alt=\"\" width=\"622\" height=\"480\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/math1-622x480.jpg 622w, https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/math1-1024x790.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/math1-768x592.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-content\/uploads\/2022\/10\/math1.jpg 1045w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>Above: my horrible math notes.<\/p>\n<p>I found that on the brass sheet (about 6 times as much brass as in the waorb) I was able to heat the brass to about 89.0 degrees f.<\/p>\n<p>This was important because I now know:<\/p>\n<ol>\n<li>That the woarb should perform as hoped (heating power and thermal tape attachment wise). The heating elements I created don&#8217;t catch fire.<\/li>\n<li>The number of wires at what length I will need in the final waorb (resistance is directly proportional to length of wire and inversely proportional to number of wires of said length). I will need 3 wires at ~5.5&#8243; for each heating element.<\/li>\n<\/ol>\n<p><strong>CIRCUIT BUILDING<\/strong><\/p>\n<p>I then built the circuit needed to power on an RGB LED on a breadboard with an Arduino and installed Arduino. (As shown in the design).<\/p>\n<p>After that I built the temp circuit (as shown in the design) and used the serial port on the Arduino to test it was working. Once it was working I took readings to calibrate it.<\/p>\n<div class=\"message-2CShn3 cozyMessage-1DWF9U wrapper-30-Nkg cozy-VmLDNB zalgo-26OfGz\" role=\"article\" data-list-item-id=\"chat-messages___chat-messages-1034312351425495081\" aria-labelledby=\"message-username-1034312177135394888 uid_1 message-content-1034312351425495081 uid_2 message-timestamp-1034312351425495081\">\n<div class=\"contents-2MsGLg\">\n<div id=\"message-content-1034312351425495081\" class=\"markup-eYLPri messageContent-2t3eCI\">Reading | temp in F | temp in C | Temp in 10ths of C<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">880\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 71.5\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 22.2\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 222<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">680\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 85.5\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a030.1\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0301<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">580\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 96.9\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 35.5\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 355<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">640\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 94.2\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 35\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0350<\/div>\n<\/div>\n<\/div>\n<div><\/div>\n<div>I used these values to find a line of best fit to convert the sensor reading into 10ths of degrees C (so they can be stored accurately without floating point numbers).<\/div>\n<div class=\"message-2CShn3 cozyMessage-1DWF9U wrapper-30-Nkg cozy-VmLDNB zalgo-26OfGz\" role=\"article\" data-list-item-id=\"chat-messages___chat-messages-1034312351425495081\" aria-labelledby=\"message-username-1034312177135394888 uid_1 message-content-1034312351425495081 uid_2 message-timestamp-1034312351425495081\">\n<div class=\"contents-2MsGLg\">\n<div><\/div>\n<\/div>\n<\/div>\n<p>After this I added the heater element back into the circuit (almost as shown on the design, added a cockroft-walton ladder to make the MOSFET work correctly).<\/p>\n<p>After this I added a momentary switch to change modes in the final program.<\/p>\n<p><strong>PROGRAM\u00a0\u00a0<\/strong><\/p>\n<p>Currently the program is able to: switch between modes when the mom switch is clicked&#8211;showing a different LED color for each, take the temperature when the switch is single clicked in listening mode&#8211;showing a white flash from the LED, record the temperature into in 10ths of degrees c to an array.<\/p>\n<p>TODO: add the heater control, make the LEDs change dynamically with temperature in listen and repeat mode. I&#8217;m sure some other stuff I&#8217;m forgetting.<\/p>\n<div class=\"message-2CShn3 cozyMessage-1DWF9U groupStart-3Mlgv1 wrapper-30-Nkg cozy-VmLDNB zalgo-26OfGz\" role=\"article\" data-list-item-id=\"chat-messages___chat-messages-1034312177135394888\" aria-labelledby=\"message-username-1034312177135394888 uid_1 message-content-1034312177135394888 uid_2 message-timestamp-1034312177135394888\">\n<div class=\"contents-2MsGLg\">\n<div id=\"message-content-1034312177135394888\" class=\"markup-eYLPri messageContent-2t3eCI\">\/\/vars for button stuff bool pressed;<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">int pressnum = 0;<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">unsigned long pressMil; <em>\/\/there is a bug where milli() runs out of space and makes measurements invalid&#8230; maybe fixed abs <\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">int mode = 0; int test; <em>\/\/vars for recalibrating the temp sensor (form: y=mx+b)y is degrees in 10ths of c, x is sensor data number <\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">float m = -0.4639; int b = 629; <em>\/\/array for temps recorded <\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">int currentSlot = 0; <em>\/\/check to make sure this is correct<\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">int tempsRec[100];<\/div>\n<div><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\"><em>\/\/write mode 0 here (ie. startup\/idle mode)<\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">void idle () {<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(9, 0);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(10, 0);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(11, 150); }<\/div>\n<div><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\"><em>\/\/write mode 1 here (ie. listening mode) <\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">void listens () {<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\"><em>\/\/temp sensing <\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">int tempSensor = analogRead(A5);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">int temp = m*tempSensor+b; <em>\/\/temp in 10ths of degrees C<\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\"><em>\/\/LEDS <\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(9, 0);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(10, 150);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(11, 0); }<\/div>\n<\/div>\n<div class=\"buttonContainer-1502pf\">\n<div class=\"buttons-3dF5Kd container-2gUZhU isHeader-2bbX-L\" role=\"group\" aria-label=\"Message Actions\">\n<div class=\"wrapper-2vIMkT\">\n<div class=\"button-3bklZh\" role=\"button\" aria-label=\"More\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"message-2CShn3 cozyMessage-1DWF9U wrapper-30-Nkg cozy-VmLDNB zalgo-26OfGz\" role=\"article\" data-list-item-id=\"chat-messages___chat-messages-1034312186656469002\" aria-labelledby=\"message-username-1034312177135394888 uid_1 message-content-1034312186656469002 uid_2 message-timestamp-1034312186656469002\">\n<div class=\"contents-2MsGLg\">\n<div id=\"message-content-1034312186656469002\" class=\"markup-eYLPri messageContent-2t3eCI\"><em>\/\/write the picture function here (ie. take temp and store it)<\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">void picture () {<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(9, 255);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(10, 255);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(11, 255);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">int tempSensor = analogRead(A5);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">int temp = m*tempSensor+b; <em>\/\/temp in 10ths of degrees C<\/em> tempsRec[currentSlot] = temp; currentSlot++;<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">delay(500);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(9, 0);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(10, 0);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(11, 0); }<\/div>\n<div><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\"><em>\/\/write mode 2 here, (ie. run the heater correctly)<\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">void repeat () {<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(9, 150);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(10, 10);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogWrite(11, 0); }<\/div>\n<div><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">\/\/IRS<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">void switchPressed () {<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">pressed = true;<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">pressMil = millis(); }<\/div>\n<div><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">void setup() {<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\"><em>\/\/ put your setup code here, to run once: <\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">pinMode(9, OUTPUT);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">pinMode(10, OUTPUT);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">pinMode(11, OUTPUT);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">digitalWrite(3, HIGH);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">attachInterrupt (digitalPinToInterrupt (3), switchPressed, CHANGE); pinMode(A5, INPUT);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">analogReference(INTERNAL);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">Serial.begin(9600); }<\/div>\n<div><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">void loop() {<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\"><em>\/\/ put your main code here, to run repeatedly: <\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\"><em>\/\/this whole part controls the mode selection and picture action <\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">test = pressMil+500-abs(millis());<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">if (pressed == true) {<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">pressnum++;<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">delay(250);<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">pressed=false; }<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">\nif (test &lt; 0) { pressnum=0; }<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">else if (pressnum &gt;= 2) { mode++; delay(500); }<\/div>\n<div><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">if (test &gt; 0 &amp;&amp; mode == 1 &amp;&amp; pressnum == 1) { picture(); }<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">if (mode==3) { mode = 0; }<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">\n<em>\/\/these run the mode code depending on the mode<\/em><\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">if (mode==0) { idle(); }<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">else if (mode==1) { listens(); }<\/div>\n<div class=\"markup-eYLPri messageContent-2t3eCI\">else if (mode==2) { repeat(); }<br \/>\n}<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Woarb update:\u00a0 the waorb is becoming warmer. Seriously though&#8230; Here&#8217;s the waorb prototype circuit. As you can see it&#8217;s basically the circuit from the waorb proposal (missing the on\/off switch, heater being powered by an external power supply) with the addition of a momentary switch and a cockroft-walton ladder to power the MOSFET switching the &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/somanybugs\/10\/25\/person-in-time-informal-update\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Person in Time, Informal Update&#8221;<\/span><\/a><\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[17],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-json\/wp\/v2\/posts\/1569"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-json\/wp\/v2\/comments?post=1569"}],"version-history":[{"count":1,"href":"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-json\/wp\/v2\/posts\/1569\/revisions"}],"predecessor-version":[{"id":1573,"href":"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-json\/wp\/v2\/posts\/1569\/revisions\/1573"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-json\/wp\/v2\/media?parent=1569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-json\/wp\/v2\/categories?post=1569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-461\/f2022\/wp-json\/wp\/v2\/tags?post=1569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}