meta data for this page
Differences
This shows you the differences between two versions of the page.
| sensor:hx711 [2026/02/15 23:59] – created - external edit 127.0.0.1 | sensor:hx711 [2026/04/11 16:28] (current) – vamsan | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ====== LamaPLC: HX711 24-bit analog-to-digital converter (ADC) ====== | ====== LamaPLC: HX711 24-bit analog-to-digital converter (ADC) ====== | ||
| {{ : | {{ : | ||
| - | The HX711 is a widely used, low-cost 24-bit | + | The HX711 is a widely used, low-cost 24-bit |
| It is a popular component for DIY and commercial weighing-scale projects using microcontrollers such as Arduino and Raspberry Pi. | It is a popular component for DIY and commercial weighing-scale projects using microcontrollers such as Arduino and Raspberry Pi. | ||
| Line 10: | Line 10: | ||
| * **High Resolution: | * **High Resolution: | ||
| * **Integrated Amplifier (PGA):** Features an on-chip, low-noise Programmable Gain Amplifier (PGA) with selectable gains of 32, 64, or 128 to amplify very small signals from load cells. | * **Integrated Amplifier (PGA):** Features an on-chip, low-noise Programmable Gain Amplifier (PGA) with selectable gains of 32, 64, or 128 to amplify very small signals from load cells. | ||
| - | * **Dual Input Channels:** Two selectable differential input channels (Channel A and Channel B). Channel A is programmable | + | * **Dual Input Channels:** Two selectable differential input channels (Channel A and Channel B). Channel A is programmable |
| * **Simple Interface: | * **Simple Interface: | ||
| - | * **Integrated Components: | + | * **Integrated Components: |
| * **Selectable Data Rate:** The output data rate can be set to either 10 samples per second (SPS) or 80 SPS. | * **Selectable Data Rate:** The output data rate can be set to either 10 samples per second (SPS) or 80 SPS. | ||
| * **Power Efficiency: | * **Power Efficiency: | ||
| Line 49: | Line 49: | ||
| {{page>: | {{page>: | ||
| + | ==== HX711 module board pinout ==== | ||
| + | The HX711 module is a 24-bit ADC meant for weight scales, serving as an interface between a load cell (bridge sensor) and a microcontroller. It usually features two pin sets: one for connecting the load cell (input) and another for the microcontroller (output). | ||
| + | |||
| + | ^Pin Label^Name^Description^Typical Wire Colour| | ||
| + | ^E+|Excitation Positive|Positive supply to the load cell.|Red| | ||
| + | ^E-|Excitation Negative|Ground/ | ||
| + | ^A-|Channel A Negative|Negative differential signal input from the load cell.|White| | ||
| + | ^A+|Channel A Positive|Positive differential signal input from the load cell.|Green| | ||
| + | ^B-|Channel B Negative|Secondary input channel (lower priority/ | ||
| + | ^B+|Channel B Positive|Secondary input channel (lower priority/ | ||
| + | ^Vcc|Supply Voltage|Power supply for the module (**2.7V to 5.5V**).|—| | ||
| + | ^GND|Ground|Common circuit ground.|—| | ||
| + | ^DT / DAT|Data Out|Serial data output to the microcontroller.|—| | ||
| + | ^SCK / CLK|Serial Clock|Clock signal input from the microcontroller.|—| | ||
| + | |||
| + | **Key Connection Notes** | ||
| + | |||
| + | * **Microcontroller Pins:** The DT and SCK pins can be connected to any digital GPIO pins on your Arduino or ESP32; they do not require specific hardware SPI pins. | ||
| + | * **Channel A vs. B:** Channel A is the primary input and supports a gain of 128 or 64. Channel B is for a second load cell and has a fixed gain of 32. | ||
| + | * **Voltage Logic:** If you are using a 3.3V microcontroller (like an ESP32), ensure the module is powered appropriately. While many modules work at 3.3V, some " | ||
| + | * **Drift Prevention: | ||
| ==== Arduino & HX711 ==== | ==== Arduino & HX711 ==== | ||
| To get started, you'll need the HX711 Arduino Library by bogde, which is the community standard. You can install it directly via the Arduino Library Manager. | To get started, you'll need the HX711 Arduino Library by bogde, which is the community standard. You can install it directly via the Arduino Library Manager. | ||
| Line 72: | Line 93: | ||
| **Basic Reading & Calibration Code** | **Basic Reading & Calibration Code** | ||
| - | This script | + | This script |
| <code c> | <code c> | ||