{"id":16294,"date":"2022-09-29T01:35:21","date_gmt":"2022-09-29T05:35:21","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/?p=16294"},"modified":"2022-09-29T10:08:47","modified_gmt":"2022-09-29T14:08:47","slug":"double-transducer-rpm-to-light-to-magnetism","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/double-transducer-rpm-to-light-to-magnetism\/","title":{"rendered":"Double Transducer: RPM to Light to Magnetism"},"content":{"rendered":"<p>by Gia Marino and Freda Su<\/p>\n<h3>Overall Photos<\/h3>\n<div id=\"attachment_16326\" style=\"width: 2570px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16326\" loading=\"lazy\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0210-3-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1920\" class=\"size-full wp-image-16326\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0210-3-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0210-3-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0210-3-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0210-3-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0210-3-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0210-3-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0210-3-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0210-3-508x381.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-16326\" class=\"wp-caption-text\">The whole transducer.<\/p><\/div>\n<div id=\"attachment_16299\" style=\"width: 2570px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16299\" loading=\"lazy\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0221-1-scaled-e1664457560695.jpg\" alt=\"\" width=\"2560\" height=\"1920\" class=\"size-full wp-image-16299\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0221-1-scaled-e1664457560695.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0221-1-scaled-e1664457560695-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0221-1-scaled-e1664457560695-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0221-1-scaled-e1664457560695-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0221-1-scaled-e1664457560695-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0221-1-scaled-e1664457560695-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0221-1-scaled-e1664457560695-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0221-1-scaled-e1664457560695-508x381.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-16299\" class=\"wp-caption-text\">The whole double transducer.<\/p><\/div>\n<h3>Pictures of Each Part and Videos<\/h3>\n<div id=\"attachment_16300\" style=\"width: 2570px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16300\" loading=\"lazy\" class=\"wp-image-16300 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0207-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1920\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0207-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0207-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0207-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0207-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0207-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0207-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0207-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0207-508x381.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-16300\" class=\"wp-caption-text\">Electromagnet. It creates a magnetic field when power runs through it&#8217;s coils<\/p><\/div>\n<div id=\"attachment_16302\" style=\"width: 2570px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16302\" loading=\"lazy\" class=\"wp-image-16302 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0212-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1920\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0212-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0212-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0212-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0212-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0212-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0212-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0212-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0212-508x381.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-16302\" class=\"wp-caption-text\">RC circuit and transistor circuit. Smoothes out and amplifies current.<\/p><\/div>\n<div id=\"attachment_16303\" style=\"width: 2570px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16303\" loading=\"lazy\" class=\"wp-image-16303 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0213-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1920\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0213-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0213-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0213-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0213-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0213-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0213-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0213-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0213-508x381.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-16303\" class=\"wp-caption-text\">Soldered LED and photo-resistor circuit. The photo-resistor detects the brightness of the LED<\/p><\/div>\n<div id=\"attachment_16304\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16304\" loading=\"lazy\" class=\"wp-image-16304 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0214-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0214-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0214-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0214-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0214-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0214-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0214-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0214-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-16304\" class=\"wp-caption-text\">The rotary encoder wiring on a separate bread board. Reads RPM<\/p><\/div>\n<p>Videos:<\/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-16294-1\" width=\"620\" height=\"349\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/My-Movie-9.mp4?_=1\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/My-Movie-9.mp4\">https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/My-Movie-9.mp4<\/a><\/video><\/div>\n<div style=\"width: 620px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-16294-2\" width=\"620\" height=\"349\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/My-Movie-8.mp4?_=2\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/My-Movie-8.mp4\">https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/My-Movie-8.mp4<\/a><\/video><\/div>\n<p>&nbsp;<\/p>\n<p><b>Simple Narrative Description<\/b><\/p>\n<p><span style=\"font-weight: 400\">The knob measures how fast it\u2019s spinning. This controls how bright the blue light will be, which is then measured by a light detector. The amount of light measured is used to determine how strong the magnet will be.<\/span><\/p>\n<h3><strong>Process<\/strong><\/h3>\n<h4>Ideation<\/h4>\n<div id=\"attachment_16312\" style=\"width: 868px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/double-transducer-rpm-to-light-to-magnetism\/screen-shot-2022-09-29-at-2-29-48-am\/\" rel=\"attachment wp-att-16312\"><img aria-describedby=\"caption-attachment-16312\" loading=\"lazy\" class=\"size-full wp-image-16312\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.29.48-AM.png\" alt=\"\" width=\"858\" height=\"540\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.29.48-AM.png 858w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.29.48-AM-300x189.png 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.29.48-AM-768x483.png 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.29.48-AM-508x320.png 508w\" sizes=\"(max-width: 858px) 100vw, 858px\" \/><\/a><p id=\"caption-attachment-16312\" class=\"wp-caption-text\">Or ideation for our double transducer<\/p><\/div>\n<p><span style=\"font-weight: 400\">We had a few ideas for different energy forms, such as light, sound, and heat, as well as moving a magnet different distances. Some things, such as the sound and heat, would be hard to detect accurately, so we eliminated those ideas. Zach said the electromagnet might be a bit tricky but feasible and creative. He also recommended the simpler light transmission\/detector system for the middle step, so we get more time to focus on the hard stuff.<\/span><\/p>\n<h4>Rotary Encoder<\/h4>\n<div id=\"attachment_16314\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/double-transducer-rpm-to-light-to-magnetism\/img_0008-1\/\" rel=\"attachment wp-att-16314\"><img aria-describedby=\"caption-attachment-16314\" loading=\"lazy\" class=\"size-full wp-image-16314\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0008-1-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0008-1-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0008-1-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0008-1-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0008-1-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0008-1-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0008-1-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0008-1-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/a><p id=\"caption-attachment-16314\" class=\"wp-caption-text\">Getting rotary encoder to work<\/p><\/div>\n<div id=\"attachment_16315\" style=\"width: 2570px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/double-transducer-rpm-to-light-to-magnetism\/img_0009-1\/\" rel=\"attachment wp-att-16315\"><img aria-describedby=\"caption-attachment-16315\" loading=\"lazy\" class=\"size-full wp-image-16315\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0009-1-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1920\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0009-1-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0009-1-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0009-1-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0009-1-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0009-1-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0009-1-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0009-1-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0009-1-508x381.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><\/a><p id=\"caption-attachment-16315\" class=\"wp-caption-text\">serial print screen equations<\/p><\/div>\n<p><span style=\"font-weight: 400\">First, we learned about the Encoder library by Paul Stroffogen. We found a pin diagram online and ran the Basic code given with the library, and watched how the numbers in the Serial monitor changed as we twisted the knob. The numbers increase for rotating in one direction and decrease for the other direction, which is why you see the negative sign in the picture. We originally calculated angular velocity to convert to RPM but then switched to doing the math based on the ticks.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">The fun part was obviously the math for figuring out how these numbers relate to calculating the RPM.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Count the number of ticks it takes to complete 1 rotation: assuming the ticks are evenly spaced, then we can figure out how much of a rotation has happened by looking at the difference of two ticks.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">For our rotary encoder, there were 80 ticks per rotation, which means [latex]\\frac{1 rotation}{80 ticks}[\/latex] so each tick is [latex]\\frac{1}{80}[\/latex]th of a rotation.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Time frame of measurement: counting ticks for a minute would be too slow, so it\u2019s better to measure over a small portion of time and extrapolate the \u201cinstantaneous\u201d RPM. We decided to measure over 1ms, since we have the millis() function in Arduino built in. Using dimensional analysis:<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">(x ticks\/ms) * (1 rotation\/80 ticks) * (60000ms\/min) ends up with units of RPM.<\/span><\/li>\n<\/ol>\n<h4>The LED<\/h4>\n<div id=\"attachment_16316\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/double-transducer-rpm-to-light-to-magnetism\/img_0064-1\/\" rel=\"attachment wp-att-16316\"><img aria-describedby=\"caption-attachment-16316\" loading=\"lazy\" class=\"size-full wp-image-16316\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0064-1-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0064-1-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0064-1-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0064-1-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0064-1-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0064-1-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0064-1-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0064-1-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/a><p id=\"caption-attachment-16316\" class=\"wp-caption-text\">Brighter LED<\/p><\/div>\n<div id=\"attachment_16317\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/double-transducer-rpm-to-light-to-magnetism\/img_0069-1\/\" rel=\"attachment wp-att-16317\"><img aria-describedby=\"caption-attachment-16317\" loading=\"lazy\" class=\"size-full wp-image-16317\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0069-1-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0069-1-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0069-1-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0069-1-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0069-1-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0069-1-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0069-1-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0069-1-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/a><p id=\"caption-attachment-16317\" class=\"wp-caption-text\">Dimmer LED<\/p><\/div>\n<p><span style=\"font-weight: 400\">We used analogWrite to send different voltages to the LED to give it different brightness. We also used the lowest resistor and tried different colors to see what could give us the brightest LED so that the change in brightness would be most drastic. The Serial monitor shows the brightness detected by the photoresistor, which helped us find the photoresistor range also.<\/span><\/p>\n<h4>Electromagnet<\/h4>\n<div id=\"attachment_16318\" style=\"width: 1040px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/double-transducer-rpm-to-light-to-magnetism\/screen-shot-2022-09-29-at-2-37-31-am\/\" rel=\"attachment wp-att-16318\"><img aria-describedby=\"caption-attachment-16318\" loading=\"lazy\" class=\"size-full wp-image-16318\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.37.31-AM.png\" alt=\"\" width=\"1030\" height=\"594\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.37.31-AM.png 1030w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.37.31-AM-300x173.png 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.37.31-AM-1024x591.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.37.31-AM-768x443.png 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.37.31-AM-973x561.png 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.37.31-AM-508x293.png 508w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/a><p id=\"caption-attachment-16318\" class=\"wp-caption-text\">RC circuit Zach helped us simulate<\/p><\/div>\n<div id=\"attachment_16321\" style=\"width: 464px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/double-transducer-rpm-to-light-to-magnetism\/screen-shot-2022-09-29-at-2-38-47-am\/\" rel=\"attachment wp-att-16321\"><img aria-describedby=\"caption-attachment-16321\" loading=\"lazy\" class=\"size-full wp-image-16321\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.38.47-AM.png\" alt=\"\" width=\"454\" height=\"408\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.38.47-AM.png 454w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Screen-Shot-2022-09-29-at-2.38.47-AM-300x270.png 300w\" sizes=\"(max-width: 454px) 100vw, 454px\" \/><\/a><p id=\"caption-attachment-16321\" class=\"wp-caption-text\">Electromagnets with different coil size and wrapping<\/p><\/div>\n<div id=\"attachment_16322\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/double-transducer-rpm-to-light-to-magnetism\/img_0059-1\/\" rel=\"attachment wp-att-16322\"><img aria-describedby=\"caption-attachment-16322\" loading=\"lazy\" class=\"size-full wp-image-16322\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0059-1-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0059-1-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0059-1-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0059-1-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0059-1-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0059-1-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0059-1-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/IMG_0059-1-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/a><p id=\"caption-attachment-16322\" class=\"wp-caption-text\">Testing the magnetic field<\/p><\/div>\n<p><a href=\"https:\/\/drive.google.com\/file\/d\/1RH2CfyKH7a7ctSiBseOcUsEurZxuO4Pa\/view\"><span style=\"font-weight: 400\">https:\/\/drive.google.com\/file\/d\/1RH2CfyKH7a7ctSiBseOcUsEurZxuO4Pa\/view<\/span><\/a><span style=\"font-weight: 400\"> video of capacitor resistor circuit reacting to changing voltages\u00a0<\/span><br \/>\n(too big to upload)<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">We need to make sure the electromagnet works by itself, so we wrapped copper wire around a metal screw and drove current through it. At first, it wouldn\u2019t pick up any paper clips at all:<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">First, we added a lot more coils to make the magnet stronger.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">When that still didn\u2019t work, we sanded the ends for a better connection with the 9V power supply we were using.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">That still wasn\u2019t quite strong enough because it turns out the wire itself interfered with the magnetic field, so we had to sand off the outside layer. As you can see in the comparison between the 2 screws, the wire on the top (unsanded) is a stronger bronze color than the bottom screw (sanded), where you can see a lighter, more sandy\/dusty brown where it was successfully sanded.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">We experimented with 2 different wire thicknesses for the coils and discovered that the thicker wire became a stronger magnet for about the same amount of coils. In addition, the thinner wire would break a lot more often when trying to sand the ends, so we like the thicker wire better.<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">We learned that Arduino\u2019s analog output isn\u2019t truly a constant voltage, but more of a rapid cycle between the amount of time it sends 5V and 0V such that the \u201caverage voltage\u201d is somewhere in between (Pulse Width Modulation). However, the electromagnet wouldn\u2019t like the sudden changes between 5V and 0V, so we need to smooth out the voltage with a RC (resistor capacitor) circuit so it would become some close to \u201cconstant\u201d voltage between 5V and 0V, turning it into a true analog voltage.<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">This website simulates how the duty cycle turns into a smooth line: <\/span><a href=\"https:\/\/falstad.com\/circuit\/circuitjs.html?ctz=CQAgjCAMB0l5YCcyWrQDhAZjDA7HuugKwBMW6iYeFALNgGwjHOTMCmAtGGAFADyIWnHAM2xMKVFsZvAOZCRpIorZZSMqLwBOIUsOmrDbUht4BjI2DFHlmGbAQhu0WsmLoshPJH1IsWFCOfABKegbWbNRMkVB6VpoOtKS8APZx6nHCiJgsMPCQiHgMxAykeeC8FEIgAGIQFbhs3CAAIgCuAC4AngA6AM4Awt3mADbsvAAW2PFYvEA\"><span style=\"font-weight: 400\">https:\/\/falstad.com\/circuit\/circuitjs.html?ctz=CQAgjCAMB0l5YCcyWrQDhAZjDA7HuugKwBMW6iYeFALNgGwjHOTMCmAtGGAFADyIWnHAM2xMKVFsZvAOZCRpIorZZSMqLwBOIUsOmrDbUht4BjI2DFHlmGbAQhu0WsmLoshPJH1IsWFCOfABKegbWbNRMkVB6VpoOtKS8APZx6nHCiJgsMPCQiHgMxAykeeC8FEIgAGIQFbhs3CAAIgCuAC4AngA6AM4Awt3mADbsvAAW2PFYvEA<\/span><\/a><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">We also needed a transistor (IRLB8721PbF) in order to give the electromagnet enough current, since the Arduino doesn\u2019t have much. The transistor takes in a voltage at the Gate terminal (output of RC circuit) and amplifies the output to the electromagnet. The value of transistors is that a small change in the Gate voltage would result in a much larger difference in the current, which would thus change the magnetic field strength.<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">We started with trying the default parameters given in the website, because why not. Those values turned out to work well, so we kept those.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">We also added a heat sink to the transistor because it became hot quickly.<\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h2><b>Discussion<\/b><\/h2>\n<p><span style=\"font-weight: 400\">While the project seemed pretty straightforward at first, there were details that we didn\u2019t really consider that took more time than it should have. For example, even with simple parts of the system, such as the LED, we had to try different colors of LEDs\/resistor combinations, because it turns out that they glow with different brightness when they all have the same amount of current. We wanted to use the brightest LED in order to give the photoresistor the widest range of values possible, since every LED can be dimmed to the same level, but not every LED can be brightened to the same level. Other small things that took longer than it should have included needing to sand all the wire used around the electromagnet, since we didn\u2019t realize that the coating could interfere with the magnetic field until we tested it. Another problem we ran into was that the LCD would flash in order to refresh the correct values, and we tried for a while to get rid of the flashing at first, but couldn\u2019t. So we realized it was probably just a necessary quirk of the system. Also we realized that we should\u2019ve put more time into figuring out the LCD because ours didn\u2019t end up working properly and it was most likely a little mapping issue we missed.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">Secondly, for some reason one of the circuits that was working normally before suddenly decides to shut off whenever the rotary encoder spins. Not sure why that happens, and Zach wasn\u2019t able to figure it out either. Another team suggested later that it could be that the other components use too much power, causing the Arduino to shut off. Of course, there could be other issues such as poor connections as well, but we double checked those, and again, it was working before without modifying anything.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">If we were doing this again, perhaps we could consider doing different strategies for dividing the work. For this project, we both worked on the same part of the system at once. The benefits were that we both learned more deeply about each part of the circuit, and could help each other debug better because of it. However, this may not have been the most time efficient approach, since the output produced would be limited to whatever part of the system we were doing, instead of perhaps being able to make progress on multiple parts at once. But at the same time, by each working on different parts, perhaps we wouldn\u2019t have as deep of an understanding of each step, and thus be less effective at helping each other debug. Perhaps we could take a mixture of these approaches and do the easy parts concurrently, but work on the hard parts together.<\/span><\/p>\n<h2><strong>Functional block diagram and schematic<\/strong><\/h2>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/double-transducer-rpm-to-light-to-magnetism\/project-1-page-2-drawio\/\" rel=\"attachment wp-att-16324\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-16324\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/09\/Project-1-Page-2.drawio.svg\" alt=\"\" width=\"1577\" height=\"1403\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>Code<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"c\">\/* Double Transducer: RPM to Magnetism \r\nGia Marino and Freda Su\r\n\r\nOur code takes inputs from a rotary encoder and translates them to positions on a \r\ntiny circle in the encoder. We used these positions to calculate the RPM based on \r\nthe number of ticks that go by. Then we take that number and map RPM into a \r\n0 to 255 so that the LED can change brightness based on the rotation speed. Then we \r\nhave the photoresistor that reads the brightness of the LED and maps it into a range\r\nof 0 to 255 so it can send a voltage to our electromagnet. Lastly, the code takes the\r\nRPM, LED input value, LED brightness, and input value into the electromagnet and maps\r\nit into a range of 0-99. then prints it on the LCD screen\r\n\r\n Arduino pin | role   | description\r\n ------------|--------|-------------\r\n A3            input    photoresistor pin\r\n 9             output   electromagnet pin\r\n 6             output   LED pin\r\n 2             input    rotary encoder pin A\r\n 3             input    rotary encoder pin B\r\n SDA           output   LCD serial pin\r\n SCL           input    LCD clock pin\r\n GND           input    ground\r\n 5V            output   5v\r\n\r\nWe based our if statement for the rotary encoder around Paul Stoffregen's Encoder\r\nlibrary code: https:\/\/github.com\/PaulStoffregen\/Encoderthe, specifically the \"basic\" \r\nexample that comes with the library. We had a lot of assistance and influence from Remy's \r\ncode for the LCD display (https:\/\/github.com\/remyfrank01\/Double-Transducer\/blob\/main\/DOUBLE_TRANS.ino).\r\nLastly, we copied the LCD tutorial code and worked off of that, so our code for the LCD display \r\nis also heavily influenced by this tutorial: https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/tutorials\/I2C-lcd*\/\r\n\r\n\r\n\r\n#include &lt;LiquidCrystal_I2C.h&gt;  \/\/\/\/https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/tutorials\/I2C-lcd\r\n#include &lt;Wire.h&gt; \/\/LCD display\r\n#include &lt;Encoder.h&gt; \/\/https:\/\/www.pjrc.com\/teensy\/td_libs_Encoder.html\r\n\r\nconst int PHOTOPIN = A3; \/\/ photoresistor pin\r\nconst int LEDPIN = 6; \/\/ LED pin\r\nconst int EMPIN = 9; \/\/ electromagnet pin\r\nconst int totalTicks = 48; \/\/ amount of steps in one full rotation of the rotary encoder\r\nconst double anglePerTick = 1.0\/totalTicks; \/\/ one Rotation\/total ticks\r\n\r\n\/* Create an LCD display object called \"lcd\" with I2C address 0x27\r\n    which is 16 columns wide and 3 rows tall. You can use any name you'd like. (col, row)\r\n    (0,0) (1,0) (2,0) ... (15,0)\r\n    (0,1) (1,1) (2,1) ... (15,1)*\/\r\nLiquidCrystal_I2C lcd(0x27, 16, 2);\r\nEncoder myEnc(2,3); \/\/pins 2 &amp; 3 should have interrupt capablility\r\n\r\nvoid setup() {\r\n  pinMode(PHOTOPIN, INPUT);\r\n  pinMode(LEDPIN, OUTPUT);\r\n  pinMode(EMPIN, OUTPUT);\r\n  Serial.begin(9600);\r\n  Wire.begin();\r\n  \r\n  \/\/ initialize the lcd (only need to do this once)\r\n  lcd.init();\r\n\r\n  \/\/ turn on the backlight to start\r\n  lcd.backlight();\r\n  lcd.clear();\r\n\r\n}\r\n\r\nunsigned long time0 = millis(); \/\/ time since last checked the rotary encoder\r\nunsigned long timerLCD = millis(); \/\/ timer used for LCD dispkay\r\nlong oldPosition = -999;\r\nfloat angVel; \/\/ anglular velocity\r\nunsigned int brightness = 0; \/\/the input for the LED that controls the brightness\r\nunsigned int photoVal = 0; \/\/ the value we get from the photoresistor\r\nunsigned int voltage = 0; \/\/ electromagnet voltage\r\nunsigned int rpm = 0; \/\/ rotations per min calculated from rotary encoder steps\r\n\r\n\r\nvoid loop() {\r\n\r\nunsigned long globalTime = millis(); \r\n  \r\n  long newPosition = myEnc.read();\r\n\r\n  \/\/ convert ticks to rpm\r\n  if (globalTime - time0 &gt;= 1) { \/\/ checks every second\r\n    double countTicks = abs(newPosition - oldPosition); \/\/ figures out how many steps passed by \r\n    oldPosition = newPosition;\r\n\r\n    \/\/ reset time so when loop runs again we base our math on the most recent last position\r\n    time0 = globalTime; \r\n\r\n    angVel = countTicks * anglePerTick;\r\n    rpm = angVel * 60000; \/\/ converts just calculated angular velocity to RPM\r\n  }\r\n\r\n    \/\/ takes RPM and calculates a mapped output voltage so brightness is affected by rpm speed\r\n    brightness = map(rpm, 0, 60, 0, 255);  \/\/120-360 deg\/sec to 0-255 analogWrite\r\n    analogWrite(LEDPIN, brightness);\r\n\r\n    \/\/takes photoresistor value and maps an output voltage for the electromagnet so\r\n    \/\/ it varies based on the photoresistor values\r\n    photoVal = analogRead(PHOTOPIN);\r\n    voltage = map(photoVal, 0,1023, 0, 255); \/\/adjust photoVal range: 0-1023 photoVal to 0-255 analogWrite\r\n    analogWrite(EMPIN, voltage);\r\n\r\n  \/\/LCD display\r\n  \r\n  if (millis() - timerLCD &gt;= 250) {\/\/ every 1\/4 sec\r\n    timerLCD = millis();  \/\/reset\r\n    lcd.clear();\r\n    \/\/ set cursor to home position, i.e. the upper left corner\r\n    lcd.home(); \r\n    int mappedRPM = map(rpm, 0, 60, 0, 99);\r\n    if (mappedRPM &gt; 99) mappedRPM = 99;\r\n    else if (mappedRPM &lt; 0) mappedRPM = 0;\r\n    lcd.print(\"i:\" + String(mappedRPM));  \/\/convert to rpm\r\n\r\n    lcd.setCursor(6,0);  \/\/middle of first row\r\n    int mappedBrightness = map(brightness, 0, 255, 0, 99);\r\n    if (mappedBrightness &gt; 99) mappedBrightness = 99;\r\n    else if (mappedBrightness &lt; 0) mappedBrightness = 0;\r\n    lcd.print(\"m:\" + String(mappedBrightness)); \/\/convert brightness\r\n    \/\/ move cursor to column 8, row 1\r\n    \r\n    lcd.setCursor(8, 1);\r\n    int mappedPhotoVal = map(photoVal, 0, 1023, 0, 99);\r\n    if (mappedPhotoVal &gt; 99) mappedPhotoVal = 99;\r\n    else if (mappedPhotoVal &lt; 0) mappedPhotoVal = 0;\r\n    \r\n    lcd.print(String(mappedPhotoVal));\r\n    \/\/ move cursor to column 13, row 2\r\n    lcd.setCursor(12, 1);\r\n\r\n    int mappedVoltage = map(voltage, 0, 255, 0, 99);\r\n    if (mappedVoltage &gt; 99) mappedVoltage = 99;\r\n    else if (mappedVoltage &lt; 0) mappedVoltage = 0;\r\n    lcd.print(\"o:\" + String(voltage));\r\n  }\r\n\r\n  \/\/goes to RC circuit, transistor etc\r\n\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>by Gia Marino and Freda Su Overall Photos Pictures of Each Part and Videos Videos: &nbsp; Simple Narrative Description The knob measures how fast it\u2019s spinning. This controls&#8230;<\/p>\n","protected":false},"author":236,"featured_media":16326,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[86],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/posts\/16294"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/users\/236"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/comments?post=16294"}],"version-history":[{"count":13,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/posts\/16294\/revisions"}],"predecessor-version":[{"id":16337,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/posts\/16294\/revisions\/16337"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/media\/16326"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/media?parent=16294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/categories?post=16294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/tags?post=16294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}