Adjustable LED Weight Limit Indicator With HX711 Scale Using Visuino

by RonFrtek in Circuits > Arduino

73 Views, 1 Favorites, 0 Comments

Adjustable LED Weight Limit Indicator With HX711 Scale Using Visuino

Adjustable LED Weight Limit Indicator With HX711 Scale Using Visuino

This smart weighing scale, built with Visuino, allows you to set a custom weight limit using a rotary encoder. As you weigh an item, the scale’s intuitive LED system indicates whether the weight is within the limit (green LED) or exceeds it (red LED). This project combines the HX711 load cell with the user-friendly Visuino platform for quick and seamless assembly and operation.

Watch the video!

What You Will Need

Scale With HX711.png
VisuinoAdvrtisemenArduinoGiga_1 (1).jpg
breadboard.png
images.jpg
FMT2X9VKEY93G5P.jpg
download.jpg
arduino.jpg
redled.jpg
greenled.jpg
AD267-2.jpg
  1. Arduino board (or any other board)
  2. Breadboard
  3. One Weight Load Cell
  4. One HX711 ADC Sensor Module for Load Cells
  5. OLED Display
  6. Breadboard
  7. Rotary encoder
  8. Green LED
  9. Red LED
  10. 2X 1K ohm resistor
  11. Jumper wires
  12. Visuino program: Download Visuino


Note: You can purchase online Weight Load Cell and HX711 ADC Sensor Module together already as a kit.

The Circuit

2024-12-07_11-48-37.jpg
  1. Connect the Red wire from the Load Cell (Picture 1) to the E+ pin of the HX711 module
  2. Connect the Black wire from the Load Cell (Picture 1) to the E- pin of the HX711 module
  3. Connect the White wire from the Load Cell (Picture 1) to the A- pin of the HX711 module
  4. Connect the Green wire from the Load Cell (Picture 1) to the A+ pin of the HX711 module


  1. Connect HX711 ADC Sensor Module Ground wire(Black wire) to Ground pin of the Arduino board
  2. Connect HX711 ADC Sensor Module Power wire(Red wire) to 5V pin of the Arduino board
  3. Connect HX711 ADC Sensor Module  DT wire(Green wire) to Digital pin 3 of the Arduino Nano board
  4. Connect HX711 ADC Sensor Module  SCK wire(Yellow wire) to Digital pin 2 of the Arduino Nano board


  1. Connect OLED Display pin [SCL] to Arduino pin [SCL]
  2. Connect OLED Display pin [SDA] to Arduino pin [SDA]
  3. Connect OLED Display pin [VCC] to Arduino pin [5v]
  4. Connect OLED Display pin [GND] to Arduino pin [GND]


  1. Connect Arduino pin [5V] to breadboard positive pin [Red line]
  2. Connect Arduino pin [GND] to breadboard negative pin [Black line]
  3. Connect Arduino Digital pin [6] to Resistor1 on the breadboard
  4. Connect other side of the Resistor1 to the Red LED positive pin
  5. Connect Red LED negative pin to breadboard pin [GND]
  6. Connect Arduino Digital pin [7] to Resistor2 on the breadboard
  7. Connect other side of the Resistor2 to the Green LED positive pin
  8. Connect Green LED negative pin to breadboard pin [GND]


  1. Connect Encoder module pin [CLK] to Arduino digital pin [4]
  2. Connect Encoder module pin [DT] to Arduino digital pin [5]
  3. Connect Encoder module pin [+] to Arduino pin [5v]
  4. Connect Encoder module pin [-] to Arduino pin [GND]

Calibrating the Scale

Please check this tutorialon how to calibrate the scale, especially Part 8: Set the Weight Zero Offset for the HX711 Component

Start Visuino, and Select the Arduino Board Type

select-board-uno.jpg
Visuino-Select-Board-UNO.jpg

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

In Visuino Add & Set Components

