subject: Low-power Microcontroller Based Intelligent Integrated Instrument Design - Microcontroller, [print this page] 1 Introduction Now, the world is from the industrial, machine age into the information age. Instrument as an information tool, plays an essential role of information sources. As sources of information must be accurate or less the maximum error, so are all of modern instrumentation integrated integration using a variety of forms of technology, high-tech development in the information era, instrumentation is entirely modern and comprehensive factors.
Designed this low-power microcontroller based intelligent comprehensive instrument is based on intelligent, digital, network design a new generation of intelligent instruments, using smart conditioning, smart bus, industrial networks, liquid crystal display, electronic storage technology, Comprehensive instructions meters, adjust instruments, meters and record meter totalizer function, with high measurement precision, high reliability and stability characteristics. High brightness LED Backlit 192 64 monochrome Lattice LCD display, supports 2-channel universal analog input, 1 channel analog output and 2-channel alarm output. This article discusses the intelligence integrated instrument specific software and hardware design.
2 Intelligent integrated hardware block diagram of instrument
Instrument hardware block diagram shown in Figure 1. The hardware is structured by Power supply , 24V distribution output, universal input, analog output, alarm output, LCD interface, keypad interface, external memory interface, Real-Time Clock, RS485 communications interface, the nine components.
3 Intelligent integrated instrument detailed design of the hardware
Smart integrated devices to MSP430F149 as the main processing Chip . MSP430F149 is a low-power microcontroller, is very suitable Cooperation Mixed-signal processors for the instrument.
3.1 Common signal input circuit
Input signal in a voltage signal, current signal, as well as resistance signal, these signals are able to measure the input, which we call "universal input", shown in Figure 2. Voltage signals input1 and input3 input IN1 voltage that is measured by measuring voltage signal. Current signal from input2 and input3 input, IN2 and IN3 by measuring the voltage, the resistance of known resistance R5, get current input value. Measurement PT100, PT100 with three-wire access. Three-wire connection method is to eliminate the errors caused by lead length, the following formula can be obtained, set lead resistance r, then:
2 (1)? (2), may By the formula (3) the resistance measuring PT100 known only with U1, U2, I related, thus eliminating the error caused by lead, the formula can be obtained from the precision PT100 by the U1, U2 of the measurement accuracy. Specific measurement methods are as follows: First, the measured voltage value U2, are known to 5V reference and resistance of R4, could be considered as the amount of current flowing through the PT100 and measured U1, you can calculate the resistance of PT100.
3.2 Analog signal output and dot-matrix liquid crystal display design
Intelligent integrated instrument analog output is the industry standard output 4-20mA. To get 4-20mA by 1-5SV analog voltage output obtained through the VI converter. And get 1-5V analog voltage output mostly through analog converter (DAC) to do, but at present there is no integrated within many microcontroller DAC (including the MSP430F149), even though some single chip integrated DAC, DAC's accuracy is often not high. In the high-precision applications still need an external DAC, so obviously increases the cost. But almost all of the SCM (including MSP430F149) are available timer or PWM output. This instrument is the application of MSP430F149 the PWM output, after simple transformation circuit to implement DAC, which greatly reduce the AO part of the costs and reduce the volume, and improved accuracy.
LCD screen Select Truly's MSC-G19264DYSY-070WSTN screen, the screen pixels is 192 128, a supply voltage of 3.3V, consistent with MSP430F149 the I / O port level range, it's easy to connect. Backlight supply using a 5V high-brightness light than D surface designed to display images even in low visibility situation looks very bright, very clear. Its operating range of -20-70 , the smart integrated devices operating temperature range (0-55 ) within. The LCD screen of the operating current of only 75mA, than the ordinary dot matrix LCD screen to be much lower, thereby reducing overall system power consumption.
3.3 Real Time Clock Design
Intelligent integrated instrument with real-time clock function, real-time clock chip PhilipsPCF8563, with high accuracy. With I2C bus interface, a few degrees up to 400KHZ. Track with the year and leap year. With programmable alarms, low voltage monitor. Counter counts ranging from seconds to years, and counter / timer can be used to trigger precise timing applications. Reset circuit within the belt. Operation of the clock with very low standby current in VDD = 3.0V and Tamb = 25 under the typical power consumption of only 250nA. Figure 3 is a PCF8563 application circuit.
3.4 Button interface with external memory design
Instrument panel, a total of eight buttons, namely, up, down, left, right, SET, ENTER, and two special function keys. Up, down, left, and right keys were used in the screen to move the cursor in four directions, up and down also has a number of scrolling, SET button to activate the corresponding option screen, ENTER key to confirm . Special function key 1 to switch the screen and system configuration to run the display. 2 to preserve the special function keys. Used in the design and the LCD screen to share data port, through the 74HC245 to isolate. Because the 74HC245 with three-state output, so buttons and LCD screen will not interfere with each other.
Provide logging instrument can sample data on each channel every time interval (adjustable) and recorded. External memory data chip allows the user JMEL's serial FLASHAT25F2048. It consists of 3.3V power supply. The chip interfaces with the NANDFLASH concerned with the characteristics of a simple, three-wire system using SPI interface, and the MSP430F149 can be easily connected. And in capacity to meet the requirements of the situation, much lower cost than NANDFLASH. It also has the capacity relative to the E2PROM large, simple interface features. AT25F2048 capacity of 256K, a total of four segments, 64K bytes. Each page of 256 bytes. It provides hardware write protection and software write protection, support pages to write and byte write mode, can be erased 10,000 times, consistent with the use of intelligent integrated instrument life.