Interfacing Load Cell with Raspberry Pi 3 (via HX711) ⚖️
A load cell is a transducer that converts force (weight) into an electrical signal. The HX711 is a precision 24-bit analog-to-digital converter (ADC) designed for weigh scales. Today we’ll connect a load cell to Raspberry Pi 3 using the HX711 module. 🧪
🔧 Components Required
Component | Quantity |
---|---|
Raspberry Pi 3 | 1 |
Load Cell | 1 |
HX711 Module | 1 |
Jumper Wires | 6 |
Breadboard (optional) | 1 |
🔌 Pin Connections
HX711 Pin | Raspberry Pi Pin | Pin Number |
---|---|---|
VCC | 5V | Pin 2 |
GND | Ground | Pin 6 |
DT | GPIO 5 | Pin 29 |
SCK | GPIO 6 | Pin 31 |

Figure: Load Cell connected to Raspberry Pi 3 via HX711
💻 Python Code
from hx711 import HX711
import RPi.GPIO as GPIO
import time
hx = HX711(dout_pin=5, pd_sck_pin=6)
hx.set_reading_format("MSB", "MSB")
hx.set_reference_unit(1)
hx.reset()
hx.tare()
print("Place item on load cell")
try:
while True:
weight = hx.get_weight(5)
print(f"Weight: {weight:.2f} grams")
hx.power_down()
hx.power_up()
time.sleep(1)
except KeyboardInterrupt:
print("Exiting...")
GPIO.cleanup()
📌 Summary
This setup lets you build your own weighing machine, useful for kitchen scales, industrial applications, or science projects! ⚖️🍽️
Raspberry Pi 3 सह लोड सेल व HX711 कसे जोडावे ⚖️ (मराठी)
लोड सेल हे उपकरण वजन मोजण्यासाठी वापरले जाते. HX711 हा त्यासाठी खास तयार केलेला अॅनालॉग-टू-डिजिटल कन्वर्टर आहे. चला याला Raspberry Pi 3 सोबत जोडण्याची प्रक्रिया बघूया. 🧪
🔧 लागणारे साहित्य
साहित्य | प्रमाण |
---|---|
Raspberry Pi 3 | 1 |
लोड सेल | 1 |
HX711 मॉड्यूल | 1 |
जंपर वायर | 6 |
ब्रेडबोर्ड (पर्यायी) | 1 |
🔌 वायरिंग जोडणी
HX711 पिन | Raspberry Pi पिन | पिन क्रमांक |
---|---|---|
VCC | 5V | पिन 2 |
GND | GND | पिन 6 |
DT | GPIO 5 | पिन 29 |
SCK | GPIO 6 | पिन 31 |
💻 Python कोड
लोड सेलचे वाचन करण्यासाठी खालील कोड वापरा:
# वरील इंग्रजी कोड लागू आहे (तेच वापरा)
📌 सारांश
हे सर्किट वापरून तुम्ही स्वतःची इलेक्ट्रॉनिक वजन काटा बनवू शकता. हे शिक्षण, प्रयोगशाळा व स्वयंपाकघरासाठी उपयुक्त आहे! 🥣📏
Comments