Build it step by step
0 of 6 doneBuild the bridge
Join the two sensors' red wires to E+ and the two blacks to E-. The white wires go to A+ and A-.
Mount the sensors
Fix each between a top hook plate and a bottom hook plate so the load shares between them. Use metal brackets and bolts.
Wire the HX711 and display
DT to D2, SCK to D3 and the OLED on A4 and A5.
Find the raw value
Set CAL_FACTOR to 1. Hang a known weight, such as a 1 kg dumbbell, and read the raw number.
Calibrate
CAL_FACTOR is raw reading divided by the weight in kg. Enter it and upload again.
Use it
Press tare with nothing hanging, then lift. The peak value stays until you reset it.
How do you build a digital hanging scale?
A load cell scale for luggage or fish with peak hold and tare. You need Arduino Nano, Weight sensor 50 kg half-bridge (bathroom scale) × 2, HX711 load cell amplifier, SSD1306 OLED Display, Tactile push button 6 mm × 2, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm). It takes 6 steps and about 90 minutes.
- Level
- Beginner
- Time
- About 90 min
- Parts
- 7
Wiring
| From | To | Why |
|---|---|---|
| Two half-bridge sensors, red wires joined | HX711 E+ | Excitation positive |
| Two half-bridge sensors, black wires joined | HX711 E- | Excitation negative |
| Sensor 1 white wire | HX711 A+ | Signal positive |
| Sensor 2 white wire | HX711 A- | Signal negative |
| HX711 DT | Nano D2 | Data |
| HX711 SCK | Nano D3 | Clock |
| HX711 VCC and GND | Nano 5V and GND | Supply |
| OLED SDA and SCL | Nano A4 and A5 | Display |
| Tare button | Nano D4 and GND | Zero the scale |
| Peak-reset button | Nano D5 and GND | Clear the peak |
Code
Arduino IDE, board "Arduino Nano" (processor ATmega328P, or ATmega328P (Old Bootloader) for clones). Install "HX711" by Rob Tillaart or by bogde (the code above uses bogde's version) and the Adafruit SSD1306 and GFX libraries. Run it once with CAL_FACTOR 1 and read the raw value on the serial monitor, then calibrate (see steps).
Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).
#include <HX711.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
HX711 scale;
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
const byte TARE_BTN = 4, PEAK_BTN = 5;
const float CAL_FACTOR = 20000.0; // raw units per kg: measure it, see the steps
float peak = 0;
void setup() {
pinMode(TARE_BTN, INPUT_PULLUP); pinMode(PEAK_BTN, INPUT_PULLUP);
scale.begin(2, 3);
scale.set_scale(CAL_FACTOR);
scale.tare();
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C);
oled.setTextColor(SSD1306_WHITE);
Serial.begin(9600);
}
void loop() {
if (digitalRead(TARE_BTN) == LOW) { scale.tare(); peak = 0; delay(300); }
if (digitalRead(PEAK_BTN) == LOW) { peak = 0; delay(300); }
float kg = scale.get_units(4);
if (kg > peak) peak = kg;
Serial.print(scale.get_value(4)); Serial.print(" raw "); Serial.print(kg, 2); Serial.println(" kg");
oled.clearDisplay();
oled.setTextSize(3); oled.setCursor(0, 0); oled.print(kg, 2); oled.setTextSize(1); oled.print(" kg");
oled.setTextSize(1); oled.setCursor(0, 36); oled.print(kg * 2.20462, 2); oled.print(" lb");
oled.setCursor(0, 50); oled.print("Peak "); oled.print(peak, 2); oled.print(" kg");
oled.display();
}What the serial monitor should show
Open the serial monitor at the baud rate in the code. This is what our simulator prints for a virtual Arduino Nano with its sensors at their default values. Your numbers will follow your real readings, but the format should match.
0 raw 0.00 kg
Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Nothing hanging | Reads 0.00 kg after tare |
| Known weight | Within about 1 % of the true weight |
| Pull down hard briefly | The peak holds the highest value |
| Hang the weight 10 minutes | The reading drifts by less than 1 % (some creep is normal) |
If it does not work
Reading goes negative when loaded
Swap A+ and A- or use a negative CAL_FACTOR.
Reading is unstable
Keep wires short, use a clean 5 V supply and let the cells warm up for a minute.
One sensor reads wrong
Check each half-bridge has red, black and white wire in the right place.
Reading changes with hook position
The load is not centred. Add a mechanism so the weight hangs under the middle.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the digital hanging scale?
Arduino Nano, Weight sensor 50 kg half-bridge (bathroom scale) × 2, HX711 load cell amplifier, SSD1306 OLED Display, Tactile push button 6 mm × 2, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).
How long does the digital hanging scale take to build?
About 90 minutes for a beginner maker, in 6 steps.
How do I know the digital hanging scale works?
Nothing hanging: Reads 0.00 kg after tare. Known weight: Within about 1 % of the true weight. Pull down hard briefly: The peak holds the highest value.
Reading goes negative when loaded: what should I check?
Swap A+ and A- or use a negative CAL_FACTOR.
Reading is unstable: what should I check?
Keep wires short, use a clean 5 V supply and let the cells warm up for a minute.
One sensor reads wrong: what should I check?
Check each half-bridge has red, black and white wire in the right place.
Reading changes with hook position: what should I check?
The load is not centred. Add a mechanism so the weight hangs under the middle.
