{"id":12748,"date":"2021-04-07T13:27:14","date_gmt":"2021-04-07T17:27:14","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/?p=12748"},"modified":"2021-04-09T16:07:45","modified_gmt":"2021-04-09T20:07:45","slug":"self-control-snack-box","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/self-control-snack-box\/","title":{"rendered":"Self-Control Snack Box"},"content":{"rendered":"<p><strong>Overview<\/strong><\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-12750 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2184-768x1024.jpeg\" alt=\"\" width=\"620\" height=\"827\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2184-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2184-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2184-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2184-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2184-973x1297.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2184-508x677.jpeg 508w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2184-scaled.jpeg 1920w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/p>\n<p>This box displays the time that has passed since it was last opened, making it an effective deterrent for continuous snack consumption.<\/p>\n<p>&nbsp;<\/p>\n<p><em>Moving Image<\/em><\/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-12748-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\/9F990970-3DFC-4E87-AC36-F1927137D0B6.mp4?_=1\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/9F990970-3DFC-4E87-AC36-F1927137D0B6.mp4\">https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/9F990970-3DFC-4E87-AC36-F1927137D0B6.mp4<\/a><\/video><\/div>\n<p>&nbsp;<\/p>\n<p><em>Overall Photo for Proportion and Scale<\/em><\/p>\n<div id=\"attachment_12819\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-12819\" loading=\"lazy\" class=\"wp-image-12819 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2249-scaled.jpeg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2249-scaled.jpeg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2249-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2249-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2249-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2249-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2249-973x1297.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2249-508x677.jpeg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-12819\" class=\"wp-caption-text\">The box I constructed is 26cm x 26cm x 26cm. I made it relatively big so it could hold many snacks but small enough to fit in the shelves of my dorm room.<\/p><\/div>\n<p>&nbsp;<\/p>\n<p><em>Detail Photos<\/em><\/p>\n<div id=\"attachment_12752\" style=\"width: 2570px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-12752\" loading=\"lazy\" class=\"wp-image-12752 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2181-scaled.jpeg\" alt=\"\" width=\"2560\" height=\"1920\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2181-scaled.jpeg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2181-300x225.jpeg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2181-1024x768.jpeg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2181-768x576.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2181-1536x1152.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2181-2048x1536.jpeg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2181-973x730.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2181-508x381.jpeg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-12752\" class=\"wp-caption-text\">All the electrical components are within the lid of the box.<\/p><\/div>\n<div id=\"attachment_12751\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-12751\" loading=\"lazy\" class=\"wp-image-12751 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2180-scaled.jpeg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2180-scaled.jpeg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2180-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2180-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2180-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2180-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2180-973x1297.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2180-508x677.jpeg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-12751\" class=\"wp-caption-text\">Another top-down view of the components within the lid of the box.<\/p><\/div>\n<div id=\"attachment_12821\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-12821\" loading=\"lazy\" class=\"wp-image-12821 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2166-scaled.jpeg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2166-scaled.jpeg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2166-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2166-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2166-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2166-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2166-973x1297.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2166-508x677.jpeg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-12821\" class=\"wp-caption-text\">I soldered the wiring for the seven segment display to ensure strong electrical connections and prevent wires from disconnecting when the box is opened.<\/p><\/div>\n<p>&nbsp;<\/p>\n<p><em>Use of my device<\/em><\/p>\n<div id=\"attachment_12822\" style=\"width: 2570px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-12822\" loading=\"lazy\" class=\"wp-image-12822 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2178-scaled.jpeg\" alt=\"\" width=\"2560\" height=\"1920\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2178-scaled.jpeg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2178-300x225.jpeg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2178-1024x768.jpeg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2178-768x576.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2178-1536x1152.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2178-2048x1536.jpeg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2178-973x730.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2178-508x381.jpeg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-12822\" class=\"wp-caption-text\">Here are all the snacks I need to stop eating<\/p><\/div>\n<div id=\"attachment_12823\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-12823\" loading=\"lazy\" class=\"wp-image-12823 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2179-scaled.jpeg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2179-scaled.jpeg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2179-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2179-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2179-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2179-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2179-973x1297.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2179-508x677.jpeg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-12823\" class=\"wp-caption-text\">The snacks are now in the box so I will eat them less often.<span style=\"font-size: 16px\">\u00a0 \u00a0<\/span><\/p><\/div>\n<div style=\"width: 620px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-12748-2\" 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\/IMG_2247.mp4?_=2\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2247.mp4\">https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2247.mp4<\/a><\/video><\/div>\n<p>The display resets once the box is opened and the timer starts counting again.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Process Images and Review<\/strong><\/p>\n<p><em>Decision Points<\/em><\/p>\n<div id=\"attachment_12826\" style=\"width: 2570px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-12826\" loading=\"lazy\" class=\"wp-image-12826 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/sketch-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1920\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/sketch-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/sketch-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/sketch-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/sketch-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/sketch-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/sketch-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/sketch-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/sketch-508x381.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-12826\" class=\"wp-caption-text\">Initial ideation sketches<\/p><\/div>\n<p>Originally, this project idea came from my forgetfulness when it comes to taking pills: I will always forget whether I actually took my medicine within a day. So, I had the idea to attach a timer onto the pill bottle that would display how long it has been since I last opened the bottle. With this device, I could tell if I took my medicine within 24 hours so that I would not accidentally take my medicine twice a day or just not take it at all. However, when I searched online, this device already existed so I was less interested in completing it as my own personal project.<\/p>\n<p>Instead, I decided to tackle another pressing issue: my lack of self-control when it comes to food. As a Freshman, maintaining good eating habits has been difficult especially when my roommates and I buy many snacks. So I shifted the idea from building a timer to take know when to take medicine to building a timer to become more aware of how often I am eating snacks. This timer would automatically reset once I open the box to reach for snacks, making it an unavoidable reminder of my frequent snack consumption.<\/p>\n<div style=\"width: 620px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-12748-3\" 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\/IMG_2251.mp4?_=3\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2251.mp4\">https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2251.mp4<\/a><\/video><\/div>\n<p>During the process, I unfortunately encountered issues with the battery. Whenever I would connect it to my computer, the display would show numbers very clearly and brightly. However, with the battery the device would work properly for the first few moments, but after a minute or so the display would start flashing as shown above. I attempted to debug this behavior for quite a long time, updating the monitor as few times as possible, however I was unable to successfully debug it and continued to use my computer as a power source for the demonstration.<\/p>\n<p>&nbsp;<\/p>\n<p><em>Process Highlights<\/em><\/p>\n<div style=\"width: 620px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-12748-4\" 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\/IMG_2137.mp4?_=4\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2137.mp4\">https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2137.mp4<\/a><\/video><\/div>\n<p>Since I had not used the seven segment display before, I was also quite curious about the edge behavior. With the electronic prototype I built, I tested what would happen when the time would overflow and attempt to display a 5 digit number. I found that it would simply display &#8220;&#8212;-&#8220;, in which I was okay with not changing that behavior since I think I would deserve a snack if I was able to resist after 100 hours.<\/p>\n<div style=\"width: 620px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-12748-5\" 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\/IMG_2138.mp4?_=5\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2138.mp4\">https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2138.mp4<\/a><\/video><\/div>\n<p>Although I used millis() to keep track of the time, I wanted to display the time in hours:minutes to keep the convention of a clock and display a decent amount of time (around 4 days). This involved some conversions and math which took a bit of testing to get right. I sped up the incrementation to ensure that the time would be accurate even when the hours went into the double digits.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_12833\" style=\"width: 630px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-12833\" loading=\"lazy\" class=\"wp-image-12833 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2257-768x1024.jpeg\" alt=\"\" width=\"620\" height=\"827\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2257-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2257-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2257-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2257-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2257-973x1297.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2257-508x677.jpeg 508w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2257-scaled.jpeg 1920w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><p id=\"caption-attachment-12833\" class=\"wp-caption-text\">My cardboard laser cut box had a few issues that I was able to fix before laser cutting the final box<\/p><\/div>\n<p>This was my first time laser cutting or working with any sort of software for laser cutting. On my first attempt, I made a hole for the display on top of the box and the IR proximity sensor I used to determine whether the box was opened or not. However, I realized that I made the hole for the sensor too small and placed it in the wrong position. I wanted the proximity sensor to determine the distance between the lid of the box and the box component, but I had placed the proximity sensor hole at the top of the box which would fail to detect anything useful. Thankfully, I noticed my mistake and changed it before laser cutting the wood.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-12825 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2250-scaled.jpeg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2250-scaled.jpeg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2250-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2250-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2250-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2250-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2250-973x1297.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2250-508x677.jpeg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<div id=\"attachment_12754\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-12754\" loading=\"lazy\" class=\"wp-image-12754 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2183-scaled.jpeg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2183-scaled.jpeg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2183-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2183-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2183-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2183-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2183-973x1297.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/IMG_2183-508x677.jpeg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-12754\" class=\"wp-caption-text\">Minor detail: I painted the box so that it would match other decorations in the space<\/p><\/div>\n<p>&nbsp;<\/p>\n<p><strong>Discussion<\/strong><\/p>\n<p>One comment I received asked what would happen when I put the snacks into the box. Currently, the solution would be to time placing the snacks in the box that I would put snacks in while taking them out so the time would still reflect the last time I ate snacks. However, I could instead add a button just for putting in snacks that would prevent the IR proximity sensor reads from resetting the timer when I wanted to add in snacks. Another comment I received was adding some sort of punishment if I opened the box too frequently or even having some sort of reward if I was able to prevent snacking for a long time. I could implement a speaker that would play certain sounds to reflect either disapproval or approval, using a buzzer\/annoying noise vs a sparkly noise to contrast the results of opening the box at certain times.<\/p>\n<p>I am personally quite satisfied with the overall construction of the box and the way all the electronic components are just housed within the lid. So far, I have found the box quite effective as it has drastically reduced temptations to look towards the snacks during the day and has prevented me from opening the box when I was testing the box. However, I am quite disappointed that I was unable to get the battery to power the device, making it quite inconvenient to use on a daily basis.<\/p>\n<p>I learned that I am quite interested in the physical construction of the devices I make. I had a lot of fun thinking of ways the box could be customized and decorated to be well incorporated in the space of my dorm, making it perfectly fit the shelves and making the electrical components fit the different holes within the box. In the future, I hope to continue to create 3D forms using laser cutting or 3D printing.<\/p>\n<p>Although I do not expect to build another version of this box, I would have a lot of ideas for a future one. First off, I would incorporate the sound addition described above to provide feedback to the user&#8217;s snack consumption. Furthermore, I would want to make the box a little lighter since the lid is quite clunky right now despite the electronic components not being very heavy. Finally, I would want to make sure that the battery works.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Technical Information<\/strong><\/p>\n<div id=\"attachment_12840\" style=\"width: 787px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-12840\" loading=\"lazy\" class=\"wp-image-12840 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Block-Diagram.jpg\" alt=\"\" width=\"777\" height=\"235\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Block-Diagram.jpg 777w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Block-Diagram-300x91.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Block-Diagram-768x232.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Block-Diagram-508x154.jpg 508w\" sizes=\"(max-width: 777px) 100vw, 777px\" \/><p id=\"caption-attachment-12840\" class=\"wp-caption-text\">Logical Block Diagram<\/p><\/div>\n<div id=\"attachment_12841\" style=\"width: 1073px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-12841\" loading=\"lazy\" class=\"wp-image-12841 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic.jpg\" alt=\"\" width=\"1063\" height=\"611\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic.jpg 1063w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic-300x172.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic-1024x589.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic-768x441.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic-973x559.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-content\/uploads\/2021\/04\/Project-2-Schematic-508x292.jpg 508w\" sizes=\"(max-width: 1063px) 100vw, 1063px\" \/><p id=\"caption-attachment-12841\" class=\"wp-caption-text\">Schematic Diagram<\/p><\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"c\">\/*\r\n * Self-control Snack Box\r\n * Erica Fu\r\n * \r\n * Description:\r\n * Uses IR Proximity sensor to detect if the box is opened; resets the timer once the box is open\r\n * Increments the time on the display and converts the time to hours and minutes\r\n * \r\n * Pin mapping:\r\n * \r\n *  Arduino pin                 | type   | description\r\n *  ----------------------------|--------|-------------\r\n *  A0                           input      IR proximity sensor to detect if box is opened\r\n *  2, 3, 4, 5                   output     digit pins on the seven seg digit display\r\n *  6, 7, 8, 9, 10, 11, 12, 13   output     segment pins on the seven seg digit display\r\n *  \r\n * Sources:\r\n * 1) Used this website to understand and complete the wiring of the seven segment display,\r\n *    also used the code to display numbers\r\n *    https:\/\/www.instructables.com\/Using-a-4-digit-7-segment-display-with-arduino\/\r\n * 2) Used the IR proximity sensor explaination on the course website to understand and complete the wiring of the part\r\n *    also used the code to read inputs\r\n *    https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/tutorials\/IR-proximity-sensor\r\n *\/\r\n\r\n#include &lt;SevSeg.h&gt;\r\n\r\nSevSeg sevseg; \r\n\r\nconst int PHOTORESISTORPIN = A0; \r\n\r\n\/\/used to calculate the timing later\r\nlong timeVal = 0; \r\nlong delayTime = 0;\r\nint savedTime = 0;\r\n\r\nvoid setup() {\r\n    \/\/setup for the seven segment display\r\n    byte numDigits = 4;  \r\n    byte digitPins[] = {2, 3, 4, 5};\r\n    byte segmentPins[] = {6, 7, 8, 9, 10, 11, 12, 13};\r\n    bool resistorsOnSegments = 0; \r\n    sevseg.begin(COMMON_CATHODE, numDigits, digitPins, segmentPins, resistorsOnSegments);\r\n    sevseg.setBrightness(0);\r\n    sevseg.setNumber(0, 3);\r\n\r\n    \/\/setup for the IR proximity sensor\r\n    pinMode(PHOTORESISTORPIN, INPUT); \r\n\r\n    \/\/serial setup for debugging\r\n    Serial.begin(9600); \r\n}\r\nvoid loop() {\r\n   \r\n    \/\/check if 1 second has passed\r\n    if(millis()-delayTime &gt;= 1000){\r\n      \r\n      \/\/store the value of the IR proximity sensor\r\n      int readVal = analogRead(PHOTORESISTORPIN); \r\n    \r\n      \/\/reset delay\r\n      delayTime = millis();\r\n      \r\n      \/\/check if something is lifted from proximity sensor\r\n      if(readVal&lt;15){\r\n        timeVal = 0; \/\/reset time\r\n      } else {\r\n        timeVal = timeVal + 1; \/\/add to time\r\n      }\r\n    }\r\n\r\n    \/\/if the time has changed\r\n    if(savedTime != timeVal) {\r\n      \r\n      \/\/calculate the hr:min to be displayed\r\n      int hr = (timeVal\/3600)*100;                      \r\n      int mins = (timeVal\/60)%60;\r\n      int displayTime = hr+mins;\r\n\r\n      \/\/update the seven segment display\r\n      sevseg.setNumber(displayTime, 3);\r\n\r\n      \/\/update savedTime for next time change check\r\n      savedTime = timeVal;\r\n    }\r\n\r\n    \/\/refresh display so it will light up\r\n    sevseg.refreshDisplay();\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview This box displays the time that has passed since it was last opened, making it an effective deterrent for continuous snack consumption. &nbsp; Moving Image &nbsp; Overall&#8230;<\/p>\n","protected":false},"author":176,"featured_media":12750,"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\/12748"}],"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\/176"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/comments?post=12748"}],"version-history":[{"count":7,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/posts\/12748\/revisions"}],"predecessor-version":[{"id":12847,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/posts\/12748\/revisions\/12847"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/media\/12750"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/media?parent=12748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/categories?post=12748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2021\/work\/wp-json\/wp\/v2\/tags?post=12748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}