{"id":535,"date":"2025-02-12T11:29:08","date_gmt":"2025-02-12T03:29:08","guid":{"rendered":"https:\/\/code.xedulab.com\/?p=535"},"modified":"2025-03-31T13:44:54","modified_gmt":"2025-03-31T05:44:54","slug":"automatic-fan","status":"publish","type":"post","link":"https:\/\/code.xedulab.com\/index.php\/2025\/02\/12\/automatic-fan\/","title":{"rendered":"Automatic Fan"},"content":{"rendered":"<button class=\"simplefavorite-button has-count preset\" data-postid=\"535\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none;background-color:#ffffff;border-color:#ffffff;color:#686868;\"><i class=\"sf-icon-favorite\" style=\"color:#686868;\"><\/i>\u6536\u85cf<span class=\"simplefavorite-button-count\" style=\"\">0<\/span><\/button>\n<p>1.Teaching objectives (knowledge preparation)<\/p>\n\n\n\n<p>Get to know rotary potentiometers and motors, and understand their specifications and parameters.<\/p>\n\n\n\n<p>Implement fan rotation through programming and understand the control logic of motor speed using a rotary potentiometer.<\/p>\n\n\n\n<p>Being able to combine real-life application scenarios and apply project devices to achieve intelligent application scenarios in daily life.<\/p>\n\n\n\n<p>2.Teaching tasks<\/p>\n\n\n\n<p>Build an automatic fan with manually adjustable fan speed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"850\" height=\"316\" src=\"https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-54.png\" alt=\"\" class=\"wp-image-3003\" srcset=\"https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-54.png 850w, https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-54-300x112.png 300w, https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-54-768x286.png 768w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><\/figure>\n\n\n\n<p>3\uff0cPreparation of teaching environment and equipment<\/p>\n\n\n\n<p>Equipment List: Image (with label number 123456)<\/p>\n\n\n\n<p><strong>Equipment Serial Number Table<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Serial number<\/td><td>number<\/td><td>equipment<\/td><td>Specifications<\/td><td>quantity<\/td><\/tr><tr><td>1<\/td><td>&nbsp;<\/td><td>rotary potentiometer<\/td><td>&nbsp;<\/td><td>1<\/td><\/tr><tr><td>2<\/td><td>&nbsp;<\/td><td>motor.<\/td><td>&nbsp;<\/td><td>1<\/td><\/tr><tr><td>&nbsp;<\/td><td>&nbsp;<\/td><td>&nbsp;<\/td><td>&nbsp;<\/td><td>1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Software: <\/strong>Smart Code programming software.<strong><\/strong><\/p>\n\n\n\n<p><strong>Hardware:<\/strong> SMART Code kit: rotary potentiometer, motor.<strong><\/strong><\/p>\n\n\n\n<p><strong>Other: <\/strong>Several building block devices.<strong><\/strong><\/p>\n\n\n\n<p><strong>Detailed List of Structural Components<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Serial number<\/td><td>number<\/td><td>equipment<\/td><td>Specifications<\/td><td>quantity<\/td><\/tr><tr><td>1<\/td><td>&nbsp;<\/td><td>3-hole beam<\/td><td>&nbsp;<\/td><td>12<\/td><\/tr><tr><td>2<\/td><td>&nbsp;<\/td><td>7-hole beam<\/td><td>&nbsp;<\/td><td>4<\/td><\/tr><tr><td>3<\/td><td>&nbsp;<\/td><td>13-hole beam<\/td><td>&nbsp;<\/td><td>4<\/td><\/tr><tr><td>4<\/td><td>&nbsp;<\/td><td>T-shaped beam<\/td><td>&nbsp;<\/td><td>4<\/td><\/tr><tr><td>5<\/td><td>&nbsp;<\/td><td>Black sales<\/td><td>&nbsp;<\/td><td>36<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Note: Materials required to fix a set of sensors: 6 3-hole beams, 2 7-hole beams, 2 13 hole beams, 2 T-shaped beams, and 18 black pins.<\/p>\n\n\n\n<p>4.Project Practice Process<\/p>\n\n\n\n<p>(Summary of Knowledge Points: 1. Components. 2. Program Modules. 3. Program Design)<\/p>\n\n\n\n<p>1.<strong>Project video (in video format)<\/strong><\/p>\n\n\n\n<p>2.<strong>Project Steps<\/strong><\/p>\n\n\n\n<p>Assemble the automatic fan using a rotary potentiometer and motor. The fan switch and fan speed are controlled by the value of the rotary potentiometer.<\/p>\n\n\n\n<p>Use SMART Code software to program and control devices.<\/p>\n\n\n\n<p>Firstly, create the main program entrance. The example code is as follows:<\/p>\n\n\n\n<p>Then, create a variable value to store the value of the rotary potentiometer. The example code is as follows:<\/p>\n\n\n\n<p>Then, based on the value of the rotary potentiometer, determine the switch of the motor. When the value is less than 10, control the motor to stop rotating. The example code is as follows:<\/p>\n\n\n\n<p>Then, after the motor rotates, control the motor rotation speed based on the value of the rotary potentiometer. The example code is as follows:<\/p>\n\n\n\n<p>Then, divide the values of the rotary potentiometer into two gears, low speed and tell the corresponding values of the rotary potentiometer to be 10-55 and 55-100, and continue to rotate for 3 seconds. The example code is as follows:<\/p>\n\n\n\n<p>Then, based on the value of the rotary potentiometer, the motor speed control is completed. When the value of the rotary potentiometer is greater than or equal to 10 and less than 55, the motor turns forward at a speed of 20. When the value of the rotary potentiometer is greater than or equal to 55, the motor turns forward at a speed of 100. The example code is as follows:<\/p>\n\n\n\n<p>Finally, complete the entire logic of the automatic fan. The example code is as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"591\" height=\"456\" src=\"https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-55.png\" alt=\"\" class=\"wp-image-3005\" srcset=\"https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-55.png 591w, https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-55-300x231.png 300w\" sizes=\"(max-width: 591px) 100vw, 591px\" \/><\/figure>\n\n\n\n<p>3.Optimization and improvement plan.<\/p>\n\n\n\n<p>4.Interesting thinking:<\/p>\n\n\n\n<p>3.<strong>Reflection and discussion: What factors affect the accuracy of decibel measuring instruments?<\/strong><\/p>\n\n\n\n<p>Experimental results<\/p>\n\n\n\n<p>Data records: Table 1 and Table 2<\/p>\n\n\n\n<p>Experimental conclusion:<\/p>\n\n\n\n<p>5.Extension and Expansion<\/p>\n\n\n\n<p>Reflection and exploration:<\/p>\n\n\n\n<p>Question 1:<\/p>\n\n\n\n<p>Question 2:<\/p>\n<button class=\"simplefavorite-button has-count preset\" data-postid=\"535\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none;background-color:#ffffff;border-color:#ffffff;color:#686868;\"><i class=\"sf-icon-favorite\" style=\"color:#686868;\"><\/i>\u6536\u85cf<span class=\"simplefavorite-button-count\" style=\"\">0<\/span><\/button>","protected":false},"excerpt":{"rendered":"<p>\u6536\u85cf0 1.Teaching objectives (knowledge preparation) Get t&#8230;<\/p>\n","protected":false},"author":16,"featured_media":3006,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[83,81],"tags":[],"class_list":["post-535","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-iot"],"_links":{"self":[{"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/posts\/535","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/comments?post=535"}],"version-history":[{"count":4,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/posts\/535\/revisions"}],"predecessor-version":[{"id":3018,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/posts\/535\/revisions\/3018"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/media\/3006"}],"wp:attachment":[{"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/media?parent=535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/categories?post=535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/tags?post=535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}