{"id":110379,"date":"2022-04-27T15:06:09","date_gmt":"2022-04-27T15:06:09","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=110379"},"modified":"2025-01-25T11:38:33","modified_gmt":"2025-01-25T11:38:33","slug":"arduino-load-cell-hx711","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/arduino-load-cell-hx711\/","title":{"rendered":"Arduino with Load Cell and HX711 Amplifier (Digital Scale)"},"content":{"rendered":"\n<p>In this guide, you&#8217;ll learn how to create a digital scale with the Arduino using a load cell and the HX711 amplifier. First, you&#8217;ll learn how to wire the load cell and the HX711 amplifier to the Arduino to build a scale. Then, we&#8217;ll show you how to calibrate the scale, and a simple example to get the weight of objects. Later, we&#8217;ll also add a display to show the measurements and a button to tare the scale.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-load-cell-HX711-amplifier.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Arduino with Load Cell and HX711 Amplifier Digital Scale\" class=\"wp-image-110383\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-load-cell-HX711-amplifier.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-load-cell-HX711-amplifier.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-load-cell-HX711-amplifier.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-load-cell-HX711-amplifier.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n<p><strong>Table of Contents<\/strong><\/p>\n\n\n\n<p>In this tutorial, we&#8217;ll cover the following topics:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#load-cells-intro\">Introducing Load Cells (Strain Gauges)<\/a><\/li>\n\n\n\n<li><a href=\"#hx711-amplifier\">HX711 Amplifier<\/a><\/li>\n\n\n\n<li><a href=\"#setting-load-cell\">Setting Up Load Cell<\/a><\/li>\n\n\n\n<li><a href=\"#load-cell-hx711-arduino-wiring\">Wiring Load Cell and HX711 Amplifier to the Arduino<\/a><\/li>\n\n\n\n<li><a href=\"#hx711-library\">Installing HX711 Library<\/a><\/li>\n\n\n\n<li><a href=\"#calibrate-load-cell\">Calibrating the Scale<\/a><\/li>\n\n\n\n<li><a href=\"#weighting-objects\">Weighting Objects &#8211; Code<\/a><\/li>\n\n\n\n<li><a href=\"#digital-scale-arduino\">Digital Scale with Arduino<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"load-cells-intro\">Introducing Load Cells<\/h2>\n\n\n\n<p>A load cell converts a force into an electrical signal that can be measured. The electrical signal changes proportionally to the force applied. There are different types of load cells: strain gauges, pneumatic, and hydraulic. In this tutorial, we&#8217;ll cover strain gauge load cells.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/load-cell.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"load cell component board\" class=\"wp-image-110037\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/load-cell.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/load-cell.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Strain gauge load cells are composed of a metal bar with attached strain gauges (under the white glue in the picture above). A strain gauge is an electrical sensor that measures force or strain on an object. The resistance of the strain gauges varies when an external force is applied to an object, which results in a deformation of the object&#8217;s shape (in this case, the metal bar). The strain gauge resistance is proportional to the load applied, which allows us to calculate the weight of objects.<\/p>\n\n\n\n<p>Usually, load cells have four strain gauges hooked up in a Wheatstone bridge (as shown below) that allow us to get accurate resistance measurements. For a more detailed explanation of how strain gauges work, <a href=\"https:\/\/www.allaboutcircuits.com\/textbook\/direct-current\/chpt-9\/strain-gauges\/\" target=\"_blank\" rel=\"noreferrer noopener\">read this article<\/a>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"750\" height=\"500\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/load-cell-setup-scale-wheatstone-brifge-01.png?resize=750%2C500&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"load cell wheatstone bridge\" class=\"wp-image-110041\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/load-cell-setup-scale-wheatstone-brifge-01.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/load-cell-setup-scale-wheatstone-brifge-01.png?resize=300%2C200&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>The wires coming from the load cell usually have the following colors:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span class=\"rnthl rntcred\">Red<\/span>: VCC (E+)<\/li>\n\n\n\n<li><span class=\"rnthl rntcblack\">Black<\/span>: GND (E-)<\/li>\n\n\n\n<li><span class=\"rnthl rntclgray\">White<\/span>: Output &#8211; (A-)<\/li>\n\n\n\n<li><span class=\"rnthl rntcgreen\">Green<\/span>: Output + (A+)<\/li>\n<\/ul>\n\n\n\n<p><strong>Applications<\/strong><\/p>\n\n\n\n<p>Strain gauge load cells can be used in a wide variety of applications. For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>check if an object&#8217;s weight changes over time;<\/li>\n\n\n\n<li>measure the weight of an object;<\/li>\n\n\n\n<li>detect the presence of an object;<\/li>\n\n\n\n<li>estimate a container&#8217;s liquid level;<\/li>\n\n\n\n<li>etc.<\/li>\n<\/ul>\n\n\n\n<p>Because the changes in strain when weighting objects are so small, we need an amplifier. The load cell we&#8217;re using is usually sold together with an HX711 amplifier. So, that&#8217;s the amplifier we&#8217;ll use.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"hx711-amplifier\">HX711 Amplifier<\/h2>\n\n\n\n<p>The HX711 amplifier is a breakout board that allows you to easily read load cells to measure weight. You wire the load cell wires on one side, and the microcontroller on the other side. The HX711 communicates with the microcontroller using two-wire interface (Clock and Data).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"450\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/hx711-amplifier.jpg?resize=750%2C450&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"HX711 amplifier\" class=\"wp-image-110038\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/hx711-amplifier.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/hx711-amplifier.jpg?resize=300%2C180&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>You need to solder header pins on the GND, DT, SCK, and VCC pins to connect to the Arduino. I soldered the load cell wires directly to the E+, E-, A-, and A+ pins. The load cell wires were very thin and fragile, be careful when soldering to not damage the wires.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/hx711-amplifier-soldered.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"HX711 Amplifier Soldered\" class=\"wp-image-110089\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/hx711-amplifier-soldered.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/hx711-amplifier-soldered.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p><\/p>\n\n\n\n<p>For more information about the HX711 amplifier, you can <a href=\"https:\/\/cdn.sparkfun.com\/datasheets\/Sensors\/ForceFlex\/hx711_english.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">consult the HX711 datasheet<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"setting-load-cell\">Setting Up the Load Cell<\/h2>\n\n\n\n<p>Our load cell kit came with two acrylic plates and some screws to set up the load cell as a scale. You can use wood plates or 3D-print your own plates.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/Load-cell-hx711-amplifier-package.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"load cell hx711amplifier package\" class=\"wp-image-110039\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/Load-cell-hx711-amplifier-package.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/Load-cell-hx711-amplifier-package.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>You should attach the plates to the load cell in a way that creates a strain between the opposite ends of the metal bar. The bottom plate holds the load cell, and the upper plate is where you place the objects.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"332\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/load-cell-setup-scale.png?resize=750%2C332&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"load cell setup scale\" class=\"wp-image-110040\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/load-cell-setup-scale.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/load-cell-setup-scale.png?resize=300%2C133&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>The following figure shows what my load cell with the acrylic plates looks like.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/load-cell-scale-arduino.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"load cell scale\" class=\"wp-image-110091\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/load-cell-scale-arduino.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/load-cell-scale-arduino.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\">Where to Buy Load Cell with HX711?<\/h2>\n\n\n\n<p>You can check the load cell with the HX711 on Maker Advisor to find the best price (with or without acrylic plates included). There are load cells with different measurement ranges. The most common maximum weights are 1kg, 5kg, 10kg, and 20kg.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/makeradvisor.com\/tools\/load-cell-hx711-amplifier\/\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"263\" height=\"186\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/load-cell-hx711-amplifier-product.png?resize=263%2C186&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Load Cell HX711 Amplifier\" class=\"wp-image-110067\"\/><\/a><\/figure><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/load-cell-hx711-amplifier\/\" target=\"_blank\" rel=\"noreferrer noopener\">Load Cell with HX711 Amplifier<\/a><\/li>\n<\/ul>\n\n\n<p>You can use the preceding links or go directly to <a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\">MakerAdvisor.com\/tools<\/a> to find all the parts for your projects at the best price!<\/p><p style=\"text-align:center;\"><a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/10\/header-200.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"load-cell-hx711-arduino-wiring\">Wiring Load Cell and HX711 Amplifier to the Arduino<\/h2>\n\n\n\n<p>The HX711 amplifier communicates via two-wire interface. You can connect it to any digital pins of your Arduino board. We&#8217;re connecting the data pin (DT) to <span class=\"rnthl rntclgray\">Pin 2<\/span> and the clock pin (CLK) to <span class=\"rnthl rntcyellow\">Pin 3<\/span>.<\/p>\n\n\n\n<p>Follow the next table or schematic diagram to wire the load cell to the Arduino board.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Load Cell<\/strong><\/td><td><strong>HX711<\/strong><\/td><td><\/td><td><strong>HX711<\/strong><\/td><td><strong>Arduino<\/strong><\/td><\/tr><tr><td><span class=\"rnthl rntcred\">Red<\/span> (E+)<\/td><td><strong>E+<\/strong><\/td><td><\/td><td><strong>GND<\/strong><\/td><td><span class=\"rnthl rntcblack\">GND<\/span><\/td><\/tr><tr><td><span class=\"rnthl rntcblack\">Black<\/span> (E-)<\/td><td><strong>E-<\/strong><\/td><td><\/td><td><strong>DT<\/strong><\/td><td><span class=\"rnthl rntclgray\">Pin 2<\/span><\/td><\/tr><tr><td><span class=\"rnthl rntclgray\">White<\/span> (A-)<\/td><td><strong>A-<\/strong><\/td><td><\/td><td><strong>SCK<\/strong><\/td><td><span class=\"rnthl rntcyellow\">Pin 3<\/span> <\/td><\/tr><tr><td><span class=\"rnthl rntclgreen\">Green<\/span> (A+)<\/td><td><strong>A+<\/strong><\/td><td><\/td><td><strong>VCC<\/strong><\/td><td><span class=\"rnthl rntcred\">5V<\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"731\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-load-cell-diagram_bb.png?resize=1200%2C731&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Arduino with Load Cell HX711 Wiring Schematic Diagram\" class=\"wp-image-110427\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-load-cell-diagram_bb.png?w=1506&amp;quality=100&amp;strip=all&amp;ssl=1 1506w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-load-cell-diagram_bb.png?resize=300%2C183&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-load-cell-diagram_bb.png?resize=1024%2C624&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-load-cell-diagram_bb.png?resize=768%2C468&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"hx711-library\">Installing the HX711 Library<\/h2>\n\n\n\n<p>There are several different libraries to get measurements from a load cell using the HX711 amplifier. We&#8217;ll use the <a href=\"https:\/\/github.com\/bogde\/HX711\" target=\"_blank\" rel=\"noreferrer noopener\">HX711 library by bodge<\/a>. It is compatible with the ESP32, ESP8266, and Arduino.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Arduino IDE<\/h3>\n\n\n\n<p>Follow the next instructions to install the library if you&#8217;re using Arduino IDE.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open Arduino IDE and go to <strong>Sketch <\/strong>> <strong>Include Library<\/strong> > <strong>Manage Libraries<\/strong>.<\/li>\n\n\n\n<li>Search for &#8220;<strong>HX711 Arduino Library<\/strong>&#8221; and install the library by Bogdan Necula.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"786\" height=\"443\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/Install-HX711-Bogdan-Library-Arduino-IDE.png?resize=786%2C443&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Install HX711 Bogdan Library\" class=\"wp-image-110006\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/Install-HX711-Bogdan-Library-Arduino-IDE.png?w=786&amp;quality=100&amp;strip=all&amp;ssl=1 786w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/Install-HX711-Bogdan-Library-Arduino-IDE.png?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/Install-HX711-Bogdan-Library-Arduino-IDE.png?resize=768%2C433&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 786px) 100vw, 786px\" \/><\/figure><\/div>\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"calibrate-load-cell\">Calibrating the Scale (Arduino with Load Cell)<\/h2>\n\n\n\n<p>At this time, we assume you have wired the load cell to the HX711 amplifier and the amplifier to the Arduino board. You should also have your scale set up (two plates wired on opposite ends on the load cell), and have installed the HX711 library.<\/p>\n\n\n\n<p>Before getting the weight of objects, you need to calibrate your load cell first by getting the <u>calibration factor<\/u>. Your calibration factor will be different than mine, so you shouldn&#8217;t skip this section.<\/p>\n\n\n\n<p><strong>1)<\/strong> Prepare an object with a known weight. I used my kitchen scale and weighed a glass with water (107g).<\/p>\n\n\n\n<p><strong>2)<\/strong> Upload the following code to your Arduino board. We wrote the following code taking into account the instructions to calibrate the load cell provided by the library documentation.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/*\r\n  Rui Santos\r\n  Complete project details at https:\/\/RandomNerdTutorials.com\/arduino-load-cell-hx711\/\r\n  \r\n  Permission is hereby granted, free of charge, to any person obtaining a copy\r\n  of this software and associated documentation files.\r\n  \r\n  The above copyright notice and this permission notice shall be included in all\r\n  copies or substantial portions of the Software.\r\n*\/\r\n\r\n\/\/ Calibrating the load cell\r\n#include &quot;HX711.h&quot;\r\n\r\n\/\/ HX711 circuit wiring\r\nconst int LOADCELL_DOUT_PIN = 2;\r\nconst int LOADCELL_SCK_PIN = 3;\r\n\r\nHX711 scale;\r\n\r\nvoid setup() {\r\n  Serial.begin(57600);\r\n  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);\r\n}\r\n\r\nvoid loop() {\r\n\r\n  if (scale.is_ready()) {\r\n    scale.set_scale();    \r\n    Serial.println(&quot;Tare... remove any weights from the scale.&quot;);\r\n    delay(5000);\r\n    scale.tare();\r\n    Serial.println(&quot;Tare done...&quot;);\r\n    Serial.print(&quot;Place a known weight on the scale...&quot;);\r\n    delay(5000);\r\n    long reading = scale.get_units(10);\r\n    Serial.print(&quot;Result: &quot;);\r\n    Serial.println(reading);\r\n  } \r\n  else {\r\n    Serial.println(&quot;HX711 not found.&quot;);\r\n  }\r\n  delay(1000);\r\n}\r\n\r\n\/\/calibration factor will be the (reading)\/(known weight)\r\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/Arduino\/Arduino_Load_Cell\/Arduino_Calibrate_Load_Cell.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<p><strong>3)<\/strong> After uploading, open the<strong> Serial Monitor at a baud rate of 57600<\/strong> and then press the Arduino on-board RESET button.<\/p>\n\n\n\n<p><strong>4)<\/strong> Follow the instructions on the Serial Monitor: remove any weights from the scale (it will tare automatically). Then, place an object with a known weight on the scale and wait until you get a value.<\/p>\n\n\n\n<p><strong>5)<\/strong> Calculate your calibration factor using the formula:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>calibration factor = (reading)\/(known weight)<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"415\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/calibrate-load-cell-arduino-serial-monitor.png?resize=683%2C415&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Calibrate load Cell Arduino Serial Monitor\" class=\"wp-image-110428\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/calibrate-load-cell-arduino-serial-monitor.png?w=683&amp;quality=100&amp;strip=all&amp;ssl=1 683w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/calibrate-load-cell-arduino-serial-monitor.png?resize=300%2C182&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 683px) 100vw, 683px\" \/><\/figure><\/div>\n\n\n<p> In our case, the reading is -49171. The known weight is 107g, so our calibration factor will be: -49171\/107 = -459.542.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>calibration factor = -49171\/107 = -459.542<\/code><\/pre>\n\n\n\n<p>Save your calibration factor because you&#8217;ll need it later. Yours will be different than ours.<\/p>\n\n\n\n<p>Because the output of the sensor is proportional to the force applied to the load cell, you can calibrate your scale using whatever unit makes sense for you. I used grams, but you can use pounds, kilograms, or even pieces of cat food (<a href=\"https:\/\/youtu.be\/iywsJB-T-mU\" target=\"_blank\" rel=\"noreferrer noopener\">as in this Andreas Spiess video<\/a>).<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"weighting-objects\">Weighting Objects (Arduino with Load Cell)<\/h2>\n\n\n\n<p>Now that you know your calibration factor, you can use your load cell to weight objects. Start by weighing objects with a known weight and repeat the calibration process if the values are not accurate.<\/p>\n\n\n\n<p>Copy the following code to your Arduino IDE. Before uploading it to your board, don&#8217;t forget to insert your calibration factor in line 43\/44 of the code. The following code is the <a href=\"https:\/\/github.com\/bogde\/HX711\/blob\/master\/examples\/HX711_full_example\/HX711_full_example.ino\" target=\"_blank\" rel=\"noreferrer noopener\">example provided by the library<\/a> that demonstrates the use of most of its functions.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/**\r\n * Complete project details at https:\/\/RandomNerdTutorials.com\/arduino-load-cell-hx711\/\r\n *\r\n * HX711 library for Arduino - example file\r\n * https:\/\/github.com\/bogde\/HX711\r\n *\r\n * MIT License\r\n * (c) 2018 Bogdan Necula\r\n *\r\n**\/\r\n\r\n#include &lt;Arduino.h&gt;\r\n#include &quot;HX711.h&quot;\r\n\r\n\/\/ HX711 circuit wiring\r\nconst int LOADCELL_DOUT_PIN = 2;\r\nconst int LOADCELL_SCK_PIN = 3;\r\n\r\nHX711 scale;\r\n\r\nvoid setup() {\r\n  Serial.begin(57600);\r\n  Serial.println(&quot;HX711 Demo&quot;);\r\n  Serial.println(&quot;Initializing the scale&quot;);\r\n\r\n  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);\r\n\r\n  Serial.println(&quot;Before setting up the scale:&quot;);\r\n  Serial.print(&quot;read: \\t\\t&quot;);\r\n  Serial.println(scale.read());      \/\/ print a raw reading from the ADC\r\n\r\n  Serial.print(&quot;read average: \\t\\t&quot;);\r\n  Serial.println(scale.read_average(20));   \/\/ print the average of 20 readings from the ADC\r\n\r\n  Serial.print(&quot;get value: \\t\\t&quot;);\r\n  Serial.println(scale.get_value(5));   \/\/ print the average of 5 readings from the ADC minus the tare weight (not set yet)\r\n\r\n  Serial.print(&quot;get units: \\t\\t&quot;);\r\n  Serial.println(scale.get_units(5), 1);  \/\/ print the average of 5 readings from the ADC minus tare weight (not set) divided\r\n            \/\/ by the SCALE parameter (not set yet)\r\n            \r\n  scale.set_scale(-459.542);\r\n  \/\/scale.set_scale(-471.497);                      \/\/ this value is obtained by calibrating the scale with known weights; see the README for details\r\n  scale.tare();               \/\/ reset the scale to 0\r\n\r\n  Serial.println(&quot;After setting up the scale:&quot;);\r\n\r\n  Serial.print(&quot;read: \\t\\t&quot;);\r\n  Serial.println(scale.read());                 \/\/ print a raw reading from the ADC\r\n\r\n  Serial.print(&quot;read average: \\t\\t&quot;);\r\n  Serial.println(scale.read_average(20));       \/\/ print the average of 20 readings from the ADC\r\n\r\n  Serial.print(&quot;get value: \\t\\t&quot;);\r\n  Serial.println(scale.get_value(5));   \/\/ print the average of 5 readings from the ADC minus the tare weight, set with tare()\r\n\r\n  Serial.print(&quot;get units: \\t\\t&quot;);\r\n  Serial.println(scale.get_units(5), 1);        \/\/ print the average of 5 readings from the ADC minus tare weight, divided\r\n            \/\/ by the SCALE parameter set with set_scale\r\n\r\n  Serial.println(&quot;Readings:&quot;);\r\n}\r\n\r\nvoid loop() {\r\n  Serial.print(&quot;one reading:\\t&quot;);\r\n  Serial.print(scale.get_units(), 1);\r\n  Serial.print(&quot;\\t| average:\\t&quot;);\r\n  Serial.println(scale.get_units(10), 5);\r\n\r\n  delay(5000);\r\n}\r\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/Arduino\/Arduino_Load_Cell\/Arduino_Test_Load_Cell.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How the Code Works<\/h3>\n\n\n\n<p>Start by including the required library.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>#include \"HX711.h\"<\/code><\/pre>\n\n\n\n<p>The following lines define the pins you&#8217;ll use to connect to the HX711 amplifier. We chose Pin 2 and Pin 3. You can use any other digital pins.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>const int LOADCELL_DOUT_PIN = 2;\nconst int LOADCELL_SCK_PIN = 3;<\/code><\/pre>\n\n\n\n<p>Then, create an instance of the HX711 library called <span class=\"rnthl rntliteral\">scale<\/span> that you&#8217;ll use later on to get the measurements.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>HX711 scale;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">setup()<\/h4>\n\n\n\n<p>In the <span class=\"rnthl rntliteral\">setup()<\/span>, initialize the Serial monitor.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>Serial.begin(57600);<\/code><\/pre>\n\n\n\n<p>Initialize the load cell by calling the <span class=\"rnthl rntliteral\">begin()<\/span> method on the <span class=\"rnthl rntliteral\">scale<\/span> object and passing the digital pins as arguments.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);<\/code><\/pre>\n\n\n\n<p>Then, it calls several methods that you can use to get readings using the library.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span class=\"rnthl rntliteral\">read()<\/span>: gets a raw reading from the sensor<\/li>\n\n\n\n<li><span class=\"rnthl rntliteral\">read_average(number of readings)<\/span>: gets the average of the latest defined number of readings<\/li>\n\n\n\n<li><span class=\"rnthl rntliteral\">get_value(number of readings)<\/span>: gets the average of the last defined number of readings minus the tare weight;<\/li>\n\n\n\n<li><span class=\"rnthl rntliteral\">get_units(number of readings)<\/span>: gets the average of the last defined number of readings minus the tare weight divided by the calibration factor \u2014 this will output a reading in your desired units.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>Serial.println(\"Before setting up the scale:\");\nSerial.print(\"read: \\t\\t\");\nSerial.println(scale.read());      \/\/ print a raw reading from the ADC\n\nSerial.print(\"read average: \\t\\t\");\nSerial.println(scale.read_average(20));   \/\/ print the average of 20 readings from the ADC\n\nSerial.print(\"get value: \\t\\t\");\nSerial.println(scale.get_value(5));   \/\/ print the average of 5 readings from the ADC minus the tare weight (not set yet)\n\nSerial.print(\"get units: \\t\\t\");\nSerial.println(scale.get_units(5), 1);  \/\/ print the average of 5 readings from the ADC minus tare weight (not set) divided\n\/\/ by the SCALE parameter (not set yet)<\/code><\/pre>\n\n\n\n<p>In the following line, don&#8217;t forget to insert your calibration factor. It uses the <span class=\"rnthl rntliteral\">set_scale()<\/span> method.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>scale.set_scale(INSERT YOUR CALIBRATION FACTOR)<\/code><\/pre>\n\n\n\n<p>Then, call the <span class=\"rnthl rntliteral\">tare()<\/span> method to tare the scale.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>scale.tare();               \/\/ reset the scale to 0<\/code><\/pre>\n\n\n\n<p>After this setup, the scale should be ready to get accurate readings in your desired unit. The example calls the same previous methods so that you can see the difference before and after setting up the scale.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>Serial.print(\"read: \\t\\t\");\nSerial.println(scale.read());                 \/\/ print a raw reading from the ADC\n\nSerial.print(\"read average: \\t\\t\");\nSerial.println(scale.read_average(20));       \/\/ print the average of 20 readings from the ADC\n\nSerial.print(\"get value: \\t\\t\");\nSerial.println(scale.get_value(5));   \/\/ print the average of 5 readings from the ADC minus the tare weight, set with tare()\n\nSerial.print(\"get units: \\t\\t\");\nSerial.println(scale.get_units(5), 1);        \/\/ print the average of 5 readings from the ADC minus tare weight, divided\n\/\/ by the SCALE parameter set with set_scale<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">loop()<\/h4>\n\n\n\n<p>In the <span class=\"rnthl rntliteral\">loop()<\/span>, the example calls the <span class=\"rnthl rntliteral\">get_units()<\/span> method in two different ways: to get one single reading (without any parameters) and to get the average of the last 10 readings.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>Serial.print(\"one reading:\\t\");\nSerial.print(scale.get_units(), 1);\nSerial.print(\"\\t| average:\\t\");\nSerial.println(scale.get_units(10), 5);<\/code><\/pre>\n\n\n\n<p>It shuts down the ADC that reads the sensor by using the <span class=\"rnthl rntliteral\">power_down()<\/span> method. Then, it waits for 5 seconds, powers up the ADC (<span class=\"rnthl rntliteral\">power_up()<\/span>), and the <span class=\"rnthl rntliteral\">loop()<\/span> repeats. So, you&#8217;ll get new readings on the Serial Monitor every 5 seconds.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>scale.power_down();  \/\/ put the ADC in sleep mode\ndelay(5000);\nscale.power_up();<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Demonstration<\/h2>\n\n\n\n<p>Upload the code to your Arduino board. After uploading, open the Serial Monitor at a baud rate of 115200. <\/p>\n\n\n\n<p>Let the code run a few seconds so that it has time to set up the scale (you&#8217;ll see the message on the Serial Monitor). Then, place any object on the scale to measure it and you&#8217;ll get the results on the Serial Monitor.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"684\" height=\"495\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-digital-scale-demonstration.png?resize=684%2C495&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Load cell demonstration Arduino IDE Serial Monitor\" class=\"wp-image-110429\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-digital-scale-demonstration.png?w=684&amp;quality=100&amp;strip=all&amp;ssl=1 684w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-digital-scale-demonstration.png?resize=300%2C217&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 684px) 100vw, 684px\" \/><\/figure><\/div>\n\n\n<p>I experimented with several objects and compared them against the value on my kitchen scale, and the results were the same. So, I can say that my Arduino scale is at least as accurate as my kitchen scale.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"digital-scale-arduino\">Digital Scale with Arduino<\/h2>\n\n\n\n<p>In this section, we&#8217;ll create a simple digital scale with the Arduino. We&#8217;ll add an OLED display to show the results and a pushbutton to tare the scale.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/arduino-digital-scale.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Arduino Digital Scale\" class=\"wp-image-110434\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/arduino-digital-scale.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/arduino-digital-scale.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">Parts Required<\/h3>\n\n\n\n<p>Here&#8217;s a list of the parts required for this project:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/compatible-arduino-uno-r3-board\/\" target=\"_blank\" rel=\"noreferrer noopener\">Arduino UNO<\/a> (read <a href=\"https:\/\/makeradvisor.com\/best-arduino-starter-kits\/\" target=\"_blank\" rel=\"noreferrer noopener\">Best Arduino starter kits<\/a>)<\/li>\n\n\n\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/load-cell-hx711-amplifier\/\" target=\"_blank\" rel=\"noreferrer noopener\">Load Cell with HX711 Amplifier<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/oled-display-128x64-0-96-inch\/\" target=\"_blank\" rel=\"noreferrer noopener\">I2C SSD1306 OLED Display<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/pushbuttons-kit\/\" target=\"_blank\" rel=\"noreferrer noopener\">Pushbutton<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/resistors-kits\/\" target=\"_blank\" rel=\"noreferrer noopener\">10K Ohm Resistor<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/mb-102-solderless-breadboard-830-points\/\" target=\"_blank\" rel=\"noreferrer noopener\">Breadboard<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/jumper-wires-kit-120-pieces\/\" target=\"_blank\" rel=\"noreferrer noopener\">Jumper Wires<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Schematic Diagram<\/h3>\n\n\n\n<p>Add an OLED display and a pushbutton to your previous circuit on the following pins:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>OLED Display<\/strong><\/td><td><strong>Arduino<\/strong><\/td><\/tr><tr><td><span class=\"rnthl rntcred\">VCC<\/span><\/td><td>3.3V or 5V*<\/td><\/tr><tr><td><span class=\"rnthl rntcblack\">GND<\/span><\/td><td>GND<\/td><\/tr><tr><td><span class=\"rnthl rntclblue\">SDA<\/span><\/td><td>A4<\/td><\/tr><tr><td><span class=\"rnthl rntclgreen\">SCL<\/span><\/td><td>A5<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>*connect to 3.3V or 5V depending on the model.<\/p>\n\n\n\n<p class=\"rntbox rntclblue\">Not familiar with the OLED display? Read: <a href=\"https:\/\/randomnerdtutorials.com\/guide-for-oled-display-with-arduino\/\">Guide for I2C OLED Display with Arduino<\/a>.<\/p>\n\n\n\n<p>Wire the pushbutton via a 10kOhm pull-down resistor to <span class=\"rnthl rntcpurple\">Pin 4<\/span>. The other lead of the pushbutton should be connected to 5V. You can use any other Arduino digital pin. <\/p>\n\n\n\n<p>You can follow the next schematic diagram to wire your parts.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-digital-scale-schematic-diagram.png?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"1132\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-digital-scale-schematic-diagram.png?resize=1200%2C1132&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 Digital Scale Schematic Diagram\" class=\"wp-image-110437\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-digital-scale-schematic-diagram.png?w=1630&amp;quality=100&amp;strip=all&amp;ssl=1 1630w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-digital-scale-schematic-diagram.png?resize=300%2C283&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-digital-scale-schematic-diagram.png?resize=1024%2C966&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-digital-scale-schematic-diagram.png?resize=768%2C725&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-digital-scale-schematic-diagram.png?resize=1536%2C1449&amp;quality=100&amp;strip=all&amp;ssl=1 1536w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/a><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">Arduino Digital Scale &#8211; Code<\/h3>\n\n\n\n<p>For simplicity, we&#8217;ll handle the pushbutton using a simple library that detects button presses with debouncing (so we don&#8217;t need to worry about that in our code). To write to the OLED display, we&#8217;ll use the <a href=\"https:\/\/github.com\/adafruit\/Adafruit_SSD1306\" target=\"_blank\" rel=\"noreferrer noopener\">Adafruit SSD1306<\/a> and <a href=\"https:\/\/github.com\/adafruit\/Adafruit-GFX-Library\" target=\"_blank\" rel=\"noreferrer noopener\">Adafruit GFX<\/a> libraries.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Pushbutton Library<\/h4>\n\n\n\n<p>There are many libraries with many functionalities to handle pushbuttons. We&#8217;ll use the <a href=\"https:\/\/github.com\/pololu\/pushbutton-arduino\" target=\"_blank\" rel=\"noreferrer noopener\">pushbutton library by polulu<\/a>. It is a simple library but comes with everything we need for this project. In your Arduino IDE, go to <strong>Sketch <\/strong>&gt; <strong>Include Library<\/strong> &gt; <strong>Manage Libraries<\/strong> and search for &#8220;<strong>pushbutton<\/strong>&#8220;. Install the pushbutton library by polulu.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"786\" height=\"443\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/pushbutton-library-polulu-arduino-ide.png?resize=786%2C443&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Pushbutton Library Arduino IDE Polulu\" class=\"wp-image-110046\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/pushbutton-library-polulu-arduino-ide.png?w=786&amp;quality=100&amp;strip=all&amp;ssl=1 786w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/pushbutton-library-polulu-arduino-ide.png?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/pushbutton-library-polulu-arduino-ide.png?resize=768%2C433&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 786px) 100vw, 786px\" \/><\/figure><\/div>\n\n\n<p>Alternatively, if you don&#8217;t want to use the library you can add the debounce code yourself (which is not difficult). For a debounce code example, in the Arduino IDE, you can go to File &gt; Examples &gt; Digital &gt; Debounce. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">OLED Libraries<\/h4>\n\n\n\n<p>We\u2019ll use the following libraries to control the OLED display. Make sure you have these libraries installed:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/adafruit\/Adafruit_SSD1306\" target=\"_blank\" rel=\"noreferrer noopener\">Adafruit_SSD1306 library<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/adafruit\/Adafruit-GFX-Library\" target=\"_blank\" rel=\"noreferrer noopener\">Adafruit_GFX library<\/a><\/li>\n<\/ul>\n\n\n\n<p>You can install the libraries using the Arduino Library Manager. Go to&nbsp;<strong>Sketch&nbsp;<\/strong>&gt;&nbsp;<strong>Include Library<\/strong>&nbsp;&gt;&nbsp;<strong>Manage Libraries<\/strong>&nbsp;and search for the library name.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Code<\/h3>\n\n\n\n<p>Copy the following code to your Arduino IDE. Before uploading it to the Arduino board, you need to insert your calibration factor (<a href=\"#calibrate-load-cell\">obtained previously<\/a>).<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/*\r\n  Rui Santos\r\n  Complete project details at https:\/\/RandomNerdTutorials.com\/arduino-load-cell-hx711\/\r\n  \r\n  Permission is hereby granted, free of charge, to any person obtaining a copy\r\n  of this software and associated documentation files.\r\n  \r\n  The above copyright notice and this permission notice shall be included in all\r\n  copies or substantial portions of the Software.\r\n*\/\r\n\r\n\/\/ Library HX711 by Bogdan Necula: https:\/\/github.com\/bogde\/HX711\r\n\/\/ Library: pushbutton by polulu: https:\/\/github.com\/pololu\/pushbutton-arduino\r\n\r\n#include &quot;HX711.h&quot;\r\n#include &lt;Wire.h&gt;\r\n#include &lt;Adafruit_GFX.h&gt;\r\n#include &lt;Adafruit_SSD1306.h&gt;\r\n#include &lt;Pushbutton.h&gt;\r\n\r\n\/\/ HX711 circuit wiring\r\nconst int LOADCELL_DOUT_PIN = 2;\r\nconst int LOADCELL_SCK_PIN = 3;\r\n\r\nHX711 scale;\r\nint reading;\r\nint lastReading;\r\n\/\/REPLACE WITH YOUR CALIBRATION FACTOR\r\n#define CALIBRATION_FACTOR -476.592\r\n\r\n\/\/OLED Display\r\n#define SCREEN_WIDTH 128 \/\/ OLED display width, in pixels\r\n#define SCREEN_HEIGHT 64 \/\/ OLED display height, in pixels\r\n\r\n\/\/ Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)\r\n#define OLED_RESET     -1 \/\/ Reset pin # (or -1 if sharing Arduino reset pin)\r\nAdafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &amp;Wire, OLED_RESET);\r\n\r\n\/\/Button\r\n#define BUTTON_PIN 4\r\nPushbutton button(BUTTON_PIN);\r\n\r\nvoid displayWeight(int weight){\r\n  display.clearDisplay();\r\n  display.setTextSize(1);\r\n  display.setTextColor(WHITE);\r\n  display.setCursor(0, 10);\r\n  \/\/ Display static text\r\n  display.println(&quot;Weight:&quot;);\r\n  display.display();\r\n  display.setCursor(0, 30);\r\n  display.setTextSize(2);\r\n  display.print(weight);\r\n  display.print(&quot; &quot;);\r\n  display.print(&quot;g&quot;);\r\n  display.display();  \r\n}\r\n\r\nvoid setup() {\r\n  Serial.begin(57200);\r\n\r\n  if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { \r\n    Serial.println(F(&quot;SSD1306 allocation failed&quot;));\r\n    for(;;);\r\n  }\r\n  delay(2000);\r\n  display.clearDisplay();\r\n  display.setTextColor(WHITE);\r\n  \r\n  Serial.println(&quot;Initializing the scale&quot;);\r\n  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);\r\n\r\n  scale.set_scale(CALIBRATION_FACTOR);   \/\/ this value is obtained by calibrating the scale with known weights\r\n  scale.tare();               \/\/ reset the scale to 0\r\n}\r\n\r\nvoid loop() {\r\n  \r\n  if (button.getSingleDebouncedPress()){\r\n    Serial.print(&quot;tare...&quot;);\r\n    scale.tare();\r\n  }\r\n  \r\n  if (scale.wait_ready_timeout(200)) {\r\n    reading = round(scale.get_units());\r\n    Serial.print(&quot;Weight: &quot;);\r\n    Serial.println(reading);\r\n    if (reading != lastReading){\r\n      displayWeight(reading); \r\n    }\r\n    lastReading = reading;\r\n  }\r\n  else {\r\n    Serial.println(&quot;HX711 not found.&quot;);\r\n  }\r\n}\r\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/Arduino\/Arduino_Load_Cell\/Arduino_Digital_Scale.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How the Code Works<\/h3>\n\n\n\n<p>Start by including the required libraries:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>#include \"HX711.h\"\n#include &lt;Wire.h&gt;\n#include &lt;Adafruit_GFX.h&gt;\n#include &lt;Adafruit_SSD1306.h&gt;\n#include &lt;Pushbutton.h&gt;<\/code><\/pre>\n\n\n\n<p>Define the pins for the HX711 (load cell)\u2014we&#8217;re using the same as previous examples:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>\/\/ HX711 circuit wiring\nconst int LOADCELL_DOUT_PIN = 2;\nconst int LOADCELL_SCK_PIN = 3;<\/code><\/pre>\n\n\n\n<p>Create an <span class=\"rnthl rntliteral\">HX711<\/span> instance called <span class=\"rnthl rntliteral\">scale<\/span>.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>HX711 scale;<\/code><\/pre>\n\n\n\n<p>The following variables will hold the current weight reading and the last weight reading. We only want to update the OLED display in case there&#8217;s a new reading, so that&#8217;s why we need these two variables. Additionally, we don&#8217;t want to measure decimals of grams which will make the scale too sensitive for our application\u2014that&#8217;s why these variables are integers. If you need decimals in your measurements, you can define float variables instead.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>int reading;\nint lastReading;<\/code><\/pre>\n\n\n\n<p>Don&#8217;t forget to replace the next value with your calibration factor. In my case, that line of code looks as follows (my value is negative):<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>#define CALIBRATION_FACTOR -459.542<\/code><\/pre>\n\n\n\n<p>Next, we need to define the OLED width and height:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>#define SCREEN_WIDTH 128 \/\/ OLED display width, in pixels\n#define SCREEN_HEIGHT 64 \/\/ OLED display height, in pixels<\/code><\/pre>\n\n\n\n<p>And create an instance of the <span class=\"rnthl rntliteral\">Adafruit_SSD1306<\/span> library called <span class=\"rnthl rntliteral\">display<\/span>.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &amp;Wire, OLED_RESET);<\/code><\/pre>\n\n\n\n<p>Define the GPIO you&#8217;ll use to read the button and create a <span class=\"rnthl rntliteral\">Pushbutton<\/span> object called <span class=\"rnthl rntliteral\">button<\/span> on that pin.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>#define BUTTON_PIN 4\nPushbutton button(BUTTON_PIN);<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">displayWeight() function<\/h4>\n\n\n\n<p>We created a function called <span class=\"rnthl rntliteral\">displayWeight()<\/span> that accepts as arguments the weight you want to display on the OLED.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>void displayWeight(int weight){\n  display.clearDisplay();\n  display.setTextSize(1);\n  display.setTextColor(WHITE);\n  display.setCursor(0, 10);\n  \/\/ Display static text\n  display.println(\"Weight:\");\n  display.display();\n  display.setCursor(0, 30);\n  display.setTextSize(2);\n  display.print(weight);\n  display.print(\" \");\n  display.print(\"g\");\n  display.display();  \n}<\/code><\/pre>\n\n\n\n<p class=\"rntbox rntclblue\">Not familiar with the OLED display? Read: <a href=\"https:\/\/randomnerdtutorials.com\/esp8266-0-96-inch-oled-display-with-arduino-ide\/\"><\/a><a href=\"https:\/\/randomnerdtutorials.com\/guide-for-oled-display-with-arduino\/\">Guide for I2C OLED Display with Arduino<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">setup()<\/h4>\n\n\n\n<p>In the <span class=\"rnthl rntliteral\">setup()<\/span>, initialize the Serial Monitor.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>Serial.begin(57200);<\/code><\/pre>\n\n\n\n<p>Initialize the OLED display:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { \n  Serial.println(F(\"SSD1306 allocation failed\"));\n  for(;;);\n}\ndelay(2000);\ndisplay.clearDisplay();\ndisplay.setTextColor(WHITE);<\/code><\/pre>\n\n\n\n<p>And finally, initialize the load cell:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>Serial.println(\"Initializing the scale\");\nscale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);\n\nscale.set_scale(CALIBRATION_FACTOR);   \/\/ this value is obtained by calibrating the scale with known weights\nscale.tare();               \/\/ reset the scale to 0<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">loop()<\/h4>\n\n\n\n<p>The pushbutton library allows us to wait for an event in case of a pushbutton press or pushbutton release. In this case, we check whether the pushbutton was pushed using the <span class=\"rnthl rntliteral\">getSingleDebouncePress()<\/span> method and call the <span class=\"rnthl rntliteral\">tare()<\/span> function if the button was pressed.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>if (button.getSingleDebouncedPress()){\n  Serial.print(\"tare...\");\n  scale.tare();\n}<\/code><\/pre>\n\n\n\n<p>The HX711 provides a <a href=\"https:\/\/github.com\/bogde\/HX711#non-blocking-mode\" target=\"_blank\" rel=\"noreferrer noopener\">non-blocking method to get readings<\/a>. It defines a maximum timeout to wait for the hardware to be initialized and doesn&#8217;t block your code in case the scale gets disconnected or in case of hardware failures.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>if (scale.wait_ready_timeout(200)) {\n  reading = round(scale.get_units());\n  Serial.print(\"Weight: \");\n  Serial.println(reading);<\/code><\/pre>\n\n\n\n<p>In the <span class=\"rnthl rntliteral\">loop()<\/span>, we are constantly getting new readings and checking them against the latest reading. If we got a new measurement, we call the <span class=\"rnthl rntliteral\">displayWeight()<\/span> function to update the OLED display.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>if (reading != lastReading){\n  displayWeight(reading); \n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Demonstration<\/h3>\n\n\n\n<p>After uploading the code to your board, you can start weighing objects with your load cell. The readings will show up on the OLED display. You can tare the scale by pressing the pushbutton.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-digital-scale-demonstration.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Arduino digital scale demonstration\" class=\"wp-image-110435\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-digital-scale-demonstration.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-digital-scale-demonstration.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Once again, the readings on my Arduino digital scale correspond to the readings on my kitchen scale.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"432\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/digital-scale-kitchen.jpg?resize=750%2C432&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-110095\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/digital-scale-kitchen.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/03\/digital-scale-kitchen.jpg?resize=300%2C173&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>In this tutorial, you learned how to interface a strain gauge load cell with the Arduino board using the HX711 amplifier. The output of the load cell is proportional to the force applied. So, you can calibrate it to be used in g, kg, ib, or any other unit that makes sense for your project.<\/p>\n\n\n\n<p>In summary, you learned how to calibrate the scale and how to get the weight of objects. You also learned how to create a simple digital scale with the Arduino using an OLED display to show the measurements and a pushbutton to tare the scale.<\/p>\n\n\n\n<p>We hope you found this tutorial useful to get you started with a load cell. Besides being useful to measure the weight of objects, it can also be useful in many applications like detecting the presence of an object, estimating the level of liquid in a tank, calculating water&#8217;s evaporation rate, checking if there&#8217;s food on your pet&#8217;s bowl, etc.<\/p>\n\n\n\n<p>We have tutorials for other popular sensors that you might find useful:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/arduino-k-type-thermocouple-max6675\/\">Arduino: K-Type Thermocouple with MAX6675 Amplifier (<strong>Temperature Sensor<\/strong>)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/guide-for-ds18b20-temperature-sensor-with-arduino\/\">Arduino with DS18B20:\u00a0<strong>Temperature Sensor<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/arduino-lm35-lm335-lm34-temperature-sensor\/\">Guide for LM35, LM335, and LM34 <strong>Temperature Sensors<\/strong> with Arduino<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/bme680-sensor-arduino-gas-temperature-humidity-pressure\/\">Arduino with BME680:\u00a0<strong>Gas, Pressure, Humidity, and Temperature<\/strong>\u00a0<strong>Sensor<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/bme280-sensor-arduino-pressure-temperature-humidity\/\">Arduino with BME280:\u00a0<strong>Temperature, Humidity, and Pressure Sensor<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/complete-guide-for-dht11dht22-humidity-and-temperature-sensor-with-arduino\/\">Arduino with DHT11\/DHT22:\u00a0<strong>Temperature, and Humidity Sensor<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/arduino-bmp388\/\">Arduino with BMP388:\u00a0<strong>Altimeter Sensor<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/complete-guide-for-ultrasonic-sensor-hc-sr04\/\">Arduino with <strong>Ultrasonic Sensor<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/arduino-mpu-6050-accelerometer-gyroscope\/\">Arduino Guide for <strong>MPU-6050 Accelerometer and Gyroscope Sensor<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/arduino-bh1750-ambient-light-sensor\/\">Arduino with BH1750\u00a0<strong>Ambient Light Sensor<\/strong><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/arduino-tds-water-quality-sensor\/\">Arduino with TDS Sensor (<strong>Water Quality<\/strong>)<\/a><\/li>\n<\/ul>\n\n\n\n<p>Learn more about the Arduino with our resources:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/arduino-step-by-step-projects\/\">Arduino Step by step Projects<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/projects-arduino\/\">Free Arduino projects and tutorials<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, you&#8217;ll learn how to create a digital scale with the Arduino using a load cell and the HX711 amplifier. First, you&#8217;ll learn how to wire the load &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Arduino with Load Cell and HX711 Amplifier (Digital Scale)\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/arduino-load-cell-hx711\/#more-110379\" aria-label=\"Read more about Arduino with Load Cell and HX711 Amplifier (Digital Scale)\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":5,"featured_media":110383,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[303,267,2,302,245,264],"tags":[],"class_list":["post-110379","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-0-arduino","category-arduino-project","category-arduino","category-0-guide","category-arduino-ide","category-project"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/Arduino-load-cell-HX711-amplifier.jpg?fit=1280%2C720&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/110379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=110379"}],"version-history":[{"count":15,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/110379\/revisions"}],"predecessor-version":[{"id":166966,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/110379\/revisions\/166966"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/110383"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=110379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=110379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=110379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}