Introduction: Arduino Nano and Visuino: Measure Weight With HX711 Load Cell Amplifier and ADC

HX711 Load Cell Amplifier and ADC modules make it very easy to build your own scale with Arduino. With the help of Visuino the task is so easy that you can complete it in just couple of minutes.

In this instructable, I will show you how to connect the load cell to the HX711 Load Cell Amplifier, how to connect the HX711 to Arduino, how to program it with Visuino, and how to calibrate your newly created scale.

Step 1: Components

Picture of Components
  1. One Arduino compatible board (I use Arduino Nano, because I have one, but any other will be just fine)
  2. One Weight Load Cell
  3. One HX711 ADC Sensor Module for Load Cells
  4. 4 Female-Female jumper wires

Step 2: Connect the Load Cell to the HX711 Module

Picture of Connect the Load Cell to the HX711 Module
  1. Connect the Red wire from the Load Cell (Picture 1) to the E+ pin of the HX711 module (Picture 2)
  2. Connect the Black wire from the Load Cell (Picture 1) to the E- pin of the HX711 module (Picture 2)
  3. Connect the White wire from the Load Cell (Picture 1) to the A- pin of the HX711 module (Picture 2)
  4. Connect the Green wire from the Load Cell (Picture 1) to the A+ pin of the HX711 module (Picture 2)

Step 3: Connect the HX711 Module to the Arduino Board

Picture of Connect the HX711 Module to the Arduino Board
  1. Connect 5V VCC Power(Red wire), SCK(Yellow wire), DT(Green wire), and Ground(Black wire), to the HX711 ADC Sensor Module (Picture 1)
  2. Connect the other end of the Ground wire(Black wire) to Ground pin of the Arduino board (Picture 2)
  3. Connect the other end of the 5V VCC Power wire(Red wire) to the 5V power pin of the Arduino board (Picture 2)
  4. Connect the other end of the DT wire(Green wire) to Digital pin 3 of the Arduino Nano board (Picture 3)
  5. Connect the other end of the SCK wire(Yellow wire) to Digital pin 2 of the Arduino Nano board (Picture 3)
  6. Picture 4 shows where are the Ground, 5V Power, Digital pin 2, and Digital pin 3, pins of the Arduino Nano

Step 4: Start Visuino, and Select the Arduino Board Type

Picture of Start Visuino, and Select the Arduino Board Type

To start programming the Arduino, you will need to have the Arduino IDE installed from here: http://www.arduino.cc/.

Make sure that you install 1.6.7 or higher, otherwise this Instructable will not work!

The Visuino: https://www.visuino.com also needs to be installed.

  1. Start Visuino as shown in the first picture
  2. Click on the "Tools" button on the Arduino component (Picture 1) in Visuino
  3. When the dialog appears, select "Arduino Nano" as shown in Picture 2

Step 5: In Visuino: Add and Connect HX711 Weight Scale Component

Picture of In Visuino: Add and Connect HX711 Weight Scale Component
  1. Type "weight" in the Filter box of the Component Toolbox then select the "HX711 Weight Scale" component (Picture 1), and drop it in the design area
  2. Connect the "SensorClock" pin of the WeightScale1 component to the to the "Digital" input pin of the "Digital[ 2 ]" channel of the Arduino component (Picture 2)
  3. Connect the "SensorData" input pin of the WeightScale1 component to the "Out" output pin of the "Digital[ 3 ]" channel of the Arduino component (Picture 3)
  4. Connect the "Out" output pin of the WeightScale1 component to the "In" input pin of the "Serial[ 0 ]" channel of the Arduino component (Picture 4)

Step 6: Generate, Compile, and Upload the Arduino Code

Picture of Generate, Compile, and Upload the Arduino Code
  1. In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE
  2. In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)

Step 7: And Play...

Picture of And Play...
  1. Mount one end of the Weight Load Cell to some surface, as example the corner of a desk or table with clamp or in any other way (Picture 1)
  2. If you open Serial Terminal in the Arduino IDE or Visuino, you will see the value measured by the HX711 module (Picture 2)
  3. The values will have little meaning at the moment, as we have not calibrated the scale. Continue with the next step to see how to calibrate the scale

Step 8: In Visuino: Set the Weight Zero Offset for the HX711 Component

Picture of In Visuino: Set the Weight Zero Offset for the HX711 Component

The first step in the calibration is to Zero the scale:

  1. In the design area select the WeightScale1 component (Picture 2)
  2. In the Object Inspector set the value of the "Offset" property to minus the value from the Serial Terminal (Picture 1) in my case -104216 (Picture 2)
  3. Generate, Compile, and Upload the Arduino code as you did in Step 6
  4. If you connect with the Serial Terminal again, you will see that the values are around Zero (Picture 3)

Step 9: In Visuino: Set the Weight Scale Divider for the HX711 Component

Picture of In Visuino: Set the Weight Scale Divider for the HX711 Component

The second step in calibration is to calibrate with some known weight:

  1. Place a 1 gram weight on the sticking end of the Weight Load Cell (Picture 1). In my case I just placed a USB flash memory (Picture 1) to show the process, but for real calibration you will need to place exactly one gram object. To have precise measurement you will need to mount a table on the weight cell, but I will leave you to design it yourself. There are a lot of resources on how to mechanically design scale
  2. Connect to the Arduino with Serial Terminal (Picture 2)
  3. In the design area select the WeightScale1 component (Picture 3)
  4. In the Object Inspector set the value of the "Scale Divider" property to the value from the Serial Terminal (Picture 2) in my case 2565 (Picture 3)
  5. Generate, Compile, and Upload the Arduino code as you did in Step 6
  6. If you connect with the Serial Terminal again, you will see that the values are around One (Picture 4)

Step 10: And Play...

Picture of And Play...

Congratulations! You have created your first Digital Scale with Arduino andHX711 ADC Weight Sensor module.

Picture 1 shows the connected and powered up project.

The Video shows the running project and the serial terminal, as different weights are placed on the Load Cell.

If you open the Serial Terminal in the Arduino IDE or Visuino, and there is no weight on the Load Cell, you will see values around zero displayed (Picture 2)

If you place some weight, you will see it displayed on the terminal (Picture 3)

On Picture 4 you can see the complete Visuino diagram.
Also attached is the Visuino project, that I created for this Instructable. You can download and open it in Visuino: https://www.visuino.com

Comments

mrmonteith (author)2017-03-30

The nice thing is you can get both the HX711, the load cell, and Nano on like E-Bay for like <$10 and free shipping.

BoianM (author)mrmonteith2017-03-30

Yes, that's how I got mines :-)

RobertoD72 (author)2017-02-23

Great! It works well and precisely. My question is (I tried by myself without success) how to connect two HX711 to weigh a beam placed on both end on two load cells? TIA

BoianM (author)RobertoD722017-02-24

Thank you! i think you will need to use the E and B pins for the second cell. Then add a second component in Visuino, and check the "Use Channel B" property for it. I have not tested thou... Will be interesting to see how it works. Maybe I will see to get myself a second loadcell and test :-)

About This Instructable

21,444views

19favorites

License:

More by BoianM:Program Arduino UNO With Visuino to Draw on ILI9341 TFT Touchscreen Display Shield With PenAssemble Kuman Wi-Fi Robot With Camera and ManipulatorArduino and Visuino: Long Distance Remote Light Sensor With RFM95W/RFM98W Makerfabs LoRa Shields
Add instructable to: