{"id":733,"date":"2020-02-10T13:57:02","date_gmt":"2020-02-10T06:57:02","guid":{"rendered":"http:\/\/wiki.rdd-tech.com\/?post_type=ht_kb&#038;p=733"},"modified":"2020-08-13T13:10:33","modified_gmt":"2020-08-13T06:10:33","slug":"latihan-advanced-sensor-i2c-wattmeter","status":"publish","type":"ht_kb","link":"https:\/\/wiki.rdd-tech.com\/index.php\/knowledge-base\/latihan-advanced-sensor-i2c-wattmeter\/","title":{"rendered":"Latihan Advanced Sensor : I2C Wattmeter"},"content":{"rendered":"\n<h3 id=\"1-tujuan\" >1. Tujuan<\/h3>\n\n\n\n<ol><li>Memberikan pengetahuan teori dan praktikal mengenai <em>I2C Wattmeter<\/em>.<\/li><li>Memberikan pengetahuan teori mengenai jalur komunikasi I2C.<\/li><li>Memberikan pengetahuan dasar mengenai hardware Arduino.     <\/li><\/ol>\n\n\n\n<h3 id=\"2-alat-dan-bahan\" >2. Alat dan Bahan<\/h3>\n\n\n\n<ol><li>Arduino MKR1000 Development Board @ 1 unit<\/li><li>DFRobot I2C Wattmeter Module @ 1 unit<\/li><li>DFRobot Rotation Sensor Module @ 1 unit<\/li><li>RDD Tech Arduino MKR IoT Training Module  @ 1 unit  <\/li><li>DFRobot 130 DC Motor Module @ 1 unit<\/li><li>Kabel dan konektor @ secukupnya<\/li><li>Kabel USB Arduino Development Board @ 1 unit<\/li><li>Arduino IDE<\/li><li>PC @ 1 unit<\/li><li>Variable Power Supply @ 1 unit        <\/li><\/ol>\n\n\n\n<h3 id=\"3-teori-singkat\" >3. Teori Singkat<\/h3>\n\n\n\n<h5 id=\"1-wattmeter\" >1. Wattmeter<\/h5>\n\n\n\n<p>Seperti yang telah pada artikel latihan sensor analog: voltage divider, voltage divider adalah cara yang sangat sederhana untuk mengukur tegangan. Namun dengan menggunakan voltage divider kita tidak dapat mengetahui arus yang mengalir pada beban jika nilai beban tidak fixed, contohnya beban induktif atau beban kapasitif. Kekurangan-kekurangan ini dapat diatasi oleh rangkaian current sensing. Rangkaian current sensing ini terbagi menjadi dua jenis yaitu high current sensing dan low current sensing. Perbedaan diantaranya adalah posisi penempatan resistor shunt (Rshunt) terhadap beban, jika high current sensing maka posisi resistor shunt berada sebelum beban dan sebaliknya pada low current sensing. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"558\" src=\"http:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/XaSAL-1024x558.gif\" alt=\"\" class=\"wp-image-734\" srcset=\"https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/XaSAL-1024x558.gif 1024w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/XaSAL-300x164.gif 300w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/XaSAL-768x419.gif 768w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/XaSAL-50x27.gif 50w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/XaSAL-1536x837.gif 1536w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/XaSAL-2048x1116.gif 2048w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/XaSAL-920x501.gif 920w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/XaSAL-600x327.gif 600w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/XaSAL-320x174.gif 320w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>Figure 1A merupakan high current sensing dan Figure 1b merupakan low current sensing<\/figcaption><\/figure>\n\n\n\n<p>Seperti yang telah dijelaskan pada gambar diatas, tegangan diantara ujung-ujung Rsense atau Rshunt dimasukan ke amplifier untuk diperkuat. Ini dikarenakan nilai Rshunt harus sekecil mungkin agar tidak menggangu beban baik tegangan maupun arus.<\/p>\n\n\n\n<h5 id=\"2-komunikasi-i2c\" >2. Komunikasi I2C<\/h5>\n\n\n\n<p>I2C merupakan dari Inter-Integrated Circuit. Merupakan sebuah protokol komunikasi antar sirkuit terintegrasi. Komunikasi I2C juga disebut komunikasi 2-wire, karena hanya membutuhkan dua jalur (kabel) untuk berkomunikasi yaitu SCL (Serial Clock) dan SDA (Serial Data). I2C juga memungkinkan satu perangkat master memiliki banyak perangkat slave.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"362\" src=\"http:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/1920px-I2C.svg_-1024x362.png\" alt=\"\" class=\"wp-image-735\" srcset=\"https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/1920px-I2C.svg_-1024x362.png 1024w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/1920px-I2C.svg_-300x106.png 300w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/1920px-I2C.svg_-768x271.png 768w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/1920px-I2C.svg_-50x18.png 50w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/1920px-I2C.svg_-1536x542.png 1536w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/1920px-I2C.svg_-920x325.png 920w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/1920px-I2C.svg_-600x212.png 600w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/1920px-I2C.svg_-320x113.png 320w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/1920px-I2C.svg_.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>Komunikasi I2C.<br>Sumber: www.wikipedia.org<\/figcaption><\/figure>\n\n\n\n<p>Untuk membuat Arduino dapat berkomunikasi dengan menggunakan I2C , hendaknya memanggil Wire.h pada header sketch terlebih dahulu.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include Wire.h<\/code><\/pre>\n\n\n\n<h5 id=\"3-dfrobot-i2c-wattmeter\" >3. DFRobot I2C Wattmeter<\/h5>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"900\" height=\"600\" src=\"http:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/SEN0291.jpg\" alt=\"\" class=\"wp-image-736\" srcset=\"https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/SEN0291.jpg 900w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/SEN0291-300x200.jpg 300w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/SEN0291-768x512.jpg 768w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/SEN0291-50x33.jpg 50w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/SEN0291-600x400.jpg 600w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/SEN0291-320x213.jpg 320w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><figcaption> DFRobot I2C Wattmeter.<br>Sumber: www.dfrobot.com<\/figcaption><\/figure>\n\n\n\n<p>Berikut merupakan spesifikasi dari DFRobot I2C wattmeter module:<\/p>\n\n\n\n<ol><li>Input Voltage (VCC) : 3.3V~5.5V<\/li><li>Voltage Range (IN+ or IN- relative to GND): 0 ~ 26 V<\/li><li>Voltage Resolution: 4 mV<\/li><li>Voltage Relative Error: &lt;\u00b10.2% (Typical)<\/li><li>Current Range: 0 ~ \u00b18A (Bidirectional current)<\/li><li>Current Resolution: 1mA<\/li><li>Current Relative Error: &lt;\u00b10.2% (Typical, manual calibration required)<\/li><li>Power Range: 0 ~ 206 W<\/li><li>Power Resolution: 20 mW (Hardware) \/ 4 mW (Software)<\/li><li>Quiescent Current: 0.7 mA<\/li><li>Interface: Gravity I2C (logic level: 0-3.3V)<\/li><li>I2C Address: Four options 0x40, 0x41, 0x44, 0x45<\/li><li>Dimension: 30.0mm*22.0mm\/1.18*0.87 in<\/li><li>Weight: 4g<\/li><\/ol>\n\n\n\n<h3 id=\"d-langkah-keselamatan-latihan\" >D. Langkah Keselamatan Latihan<\/h3>\n\n\n\n<ol><li>Pastikan pemasangan kabel penguhubung telah benar sesuai dengan kode warna yang diberikan modul DFRobot.<\/li><li>Pastikan polaritas<em> power supply<\/em> tidak terbalik.<\/li><li>Jangan gunakan beban tegangan AC, sensor ini hanya untuk tegangan DC.<\/li><li>Lepas catu dari papan mikrokontroler baik dari kabel usb maupun dari <em>power supply<\/em> sebelum merubah rangkaian.    <\/li><\/ol>\n\n\n\n<h3 id=\"e-langkah-langkah-latihan\" >E. Langkah &#8211; Langkah Latihan<\/h3>\n\n\n\n<ol><li>Siapkan alat dan bahan seperti yang telah dituliskan diatas.<\/li><li>Pasang Arduino MKR1000 pada RDD Tech Arduino MKR IoT Training Module.  .<\/li><li>Pasangkan<em>&nbsp;jack<\/em>&nbsp;DC&nbsp;<em>power supply<\/em>&nbsp;pada jack DC&nbsp;<em>input<\/em>&nbsp;RDD Tech Arduino MKR IoT Training Module.   <\/li><li>Download file zip yang berisi library DFRobot_INA219 pada link berikut <a href=\"https:\/\/github.com\/DFRobot\/DFRobot_INA219\">https:\/\/github.com\/DFRobot\/DFRobot_INA219<\/a>.<\/li><li>Install library dengan memilih menu sketch&gt;include library&gt;pilih file zip yang telah didownload sebelumnya pada Arduino IDE.<\/li><li>Rangkailah rangkaian seperti pada gambar latihan 1.1.<\/li><li>Gunakanlah program contoh yang diberikan library pada menu example&gt;DFRobot_IN219_master&gt;getVoltageCurrentPower.<\/li><li>Lakukanlah pengukuran arus, tegangan dan daya pada beban motor. Mainkan kecepatan motor dengan menggunakan input dari rotation sensor dan tampilkan data PWM, arus, tegangan, dan daya pada serial monitor. Hasilnya dapat dilihat pada video latihan 1.1.  <\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"675\" height=\"332\" src=\"http:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/Adv_Sensor_Wattmeter-1.png\" alt=\"\" class=\"wp-image-1042\" srcset=\"https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/Adv_Sensor_Wattmeter-1.png 675w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/Adv_Sensor_Wattmeter-1-300x148.png 300w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/Adv_Sensor_Wattmeter-1-50x25.png 50w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/Adv_Sensor_Wattmeter-1-600x295.png 600w, https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/Adv_Sensor_Wattmeter-1-320x157.png 320w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><figcaption>Gambar latihan 1.1<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"http:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/01\/V_20200131_135547_vHDR_Auto21.mp4\"><\/video><figcaption>Video latihan 1.1<\/figcaption><\/figure>\n\n\n\n<p>Tetap Semangat dan Selamat Mencoba! (RDD Team)<\/p>\n","protected":false},"author":4,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0},"ht_kb_category":[49],"ht_kb_tag":[40,24,25,32],"_links":{"self":[{"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/ht_kb\/733"}],"collection":[{"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/ht_kb"}],"about":[{"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/comments?post=733"}],"version-history":[{"count":14,"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/ht_kb\/733\/revisions"}],"predecessor-version":[{"id":1416,"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/ht_kb\/733\/revisions\/1416"}],"wp:attachment":[{"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/media?parent=733"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/ht_kb_category?post=733"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/ht_kb_tag?post=733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}