A Python project for creating a digital scale using HX711 load cell amplifier and Raspberry Pi.
- Raspberry Pi (any model)
- HX711 Load Cell Amplifier
- Load Cell (strain gauge)
- Jumper wires
- Power supply
Connect the HX711 to the Raspberry Pi as follows:
- VCC -> 3.3V
- GND -> GND
- DT (Data) -> GPIO 21 (or your chosen GPIO)
- SCK (Clock) -> GPIO 20 (or your chosen GPIO)
Connect the load cell to the HX711:
- E+ -> Load cell E+
- E- -> Load cell E-
- A+ -> Load cell A+
- A- -> Load cell A-
- Create a virtual environment:
python -m venv venv- Activate the virtual environment:
- Windows:
venv\Scripts\activate- Unix/MacOS:
source venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Calibrate the scale:
python calibrate.py- Run the scale:
python scale.pyThe project consists of the following components:
hx711 5209 .py: Core HX711 driver implementationcalibrate.py: Calibration utilityscale.py: Main scale applicationconfig.py: Configuration settings
MIT License