Share this

Design of a dynamic weighing measurement board based on PC/104 bus

2026-04-06 08:57:26 · · #1
Abstract: Based on the analysis of existing system problems, a design of a dynamic weighing measurement interface board based on PC/104 bus and C8051F060MCU as the core is proposed. C8051F060 has independent dual-channel 16-bit successive approximation A/D converter and other functions. After more than a year of actual use, it has been proven that the design has the advantages of simplifying hardware and software design, enhancing the reliability of the system, and reducing the cost. Keywords: PC/104 bus; dynamic weighing; analog-to-digital converter The object being measured is in a non-static state, that is, the object being weighed or the force being measured is in motion, which forms a dynamic weighing measurement state [1]. For example, real-time weighing measurement of cars traveling on highways or trains running on railways is called dynamic weighing. Overload of freight vehicles is a well-known fact in the freight industry. Overload of freight vehicles has a huge impact on the safety of highway transportation and the maintenance of road surface. The relevant national departments have made special rectifications, and the dynamic weighing measurement system of automobiles is one of the powerful technical weapons for controlling overload of freight vehicles. In the field of automotive dynamic weighing measurement, some dynamic weighing instruments are already in use, but they are mainly based on microcontrollers, using low precision, low speed, and multiple components to form the system. Although this results in lower manufacturing costs, its reliability, performance, and specifications are greatly limited [2, 3, 4]. Considering the actual needs of the project, we designed a high-performance automotive dynamic weighing measurement interface board that works with a portable PC/104 bus computer, overcoming the above shortcomings and achieving the expected design specifications. The hardware circuit of the high-performance automotive dynamic weighing measurement interface board that works with a portable PC/104 bus computer consists of two parts: a signal acquisition section and an interface section with the PC/104 bus. 1. Signal Acquisition Section Design Currently, the high-resolution A/D converters used in measurement and control instruments are mostly independent integrated circuit chips. Such high-precision measurement and control systems inevitably face numerous and difficult-to-solve practical problems in terms of anti-interference, conversion accuracy, circuit board size, and price. Using an integrated chip that integrates a high-resolution A/D converter with an MCU (microcontroller or single-chip microcomputer) is a good way to solve these problems. The C8051F060 is a high-speed, hybrid digital and analog integrated circuit MCU chip manufactured by CYGNAL. It features a peak operating speed of 25 MIPS, a flexible external memory interface, 59 data I/O interface lines, and two on-chip, independent 16-bit successive approximation A/D converters [5]. These two independent 16-bit successive approximation A/D converters have the following characteristics: Ø 16-bit resolution. Ø ±0.75 LSB INL, ensuring no missing codes. Ø Programmable conversion rate, up to 1 Msps. Ø Integrated tracking and holding circuitry for analog input. Ø Can be software-configured as two single-ended inputs or one differential input A/D converter. Ø Offset and gain are adjustable within a certain range. Ø Direct memory access is possible, with data directly stored in RAM without additional software overhead. Ø Includes a data-dependent window interrupt generator. Ø Dedicated internal voltage reference or external voltage reference source can be used. Two independent 16-bit successive approximation A/D converters are represented as ADCn (n=0 is the first A/D conversion channel ADC0, n=1 is the second A/D conversion channel ADC1). ADC0 has four conversion start modes; ADC1 has five. The completion time of the A/D conversion can be determined and processed by querying the ADnINT bit or by using an interrupt. Figure 1 is a schematic diagram of the signal acquisition section of the dynamic weighing measurement board. In the figure, the ADC0 IN terminal of channel 1 is connected to the bridge output of the load cell to acquire the dynamic weight signal of the vehicle. The bridge output is a millivolt-level DC voltage signal. Therefore, the instrumentation amplifier AD620-AMP2 is used as the amplification element to amplify the signal to the analog conversion range (0-2.4V) acceptable to channel 0 (ADC0) of the MCU (C8051F060). C5, R3, and C9 before and after AMP2 are used for anti-interference filtering; D1 and D2 are used for voltage input overload protection of the MCU's internal A/D converter channel ADC0. The amplification factor of the amplification channel is determined by the resistance value (RG) of resistor R4. When RG = ∞ (no amplification resistor is connected), the amplification factor (G) of the channel is 1. [align=center] Figure 1 Schematic diagram of the signal acquisition part of the dynamic weighing measurement board[/align] The output of AMP2 is filtered and sent to the external input pin AIN0 (pin 18 of the MCU) of the 16-bit A/D converter channel (ADC0) inside the C80C51F060 chip. Data sampling, holding, and A/D conversion are all completed internally by software control within the MCU chip. In Figure 1, the signal processing process and principle of A/D channel 2, which starts from the IN terminal of ADC1, are the same as described above. The reference voltage of the 16-bit A/D converter (channel 0 and channel 1) inside the C80C51F060 chip is taken from the voltage reference circuit inside the MCU. The internal voltage reference circuit of the MCU consists of a 1.2V bandgap voltage reference generator with good temperature stability (typically 15ppm/℃) and excellent load regulation (typically 0.5ppm/µA) and a double-gain output buffer amplifier. The internal reference voltage can be connected to the external device via the VREF pin (pin 4 of the MCU). Connecting the VREF pin to the VREF0 pin (pin 21 of the MCU) for channel 0 reference voltage and the VREF1 pin (pin 6 of the MCU) for channel 1 reference voltage provides reference voltages for the two 16-bit ADCs. This reference voltage value (typically 2.43V) determines the analog input range of the ADCs. The setpoint voltage connected to the input of the load cell bridge also originates from the internal reference voltage source of the MCU. It consists of dual operational amplifiers AMP3 and resistors R7, R8, R6, and V1, which form a circuit for reference voltage amplification, amplitude stabilization, and current amplification output, thus achieving precise setting of the load cell bridge input voltage. As shown in Figure 1, the hardware circuit design of the signal acquisition section of this dynamic weighing measurement board is very simple, including the amplifier circuit and the precise setting of the input voltage of the weighing sensor bridge. Clearly, compared with traditional A/D converters composed of multiple components, it has advantages such as reliable operation and strong anti-interference capability, and its price is also highly competitive (a single C80C51F060 MCU costs less than 300 RMB). When the two-channel A/D converter is started by the overflow of the MCU's Timer3 and the conversion result value is retrieved using an interrupt method, the conversion result value of ADC0 or ADC1 is read in the corresponding channel's interrupt subroutine and then saved or further processed as needed. In the settings, it should be noted that the timing period of Timer3 must be greater than or equal to the sum of the ADC conversion time and the time for reading the conversion result value (the execution time of the interrupt subroutine). 2 Design of the interface of the measuring board PC/104 is the mechanical standard of embedded PC. It inherits the advantages of the open bus structure of IBM PC and is fully compatible with IBM PC. It has the special requirements of embedded control: small size, high reliability, long life and convenient programming and debugging. Therefore, intelligent instruments based on PC104 have been widely used in the testing field [6]. Since the PC/104 bus device has the characteristics of small size, high reliability, long life and convenient programming and debugging, it is suitable for making high-density, small-volume portable testing instruments or control devices. The development platform of the PC/104 bus system is exactly the same as other existing general computer systems. Therefore, all existing development software can be used. Therefore, intelligent measurement and control systems based on PC/104 have been widely used in the field of measurement and control. In order to facilitate the development and use of the system, this dynamic weighing measurement system adopts the PC/104 bus system as the design, development and use platform of the system. The measuring board works with it to complete the acquisition, storage and transmission of signals. Since it is difficult for the MCU and PC/104 bus to be consistent in terms of signal operating frequency and interface timing, the I/O data interface between the MCU and PC/104 bus should adopt an asynchronous parallel buffer interface method. That is, devices such as 74HC373 and 74HC374 are used to latch the output data and handshake signal of the PC/104 bus. The MCU reads or transmits data based on the handshake signal. The output data of the MCU mostly uses a general-purpose parallel port with data retention function. Therefore, bus driver chips such as 74HC244 and 74HC245 can be used to isolate and drive the data from the MCU to the PC/104 bus, so that the asynchronous data transmission function in both directions can be realized [7]. The C8051F060's external memory interface is connected to a 128KB RAM (IS62LV1024) chip for data storage. The data interface between the MCU and the PC/104 bus is handled by a general-purpose parallel interface (P0, P1, P2, and P3, etc.) on the C8051F060 side. Since this general-purpose parallel port has a data retention function, an 8-bit bus driver 74HC245 is used for level shifting from the MCU to the PC/104 bus (C8051F060 operates on a 3V power supply, while the PC/104 bus operates on a 5V power supply) and data driving. However, the PC/104 data bus does not have a data retention function; therefore, an 8-bit data latch 74HC374 with tri-state output control is used for data transfer and retention from the PC/104 bus to the MCU (C8051F060 can directly receive 5V signal levels). Since the P2 port of C8051F060 requires bidirectional operation, the data transmission direction between the PC/104 bus and the MCU is determined and indicated by the latch signal from the PC/104 bus. [align=center] Figure 2 Flowchart of PC/104 bus system interface transmission control function[/align] Since the measurement board requires more than one decoded address, in addition to using an 8-bit analog comparator - 74HC688 as the comparison decoding chip for address decoding, a 74HC393 (two-to-four decoder) is added for subdivided address decoding[8]. In order to save chips, the address line A0 is abandoned in the design. Therefore, the address decoding outputs R1/W1 and R2/W2 each occupy two addresses. For example, R1/W1 can be set to 200H-3C0H or 201H-3C1H by changing the jumper of JUM1. In this way, the transmission of commands and data between the microcomputer can be realized through the software cooperation between the MCU and the PC/104 bus computer. [align=center]Figure 3. Flowchart of MCU Program Processing[/align] 3. Control Software Design Data transmission between the MCU and the PC/104 bus adopts a master/slave mode, with the PC/104 bus system as the master and the MCU as the slave. To ensure smooth data transmission in the master/slave mode, the MCU uses an interrupt mode (the P02 pin of the MCU corresponding to the D3 bit of the PC/104 bus is pre-programmed as the interrupt response pin INT0 and uses edge triggering) to respond to the start of data transmission from the PC/104 bus system, allowing bidirectional data transmission of any byte value at any time. The PC/104 bus system uses the C language interface for reading and writing, employing the inportb() function and outportb() instruction respectively. Its workflow flowchart is shown in Figure 2. In the C8051F060 MCU program design, receiving commands from the PC/104 bus microcomputer and exchanging data with it uses an external program interrupt mode; data sampling uses an ADC interrupt mode. Data sampling includes baseline sampling (output from two weighing sensors without wheel pressure) and axle load sampling (two weighing sensors measuring the weight of one axle of the vehicle at a time). A simplified flowchart of the C8051F060 MCU program processing is shown in Figure 3. In axle load sampling, the MCU automatically determines the position between the wheel and the weighing sensor based on the given number of axles and sampling threshold conditions, and automatically samples the weight value. When the wheel stops on the weighing sensor, the MCU will automatically stop data sampling according to the set over-limit time value. 4. Conclusion Currently, the types of PC/104 bus interface boards available on the market are limited and expensive. With the widespread adoption of PC/104 bus systems, the design of the PC/104 bus interface board will become a bottleneck to the success or failure of the system. Improving the performance of the PC/104 bus interface board and reducing its price will greatly promote the application of PC/104 bus systems. The design of the dynamic weighing measurement board based on the PC104 bus has proven to have the following advantages after more than a year of practical use: ü Fewer components are used, simplifying hardware and software design; ü Enhanced system anti-interference capability and operational reliability; ü Full utilization of MCU resources; ü Competitive product price. References [1] Shi Changyan. Current status and development trend of dynamic weighing and force measurement technology [J]. Journal of Metrology. 2001, 22(3): 201-205. [2] Wei Luyuan, Wu Bin, Cui Xia. Design of dynamic weighing system [J]. Automation Instrument. 2002, 23(8): 34-37. [3] Xu Zhiling. Design of dynamic highway vehicle electronic scale [J]. Weighing Instrument. 2002, 31(6): 18-20. [4] Li Yede, Jia Maoying. Application of AD7705 in automobile weight measurement [J]. Journal of Shandong Institute of Engineering. 2002, 16(2): 51-54. [5] CYGNAL Integrated Products Inc. C8051F060/1/2/3 Mixed-Signal ISP FLASH MCU Family [EB/OL]. http://www.xhl.com.cn, 2004-12. [6] Yao Zhijun, Zhang Ping, Bai Xianglin. A test instrument based on PC104[J]. Modern Electronics Technology. 2003, 1(1): 57-58. [7] Wang Mingshun. Interface design between PC/104 bus and MCU[J]. Industrial Control Computer. 2004, 9(9): 41-43. [8] Zhang Guofan, Gu Shusheng, Wang Mingshun. Computer Control System[M]. Beijing: Metallurgical Industry Press, 2004: 25-26. Design of dynamic weighing measuring board based on PC/104 bus
Read next

CATDOLL CATDOLL 115CM Tina TPE

Height: 115cm Weight: 19.5kg Shoulder Width: 29cm Bust/Waist/Hip: 57/53/64cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22