{"id":1034,"date":"2023-06-20T03:07:44","date_gmt":"2023-06-19T20:07:44","guid":{"rendered":"https:\/\/delta-electronic.com\/Design\/Hardwares\/?p=1034"},"modified":"2023-06-20T10:49:31","modified_gmt":"2023-06-20T03:49:31","slug":"antarmuka-loadcell-dengan-de-atmega2560-arduino-embedded-board","status":"publish","type":"post","link":"https:\/\/delta-electronic.com\/Design\/Hardwares\/antarmuka-loadcell-dengan-de-atmega2560-arduino-embedded-board\/","title":{"rendered":"Antarmuka Loadcell dengan DE-ATMega2560-Arduino-Embedded-Board"},"content":{"rendered":"<p><strong>Loadcell<\/strong><\/p>\n<p>Loadcell adalah merupakan sensor berat yang biasanya digunakan pada timbangan-timbangan digital dan terdiri dari 4 buah strain gage. Apakah itu strain gage? Strain gage adalah sebuah komponen yang terdiri dari kawat yang berliku-liku di mana saat kawat merapat atau meregang akan mengakibatkan terjadinya perubahan resistansi.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"size-full wp-image-1035 aligncenter\" src=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Strain_gauge_deformation.jpg\" alt=\"\" width=\"750\" height=\"675\" srcset=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Strain_gauge_deformation.jpg 750w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Strain_gauge_deformation-600x540.jpg 600w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Strain_gauge_deformation-300x270.jpg 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Strain Gage<\/strong><\/p>\n<p>Sebuah strain gage hanya memiliki perubahan resistansi yang kecil. Agar diperoleh perubahan yang besar dan membangkitkan sinyal listrik yang cukup untuk diterima oleh Instrument Amplifier maka dibutuhkan 4 buah strain gage yang disusun membentuk Jembatan Wheatstone<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-1036 aligncenter\" src=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/220px-Wheatstone_bridge.jpg\" alt=\"\" width=\"220\" height=\"146\" \/><\/p>\n<p>Pada saat kondisi balance atau tidak ada beban pada loadcell maka nilai resistansi R1, R2, R3 dan R4 adalah sama sehingga diperoleh keseimbangan di mana R1\/R2 = R4\/R3 sehingga diperoleh Vo = 0 volt. Namun saat beban diletakkan maka keempat nilai resistor ini akan berubah di mana R1 dan R3 akan membesar dan R4 dan R2 mengecil dan tegangan Vo akan bertambah besar.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-1037 size-full\" src=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/220px-Wheatstone_bridge_with_gauges.jpg\" alt=\"\" width=\"220\" height=\"122\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1038\" src=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/formula.png\" alt=\"\" width=\"278\" height=\"69\" \/> dengan menggunakan formula ini maka apabila R1 hingga R4 adalah 350 ohm dan saat beban diletakkan R1 dan R3 menjadi 352 dan R2 dan R4 menjadi 348 dan Vex = 5V maka diperoleh <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1039\" src=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/FORMULA2.png\" alt=\"\" width=\"278\" height=\"69\" \/> = 0.0286v<\/p>\n<p>Tegangan 0.0286V atau 28.6 mV ini sudah cukup besar untuk diukur dengan multimeter namun masih kurang besar untuk diolah oleh Analog to Digital Converter. Untuk itu diperlukan sebuah Instrument Amplifier yang akan menguatkan signal kecil tadi menjadi lebih besar.<\/p>\n<p><strong>HX-711<\/strong><\/p>\n<p>HX-711 adalah merupakan sebuah modul instrument amplifier yang sudah dilengkapi dengan 24 bit ADC dengan output serial yaitu DT (Data) dan SCK (Serial Clock)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1041 aligncenter\" src=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/hx-711.png\" alt=\"\" width=\"712\" height=\"351\" srcset=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/hx-711.png 712w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/hx-711-600x296.png 600w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/hx-711-300x148.png 300w\" sizes=\"(max-width: 712px) 100vw, 712px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Modul HX-711<\/strong><\/p>\n<p>Di sini tampak output dari loadcell (Vo) dihubungkan ke INA+ dan INA- dari bagian Instrument Amplifier dan penguatannya diatur oleh PGA (Programmable Gain Amplifier) yang dapat menguatkan hingga 32, 64 atau 128x. Lalu hasil penguatan akan diolah oleh 24 bit ADC dan keluarannya diubah menjadi data serial oleh Digital Interface sehingga menjadi Dout dan SCK yang akan dapat dihubungkan langsung ke Port Digital dari MCU \/ Microcontroller<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1044 aligncenter\" src=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/timing.png\" alt=\"\" width=\"726\" height=\"277\" srcset=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/timing.png 726w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/timing-600x229.png 600w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/timing-300x114.png 300w\" sizes=\"(max-width: 726px) 100vw, 726px\" \/><\/p>\n<p>Untuk mengambil data tersebut dari HX711 cukup dibutuhkan 2 jalur yaitu DOut dan SCK di mana DOut akan dikirimkan secara serial sejumlah 24 bit setiap kali SCK transisi dari LOW ke HIGH. Pengiriman data diawali dengan bagian MSB terlebih dahulu dan diakhiri LSB pada clock ke 24.<\/p>\n<p><strong>Antarmuka dengan DE-ATMega2560-Embedded-Board<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1046\" src=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Visio-DE-ATMEGA2560-PIN-OUT2-hx711.jpg\" alt=\"\" width=\"2232\" height=\"2232\" srcset=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Visio-DE-ATMEGA2560-PIN-OUT2-hx711.jpg 2232w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Visio-DE-ATMEGA2560-PIN-OUT2-hx711-300x300.jpg 300w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Visio-DE-ATMEGA2560-PIN-OUT2-hx711-100x100.jpg 100w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Visio-DE-ATMEGA2560-PIN-OUT2-hx711-600x600.jpg 600w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Visio-DE-ATMEGA2560-PIN-OUT2-hx711-1024x1024.jpg 1024w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Visio-DE-ATMEGA2560-PIN-OUT2-hx711-150x150.jpg 150w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Visio-DE-ATMEGA2560-PIN-OUT2-hx711-768x768.jpg 768w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Visio-DE-ATMEGA2560-PIN-OUT2-hx711-1536x1536.jpg 1536w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/Visio-DE-ATMEGA2560-PIN-OUT2-hx711-2048x2048.jpg 2048w\" sizes=\"(max-width: 2232px) 100vw, 2232px\" \/><\/p>\n<p><strong>Arduino Source Code \/ Sketch<\/strong><\/p>\n<p>Untuk menggunakan modul HX711 pada Arduino IDE terlebih dahulu kita harus melakukan instalasi library HX711 sebagai berikut, klik library manager dan ketik hx711 di kolom search. Di sini saya gunakan DFRobot_Hx711 sebagai library yang akan kita gunakan.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1047 aligncenter\" src=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/hx711-library.png\" alt=\"\" width=\"811\" height=\"189\" srcset=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/hx711-library.png 811w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/hx711-library-600x140.png 600w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/hx711-library-300x70.png 300w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/hx711-library-768x179.png 768w\" sizes=\"(max-width: 811px) 100vw, 811px\" \/><\/p>\n<p>Lalu kita pilih example readweight di dalam kelompok example DFRobot_Hx711 sebagai contoh yang akan kita gunakan.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1048 aligncenter\" src=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/readweight-arduino-hx711-sketch.png\" alt=\"\" width=\"488\" height=\"524\" srcset=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/readweight-arduino-hx711-sketch.png 488w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/readweight-arduino-hx711-sketch-279x300.png 279w\" sizes=\"(max-width: 488px) 100vw, 488px\" \/><\/p>\n<p>Karena Modul <a href=\"https:\/\/www.tokopedia.com\/delta-electronic\/de-atmega2560-embedded-board-atmega2560-arduino-development-modul\">DE-ATMega2560-Arduino-Embedded-Board<\/a> menggunakan digital 18 dan 19 untuk DT dan SCK maka di sini kita ganti A2 dan A3 menjadi 18 dan 19<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1049 aligncenter\" src=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/readweight-arduino-hx711-sketch2.png\" alt=\"\" width=\"411\" height=\"355\" srcset=\"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/readweight-arduino-hx711-sketch2.png 411w, https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-content\/uploads\/2023\/06\/readweight-arduino-hx711-sketch2-300x259.png 300w\" sizes=\"(max-width: 411px) 100vw, 411px\" \/><\/p>\n<p>Kemudian sketch telah siap untuk dicompile dan download ke <a href=\"https:\/\/www.tokopedia.com\/delta-electronic\/de-atmega2560-embedded-board-atmega2560-arduino-development-modul\">DE-ATMega2560-Arduino-Embedded-Board<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>DELTA ELECTRONIC<\/strong><\/p>\n<p><strong>Paulus Andi Nalwan, ST<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Loadcell Loadcell adalah merupakan sensor berat yang biasanya digunakan pada timbangan-timbangan digital dan terdiri dari 4 buah strain gage. Apakah itu strain gage? Strain gage adalah sebuah komponen yang terdiri dari kawat yang berliku-liku di mana saat kawat merapat atau meregang akan mengakibatkan terjadinya perubahan resistansi. Strain Gage Sebuah strain gage hanya memiliki perubahan resistansi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[120],"tags":[94,102,103,104,105,96,95],"class_list":["post-1034","post","type-post","status-publish","format-standard","hentry","category-antarmuka-arduino","tag-arduino","tag-arduino-board","tag-arduino-ide","tag-bahasa-c","tag-c-language","tag-microcontroller","tag-mikrokontroler"],"_links":{"self":[{"href":"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-json\/wp\/v2\/posts\/1034","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-json\/wp\/v2\/comments?post=1034"}],"version-history":[{"count":0,"href":"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-json\/wp\/v2\/posts\/1034\/revisions"}],"wp:attachment":[{"href":"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-json\/wp\/v2\/media?parent=1034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-json\/wp\/v2\/categories?post=1034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/delta-electronic.com\/Design\/Hardwares\/wp-json\/wp\/v2\/tags?post=1034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}