Creating a Force Sensor Based on ESP32 and HX711—— Research Project on Basic Education Reform in Hunan Province
01Working Principle
- Force Sensor → HX711 → ESP32 → Bluetooth → Phyphox Mobile App

HX711 ModuleHX711 is a high-precision 24-bit analog-to-digital converter chip specifically designed for pressure sensors. Its main function is to amplify the measured small voltage signals to a range that can be read by a microcontroller, with a working voltage of 2.6-5.5V.Pin DescriptionVDD Power Positive GND Power Ground SCK Clock Signal Pin DT Data Input/Output Pin
Wiring HX711 with ESP32
-
Power Connection
HX711 VCC: Connect to the 3.3V output of ESP32
HX711 GND: Connect to the common ground of ESP32
-
Data Communication Interface
HX711 DOUT (Data Output): Connect to any GPIO input pin of ESP32 (e.g., GPIO15)
HX711 PD_SCK (Clock Signal): Connect to any GPIO output pin of ESP32 (e.g., GPIO14)
-
Weighing Sensor Interface
- Sensor E+ (Red): Connect to HX711 E+
- Sensor E- (Black): Connect to HX711 E-
- Sensor A+ (Green): Connect to HX711 A+
- Sensor A- (White): Connect to HX711 A-
02PCB Design for ESP32 and HX711
- PCB Manufacturing Platform

- Jialichuang is a high-tech enterprise focused on PCB prototyping and small batch production. Jialichuang provides services including online circuit design, PCB manufacturing, component trading, SMT assembly, stencil production, and 3D printing.
- Schematic Diagram

- Connect ESP32 and HX711 through the PCB, and reserve two PH2.0 interfaces, one for the strain gauge and one for the OLED display SSD1306.

- Overall Design
03Finished Product of the Force Sensor
- Weld the ESP32 and HX711 along with the PH2.0 interface, and install all components.

- Overall effect after adding the casing
04ESP32 Program Section
- HX711 Program

- SSD1306 Program

- Data Reading and Bluetooth Sending Program



On August 23, 2023, Teacher Zhu shared a notification about the “2023 Shuangfeng County Basic Education Quality Course Selection” in the Loudi High School Physics Master Teacher Studio. The studio can recommend a “Quality Experimental Teaching Course”. As a member of the master teacher studio, I proactively told Teacher Zhu: “If no one signs up, I am willing to try again. If someone else signs up, then this opportunity should go to them.” Last year, I was fortunate to participate in the first experimental quality course selection, but due to time constraints, I was directly recommended from the city to the national selection, unfortunately, I was not selected; however, the province did not provide further rewards, which was a bit regrettable, so I wanted to make up for this regret.


In the previous device, I did not consider that the volume of the sealing box would change significantly, leading to large errors when changing pressure due to volume changes. Ultimately, this experimental device failed. However, there are always more solutions than difficulties, so I purchased a glass jar online to replace the sealing box and improve it again to address the impact of significant volume changes when changing the enclosed gas volume, assembled as follows.

Although this time I solved the problem of volume change, the sealing at the bottle cap is not
END
Share
Collect
Like



Long press to scan the code to followWeChat signal:XuesiwuliWelcome to communicate, criticize, and correct