Let us resolve the search query immediately: "Sensor" is the correct English noun for a device that detects and responds to a physical stimulus. "Senser" is a misspelling and is not recognized by IEEE, IEC, or any legitimate engineering standard. Search engines process thousands of "senser" queries monthly, likely due to phonetic spelling or auto-translate artifacts. However, knowing how to spell the word will not help you interface one on a workbench. To bridge the gap between terminology and practical application, this guide transitions directly into interfacing one of the most common, yet frequently miswired, precision sensors in embedded systems: the HX711 load cell amplifier paired with an ESP32.
The Sensing Principle: Strain Gauges and Wheatstone Bridges
A load cell translates mechanical force into an electrical resistance change using strain gauges—microscopic foil patterns bonded to a deformable aluminum or steel substrate. When weight is applied, the substrate bends, stretching the foil in the direction of the strain and compressing it perpendicularly (governed by Poisson's ratio). This physical deformation alters the electrical path length and cross-sectional area, shifting the resistance by a few milliohms. Because this delta is far too small to measure directly with a standard microcontroller ADC, the strain gauges are arranged in a Wheatstone bridge configuration.
The Wheatstone bridge outputs a differential voltage in the microvolt range, proportional to the excitation voltage and the applied load. This is where the HX711 chip becomes mandatory. The HX711 contains a Programmable Gain Amplifier (PGA) that boosts this microvolt differential signal by a factor of 128 or 64, followed by a 24-bit analog-to-digital converter (ADC). The chip then shifts this digitized value out via a custom, proprietary serial protocol—not I2C or SPI—requiring precise GPIO timing from your microcontroller to clock the data bits out sequentially.
HX711 Wiring, Pinout, and Logic Level Constraints
Before wiring, you must understand the HX711 power supply range and logic thresholds. The HX711 datasheet specifies an operating voltage of 2.6V to 5.5V. Crucially, the logic high threshold on the DOUT (Data Out) and PD_SCK (Power Down / Serial Clock) pins tracks the VCC supply voltage. If you power the HX711 with 5V, it will output 5V logic highs.
The ESP32-WROOM-32 GPIO pins are strictly 3.3V tolerant. If you wire a 5V-powered HX711 DOUT pin directly to an ESP32 GPIO, you will inject 5V into the microcontroller's input pad, potentially destroying the pin or the entire SoC. Always power the HX711 VCC from the ESP32's 3V3 output, or use a bidirectional logic level shifter.
| HX711 Pin | Function | ESP32 Pin | Supply / Logic Range |
|---|---|---|---|
| VCC | Power Supply | 3V3 | 3.3V (Max 5.5V, but 3.3V required for direct ESP32 logic) |
| GND | Ground Reference | GND | Common ground required |
| DT (DOUT) | Digital Data Output | GPIO 4 | 3.3V Logic High |
| SCK (PD_SCK) | Serial Clock Input | GPIO 5 | 3.3V Logic High |
| E+ | Load Cell Excitation + | N/A (To Load Cell) | Outputs ~VCC (3.3V in this setup) |
| E- | Load Cell Excitation - | N/A (To Load Cell) | Ground Reference |
| A+ | Signal + (Wheatstone) | N/A (To Load Cell) | Microvolt differential |
| A- | Signal - (Wheatstone) | N/A (To Load Cell) | Microvolt differential |
Output Signal Math: Converting Raw ADC Counts to Kilograms
The HX711 outputs a strictly digital signal (a 24-bit two's complement integer), not an analog voltage. The analog-to-digital conversion happens entirely inside the HX711 silicon. The raw output represents the amplified differential voltage, which correlates to mass only after a two-step mathematical transformation: Taring and Scaling.
The raw 24-bit integer ($R$) ranges from -8,388,608 to +8,388,607. To convert this to a physical unit like kilograms, you must capture a baseline reading with zero load (the Tare value, $T$) and determine a Calibration Factor ($C$), which represents the number of raw ADC counts per unit of weight.
The Conversion Formula:
Weight = (Raw_Reading - Tare_Value) / Calibration_Factor
Worked Numeric Example:
Assume your system is powered on with an empty scale. You read the HX711 and average 10 samples to get your Tare value: 82,400.
Next, you place a certified 5.000 kg calibration weight on the scale. The new raw reading averages 195,800.
To find the Calibration Factor ($C$):
C = (195,800 - 82,400) / 5.000 kg = 22,680 counts/kg
Now, if you place an unknown object on the scale and the HX711 outputs a raw reading of 145,000, the math resolves as:
Weight = (145,000 - 82,400) / 22,680 = 2.76 kg
Without this calibration step, the raw numbers are meaningless. Environmental factors, mechanical mounting stress, and variations in the strain gauge bonding mean every single load cell requires its own unique $C$ value. For reliable ESP32 integration, the SparkFun HX711 Hookup Guide provides excellent baseline library implementations for handling this math in C++.
Common Interference Sources and Bench Mitigations
Because the HX711 PGA is amplifying signals in the microvolt range, it acts as an antenna for electromagnetic interference (EMI). If your ESP32 serial monitor shows wild fluctuations (e.g., jumping ±50g on a 5kg scale), you are likely fighting one of three interference sources:
- WiFi RF Interference: The ESP32's 2.4GHz antenna radiates significant RF energy. When the WiFi radio transmits, the RF envelope can induce noise in the high-impedance Wheatstone bridge traces. Fix: Keep the ESP32 antenna at least 5cm away from the HX711 board and load cell wires. Use a metal enclosure tied to circuit ground to shield the analog front-end.
- 50/60Hz Mains Hum: Unshielded load cell wires running parallel to AC mains cables will inductively couple AC noise into the signal lines. Fix: Use twisted-pair shielded cable for the E+, E-, A+, and A- connections, and ground the shield at the HX711 GND pin only (avoiding ground loops).
- Thermal Drift: Strain gauges are temperature-sensitive. If your workbench is near a sunlit window or an HVAC vent, the aluminum substrate will expand/contract, shifting the zero-point (Tare). Fix: Implement a software auto-tare routine that triggers when the system detects a stable, near-zero load for a set duration, or use temperature-compensated load cells for precision lab equipment.
For deeper electrical theory on why the Wheatstone bridge is susceptible to these common-mode and differential-mode noise vectors, refer to the All About Circuits Wheatstone Bridge analysis. Additionally, review the Espressif ESP32 GPIO documentation to ensure your chosen pins do not conflict with internal SPI flash or boot strapping requirements.
Frequently Asked Questions
Is "senser" an accepted technical term in any engineering standard?
No. The IEEE Standards Association, IEC (International Electrotechnical Commission), and ISO exclusively use the spelling "sensor" to define a device that converts a physical quantity into a signal. "Senser" occasionally appears as a proper noun (a surname or specific corporate brand name), but in the context of electronics, embedded systems, and physics, it is strictly a typographical error.
Why does my load cell sensor drift when the ESP32 transmits via WiFi?
This is caused by RF rectification and ground bounce. When the ESP32's WiFi radio draws peak current (up to 240mA during transmission), it causes a momentary voltage sag on the 3.3V rail. Because the HX711 uses the VCC rail as its reference voltage for the internal ADC and the load cell excitation (E+), a sagging VCC directly alters the excitation voltage, resulting in a false weight reading. Mitigate this by adding a 100µF low-ESR tantalum capacitor across the HX711 VCC and GND pins, and separating the ESP32 power supply from the analog sensor supply if possible.
What is the difference between a sensor and a transducer?
While often used interchangeably on the bench, they have distinct definitions in metrology. A transducer is any device that converts one form of energy into another (e.g., a speaker converts electrical energy into acoustic energy). A sensor is a specific subclass of transducer that converts a physical stimulus into an electrical signal specifically for measurement or data acquisition. Therefore, a load cell is both a transducer (mechanical to electrical) and a sensor, but a DC motor is a transducer, not a sensor.






