{"id":12987,"date":"2021-04-09T12:05:34","date_gmt":"2021-04-09T16:05:34","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/?p=12987"},"modified":"2021-04-09T16:01:13","modified_gmt":"2021-04-09T20:01:13","slug":"bowel-monitor","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/bowel-monitor\/","title":{"rendered":"Bowel Monitor"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-12990\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5725-2-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5725-2-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5725-2-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5725-2-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5725-2-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5725-2-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5725-2-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5725-2-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<h1 style=\"text-align: center\"><strong><span style=\"text-decoration: underline\">Bowel Monitor<\/span><\/strong><\/h1>\n<p>&nbsp;<\/p>\n<h4><span style=\"text-decoration: underline\">Description:<\/span><\/h4>\n<p>The Bowel Monitor is a device built to ease the pain of waiting for the bathroom by giving information about who&#8217;s using the bathroom, their purpose inside, and how long they have been using the bathroom.<\/p>\n<p>&nbsp;<\/p>\n<div style=\"width: 620px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-12987-1\" width=\"620\" height=\"1102\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Bowel_Monitor_Demo.mp4?_=1\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Bowel_Monitor_Demo.mp4\">https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Bowel_Monitor_Demo.mp4<\/a><\/video><\/div>\n<div id=\"attachment_12994\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-12994\" loading=\"lazy\" class=\"wp-image-12994 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5736-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5736-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5736-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5736-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5736-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5736-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5736-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5736-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-12994\" class=\"wp-caption-text\">The Bowel Monitor in its natural habitat (Command stripped to the door)<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_12995\" style=\"width: 1930px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-12995\" loading=\"lazy\" class=\"wp-image-12995 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5738-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5738-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5738-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5738-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5738-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5738-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5738-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5738-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-12995\" class=\"wp-caption-text\">Magnet holder to trip the magnetic field sensor when\u00a0 the door is closed<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_12996\" style=\"width: 1930px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-12996\" loading=\"lazy\" class=\"wp-image-12996 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5739-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5739-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5739-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5739-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5739-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5739-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5739-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5739-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-12996\" class=\"wp-caption-text\">Magnetic field sensor taped to wall for easy positioning and configuration to any bathroom door<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_12997\" style=\"width: 1930px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-12997\" loading=\"lazy\" class=\"wp-image-12997 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5740-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5740-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5740-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5740-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5740-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5740-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5740-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5740-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-12997\" class=\"wp-caption-text\">Small potentiometer so that the brightness of the display can be changed to adapt to different lighting conditions<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_12998\" style=\"width: 1224px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-12998\" loading=\"lazy\" class=\"wp-image-12998 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-09-at-11.44.40-AM.jpg\" alt=\"\" width=\"1214\" height=\"1810\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-09-at-11.44.40-AM.jpg 1214w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-09-at-11.44.40-AM-201x300.jpg 201w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-09-at-11.44.40-AM-687x1024.jpg 687w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-09-at-11.44.40-AM-768x1145.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-09-at-11.44.40-AM-1030x1536.jpg 1030w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-09-at-11.44.40-AM-973x1451.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-09-at-11.44.40-AM-508x757.jpg 508w\" sizes=\"(max-width: 1214px) 100vw, 1214px\" \/><p id=\"caption-attachment-12998\" class=\"wp-caption-text\">User selecting the type of business they will be engaging in during their bathroom experience<\/p><\/div>\n<p>&nbsp;<\/p>\n<h4><span style=\"text-decoration: underline\"><strong>Build Process:<\/strong><\/span><\/h4>\n<p>The build process for this device required lots of thought about user interaction. A key moment in the designing the functionality of the device arose in deciding where the device would actually be placed. Initially, the device was going to be placed inside the bathroom and the LCD display would be placed outside the bathroom. This method of communication would require communication through the door complicating the electronic physical build of the device. In order to cut down on complexity and reduce points of failure, I instead focused on minimizing the amount of separate components communicating with each other. I decided to have one device placed on the outside of the bathroom that the user could interact with before entering the bathroom. This type of device both cut down on the points of failure within the device by reducing both electrical complexity and simplified the user interaction by giving the immediate feedback about the information they are choosing to display.<\/p>\n<div id=\"attachment_13005\" style=\"width: 1558px\" class=\"wp-caption alignleft\"><img aria-describedby=\"caption-attachment-13005\" loading=\"lazy\" class=\"wp-image-13005 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_0815.png\" alt=\"\" width=\"1548\" height=\"1124\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_0815.png 1548w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_0815-300x218.png 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_0815-1024x744.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_0815-768x558.png 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_0815-1536x1115.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_0815-973x706.png 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_0815-508x369.png 508w\" sizes=\"(max-width: 1548px) 100vw, 1548px\" \/><p id=\"caption-attachment-13005\" class=\"wp-caption-text\">Initial ideation sketch of the two module system with the display outside the bathroom and the keypad inside the bathroom<\/p><\/div>\n<div id=\"attachment_13009\" style=\"width: 590px\" class=\"wp-caption alignright\"><img aria-describedby=\"caption-attachment-13009\" loading=\"lazy\" class=\"wp-image-13009\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_1516.png\" alt=\"\" width=\"580\" height=\"453\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_1516.png 1248w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_1516-300x234.png 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_1516-1024x799.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_1516-768x599.png 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_1516-973x759.png 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_1516-508x396.png 508w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><p id=\"caption-attachment-13009\" class=\"wp-caption-text\">Initial ideation sketch of the single display module mounted outside on the bathroom door<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_13013\" style=\"width: 1930px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-13013\" loading=\"lazy\" class=\"wp-image-13013 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5737-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5737-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5737-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5737-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5737-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5737-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5737-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5737-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-13013\" class=\"wp-caption-text\">Final build of single display module device<\/p><\/div>\n<p>Another major consideration was the process for determining whether or not the door has been closed. The device could either use a proximity sensor or magnetic field sensor to detect when the door closes and display the appropriate information. The proximity sensor would have required less components as it could be placed within the physical housing of the device and rely on proximity to a reference near the door; however, physically holding the proximity sensor inside the housing would reduce versatility as it could only be placed where there is a hole in the side of the box. In contrast, the magnetic field sensor required both the sensor inside the display module and a separate set of magnets on the outside of the box to trip the sensor when the door closes. While this design is physically more complex because of the extra component, electrically it is much simpler because the magnetic field sensor acts as a switch as opposed to the analog output from the proximity sensor. The magnetic field sensor could also be taped anywhere inside the housing making the Bowel Monitor more versatile in where it can be placed outside the bathroom. In order to simplify the electronics and increase versatility of the Bowel Monitor, I decided to use the magnetic field sensor to detect when the door has closed.<\/p>\n<div id=\"attachment_13002\" style=\"width: 1930px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-13002\" loading=\"lazy\" class=\"wp-image-13002 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5728-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5728-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5728-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5728-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5728-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5728-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5728-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_5728-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-13002\" class=\"wp-caption-text\">Visualization of display module and magnet module<\/p><\/div>\n<p>&nbsp;<\/p>\n<h4><span style=\"text-decoration: underline\">Discussion:<\/span><\/h4>\n<p><span style=\"font-weight: 400\">I am extremely pleased with the outcome of this project. I think the overall design and look of the Bowel Monitor came out clean and elegant as intended. I agree with the comments on cleanliness and humor of the device: \u201cEverything about the display is so clean! I like the humor incorporated into the project and the timer is a nice feature.\u201d Part of this cleanliness came from the laser cut look of the device. As noted by peers, \u201cthe laser cut look\u201d and \u201cplate with the LCD and the numbers [are] really clean and give a really nice user interface.\u201d I believe the laser cut housing organized the display and user interaction creating a more cohesive and clean design. As for the design of the box itself, I agree that \u201cadding more to the design of the box would add to the comedic feel of the overall project.\u201d I think designing the box in the shape of something like a poop emoji would add more comedic effect to the device and consequently enhance its light-hearted nature. Similarly, adding emojis to the display could enhance the user experience with more comedy about the types of bathroom uses.<\/span><\/p>\n<p><span style=\"font-weight: 400\">While the overall design and interaction succeeded in providing both comedic effect and useful information, I think some of the sensing mechanisms could have been enhanced to improve versatility of the Bowel Monitor. Replacing the magnetic sensor for a proximity sensor could decrease the physical complexity of the device by reducing the amount of components needed for the device to function. As for the user interaction with the device, adding a selection menu while the door is open would allow the user to select their business in the bathroom while the door is open instead of just while the door is closed. This would reduce the strain on the user by giving them more options on how to interact with the Bowel Monitor. They could either close the door, enter their information, and then go into the bathroom as before, or they could keep the door open while they select their information, and then use the bathroom as indicated.<\/span><\/p>\n<p><span style=\"font-weight: 400\">As for my own experience designing and building the Bowel Monitor, I learned a lot about my design and manufacturing capabilities. I learned how to both design and manufacture electronic housing using a laser cutter as opposed to a 3D printer. I also thoroughly enjoyed applying technical knowledge in such a silly manner.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h4><span style=\"text-decoration: underline\">Technical Information:<\/span><\/h4>\n<div id=\"attachment_13066\" style=\"width: 791px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-13066\" loading=\"lazy\" class=\"wp-image-13066 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Bowel-Monitor-Functional-Block-DIagram.png\" alt=\"\" width=\"781\" height=\"270\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Bowel-Monitor-Functional-Block-DIagram.png 781w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Bowel-Monitor-Functional-Block-DIagram-300x104.png 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Bowel-Monitor-Functional-Block-DIagram-768x266.png 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Bowel-Monitor-Functional-Block-DIagram-508x176.png 508w\" sizes=\"(max-width: 781px) 100vw, 781px\" \/><p id=\"caption-attachment-13066\" class=\"wp-caption-text\">Functional block diagram of Bowel Monitor<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_13064\" style=\"width: 1285px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-13064\" loading=\"lazy\" class=\"wp-image-13064 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic-and-Block-Diagram.png\" alt=\"\" width=\"1275\" height=\"1103\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic-and-Block-Diagram.png 1275w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic-and-Block-Diagram-300x260.png 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic-and-Block-Diagram-1024x886.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic-and-Block-Diagram-768x664.png 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic-and-Block-Diagram-973x842.png 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic-and-Block-Diagram-508x439.png 508w\" sizes=\"(max-width: 1275px) 100vw, 1275px\" \/><p id=\"caption-attachment-13064\" class=\"wp-caption-text\">Electrical Schematic of Bowel Monitor<\/p><\/div>\n<p>&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"c\">\/*\r\n   60-223, Project 2: Bowel Monitor\r\n   James Kyle (jkyle1)\r\n   time spent: Too much\r\n\r\n   Collaboration and sources:\r\n   1) I watched the canvas course modules\r\n   2) Keypad tutorial: https:\/\/www.circuitbasics.com\/how-to-set-up-a-keypad-on-an-arduino\/\r\n\r\n   Challenge(s): I had lots of trouble coming up with the logical \r\n   variables I needed to update the display properly. I also struggled \r\n   with writing the function to determine how to update the display \r\n   based on the key pressed on the key pad. I ended up using the serial \r\n   monitor to display the value returned by each key press and then used \r\n   that value to distinguish keys.\r\n\r\n   Next time: I'll start by thinking at a higher level about the user interaction \r\n   before diving into the details of coding the device behavior. I will also \r\n   research the components I am using more thoroughly to ensure I understand \r\n   how they work.\r\n\r\n   Description: This device determines whether the bathroom door is open or \r\n   closed. When the door is closed, the user is able to press keys on a keypad \r\n   to indicate who they are and what they are doing in the bathroom. \r\n   The device then displays that information along with the time they have been \r\n   in the bathroom to give others an indication of how much longer they can \r\n   expect to wait to use the bathroom.\r\n\r\n\r\n   Pin mapping:\r\n\r\n   Arduino pin | type   | description\r\n   ------------|--------|-------------\r\n   A0            input     R4 [Keypad]\r\n   A1            input     R3 [Keypad]\r\n   A2            input     R2 [Keypad]\r\n   A3            input     R1 [Keypad]\r\n   A4            input     Reed Switch\r\n   2             output    D7 LCD\r\n   3             output    D6 LCD\r\n   4             output    D5 LCD\r\n   5             output    D4 LCD\r\n   6             output    E pin LCD\r\n   7             output    RS pin LCD\r\n   10            output    C4 [Keypad]\r\n   11            output    C3 [Keypad]\r\n   12            output    C2 [Keypad]\r\n   13            output    C1 [Keypad]\r\n\r\n*\/\r\n\r\n\/\/Importing necessary libraries\r\n#include &lt;Keypad.h&gt;\r\n#include &lt;LiquidCrystal.h&gt;\r\n\r\n\r\n\/***************\r\n   KEYPAD SETUP\r\n ***************\/\r\n\r\n\/\/Setting up pins for key pad\r\nconst int R1 = A3;\r\nconst int R2 = A2;\r\nconst int R3 = A1;\r\nconst int R4 = A0;\r\nconst int C1 = 13;\r\nconst int C2 = 12;\r\nconst int C3 = 11;\r\nconst int C4 = 10;\r\n\r\n\/\/Setting up key pad logic\r\nconst byte ROWS = 4;\r\nconst byte COLS = 4;\r\n\r\n\/\/Creating key pad matrix\r\nchar hexaKeys[ROWS][COLS] = {\r\n  {'1', '2', '3', 'A'},\r\n  {'4', '5', '6', 'B'},\r\n  {'7', '8', '9', 'C'},\r\n  {'*', '0', '#', 'D'}\r\n};\r\n\r\nbyte rowPins[ROWS] = {R4, R3, R2, R1};\r\nbyte colPins[COLS] = {C4, C3, C2, C1};\r\n\r\n\/\/Creating key pad variable\r\nKeypad customKeypad = Keypad(makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);\r\n\r\nchar customKey; \/\/variable to store key pressed\r\n\r\n\r\n\r\n\/**************\r\n   LCD DISPLAY\r\n **************\/\r\n\r\n\/\/Setting up LCD\r\nLiquidCrystal lcd(2, 3, 4, 5, 6, 7);\r\n\r\n\r\n\r\n\/**************\r\n   Reed Switch\r\n **************\/\r\n\r\nconst int REEDPIN = A4;\r\n\r\n\r\n\r\n\/*************\r\n   Variables\r\n *************\/\r\n\r\n\/\/Variables for timing\r\nunsigned long timer = 0; \/\/overall time\r\nunsigned int timerSec = 0; \/\/time in seconds\r\nunsigned int timerMin = 0; \/\/time in minutes\r\nunsigned long prevTime = 0; \/\/previous time in miliseconds\r\nunsigned long prevTimer = 0; \/\/previous time in seconds\r\n\r\n\/\/Message variables for LCD display\r\nString useMessage; \/\/Bathroom use type\r\nString user = \"\"; \/\/Person using the bathroom\r\nString timerMessage; \/\/For displaying time in bathroom\r\nString openMessage = \"The Porcelain Throne Awaits Your Return\"; \/\/Idling message\r\n\r\n\/\/Logical variables for updating LCD display and timer\r\nbool updateUseMessage = false;\r\nbool updateTime = false;\r\nbool resetDisplay = false;\r\nbool doorOpen = false;\r\nbool lcdClearClosed = false;\r\nbool lcdClearOpen = false;\r\n\r\n\/\/Variables for timing LCD and scroll updates\r\nint displayCounter = 0;\r\nint scrollCounter = 0;\r\n\r\n\r\n\r\nvoid setup() {\r\n\r\n  \/\/Initializing reed pin using pull-up\r\n  pinMode(REEDPIN, INPUT_PULLUP);\r\n\r\n  \/\/Debugging\r\n  Serial.begin(9600);\r\n\r\n  \/\/Start communicating with LCD\r\n  lcd.begin(16, 2);\r\n\r\n}\r\n\r\n\r\nvoid loop() {\r\n\r\n  \/\/Read Key Pad using Keypad.h\r\n  customKey = customKeypad.getKey();\r\n\r\n  \/\/Check if door is open or closed\r\n  int doorState = digitalRead(REEDPIN);\r\n\r\n\r\n\r\n  \/***********************\r\n   ***Door Open Squence***\r\n   ***********************\/\r\n\r\n  \/\/If door is open, dislay idling message\r\n  if (doorState == 1) {\r\n\r\n    \/\/Clear LCD only if door was just opened and LCD hasn't been cleared yet\r\n    if (lcdClearOpen == false) {\r\n      lcd.clear(); \/\/clear LCD\r\n      delay(100);\r\n      lcd.setCursor(0, 0);\r\n      lcd.print(openMessage); \/\/Display idling message\r\n      delay(1000); \/\/Wait 1 second\r\n      \r\n      \/\/Update LCD cleared variables\r\n      lcdClearOpen = true; \/\/LCD cleared after door was opened\r\n      lcdClearClosed = false; \/\/LCD needs to be cleared when door opens\r\n\r\n      \/\/Update timers and counters for LCD\r\n      scrollCounter = 0;\r\n      \r\n      \/\/Reset displayed time\r\n      timerSec = 0;\r\n      timerMin = 0;\r\n    }\r\n\r\n    \/\/Scroll idling message until it reaches end of message,\r\n    \/\/then wait for 1 second and return to beginning of \r\n    \/\/idling message \r\n    if (scrollCounter &lt; openMessage.length() - 16) {\r\n      lcd.scrollDisplayLeft();\r\n      scrollCounter = scrollCounter + 1; \/\/increment scroll counter\r\n      delay(500);\r\n    } else {                  \/\/If message reaches end point\r\n      scrollCounter = 0;      \/\/clear LCD and reset counters\r\n      lcdClearOpen = false;\r\n      delay(1000);\r\n    }\r\n  }\r\n\r\n\r\n  \/*************************\r\n   ***Door Closed Squence***\r\n   *************************\/\r\n\r\n  \/\/If door closes, display user inputs and time on LCD\r\n  else if (doorState == 0) {\r\n\r\n    \/\/Starting timer\r\n    timer = millis() \/ 1000 - prevTimer;\r\n\r\n    \/\/Clearing LCD if door was just closed\r\n    if (lcdClearClosed == false) {\r\n      lcd.clear();\r\n      lcdClearClosed = true;\r\n      lcdClearOpen = false;\r\n      prevTime = millis(); \/\/resetting relative time \r\n      prevTimer = millis() \/ 1000; \/\/Conversion to seconds\r\n    }\r\n\r\n    \/\/only update time if one second has passed\r\n    if (millis() - prevTime &gt; 1000) {\r\n      updateTime = true;\r\n      prevTime = millis();\r\n\r\n      \/\/Converting time from seconds to minutes and seconds\r\n      timerSec += 1; \/\/incrementing seconds counter\r\n      if (timerSec &gt;= 60) {\r\n        timerSec = 0;\r\n        timerMin += 1; \/\/incrementing minutes counter\r\n      }\r\n    }\r\n\r\n    \/\/update time on lcd\r\n    if (updateTime == true) {\r\n      lcd.setCursor(0, 1);\r\n      lcd.print((String) timerMin + \" min \" + timerSec + \" sec\");\r\n      lcd.setCursor(14,1);\r\n      lcd.print(user);\r\n      updateTime = false; \/\/resetting update variable for time\r\n    }\r\n\r\n    \/\/If keypad pressed, do something based on the key pressed\r\n    if (customKey) {\r\n      updateUseMessageFunction(customKey);\r\n    }\r\n\r\n    \/\/Update lcd if it needs to be updated\r\n    if (updateUseMessage == true) {\r\n      lcd.setCursor(0, 0);\r\n      lcd.print(\"                 \"); \/\/Clearing current use message\r\n      lcd.setCursor(0, 0);\r\n      lcd.print(useMessage); \/\/Display new use message\r\n      Serial.println(useMessage); \/\/debugging line for lcd screen\r\n      updateUseMessage = false; \/\/resetting update variable so screen is updated only if there is a change\r\n    }\r\n\r\n  }\r\n\r\n}\r\n\r\n\r\n\r\n\/\/This function determines how to update the display based on the keys \r\n\/\/pressed on the key pad\r\n\r\nvoid updateUseMessageFunction(char key) {\r\n \r\n\/****************************\r\n ** Types of Bathroom Uses **\r\n ****************************\/\r\n\r\n\/\/Peeing\r\n  if (int(key) == 49) {\r\n    useMessage = \"Pee Pee Time!  \"; \/\/Changing use message\r\n    updateUseMessage = true; \/\/Indicating LCD needs to be updated\r\n  }\r\n\r\n\/\/Pooping\r\n  if (int(key) == 50) {\r\n    useMessage = \"Poopy Time!  \";\r\n    updateUseMessage = true;\r\n  }\r\n\r\n\/\/Diarrhea or equivalent destructive act\r\n  if (int(key) == 51) {\r\n    useMessage = \"Uh-oh! ;)   \";\r\n    updateUseMessage = true;\r\n  }\r\n\r\n\/\/Washing face\r\n  if (int(key) == 52) {\r\n    useMessage = \"Washing Face\";\r\n    updateUseMessage = true;\r\n  }\r\n\r\n\/\/Brushing Teeth\r\n  if (int(key) == 53) {\r\n    useMessage = \"Brushing Teeth\";\r\n    updateUseMessage = true;\r\n  }\r\n\r\n\/\/Showering\r\n  if (int(key) == 54) {\r\n    useMessage = \"Showering\";\r\n    updateUseMessage = true;\r\n  }\r\n\r\n\/\/Clear use type on screen\r\n  if (int(key) == 42) {\r\n    useMessage = \"                \";\r\n    updateUseMessage = true;\r\n  }\r\n\r\n\r\n\r\n\/***************************\r\n ** People Using Bathroom **\r\n ***************************\/\r\n\r\n\/\/James Kyle\r\n  if (int(key) == 65) {\r\n    user = \"JK\";\r\n    updateTime = true;\r\n  }\r\n\r\n\/\/Judson Kyle\r\n  if (int(key) == 66) {\r\n    user = \"JK\";\r\n    updateTime = true;\r\n  }\r\n\r\n\/\/Roommate 1\r\n  if (int(key) == 67) {\r\n    user = \"MR\";\r\n    updateTime = true;\r\n  }\r\n\r\n\/\/Roommate 2\r\n  if (int(key) == 68) {\r\n    user = \"LW\";\r\n    updateTime = true;\r\n  }\r\n\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bowel Monitor &nbsp; Description: The Bowel Monitor is a device built to ease the pain of waiting for the bathroom by giving information about who&#8217;s using the bathroom,&#8230;<\/p>\n","protected":false},"author":172,"featured_media":13098,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[89],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/posts\/12987"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/users\/172"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/comments?post=12987"}],"version-history":[{"count":16,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/posts\/12987\/revisions"}],"predecessor-version":[{"id":13120,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/posts\/12987\/revisions\/13120"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/media\/13098"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/media?parent=12987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/categories?post=12987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/tags?post=12987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}