1 Introduction
Now, the world is moving from the era of industrialization and mechanization to the information age. Instruments, as an information tool, play an indispensable role as an information source. Since the information source must be accurate or as error-free as possible, modern instruments and meters all use a variety of technical forms for comprehensive integration. In the information age of high-tech development, instruments and meters are completely one of the comprehensive factors of modernization.
The intelligent integrated instrument based on low-power single-chip microcomputer designed in this paper is based on the design concept of a new generation of intelligent instruments that are intelligent, digital, and networked. It adopts intelligent conditioning, smart bus, industrial network, LCD display, and electronic storage technology, and integrates the functions of indicating instrument, regulating instrument, integrating instrument, and recording instrument. It has the characteristics of high measurement and control accuracy, high reliability and stability. It uses a high-brightness LED backlight 192×64 monochrome dot matrix LCD display, supports 2-channel universal analog input, 1-channel analog output, and 2-channel alarm output. This paper specifically discusses the software and hardware design of the intelligent integrated instrument.
2 Hardware structure diagram of intelligent integrated instrument
The instrument hardware structure block diagram is shown in Figure 1. Its hardware structure mainly consists of nine parts: power supply, 24V power distribution output, general signal input, analog signal output, alarm output, LCD display interface, key interface, external memory interface, real-time clock, and RS485 communication interface.
Figure 1 Hardware structure diagram
3 Detailed hardware design of intelligent integrated instrument
The intelligent integrated instrument uses MSP430F149 as the main processing chip. MSP430F149 is a low-power single-chip microcomputer, which is very suitable as the mixed signal processor of the instrument.
3.1 General signal input circuit
The input signals include voltage signals, current signals, and resistance signals. The input end that can measure all these signals is called the "universal input port", as shown in Figure 2. The voltage signal is input through input1 and input3. Measuring the voltage of IN1 is the voltage signal. The current signal is input from input2 and input3. By measuring the voltage of IN2 and IN3, the input value of the current can be obtained if the resistance value of resistor R5 is known. When measuring PT100, PT100 is connected in a three-wire system. The three-wire connection method is to eliminate the error caused by the length of the lead wire, which can be obtained by the following formula. Assuming the lead wire resistance is r, then:
U1 = (R+r) × I (1)
U2 = (R+2r) × I (2)
2 × (1) – (2), we get
(3)
From formula (3), we can know that the resistance measurement of PT100 is only related to U1, U2, and I, which eliminates the error caused by the lead wire. From the formula, we can get that the accuracy of PT100 is determined by the measurement accuracy of U1 and U2. The specific measurement method is as follows: First, measure the voltage value of U2. Given the 5V reference and the resistor R4, we can calculate the current flowing through PT100. Then measure U1 and calculate the resistance value of PT100.
Figure 2 General input port
3.2 Analog signal output and dot matrix LCD display design
The analog output of the intelligent integrated instrument is the industrial standard output 4-20mA. To get 4-20mA, you can use the 1-5SV analog voltage output through the VI conversion circuit. Most of the 1-5V analog voltage output is achieved through a digital-to-analog converter (DAC), but many microcontrollers currently do not have an integrated DAC (including MSP430F149). Even if some microcontrollers have integrated DAC, the accuracy of the DAC is often not high. In high-precision applications, an external DAC is still required, which obviously increases the cost. However, almost all microcontrollers (including MSP430F149) provide timer or PWM output functions. This instrument uses the PWM output of MSP430F149 to implement DAC through a simple conversion circuit, which greatly reduces the cost of the AO part, reduces the volume, and improves the accuracy.
The LCD screen is Truly's MSC-G19264DYSY-070W STN screen, which has 192×128 pixels and a power supply voltage of 3.3V, which is in line with the I/O port level range of MSP430F149 and can be connected very conveniently. The backlight adopts a high brightness ratio D-type light design powered by 5V, making the displayed image look very bright and clear even in low visibility conditions. Its operating range is -20-70℃, which is within the operating temperature range of the intelligent integrated instrument (0-55℃). The operating current of the entire LCD screen is only 75mA, which is much lower than that of ordinary dot matrix LCD screens, thereby greatly reducing the power consumption of the entire system.
3.3 Real-time clock design
The intelligent integrated instrument has a real-time clock function. The real-time clock chip uses Philips PCF8563, which has extremely high accuracy. It uses an I2C bus interface and can count up to 400KHZ. It has year and leap year tracking. It has a programmable alarm and a low voltage monitor. The counter counts from seconds to years, and the counter/timer can be used to accurately trigger timing applications. It has an internal power-on reset circuit. The standby current with an operating clock is very low, and the typical power consumption is only 250nA at VDD=3.0V and Tamb=25. Figure 3 is the application circuit diagram of PCF8563.
Figure 3 PCF8563 application circuit diagram
3.4 Key Interface and External Memory Design
There are 8 buttons on the instrument panel, namely up, down, left, right, SET, ENTER and two special function buttons. The up, down, left and right buttons are used to move the cursor in four directions on the screen. The up and down buttons also have the function of scrolling numbers. The SET button is used to activate the corresponding options on the screen, and the ENTER button is used to confirm. Special function button 1 is used to switch between the configuration screen and the system operation display screen. Special function button 2 is temporarily reserved. In the design, the data port is shared with the LCD screen and isolated by 74HC245. Because 74HC245 has a three-state output function, the buttons and the LCD screen will not interfere with each other.
The instrument provides a recording function, which can record the sampling data of each channel at a certain time interval (settable). The chip for external data storage is the serial FLASH AT25F2048 of JMEL Company. It is powered by 3.3V. Compared with NANDFLASH, this chip has a simple interface. It uses a three-wire SPI interface and can be easily connected to MSP430F149. And when the capacity meets the requirements, the cost is much lower than NANDFLASH. Compared with E2PROM, it has the characteristics of large capacity and simple interface. The capacity of AT25F2048 is 256K, which is divided into four segments, each with 64K bytes. 256 bytes per page. It provides hardware write protection and software write protection, supports page write and byte write mode, and can be erased 10,000 times, which meets the service life of this intelligent comprehensive instrument.
3.5 RS485 Communication
RS485 bus, as an electrical specification for multi-point differential data transmission, has become one of the most widely used standard communication interfaces. RS485 allows multi-point bidirectional communication on a pair of twisted pair cables. Its noise suppression capability, data transmission rate, cable length and reliability are unmatched by other standards. Technical indicators of RS485 protocol: maximum transmission rate of 10Mbit/s; maximum distance of 1200m; maximum of 32 nodes: bidirectional master-slave communication on a single set of twisted pair cables; parallel connected nodes, multiplexed communication.
Figure 4 RS485 communication interface
RS485 data signals adopt differential transmission, also known as balanced transmission. It uses a pair of twisted pairs, one of which is defined as A and the other as B. Generally, the positive level between the sending driver A and B is between +2V and +6V, and the negative level is between -2V and -6V. There is also a signal ground C. In RS-485, there is also an "enable" terminal. The "enable" terminal is used to control the disconnection and connection between the sending driver and the transmission line. When the "enable" terminal is in effect, the sending driver is in a high-impedance state, which is a third state different from the logic "1" and "0". The receiver is also specified relative to the sending end. The receiving and sending ends connect AA and BB correspondingly through a balanced twisted pair. When there is a level greater than +200mV between the receiving end AB, a positive logic level is output, and when it is less than -200mV, a negative logic level is output. The level range of the receiver receiving the balanced line is usually between 200mV and 6V. The driver chip of RS485 in the system uses SP485, and the circuit connection diagram is shown in Figure 4.
4. Design of the main architecture of the instrument system software
The system software mainly consists of system initialization module, data sampling module, digital filter module, data processing module, digital PID control module, LCD driver module, system operation display module, system configuration display module, key processing module, FLASH driver module, data recall module, real-time clock module and communication module. System software structure diagram 5. Due to space constraints, the detailed design of each module will not be described in detail here.
Figure 5 System software structure diagram
The author's innovation points:
The intelligent integrated instrument designed in this paper has the following functional characteristics: 1. The instrument has diversified functions, integrating multiple functions of recording instruments, digital display instruments, integrators, and regulating instruments; 2. The instrument has high analog input and output accuracy and a wide range of applications; 3. The instrument has good real-time performance and can meet users' real-time requirements; 4. The instrument has a standardized bus interface.
Previous article:Design of I2C Touch Screen Based on ARM Processor S3C2440 and Linux
Next article:Servo valve temperature zero drift measurement and control system based on C8051F020
Recommended ReadingLatest update time:2024-11-16 21:23
- Popular Resources
- Popular amplifiers
- Siemens S7-1200-PLC Programming and Application Tutorial (3rd Edition) (Edited by Shi Shouyong)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Practical training guidance for new electrician technology (Wu Qihong, Jiang Jian, Xu Kungang, Zhang Hong)
- Teach you to learn 51 single chip microcomputer-C language version (Second Edition) (Song Xuefeng)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Loto Practical Tips (8) Application of Loto Oscilloscope in Repairing LED Desk Lamp Dimming Problems
- [NXP Rapid IoT Review] W2-Sensor Data Collection Test
- Today at 10:00 AM, live broadcast with prizes: [Introduction to the Industrial Open Source Platform based on TI Sitara AM5708]
- A complete collection of commonly used electronic components, including graphic symbols/nomenclature/technical parameters
- I would like to ask how to calculate the current of the external gate-source capacitor of IGBT
- Determining the working status of multiple transistor coupling
- Simple vibration analyzer
- I saw a question on another forum about whether the mass of a battery increases after charging?
- Electromagnetic Controlled Motion Device (J)
- Live broadcast at 10 am today [Introduction to TI Sitara's latest AM64X platform]