Design of intelligent integrated instrument based on low power consumption single chip microcomputer

Publisher:太白山人Latest update time:2010-01-20 Source: 微计算机信息Keywords:Instrument Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Keywords:Instrument Reference address:Design of intelligent integrated instrument based on low power consumption single chip microcomputer

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

Design of non-polarity wiring for RS422/RS485 network
1. Problem Many current measurement and control systems are interconnected using RS422 or RS485 buses. RS422/485 bus signals are transmitted by 4 (2) polarized differential signals, which cannot be reversed. When the network transmission distance is long or there are many nodes, there will be many junction boxe
[Industrial Control]
Brief Analysis of the Principle of Dual-machine Communication Based on Serial Port RS485 in STM32
I believe everyone knows about RS485 communication. When learning about RS232, we will compare it with 485 (RS485 will be replaced by 485 below). Without talking about the advantages and disadvantages of 485, there are some articles on the Internet that I learned 485 communication using the STM32 library function, so
[Microcontroller]
Brief Analysis of the Principle of Dual-machine Communication Based on Serial Port RS485 in STM32
Design of electronic switch based on RS485 single chip multi-machine serial communication
    introduction     At present, multi-machine serial communication is the mainstream communication method in the field of communication control. Serial communication is often used to achieve the purpose of information exchange in data communication, computer network, distributed industrial control system and its meas
[Microcontroller]
Design of electronic switch based on RS485 single chip multi-machine serial communication
Design of RS485 information line node with zero-delay isolation technology
Introduction Among the many solutions for medium and long distance communication between industrial control equipment, RS485 bus is widely used in factory automation, industrial control, community monitoring, water conservancy automatic measurement and control and other fields due to its advantages such as simpl
[Analog Electronics]
Design of RS485 information line node with zero-delay isolation technology
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号