Design based on HX711 digital display weighing instrument

Publisher:幸福如意Latest update time:2023-07-11 Source: elecfansKeywords:HX711 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The digital display weighing instrument designed in this article is a weighing control display system based on resistance strain sensors and with a single-chip microcomputer as the control core. The measurement range is 0-10kg, and the measurement accuracy is ±2g. The LCD screen displays the measurement data, and can display multiple times at the same time. The measurement data is sent to the computer through the serial port for display. The system has the characteristics of high precision, stable performance and easy operation. The weighing instrument design block diagram is shown in Figure 1 below:

Design based on HX711 digital display weighing instrument

Figure 1 Weighing instrument design block diagram


1. Hardware circuit design

1.1. Loading sensor

The resistance strain type load cell is composed of several main parts such as resistance strain gauge, elastomer and detection circuit. The elastomer undergoes elastic deformation under the action of external force, causing the resistance strain gauge attached to its surface to also deform. After the resistance strain gauge is deformed, its resistance value will change (increase or decrease), and then measured accordingly. The circuit converts this resistance change into an electrical signal (voltage or current), thus completing the process of converting external force into an electrical signal.


The detection circuit is shown in Figure 2, which converts the resistance change of the resistance strain gauge into a voltage output. Because the Wheatstone bridge has many advantages, such as suppressing the influence of temperature changes, suppressing lateral force interference, and easily solving the compensation problem of the load cell, the Wheatstone bridge is widely used in load cells. a wide range of applications.

Design based on HX711 digital display weighing instrument

Figure 2 Detection circuit composed of Wheatstone bridge

A load cell generally has a total of four input and output wires. The output resistance is generally 350Ω, 480Ω, 700Ω, and 1000Ω. The input terminal generally undergoes some temperature and sensitivity compensation. The input terminal resistance will be 20 to 100Ω higher than the output terminal, so use You can determine the input and output terminals by measuring the resistance value with a multimeter.


1.2. Amplification circuit

The output signal amplitude of the strain gauge load cell is very small (mV or even μV level) and is often accompanied by large noise. For such signals, the first step in circuit processing is usually to use an instrumentation amplifier to amplify the small signal first. Instrumentation amplifier circuits have better common-mode rejection than simple differential amplifier circuits. The main purpose of amplification is not gain, but to improve the signal-to-noise ratio of the circuit. The instrumentation amplifier in this design adopts the structure of OP07 three operational amplifiers. As shown in Figure 3.


When R1=R2, R3=R4, Rf=R5, the gain of the circuit is: G=(1+2R1/RG1)(Rf/R3). It can be seen from the formula that the adjustment of the circuit gain can be achieved by changing the resistance value of RG1.

Design based on HX711 digital display weighing instrument

Figure 3 Instrument amplifier circuit


1.3. A/D conversion circuit

The A/D converter uses the electronic scale dedicated chip HX711, which is a 24-bit A/D converter chip specially designed for high-precision electronic scales. Compared with other chips of the same type, this chip integrates peripheral circuits required by other chips of the same type, including a regulated power supply, on-chip clock oscillator, etc.


The input selection switch can arbitrarily select channel A or channel B and connect it to its internal low-noise programmable amplifier. The programmable gain of channel A is 128 or 64, and the corresponding full-scale differential input signal amplitude is ±20mV or ±40mV respectively. Channel B has a fixed gain of 32, and the corresponding full-scale differential input voltage is ±80mV. Channel B is used for system parameter detection including battery. This design connects the instrumentation amplifier output to the channel A analog differential input, as shown in Figure 4 below.

Design based on HX711 digital display weighing instrument

Figure 4 HX711 application circuit


1.4. Microcontroller and interface circuit

The microcontroller uses AT89C51 chip, and the interface circuit with buttons, LCD, and computer is shown in Figure 5. The HX711 serial communication line is connected to the P1.0 and P1.1 ports of the microcontroller. After being processed by the microcontroller, the weighing data is sent to the LCD display. At the same time, multiple measurement data are sent to the computer through the serial port for display.

Design based on HX711 digital display weighing instrument

Figure 5 Microcontroller interface circuit


2. Software design

The program of the weighing instrument mainly includes the main program, A/D conversion subroutine, liquid crystal display subroutine and serial communication subroutine. Among them, the A/D conversion subroutine is particularly important. Select different input channels and gains, and the corresponding programs are also different. Select the A channel and the gain is 128. The program is as follows.

Design based on HX711 digital display weighing instrument

4. Conclusion

The above circuit only needs to change the front sensor to realize other functions such as temperature measurement, voltage measurement, current measurement, etc., and has strong applicability.


Keywords:HX711 Reference address:Design based on HX711 digital display weighing instrument

Previous article:What is the function of the microcontroller startup file .s?
Next article:Detailed introduction to the functions and usage of 51 microcontroller

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号