HX711 Dual-Channel 24 Bit Precision A/D weight Pressure Sensor

HX711 Dual-Channel 24-Bit Precision A/D Converter
High-Precision Weight Measurement for Load Cells and Strain Gauges
Introduction
The HX711 is a precision 24-bit analog-to-digital converter (ADC) designed for weigh scales and industrial control applications. This module interfaces directly with load cells and strain gauges, providing accurate weight measurements with resolutions up to 1 in 16,777,216.
Key Features
Ultra-High Resolution
24-bit ADC with 16,777,216 counts
Dual-Channel
Channel A (128x gain) and Channel B (32x gain)
Simple Interface
Serial communication with Arduino
Low Power
Typical current: 1.3mA (active), <1μA (sleep)
Technical Specifications
Resolution | 24-bit (16,777,216 counts) |
---|---|
Input Channels | 2 differential (A: 128x, B: 32x gain) |
Data Rate | 10SPS or 80SPS (selectable) |
Supply Voltage | 2.6V – 5.5V (3.3V or 5V compatible) |
Interface | Serial (Clock + Data) |
Operating Temp | -40°C to +85°C |
Pin Configuration

Pin | Label | Description | Arduino Connection |
---|---|---|---|
1 | VCC | Power (2.6-5.5V) | 5V |
2 | GND | Ground | GND |
3 | DT | Data Output | D3 |
4 | SCK | Clock Input | D2 |
5 | A+ | Channel A Positive | Load Cell Red |
6 | A- | Channel A Negative | Load Cell Black |
7 | B+ | Channel B Positive | Load Cell White |
8 | B- | Channel B Negative | Load Cell Green |
Note: Standard load cell wire colors may vary – verify with manufacturer
Load Cell Wiring

1 2 3 4 5 6 7 |
// Typical Load Cell Connections: // HX711 A+ → Load Cell Red // HX711 A- → Load Cell Black // HX711 B+ → Load Cell White // HX711 B- → Load Cell Green // E+ (Excitation+) → Load Cell Red (may vary) // E- (Excitation-) → Load Cell Black (may vary) |
Basic Weight Measurement
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
#include "HX711.h" HX711 scale; const int LOADCELL_DOUT_PIN = 3; const int LOADCELL_SCK_PIN = 2; void setup() { Serial.begin(9600); scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN); // Calibration factor (adjust for your load cell) scale.set_scale(2280.f); scale.tare(); // Reset to zero } void loop() { Serial.print("Weight: "); Serial.print(scale.get_units(), 1); // 1 decimal place Serial.println(" g"); delay(200); } |
Library Required: Install “HX711 Arduino Library” by Bogdan Necula
Advanced Features
Calibration
1 2 3 4 5 6 7 8 9 10 11 |
// Calibration procedure scale.set_scale(); // Reset scale scale.tare(); // Reset to zero Serial.println("Place known weight..."); delay(5000); float reading = scale.get_units(10); float known_weight = 100.0; // 100g test weight float calibration_factor = reading/known_weight; scale.set_scale(calibration_factor); |
Data Rate Selection
1 2 3 |
// Set data rate (10SPS or 80SPS) scale.set_gain(128); // Channel A, 128x gain, 10SPS // scale.set_gain(64); // Channel A, 64x gain, 80SPS |
Power Management
1 2 3 4 |
// Power saving modes scale.power_down(); // Current drops to <1μA delay(1000); scale.power_up(); // Wake up and stabilize |
Multiple Sensors
1 2 3 4 5 6 7 |
// Interface multiple HX711 HX711 scale1, scale2; scale1.begin(D3, D2); scale2.begin(D5, D4); float weight1 = scale1.get_units(); float weight2 = scale2.get_units(); |
Troubleshooting
No Readings
- Verify load cell wiring (check bridge completion)
- Check DT and SCK connections to Arduino
- Ensure stable power supply (add 100μF capacitor)
Unstable Values
- Secure mechanical mounting of load cell
- Add moving average filter in software
- Keep away from vibration sources
Incorrect Weight
- Recalibrate with known weights
- Check for load cell overloading
- Verify excitation voltage (typically 5V)