{"id":57411,"date":"2019-03-17T14:47:50","date_gmt":"2019-03-17T08:47:50","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=57411"},"modified":"2022-01-10T20:30:08","modified_gmt":"2022-01-10T14:30:08","slug":"acs712-%d0%b4%d0%b0%d1%82%d1%87%d0%b8%d0%ba-%d1%82%d0%be%d0%ba%d0%b0-arduino","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=57411","title":{"rendered":"ACS712 &#8212; \u0434\u0430\u0442\u0447\u0438\u043a \u0442\u043e\u043a\u0430 (Arduino)"},"content":{"rendered":"<div id=\"attachment_57412\" style=\"width: 143px\" class=\"wp-caption alignright\"><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/653656857213.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-57412\" class=\"wp-image-57412\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/653656857213.png\" alt=\"\" width=\"133\" height=\"125\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/653656857213.png 413w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/653656857213-200x188.png 200w\" sizes=\"auto, (max-width: 133px) 100vw, 133px\" \/><\/a><p id=\"caption-attachment-57412\" class=\"wp-caption-text\">\u041c\u043e\u0434\u0443\u043b\u044c ACS712<\/p><\/div>\n<p>\u0414\u0430\u0442\u0447\u0438\u043a ACS712 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u043a, \u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e (\u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 1,5%), \u0442\u0430\u043a \u0436\u0435 \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0430\u0442\u0447\u0438\u043a\u0435 \u0442\u043e\u043a\u0430 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u043a\u043e\u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0449\u0435\u0439 \u0446\u0435\u043f\u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 1,2 \u043c\u041e\u043c.<\/p>\n<p>\u0414\u0430\u0442\u0447\u0438\u043a \u0442\u043e\u043a\u0430 ACS712 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u044b \u0432 \u00b15, \u00b110 \u0438 \u00b130 \u0410, \u0441 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e 185 \u043c\u0412\/\u0410, 100 \u043c\u0412\/\u0410 \u0438 66 \u043c\u0412\/\u0410 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0430 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 ACS712 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0438\u043d\u0438\u0430\u0442\u044e\u0440\u043d\u043e\u043c 8-\u0432\u044b\u0432\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0440\u043f\u0443\u0441\u0435 SOIC \u0434\u043b\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e\u0433\u043e \u043c\u043e\u043d\u0442\u0430\u0436\u0430. \u0422\u0430\u043a \u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438.<\/p>\n<div id=\"marketWidget\"><\/div>\n<p>\u0414\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u0440\u044b\u0432 \u0446\u0435\u043f\u0438 \u043c\u0435\u0436\u0434\u0443 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439.<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/6152366213868231.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-57413\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/6152366213868231.png\" alt=\"\" width=\"308\" height=\"273\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/6152366213868231.png 403w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/6152366213868231-200x177.png 200w\" sizes=\"auto, (max-width: 308px) 100vw, 308px\" \/><\/a><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0443 ACS712 \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044f, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f:<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/34275972349.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-57414\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/34275972349.png\" alt=\"\" width=\"414\" height=\"312\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/34275972349.png 414w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/34275972349-200x151.png 200w\" sizes=\"auto, (max-width: 414px) 100vw, 414px\" \/><\/a><\/p>\n<p>\u0414\u0430\u0442\u0447\u0438\u043a \u0442\u043e\u043a\u0430 ACS712 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0425\u043e\u043b\u043b\u0430 \u0438 \u043c\u0435\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u043d\u0438\u043a\u0430. \u041f\u0440\u043e\u0442\u0435\u043a\u0430\u044e\u0449\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0434\u043d\u044b\u0439 \u043f\u0440\u043e\u0432\u043e\u0434\u043d\u0438\u043a \u0442\u043e\u043a \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043c\u0430\u0433\u043d\u0438\u0442\u043d\u043e\u0435 \u043f\u043e\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0425\u043e\u043b\u043b\u0430. \u041c\u0430\u0433\u043d\u0438\u0442\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0438\u043b\u044b \u0442\u043e\u043a\u0430. \u0414\u0430\u0442\u0447\u0438\u043a \u0442\u043e\u043a\u0430 ACS712 \u0438\u043c\u0435\u0435\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u043c\u043e\u0433\u043e \u0442\u043e\u043a\u0430 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f.\u00a0 \u041f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0442\u043e\u043a\u0430 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u044f.<\/p>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Arduino Uno (Nano) \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0443\u0441\u0442-\u0432\u043e \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0430 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044f\u00a0 ACS712. \u041a\u0430\u043a \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0440\u0430\u043d\u0435\u0435, \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u0437\u043d\u0443\u044e \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u0430 \u0434\u0430\u0442\u0447\u0438\u043a\u0430, \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0442\u043e\u043a\u0430 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u044f. \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043a\u0435\u0442\u0447\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 <a href=\"https:\/\/github.com\/muratdemirtas\/ACS712-arduino-1.git\">https:\/\/github.com\/muratdemirtas\/ACS712-arduino-1.git<\/a> , \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0442\u0447\u0438\u043a\u0438 \u0432\u0441\u0435\u0445 \u0442\u0440\u0435\u0445 \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0432 (5, 10, 30 \u0410), \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0430.<\/p>\n<blockquote>\n<p style=\"text-align: center;\"><strong>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 &#8212; <a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/ACS712.zip\">ACS712.zip<\/a><\/strong><\/p>\n<\/blockquote>\n<p style=\"text-align: center;\">\u041d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043a\u0435\u0442\u0447\u0430 \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0430 \u0434\u043b\u044f <span style=\"color: #000000;\">\u0434\u0430\u0442\u0447\u0438\u043a\u0430 <span style=\"font-style: italic;\">ACS712_05B \u043d\u0430 5\u0410<\/span><\/span><\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 11px;\"><span style=\"color: #808080; font-style: italic;\">#include &lt;ACS712.h&gt;<\/span>\r\n\u00a0\r\nACS712 sensor<span style=\"color: #66cc66;\">(<\/span>ACS712_05B, A0<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0442\u0438\u043f \u0434\u0430\u0442\u0447\u0438\u043a\u0430 ACS712_05B, ACS712_20A, ACS712_30A \/\/ 5A, 10A, 30A \/ \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u0445\u043e\u0434 \u04100<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  sensor.<span style=\"color: #006600;\">calibrate<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  float i = sensor.<span style=\"color: #006600;\">getCurrentDC<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/span>\r\n  Serial.<span style=\"color: #0066cc;\">print<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"I = \"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  Serial.<span style=\"color: #0066cc;\">print<\/span><span style=\"color: #66cc66;\">(<\/span>i<span style=\"color: #66cc66;\">)<\/span>;\r\n  Serial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\" A\"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">1000<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n<\/pre>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2019-03-17-132814.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-57417\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2019-03-17-132814.png\" alt=\"\" width=\"431\" height=\"371\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2019-03-17-132814.png 431w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2019-03-17-132814-200x172.png 200w\" sizes=\"auto, (max-width: 431px) 100vw, 431px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">\u0414\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u043a\u0435\u0442\u0447:<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 11px;\"><span style=\"color: #808080; font-style: italic;\">#include &lt;ACS712.h&gt;<\/span>\r\n\u00a0\r\nACS712 sensor<span style=\"color: #66cc66;\">(<\/span>ACS712_05B, A0<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ ACS712_05B, ACS712_20A, ACS712_30A \/\/ 5A, 10A, 30A \/ \u04100<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  sensor.<span style=\"color: #006600;\">calibrate<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  float i = sensor.<span style=\"color: #006600;\">getCurrentAC<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u043d\u0430 \u0447\u0430\u0441\u0442\u043e\u0442\u0435 50 \u0413\u0446(\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e)<\/span>\r\n  <span style=\"color: #808080; font-style: italic;\">\/\/ float i = sensor.getCurrentAC(1000); \/\/ \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u043d\u0430 \u0447\u0430\u0441\u0442\u043e\u0442\u0435 1000 \u0413\u0446(\u0434\u043e 50000 \u0413\u0446)<\/span>\r\n  Serial.<span style=\"color: #0066cc;\">print<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"I = \"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  Serial.<span style=\"color: #0066cc;\">print<\/span><span style=\"color: #66cc66;\">(<\/span>i<span style=\"color: #66cc66;\">)<\/span>;\r\n  Serial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\" A\"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">1000<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span><\/pre>\n<p style=\"text-align: center;\">\u0422\u0430\u043a\u0436\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0442\u043e\u043a\u0430 ACS712 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0412\u0430\u0442\u0442\u043c\u0435\u0442\u0440:<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 11px;\"><span style=\"color: #808080; font-style: italic;\">#include &lt;ACS712.h&gt;<\/span>\r\n\u00a0\r\nACS712 sensor<span style=\"color: #66cc66;\">(<\/span>ACS712_05B, A0<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ ACS712_05B, ACS712_20A, ACS712_30A \/\/ 5A, 10A, 30A \/ \u04100<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  sensor.<span style=\"color: #006600;\">calibrate<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  float u = <span style=\"color: #cc66cc;\">230<\/span>;\r\n  float i = sensor.<span style=\"color: #006600;\">getCurrentAC<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u043d\u0430 \u0447\u0430\u0441\u0442\u043e\u0442\u0435 50 \u0413\u0446(\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e)<\/span>\r\n  float p = u <span style=\"color: #66cc66;\">*<\/span> i;\r\n  Serial.<span style=\"color: #0066cc;\">print<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"P = \"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  Serial.<span style=\"color: #0066cc;\">print<\/span><span style=\"color: #66cc66;\">(<\/span>p<span style=\"color: #66cc66;\">)<\/span>;\r\n  Serial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\" Watt\"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">1000<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span><\/pre>\n<blockquote>\n<p style=\"text-align: center;\"><strong><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/03\/ACS712.pdf\">ACS712<\/a>.pdf<\/strong><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u0430\u0442\u0447\u0438\u043a ACS712 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u043a, \u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e (\u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 1,5%), \u0442\u0430\u043a \u0436\u0435 \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0430\u0442\u0447\u0438\u043a\u0435 \u0442\u043e\u043a\u0430 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u043a\u043e\u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0449\u0435\u0439 \u0446\u0435\u043f\u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 1,2 \u043c\u041e\u043c. \u0414\u0430\u0442\u0447\u0438\u043a \u0442\u043e\u043a\u0430 ACS712 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u044b \u0432 \u00b15, \u00b110 \u0438 \u00b130 \u0410, \u0441 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e 185 \u043c\u0412\/\u0410, 100 \u043c\u0412\/\u0410 \u0438 66 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":57412,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239,15],"tags":[],"class_list":["post-57411","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-15"],"views":14379,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/57411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=57411"}],"version-history":[{"count":7,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/57411\/revisions"}],"predecessor-version":[{"id":111401,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/57411\/revisions\/111401"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/57412"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=57411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=57411"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=57411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}