2024-11-14_19-58-09.jpg
2024-11-14_20-51-22.jpg
2024-12-07_9-32-39.jpg
2024-12-07_9-33-32.jpg
2024-12-07_9-34-40.jpg
2024-11-14_20-58-08.jpg
2024-12-07_9-37-07.jpg
2024-12-07_9-41-04.jpg
2024-12-07_9-41-24.jpg
2024-12-07_9-41-44.jpg
2024-12-07_9-42-04.jpg
2024-11-14_21-03-56.jpg
2024-11-14_21-04-22.jpg
2024-11-14_21-04-39.jpg
2024-12-07_9-47-57.jpg
2024-11-14_21-05-23.jpg
  1. Add "Weight Scale HX711" component and do the calibration like in this tutorial
  2. Add "Analog Multi Source" component
  3. Add "Integer Multi Source" component
  4. Add 2X "Integer To Analog" component
  5. Add 2X "Compare Analog Range" component
  6. Add "OLED I2C" component
  7. Add "Rotary Encoder Sensor" component


  1. Select "MultiSource1" and in the properties window set "Output Pins" to 3
  2. Select "MultiSource2" and in the properties window set "Output Pins" to 3
  3. Select "CompareRange1" and in the properties window set "Is Outside Range" to True, "Range" > "Max" to 1, select "Range" > "Max" and click on the pin icon and select "Float SinkPin"
  4. Select "CompareRange2" and in the properties window set "Include Limits" to True, "Range" > "Max" to 1 and "Range" > "Min" to 1, select "Range" > "Max" and click on the pin icon and select "Float SinkPin"


  1. Double click on the "DisplayOLED1" and in the "Elements" window drag "Draw Text" to the left side and in the "Properties" window set "Size" to 1 and "Text" to "Weight (g)"
  2. In the "Elements" window drag "Text Field" to the lefty side and in the "Properties" window set "Size" to 3 and "Y" to 15
  3.  in the "Elements" window drag "Draw Text" to the left side and in the "Properties" window set "Size" to 1 and "Text" to "LIMIT:" and "Y" to 48
  4. In the "Elements" window drag "Text Field" to the lefty side and in the "Properties" window set "Size" to 2 and "Y" to 48 and "X" to 40
  5. Close the "Elements" window


In Visuino Connect Components

2024-11-14_21-06-44.jpg
SmartScale.png
  1. Connect Arduino Digital pin [3] to "WeightScale1" pin [Sensor Data]
  2. Connect "WeightScale1" pin [Sensor Clock] to Arduino Digital pin [2]
  3. Connect Arduino digital pin [5] to "RotaryEncoderSensor1" pin [Direction]
  4. Connect Arduino digital pin [4] to "RotaryEncoderSensor1" pin [Clock]
  5. Connect "RotaryEncoderSensor1" pin [Out] to "MultiSource2" pin [In]
  6. Connect "WeightScale1" pin [Out] to "MultiSource1" Pin [In]
  7. Connect "MultiSource2" pin [0] to "IntegerToAnalog1" pin [In]
  8. Connect "MultiSource2" pin [1] to "IntegerToAnalog2" pin [In]
  9. Connect "MultiSource2" pin [2] to "DisplayOLED1" > "Text Field2" pin [In]
  10. Connect "MultiSource1" pin [0] to "CompareRange1" pin [In]
  11. Connect "MultiSource1" pin [1] to "CompareRange2" pin [In]
  12. Connect "MultiSource1" pin [3] to to "DisplayOLED1" > "Text Field1" pin [In]
  13. Connect "IntegerToAnalog2" pin [Out] to "CompareRange1" pin [Max]
  14. Connect "IntegerToAnalog1" pin [Out] to "CompareRange2" pin [Max]
  15. Connect "CompareRange1" pin [Out] to Arduino digital pin [6]
  16. Connect "CompareRange2" pin [Out] to Arduino digital pin [7]
  17. Connect "DisplayOLED1" pin I2C [Out] to Arduino pin I2C [In]


Generate, Compile, and Upload the Arduino Code

Visuino-Compile-UNO.jpg

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Play

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this tutorial, you can download it and open it in Visuino: https://www.visuino.eu