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:
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.
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.
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.
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.
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.
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.
Previous article:What is the function of the microcontroller startup file .s?
Next article:Detailed introduction to the functions and usage of 51 microcontroller
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Oscilloscope hardware bandwidth limitation and high-pass and low-pass digital filtering functions
- The sensor driver for X-NUCLEO-IKS01A3 will soon be available in MakeCode
- 【AT-START-F425 Review】 3. GPIO Lighting and Button Evaluation
- TMS320C6678 Development Routine User Manual Study 4
- What are the working modes of lithium battery charging management IC?
- STM32F030F4P6 multi-channel ADC DMA sampling value is 4095 problem summary
- 【GD32F310G-START】Upload to Alibaba Cloud
- Smart door lock cake
- 【Project source code】Ethernet real-time image transmission display based on FPGA
- [GD32E231C-START] Simulate I2C and OLED