{"id":1105,"date":"2023-08-16T22:25:12","date_gmt":"2023-08-16T14:25:12","guid":{"rendered":"https:\/\/xujiwei.com\/blog\/?p=1105"},"modified":"2023-08-16T22:25:12","modified_gmt":"2023-08-16T14:25:12","slug":"using-ina219-with-arduino-to-measure-power","status":"publish","type":"post","link":"https:\/\/xujiwei.com\/blog\/2023\/08\/using-ina219-with-arduino-to-measure-power\/","title":{"rendered":"\u5728 Arduino \u4e2d\u4f7f\u7528 INA219 \u6d4b\u91cf\u7535\u8def\u4e2d\u7535\u538b\u3001\u7535\u6d41\u548c\u529f\u7387"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_65 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<p class=\"ez-toc-title\">\u6587\u7ae0\u76ee\u5f55<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69e15cad2cdfb\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69e15cad2cdfb\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/xujiwei.com\/blog\/2023\/08\/using-ina219-with-arduino-to-measure-power\/#%E5%8E%9F%E7%90%86%E5%9B%BE\" title=\"\u539f\u7406\u56fe\">\u539f\u7406\u56fe<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/xujiwei.com\/blog\/2023\/08\/using-ina219-with-arduino-to-measure-power\/#%E5%9C%A8_Arduino_%E4%B8%AD%E4%BD%BF%E7%94%A8\" title=\"\u5728 Arduino \u4e2d\u4f7f\u7528\">\u5728 Arduino \u4e2d\u4f7f\u7528<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/xujiwei.com\/blog\/2023\/08\/using-ina219-with-arduino-to-measure-power\/#%E8%AE%BE%E7%BD%AE%E5%A2%9E%E7%9B%8A\" title=\"\u8bbe\u7f6e\u589e\u76ca\">\u8bbe\u7f6e\u589e\u76ca<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/xujiwei.com\/blog\/2023\/08\/using-ina219-with-arduino-to-measure-power\/#%E4%BD%BF%E7%94%A8%E8%BD%AF%E4%BB%B6%E6%A8%A1%E6%8B%9F_I2C\" title=\"\u4f7f\u7528\u8f6f\u4ef6\u6a21\u62df I2C\">\u4f7f\u7528\u8f6f\u4ef6\u6a21\u62df I2C<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/xujiwei.com\/blog\/2023\/08\/using-ina219-with-arduino-to-measure-power\/#%E9%87%87%E6%A0%B7%E7%94%B5%E9%98%BB%E5%8F%91%E7%83%AD\" title=\"\u91c7\u6837\u7535\u963b\u53d1\u70ed\">\u91c7\u6837\u7535\u963b\u53d1\u70ed<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/xujiwei.com\/blog\/2023\/08\/using-ina219-with-arduino-to-measure-power\/#%E5%A2%9E%E5%8A%A0%E7%94%B5%E6%B5%81%E8%8C%83%E5%9B%B4\" title=\"\u589e\u52a0\u7535\u6d41\u8303\u56f4\">\u589e\u52a0\u7535\u6d41\u8303\u56f4<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/xujiwei.com\/blog\/2023\/08\/using-ina219-with-arduino-to-measure-power\/#%E6%80%BB%E7%BB%93\" title=\"\u603b\u7ed3\">\u603b\u7ed3<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/xujiwei.com\/blog\/2023\/08\/using-ina219-with-arduino-to-measure-power\/#%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99\" title=\"\u53c2\u8003\u8d44\u6599\">\u53c2\u8003\u8d44\u6599<\/a><\/li><\/ul><\/nav><\/div>\n<p>\u524d\u6bb5\u65f6\u95f4\u5728\u505a\u4e00\u4e2a DIY \u4ea7\u54c1\u7684\u65f6\u5019\uff0c\u4f1a\u9700\u8981\u6d4b\u91cf\u7535\u8def\u4e2d\u7535\u538b\u3001\u7535\u6d41\u548c\u529f\u7387\u7b49\u6570\u636e\uff0c\u5728\u627e\u4e86\u4e00\u4e9b\u82af\u7247\u5bf9\u6bd4\u540e\u6700\u7ec8\u9009\u62e9\u4e86\u5fb7\u5dde\u4eea\u5668\u7684 INA219 \u82af\u7247\uff0c\u521a\u597d\u4e4b\u524d\u4e5f\u4f7f\u7528\u8fc7 INA219 \u6a21\u5757\u505a\u4e86\u4e00\u4e2a<a href=\"https:\/\/xujiwei.com\/blog\/2022\/10\/build-power-meter-with-esphome-and-ina219\/\">\u7b80\u5355\u7684\u529f\u7387\u8ba1<\/a>\uff0c\u76f8\u5bf9\u8fd8\u7b97\u719f\u6089\u3002<\/p>\n<p>INA219 \u7684\u5b98\u65b9\u4ecb\u7ecd\u5982\u4e0b\uff1a<\/p>\n<blockquote>\n<p>INA219 \u662f\u4e00\u6b3e\u5177\u5907 I2C \u6216 SMBUS \u517c\u5bb9\u63a5\u53e3\u7684\u5206\u6d41\u5668 \u548c\u529f\u7387\u76d1\u6d4b\u8ba1\u3002\u8be5\u5668\u4ef6\u76d1\u6d4b\u5206\u6d41\u5668\u7535\u538b\u964d\u548c\u603b\u7ebf\u7535\u6e90\u7535 \u538b\uff0c\u8f6c\u6362\u6b21\u6570\u548c\u6ee4\u6ce2\u9009\u9879\u53ef\u901a\u8fc7\u7f16\u7a0b\u8bbe\u5b9a\u3002\u53ef\u7f16\u7a0b\u6821\u51c6 \u503c\u4e0e\u5185\u90e8\u4e58\u6cd5\u5668\u76f8\u7ed3\u5408\uff0c\u652f\u6301\u76f4\u63a5\u8bfb\u53d6\u7535\u6d41\u503c(\u5355\u4f4d: \u5b89\u57f9)\u3002\u901a\u8fc7\u9644\u52a0\u4e58\u6cd5\u5bc4\u5b58\u5668\u53ef\u8ba1\u7b97\u529f\u7387(\u5355\u4f4d: \u74e6)\u3002I2C \u6216 SMBUS \u517c\u5bb9\u63a5\u53e3 \u5177\u6709 16 \u4e2a\u53ef\u7f16\u7a0b\u5730 \u5740\u3002<\/p>\n<\/blockquote>\n<p>INA219 \u7684\u4f7f\u7528\u8fd8\u662f\u6bd4\u8f83\u7b80\u5355\u7684\uff0c\u76f4\u63a5\u901a\u8fc7 I2C \u603b\u7ebf\u5373\u53ef\u8bfb\u53d6\u6570\u636e\uff0c\u5e76\u4e14\u652f\u6301\u6700\u5927 26V \u6d4b\u91cf\u7535\u538b\uff0c12 \u4f4d\u7cbe\u5ea6\uff0c\u5728\u5927\u591a\u6570\u573a\u5408\u90fd\u6ee1\u8db3\u9700\u6c42\u4e86\u3002\u5728\u7acb\u521b\u5f00\u6e90\u5e73\u53f0\uff0c\u4e5f\u80fd\u770b\u5230\u5f88\u591a USB \u529f\u7387\u8ba1\u4e5f\u662f\u4f7f\u7528\u7684\u8fd9\u6b3e\u82af\u7247\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E5%8E%9F%E7%90%86%E5%9B%BE\"><\/span>\u539f\u7406\u56fe<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img src=\"https:\/\/xujiwei.com\/blog\/wp-content\/uploads\/2023\/08\/using-ina219-in-arduino-schematic.png\" alt=\"using-ina219-in-arduino-schematic\" style=\"zoom:50%;\" \/><\/p>\n<p>INA219 \u53ea\u9700\u8981\u5f88\u5c11\u7684\u5916\u56f4\u5143\u4ef6\u5373\u53ef\u5de5\u4f5c\uff0c\u7ed9\u7535\u6e90\u6dfb\u52a0\u4e00\u4e2a\u65c1\u8def\u7535\u5bb9\uff0c\u518d\u52a0\u4e0a\u4e00\u4e2a\u91c7\u6837\u7535\u963b\uff0c\u5373\u53ef\u5b8c\u6210\u3002<\/p>\n<p>A0\u3001A1 \u7528\u4e8e\u6307\u5b9a\u901a\u8fc7 I2C \u4e0e INA219 \u901a\u4fe1\u65f6\uff0cINA219 \u7684\u5730\u5740\uff0c\u5982\u679c\u7535\u8def\u4e2d\u53ea\u6709\u4e00\u4e2a INA219 \u82af\u7247\uff0c\u53ef\u4ee5\u76f4\u63a5\u5c06\u8fd9\u4e24\u4e2a\u5f15\u811a\u63a5\u5730\u5373\u53ef\u3002<\/p>\n<p>\u901a\u5e38 INA219 \u7528\u4e8e\u9ad8\u7aef\u91c7\u96c6\uff0c\u56e0\u6b64\u5728\u7535\u8def\u4e2d\uff0c\u4f1a\u5c06 INA219 \u7684 VIN+ \u8fde\u63a5\u5230\u88ab\u6d4b\u91cf\u7535\u6e90\u7684\u6b63\u6781\uff0cVIN- \u8fde\u63a5\u5230\u4f7f\u7528\u7535\u6e90\u7684\u7535\u8def\u7684\u8f93\u5165\u7aef\u3002<\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cINA219 \u4f7f\u7528\u5927\u5c0f\u4e3a 0.1ohm \u7684\u91c7\u6837\u7535\u963b\uff0c\u5f53\u7136\u5728\u5b9e\u9645\u4f7f\u7528\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u8981\u6d4b\u91cf\u5de5\u51b5\u7684\u7535\u6d41\u5927\u5c0f\uff0c\u66f4\u6362\u4e3a\u5176\u4ed6\u5927\u5c0f\u7684\u91c7\u6837\u7535\u963b\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E5%9C%A8_Arduino_%E4%B8%AD%E4%BD%BF%E7%94%A8\"><\/span>\u5728 Arduino \u4e2d\u4f7f\u7528<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u5728 Arduino \u4e2d\uff0c\u5df2\u7ecf\u6709\u591a\u4e2a\u5e93\u652f\u6301 INA219 \u7684\u8bbe\u7f6e\u548c\u6570\u636e\u8bfb\u53d6\uff0c\u5728\u5bf9\u6bd4\u51e0\u4e2a\u5e93\u4e4b\u540e\uff0c\u6700\u7ec8\u9009\u62e9\u4e86 INA219_WE \u8fd9\u4e2a\u5e93\uff0c\u53ef\u4ee5\u901a\u8fc7 PlatformIO \u76f4\u63a5\u5b89\u88c5\uff0c\u4e5f\u53ef\u4ee5\u5728 GitHub \u514b\u9686\u540e\u653e\u5728\u6e90\u4ee3\u7801\u4e2d\u4f7f\u7528\u3002<\/p>\n<pre><code class=\"language-c++\">\/\/ 0x40 \u4e3a A0\u3001A1 \u5747\u63a5\u5730\u65f6\uff0c\u4e0e INA219 \u901a\u4fe1\u4f7f\u7528\u7684\u5730\u5740\nINA219_WE ina219 = INA219_WE(0x40);\n\nvoid readINA219() {\n    \/\/ \u91c7\u6837\u7535\u963b\u538b\u964d\n    float shuntVoltage_mV = ina219.getShuntVoltage_mV();\n    \/\/ \u7535\u6e90\u8f93\u5165\u7535\u538b\n    float busVoltage_V = ina219.getBusVoltage_V();\n    \/\/ \u91c7\u6837\u7535\u6d41\u5927\u5c0f\n    float current_mA = ina219.getCurrent_mA();\n    \/\/ \u7535\u8def\u4e2d\u529f\u7387\u5927\u5c0f\n    float power_mW = ina219.getBusPower();\n}<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"%E8%AE%BE%E7%BD%AE%E5%A2%9E%E7%9B%8A\"><\/span>\u8bbe\u7f6e\u589e\u76ca<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cINA219 \u4f7f\u7528\u4e86 PG_320 \u589e\u76ca\u8bbe\u7f6e\uff0c\u91c7\u6837\u7535\u963b\u6700\u5927\u7535\u538b\u4e3a 320mV\uff0c\u8fd9\u65f6\u5728\u4f7f\u7528 0.1ohm \u91c7\u6837\u7535\u963b\u65f6\uff0c\u7535\u6d41\u91c7\u6837\u6700\u5927\u503c\u4e3a 3.2A\uff0c\u6700\u5c0f\u5206\u8fa8\u7387\u4e3a 780uA\u3002<\/p>\n<p>\u5982\u679c\u9700\u8981\u66f4\u9ad8\u7cbe\u5ea6\uff0c\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u6d4b\u91cf\u7535\u8def\u60c5\u51b5\u6765\u8bbe\u7f6e INA219 \u7684\u589e\u76ca\uff0c\u4f8b\u5982\u6d4b\u91cf\u7535\u6d41\u4e0d\u8d85\u8fc7 800mA \u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528 PG_80 \u589e\u76ca\u8bbe\u7f6e\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u5f97\u5230\u6700\u5c0f\u5206\u8fa8\u7387\u4e3a 20uA \u5de6\u53f3\u7684\u7ed3\u679c\u3002<\/p>\n<p>\u8bbe\u7f6e\u589e\u76ca\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528 setPGain \u65b9\u6cd5\uff1a<\/p>\n<pre><code class=\"language-c++\">ina219.setPGain(PG_80);<\/code><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"%E4%BD%BF%E7%94%A8%E8%BD%AF%E4%BB%B6%E6%A8%A1%E6%8B%9F_I2C\"><\/span>\u4f7f\u7528\u8f6f\u4ef6\u6a21\u62df I2C<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 MCU \u81ea\u5e26 I2C \u603b\u7ebf\u65f6\uff0c\u4e0e INA219 \u901a\u4fe1\u57fa\u672c\u6ca1\u6709\u517c\u5bb9\u95ee\u9898\uff0c\u4f46\u662f\u5982\u679c\u5728 MCU \u7684 I2C \u603b\u7ebf\u4e0d\u591f\u7528\u65f6\uff0c\u53ef\u80fd\u9700\u8981\u4f7f\u7528\u8f6f\u4ef6\u6a21\u62df I2C\u3002<\/p>\n<p>\u5728\u4f7f\u7528\u8f6f\u4ef6\u6a21\u62df I2C \u7684\u65f6\u5019\uff0c\u5728 PlatformIO \u5e73\u53f0\u4e0a\u627e\u4e86\u4e00\u4e9b\u5e93\uff0c\u4f46\u662f\u5728\u4e0e ESP32 \u914d\u5408\u4f7f\u7528\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u51fa\u73b0\u901a\u4fe1\u51fa\u73b0\u9519\u8bef\u7684\u60c5\u51b5\u3002\u6700\u7ec8\u901a\u8fc7\u6d4b\u8bd5\uff0c\u53d1\u73b0\u4f7f\u7528 <a href=\"https:\/\/github.com\/bxparks\/AceWire\">AceWire<\/a> \u8f6f\u4ef6\u6a21\u62df I2C \u53ef\u4ee5\u4e0e INA219 \u6b63\u5e38\u901a\u4fe1\u3002<\/p>\n<p>\u5982\u679c\u6709\u4f7f\u7528\u8f6f\u4ef6\u6a21\u62df I2C \u4e0e INA219 \u901a\u4fe1\u7684\u9700\u6c42\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528 <a href=\"https:\/\/github.com\/bxparks\/AceWire\">AceWire<\/a>\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E9%87%87%E6%A0%B7%E7%94%B5%E9%98%BB%E5%8F%91%E7%83%AD\"><\/span>\u91c7\u6837\u7535\u963b\u53d1\u70ed<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u5982\u679c\u91c7\u6837\u7535\u963b\u6bd4\u8f83\u5927\uff0c\u5e76\u4e14\u6d4b\u91cf\u7684\u7535\u6d41\u6bd4\u8f83\u5927\uff0c\u53ef\u80fd\u4f1a\u51fa\u73b0\u91c7\u6837\u7535\u963b\u53d1\u70ed\u6bd4\u8f83\u4e25\u91cd\u7684\u60c5\u51b5\uff0c\u4e4b\u524d\u5728\u6d4b\u8bd5\u8fc7\u7a0b\u4e2d\uff0c\u4f7f\u7528 2512 0.05ohm \u91c7\u6837\u7535\u963b\uff0c\u6301\u7eed\u7535\u6d41\u4e3a 3A \u5de6\u53f3\u65f6\uff0c\u91c7\u6837\u7535\u963b\u4f1a\u5347\u6e29\u5230 66 \u6444\u6c0f\u5ea6\u3002<\/p>\n<p><img src=\"https:\/\/xujiwei.com\/blog\/wp-content\/uploads\/2023\/08\/\/using-ina219-in-arduino-heating.png\" alt=\"using-ina219-in-arduino-heating\" style=\"zoom:50%;\" \/><\/p>\n<p>\u5728\u6ca1\u6709\u6563\u70ed\u6761\u4ef6\u7684\u60c5\u51b5\u4e0b\uff0c\u8fd9\u4e2a\u6e29\u5ea6\u4e0d\u592a\u53ef\u63a5\u53d7\uff0c\u56e0\u6b64\u5982\u679c\u6709\u6301\u7eed\u5927\u7535\u6d41\u91c7\u6837\u9700\u6c42\uff0c\u5efa\u8bae\u653e\u5f03\u4e00\u4e9b\u91c7\u6837\u7cbe\u5ea6\uff0c\u4f7f\u7528\u66f4\u5c0f\u7684\u91c7\u6837\u7535\u963b\uff0c\u8fd9\u6837\u53ef\u4ee5\u6709\u6548\u907f\u514d\u91c7\u6837\u7535\u963b\u5347\u6e29\u592a\u9ad8\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E5%A2%9E%E5%8A%A0%E7%94%B5%E6%B5%81%E8%8C%83%E5%9B%B4\"><\/span>\u589e\u52a0\u7535\u6d41\u8303\u56f4<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cINA219 \u914d\u5408 0.1ohm \u91c7\u6837\u7535\u963b\u65f6\uff0c\u6700\u5927\u6d4b\u91cf\u7535\u6d41\u4e3a 3.2A\uff0c\u5982\u679c\u4f7f\u7528\u5728 USB PD \u5145\u7535\u6700\u5927 100W \u7684\u60c5\u51b5\u4e0b\uff0c\u4f1a\u8d85\u51fa\u91cf\u7a0b\u3002<\/p>\n<p>\u8fd9\u4e2a\u65f6\u5019\u53ef\u4ee5\u91c7\u7528\u66f4\u5c0f\u7684\u91c7\u6837\u7535\u963b\uff0c\u867d\u7136\u91c7\u6837\u7cbe\u5ea6\u4e0b\u964d\uff0c\u4f46\u662f 1mA \u5de6\u53f3\u7684\u7cbe\u5ea6\u5728\u5927\u591a\u6570\u573a\u666f\u4e5f\u8db3\u591f\u4f7f\u7528\u4e86\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E6%80%BB%E7%BB%93\"><\/span>\u603b\u7ed3<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>INA219 \u4f5c\u4e3a\u4e00\u6b3e\u6d41\u884c\u7684\u529f\u7387\u76d1\u6d4b\u82af\u7247\uff0c\u5728 DIY \u5236\u4f5c\u4e2d\uff0c\u8fd8\u662f\u76f8\u5f53\u6613\u7528\u7684\uff0c\u5e76\u4e14\u63d0\u4f9b SOP-8 \u5c01\u88c5\uff0c\u4fbf\u4e8e\u624b\u5de5\u710a\u63a5\uff0c\u914d\u5408 Arudino \u4f7f\u7528\uff0c\u62e5\u6709\u5f3a\u5927\u7684\u5f00\u6e90\u5e93\uff0c\u53ef\u4ee5\u505a\u5230\u5f00\u7bb1\u5373\u7528\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99\"><\/span>\u53c2\u8003\u8d44\u6599<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><a href=\"https:\/\/xujiwei.com\/blog\/2022\/10\/build-power-meter-with-esphome-and-ina219\/\">\u4f7f\u7528 ESPHome + INA219 \u6a21\u5757\u6784\u5efa\u4e00\u4e2a\u7b80\u6613\u529f\u7387\u8ba1<\/a><\/li>\n<li><a href=\"https:\/\/www.ti.com.cn\/product\/cn\/INA219\">INA219 - 26V\u300112 \u4f4d\u3001I2C \u8f93\u51fa\u7535\u6d41\/\u7535\u538b\/\u529f\u7387\u76d1\u63a7\u5668<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/wollewald\/INA219_WE\">INA219_WE<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/bxparks\/AceWire\">AceWire<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u6bb5\u65f6\u95f4\u5728\u505a\u4e00\u4e2a DIY \u4ea7\u54c1\u7684\u65f6\u5019\uff0c\u4f1a\u9700\u8981\u6d4b\u91cf\u7535\u8def\u4e2d\u7535\u538b\u3001\u7535\u6d41\u548c\u529f\u7387\u7b49\u6570\u636e\uff0c\u5728 &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/xujiwei.com\/blog\/2023\/08\/using-ina219-with-arduino-to-measure-power\/\">\u7ee7\u7eed\u9605\u8bfb &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":1104,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[262,328,329,348],"_links":{"self":[{"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/posts\/1105"}],"collection":[{"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/comments?post=1105"}],"version-history":[{"count":0,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/posts\/1105\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/media\/1104"}],"wp:attachment":[{"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/media?parent=1105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/categories?post=1105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/tags?post=1105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}