{"id":13860,"date":"2021-10-05T09:06:42","date_gmt":"2021-10-05T13:06:42","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/?p=13860"},"modified":"2021-10-05T09:06:42","modified_gmt":"2021-10-05T13:06:42","slug":"double-transducer-magnetic-field-to-color-gradient","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/double-transducer-magnetic-field-to-color-gradient\/","title":{"rendered":"Double Transducer: Magnetic Field to Color Gradient"},"content":{"rendered":"<p>Our project was to create a double Tansducer that converted a magnetic field strength to a printed color output. To accomplish this, we chose two middle steps to convert the input signal to the output.<\/p>\n<div id=\"attachment_13908\" style=\"width: 2570px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-13908\" loading=\"lazy\" class=\"wp-image-13908 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8483-2-1-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1707\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8483-2-1-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8483-2-1-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8483-2-1-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8483-2-1-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8483-2-1-1536x1024.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8483-2-1-2048x1365.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8483-2-1-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8483-2-1-508x339.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-13908\" class=\"wp-caption-text\">Overall Photo of Matthew&#8217;s Transducer<\/p><\/div>\n<div id=\"attachment_14130\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14130\" loading=\"lazy\" class=\"wp-image-14130 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124417046-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124417046-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124417046-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124417046-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124417046-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124417046-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124417046-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124417046-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-14130\" class=\"wp-caption-text\">Overall photo of Shenai&#8217;s Transducer<\/p><\/div>\n<h2>Project Details<\/h2>\n<div id=\"attachment_14131\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14131\" loading=\"lazy\" class=\"size-full wp-image-14131\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124449112-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124449112-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124449112-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124449112-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124449112-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124449112-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124449112-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20211005_124449112-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-14131\" class=\"wp-caption-text\">This three-axis magnetometer senses the strength of a magnetic field in 3 dimensions.<\/p><\/div>\n<div id=\"attachment_13913\" style=\"width: 1680px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-13913\" loading=\"lazy\" class=\"wp-image-13913 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8486-1-scaled-e1633296413122.jpg\" alt=\"\" width=\"1670\" height=\"1657\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8486-1-scaled-e1633296413122.jpg 1670w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8486-1-scaled-e1633296413122-300x298.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8486-1-scaled-e1633296413122-1024x1016.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8486-1-scaled-e1633296413122-150x150.jpg 150w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8486-1-scaled-e1633296413122-768x762.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8486-1-scaled-e1633296413122-1536x1524.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8486-1-scaled-e1633296413122-88x88.jpg 88w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8486-1-scaled-e1633296413122-973x965.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8486-1-scaled-e1633296413122-508x504.jpg 508w\" sizes=\"(max-width: 1670px) 100vw, 1670px\" \/><p id=\"caption-attachment-13913\" class=\"wp-caption-text\">Shown is the Stepper Motor Driver. This provides the &#8220;brains&#8221; of the stepper, controlling direction, rotation angle and speed the motor rotates at.<\/p><\/div>\n<div id=\"attachment_13915\" style=\"width: 2570px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-13915\" loading=\"lazy\" class=\"wp-image-13915 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8489-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1707\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8489-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8489-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8489-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8489-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8489-1536x1024.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8489-2048x1365.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8489-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8489-508x339.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-13915\" class=\"wp-caption-text\">The Stepper Motor is attached to a rack and pinion system that slides back and forth depending on how strong the magnetic field is. The system slides on a piece of acrylic to reduce the kinetic friction between the 3-D printed material and the cardboard surface.<\/p><\/div>\n<div id=\"attachment_13916\" style=\"width: 2570px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-13916\" loading=\"lazy\" class=\"wp-image-13916 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8485-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1707\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8485-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8485-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8485-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8485-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8485-1536x1024.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8485-2048x1365.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8485-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8485-508x339.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-13916\" class=\"wp-caption-text\">The Ultrasonic Ranger detects how far the rack is using sonar, and sends the signal back to the Arduino. The ranger is soldered to a soldering board with a screw terminal soldered on behind it, making it easy to connect wires since they don&#8217;t move around as our transducer is at work.<\/p><\/div>\n<div id=\"attachment_13918\" style=\"width: 1475px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-13918\" loading=\"lazy\" class=\"wp-image-13918 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8487-scaled-e1633297617331.jpg\" alt=\"\" width=\"1465\" height=\"1382\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8487-scaled-e1633297617331.jpg 1465w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8487-scaled-e1633297617331-300x283.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8487-scaled-e1633297617331-1024x966.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8487-scaled-e1633297617331-768x724.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8487-scaled-e1633297617331-973x918.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8487-scaled-e1633297617331-508x479.jpg 508w\" sizes=\"(max-width: 1465px) 100vw, 1465px\" \/><p id=\"caption-attachment-13918\" class=\"wp-caption-text\">The Arduino maps the distance measurement to an angle and instructs the Servo Motor to rotate to the specific angle accordingly.<\/p><\/div>\n<div id=\"attachment_13919\" style=\"width: 1885px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-13919\" loading=\"lazy\" class=\"wp-image-13919 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8488-scaled-e1633297641102.jpg\" alt=\"\" width=\"1875\" height=\"1561\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8488-scaled-e1633297641102.jpg 1875w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8488-scaled-e1633297641102-300x250.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8488-scaled-e1633297641102-1024x853.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8488-scaled-e1633297641102-768x639.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8488-scaled-e1633297641102-1536x1279.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8488-scaled-e1633297641102-973x810.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_8488-scaled-e1633297641102-508x423.jpg 508w\" sizes=\"(max-width: 1875px) 100vw, 1875px\" \/><p id=\"caption-attachment-13919\" class=\"wp-caption-text\">The rotation of the Servo Motor reveals a part of the color gradient as it rotates. This color output is then read by the next group&#8217;s transducer.<\/p><\/div>\n<ol>\n<li style=\"list-style-type: none\"><\/li>\n<\/ol>\n<blockquote>\n<blockquote>\n<blockquote>\n<h2>Project Video<\/h2>\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-13860-1\" width=\"620\" height=\"1102\" loop=\"1\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_0113.MOV-1.mp4?_=1\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_0113.MOV-1.mp4\">https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_0113.MOV-1.mp4<\/a><\/video><\/div><\/blockquote>\n<\/blockquote>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<h2><strong>Project Description<\/strong><\/h2>\n<p>We wanted to take input from the forces produced by a magnet, and give that information to a rotating motor. Then, the motor would rotate a gear, which would move a horizontal block with ridges that fit into the gear. We then sensed the position of the horizontal block, and then gave that information to another rotating motor. This second rotating motor was attached to a curved piece of paper, which had a range of colors on it. Our final output was the outward-facing color on the paper. All the information about positions and level of magnetic strength were printed as numbers on a screen for the viewer to see.<\/p>\n<h2>Progress Pictures<\/h2>\n<div id=\"attachment_13924\" style=\"width: 1866px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-13924\" loading=\"lazy\" class=\"wp-image-13924 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/65336895264__616146BA-0DCC-4A5C-9030-DB6D71EFB796-scaled-e1633299195224.jpg\" alt=\"\" width=\"1856\" height=\"1158\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/65336895264__616146BA-0DCC-4A5C-9030-DB6D71EFB796-scaled-e1633299195224.jpg 1856w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/65336895264__616146BA-0DCC-4A5C-9030-DB6D71EFB796-scaled-e1633299195224-300x187.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/65336895264__616146BA-0DCC-4A5C-9030-DB6D71EFB796-scaled-e1633299195224-1024x639.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/65336895264__616146BA-0DCC-4A5C-9030-DB6D71EFB796-scaled-e1633299195224-768x479.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/65336895264__616146BA-0DCC-4A5C-9030-DB6D71EFB796-scaled-e1633299195224-1536x958.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/65336895264__616146BA-0DCC-4A5C-9030-DB6D71EFB796-scaled-e1633299195224-973x607.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/65336895264__616146BA-0DCC-4A5C-9030-DB6D71EFB796-scaled-e1633299195224-508x317.jpg 508w\" sizes=\"(max-width: 1856px) 100vw, 1856px\" \/><p id=\"caption-attachment-13924\" class=\"wp-caption-text\">We used SolidWorks to model a rack and pinion we could 3-D print. The assembly was designed to move 1 cm for each 1\/10th rotation of the motor, meaning the teeth on the rack are spread apart by 1 cm, the same measuring resolution as the ranger.<\/p><\/div>\n<div id=\"attachment_13891\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-13891\" loading=\"lazy\" class=\"wp-image-13891 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210917_163449681-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210917_163449681-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210917_163449681-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210917_163449681-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210917_163449681-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210917_163449681-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210917_163449681-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210917_163449681-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-13891\" class=\"wp-caption-text\">We utilized the IDEATE skylab to 3-D print the parts we needed for our project in a timely fashion.<\/p><\/div>\n<div id=\"attachment_13892\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-13892\" loading=\"lazy\" class=\"size-full wp-image-13892\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210916_135421425-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210916_135421425-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210916_135421425-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210916_135421425-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210916_135421425-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210916_135421425-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210916_135421425-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/PXL_20210916_135421425-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-13892\" class=\"wp-caption-text\">process stepper wiring, was wired to smaller motor so we had to redo<\/p><\/div>\n<div id=\"attachment_13925\" style=\"width: 2570px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-13925\" loading=\"lazy\" class=\"size-full wp-image-13925\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_0085-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1920\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_0085-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_0085-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_0085-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_0085-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_0085-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_0085-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_0085-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/IMG_0085-508x381.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-13925\" class=\"wp-caption-text\">We created the printed color using a semi-cylinder with a color gradient surface. We used a popsicle stick as the axel so we could easily incorporate the servo motor into our design. We changed to a gradient from a rainbow pattern to allow us to print any hue value that the magnetic field strength is mapped to.<\/p><\/div>\n<h2><strong>Discussion:<\/strong><\/h2>\n<p>We both learned a lot from this process. We enjoyed teaming up together because we were equally invested in the success of the project, and because both had (semi-overlapping but still) different areas of technical expertise, which allowed us to synthesize knowledge from our respective fields. For example, Matthew is a Mechanical Engineering major and really good at CAD, so we were able to make quality, physical mechanisms within our middle step via our rack and pinion. Shenai is an Electrical and Computer Engineering major and she tackled a lot of the wiring and programming challenges.<\/p>\n<p>Comments from Shenai: I enjoyed the team aspect of this project, as well as the hands-on quality of the work, which was something I had been lacking in my other classes. I also felt that I grew as a debugger, both in code and circuitry. It was really satisfying when I spotted that Matt&#8217;s stepper motor wasn&#8217;t properly grounded, and was able to fix it quickly. Another super satisfying moment was when I combined our separate code into a single file, very quickly checked for timing issues\/duplicated pins and variables, and it compiled and ran perfectly on the first try.<\/p>\n<p>However, we had a terrible time with the stepper motor. We had to go through 3 different chips and 2 motors, and we had to discard our custom-made 3-D print that housed the smaller motor because the smaller motor wouldn&#8217;t work properly with any of the chips. The 3-D print made us want to hang onto the smaller motor because we had already put so much time into setting up our machine specifically for it, but finally we ended up pivoting to the more powerful and reliable motor. I think if we had been more willing to pivot entirely instead of changing little things to fit our past decisions, we would have breezed through this process faster. Although, I will say, I got really fast at unwiring and rewiring various stepper motors and their drivers, so this iterative process was helpful for my technical growth in that respect.<\/p>\n<p>Comments from Matthew: It was very exciting to have the opportunity to apply my knowledge of mechanical systems and CAD into this project. Despite having to change which stepper motor we used, the parts I created for the project all worked without the need for iterative design and further prototypes. This saved the course budget some money as we didn&#8217;t have to keep printing and printing more materials. Together, we were able to synthesize electrical and mechanical design in an effective and creative way to produce a successful end result. In addition to applying my Mechanical Engineering skills, I was able to learn a lot on the electrical side as well. I was able to brush up my coding skills in Arduino, become familiar with different electrical connections and sensors (magnetometer, ultrasonic ranger, stepper and servo motors, etc), and I even got to learn how to strip and solder wires for the first time. I feel that the acquisition of these new skills will help me grow as an engineer and will allow me to be more versatile in upcoming projects.<\/p>\n<h2>Functional Block Diagram<\/h2>\n<div id=\"attachment_13927\" style=\"width: 1508px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-13927\" loading=\"lazy\" class=\"size-full wp-image-13927\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/block-diagram-2.png\" alt=\"\" width=\"1498\" height=\"639\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/block-diagram-2.png 1498w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/block-diagram-2-300x128.png 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/block-diagram-2-1024x437.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/block-diagram-2-768x328.png 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/block-diagram-2-973x415.png 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/block-diagram-2-508x217.png 508w\" sizes=\"(max-width: 1498px) 100vw, 1498px\" \/><p id=\"caption-attachment-13927\" class=\"wp-caption-text\">Functional Block Diagram of our Project using diagrams.net<\/p><\/div>\n<h2>Electric Schematic<\/h2>\n<div id=\"attachment_14132\" style=\"width: 1716px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14132\" loading=\"lazy\" class=\"wp-image-14132 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-05-at-9.05.46-AM.png\" alt=\"\" width=\"1706\" height=\"934\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-05-at-9.05.46-AM.png 1706w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-05-at-9.05.46-AM-300x164.png 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-05-at-9.05.46-AM-1024x561.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-05-at-9.05.46-AM-768x420.png 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-05-at-9.05.46-AM-1536x841.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-05-at-9.05.46-AM-973x533.png 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-05-at-9.05.46-AM-508x278.png 508w\" sizes=\"(max-width: 1706px) 100vw, 1706px\" \/><p id=\"caption-attachment-14132\" class=\"wp-caption-text\">Electric Schematic for our project. We had access to a more simple LCD Display which allowed us to use SDA and SCL pins for both the magnetometer and the LCD display.<\/p><\/div>\n<p><strong>Code:<\/strong><\/p>\n<blockquote>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"c\">\/*\r\n * Magentic Field to Color Gradient Double Transducer\r\n * \r\n * By: Matt Wagner and Shenai Chan\r\n * \r\n * Desc: Takes in a reading of magnetic field strength, \r\n * converts it to rotational position on stepper motor, \r\n * uses Ultrasonic Ranger to sense the position of a \r\n * rack driver by the motor, feeds that information\r\n * to rotational position on a servo motor with substantial\r\n * delay to allow for proper reading of the servo position.\r\n * Sends input\/output\/intermediate information to an LCD display.\r\n * \r\n * Pin mapping table:\r\n * SDA &amp; SCL connected to both LCD and 3-axis magnetometer\r\n * 6  &lt;-&gt; servo \r\n * 8  &lt;-&gt; dir on stepper motor\r\n * 9  &lt;-&gt; step on stepper motor\r\n * 11 &lt;-&gt; echo on ultrasonic ranger\r\n * 12 &lt;-&gt; trig on uultrasonic ranger\r\n * \r\n * Credit:\r\n * Referenced starter code by Robert Zacharias on timing signal sends;\r\n * instantiating USR, LCD, and servo; and writing to LCD.\r\n * \r\n * https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/tutorials\/code-bites\r\n * https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/tutorials\/I2C-lcd\r\n * \r\n * Referenced docs from Patrick Wasp's AccelStepper lib &amp; \r\n * MPrograms' compass lib\r\n *\/\r\n\r\n\/* First, import some libraries: *\/\r\n\r\n\/\/ I2C Library\r\n#include &lt;Wire.h&gt;\r\n\/\/ For the 3-axis magnetometer\r\n#include &lt;QMC5883LCompass.h&gt;\r\n\/\/ For the stepper motor\r\n#include &lt;AccelStepper.h&gt;\r\n\/\/ For the ultrasonic ranger\r\n#include &lt;NewPing.h&gt;\r\n\/\/ For the Servo Motor\r\n#include &lt;Servo.h&gt;\r\n\/\/ For the LCD display\r\n#include &lt;LiquidCrystal_I2C.h&gt;\r\n\r\n\/* Then, instantiate objects that correlate to wired devices *\/\r\n\r\n\/\/ Make LCD obj\r\nLiquidCrystal_I2C screen(0x27, 16, 2);\r\nint iVal;\r\nint mVal1;\r\nint mVal2;\r\nint oVal;\r\n\r\n\/\/ Make magnetometer obj\r\nQMC5883LCompass compass;\r\n\r\n\/\/ Make stepper obj, as well as corresponding variables for waits\r\n\/\/ between writes, and keeping track of current position\r\n#define dirPin 8\r\n#define stepPin 9\r\n#define motorInterfaceType 1\r\nconst int wait = 1000;\r\nlong timer = 0;\r\nAccelStepper stepper = AccelStepper(motorInterfaceType, stepPin, dirPin);\r\nint currentPos;\r\n\r\n\/\/ Make USR obj\r\n#define TRIGGER_PIN  12  \r\n#define ECHO_PIN     11  \r\n#define MAX_DISTANCE 200 \r\nNewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); \r\n\r\n\/\/ Make servo obj\r\nServo gaugeMotor;\r\nconst int GAUGEMOTORPIN = 6;\r\nconst unsigned long DISPUPDATETIME = 500;\r\nconst unsigned long TIMEBETWEENREADS = 3000;\r\nunsigned long lastMove = millis();\r\nunsigned long lastUpdate = millis();\r\n\r\nvoid setup() {\r\n  \/\/ Initialize the serial port\r\n  Serial.begin(9600);\r\n  \/\/ Initialize I2C\r\n  Wire.begin();\r\n  \r\n  \/\/ Initialize the servo motor\r\n  gaugeMotor.attach(GAUGEMOTORPIN);\r\n  \r\n  \r\n  \/\/ Initialize the magnetometer\r\n  compass.init();\r\n  \r\n  \/\/ Initialize the stepper motor\r\n  stepper.setCurrentPosition(0);\r\n  stepper.setMaxSpeed(500);\r\n\r\n  \/\/ Initialize the LCD \r\n  screen.init();\r\n  \/\/ turn on the backlight to start\r\n  screen.backlight();\r\n  \/\/ set cursor to home position, i.e. the upper left corner\r\n  screen.home();\r\n}\r\n\r\nvoid loop() {\r\n  \/\/ read ultrasonic ranger\r\n  int currDist = sonar.ping_cm ();\r\n  mVal2 = currDist;\r\n  Serial.print(\"Ping: \");\r\n  Serial.print(currDist); \/\/ Send ping, get distance in cm and print result (0 = outside set distance range)\r\n  Serial.println(\"cm\");\r\n\r\n  \/\/ map range distance to degree range 15 to 165 degrees\r\n  int mappedAngle = map(currDist, 3, 11, 15, 165);\r\n  oVal = mappedAngle;\r\n\r\n  \/\/ write to LCD with appropriate timing\r\n  if (millis() - lastUpdate &gt;= DISPUPDATETIME){\r\n    screen.clear();\r\n    screen.print(\"i:\");\r\n    screen.print(iVal);\r\n    screen.setCursor(5, 0);\r\n    screen.print(\"m:\");\r\n    screen.print(mVal1);\r\n    screen.setCursor(7, 1);\r\n    screen.print(mVal2);\r\n    screen.setCursor(11, 1);\r\n    screen.print(\"o:\");\r\n    screen.print(oVal);\r\n    screen.home();\r\n\r\n    lastUpdate = millis();\r\n  }\r\n\r\n  \/\/ write to servo with appropriate timing\r\n  if (millis() - lastMove &gt;= TIMEBETWEENREADS){\r\n    \/\/ move motor\r\n    if (mappedAngle &gt;= 15 &amp;&amp; mappedAngle &lt;= 165){\r\n      gaugeMotor.write(mappedAngle);\r\n      lastMove = millis();\r\n    }\r\n  }\r\n\r\n  \/\/ read from magnetometer and write to stepper with appropriate timing\r\n  if ((millis() - timer) &gt;= wait) {\r\n    \r\n    if (stepper.distanceToGo() == 0) {\r\n      Serial.println(\"in if statement\");\r\n      \r\n      int z;\r\n      compass.read();\r\n      z = compass.getZ();\r\n      iVal = map(z, 0, 37000, 0, 99);\r\n\r\n      Serial.println(z);\r\n\r\n      int loc = map(z, 0, 37000, 0, -200);\r\n      if (0 &lt;= z &amp;&amp; z &lt;= 37000) {\r\n        if (0 &gt;= loc &amp;&amp; loc &gt; -50) {\r\n           stepper.moveTo(0);\r\n        }\r\n        else if (-50 &gt;= loc &amp;&amp; loc &gt; -100) {\r\n           stepper.moveTo(-50);\r\n        }\r\n        else if (-100 &gt;= loc &amp;&amp; loc &gt; -150) {\r\n           stepper.moveTo(-100);\r\n        }\r\n        else if (-150 &gt;= loc &amp;&amp; loc &gt;= -200) {\r\n           stepper.moveTo(-150);\r\n        }\r\n        Serial.println(loc);\r\n        stepper.setMaxSpeed(25);\r\n        stepper.setAcceleration(25);\r\n        timer = millis();\r\n        mVal1 = map(z, 0, 37000, 0, 99);\r\n      }\r\n    }\r\n  }\r\n  stepper.run();\r\n}<\/pre>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Our project was to create a double Tansducer that converted a magnetic field strength to a printed color output. To accomplish this, we chose two middle steps to&#8230;<\/p>\n","protected":false},"author":196,"featured_media":13904,"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\/f2021\/work\/wp-json\/wp\/v2\/posts\/13860"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/users\/196"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/comments?post=13860"}],"version-history":[{"count":17,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/posts\/13860\/revisions"}],"predecessor-version":[{"id":14133,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/posts\/13860\/revisions\/14133"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/media\/13904"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/media?parent=13860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/categories?post=13860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/tags?post=13860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}