1 Introduction
Today, with science and technology and social production highly developed, intelligent test instruments and instrumentation systems are developing rapidly, and the span of the objects to be tested is both wide and diverse. The rapid development of computer technology has brought the development of instruments to a new level, and traditional testing equipment has been replaced by intelligent instruments. The two main development directions of intelligent instruments are large-scale automatic test systems and portable low-power intelligent instruments. The power problem has become one of the important factors to be considered in circuit design. In this article, I will propose a design scheme for a universal low-power instrumentation system based on MSP430. This low-power system is combined with different sensors to realize data collection and processing, and has keyboard input and LCD display functions, which can be suitable for various work occasions.
2 Low-power instrument system hardware design
2.1 Overall design of hardware system
The MSP430 chip is used in this instrument system. The MSP430 series is a 16-bit ultra-low power hybrid microcontroller with a reduced instruction set. It contains a flexible clock system with von Neumann structure addressing mode (MAB) and data storage mode (MDB). Since it contains a CPU with a standard address mapping and digital analog peripheral interfaces, MSP430 provides a solution for mixed signal application requirements.
The main features of the MSP430 series are: ultra-low energy consumption architecture greatly extends battery life; ideal high-performance analog features for precision measurement; 16-bit RISC CPU provides new features for the code segment capacity processed in each time slice, and the system-programmable Flash memory can repeatedly erase and write code, erase and write in blocks, and load data. Figure 3-1 shows the hardware block diagram of the energy meter:
Figure 1 System hardware block diagram
The hardware in Figure 1 can be divided into functional modules such as data acquisition, amplification and filtering, single-chip microcomputer, keyboard, LCD display, clock circuit, data storage, DAC, alarm, watchdog circuit, RS485 communication and power management.
2.2 Module Design
2.2.1 Power module design
In the whole system, I used ±5V, ±12V, 2.5V, and 3V. For the two voltages of ±5V and ±12V, a special power module is used to power the single-chip microcomputer. Since the MSP430 microcontroller is a low-power microcontroller and uses 3V power supply, a special power module is used to power the single-chip microcomputer. The power supply module of the single-chip microcomputer is TPS76301 of Texas Instruments. This power module is surface mount type, and the output voltage is continuously adjustable. It can output a voltage of 1.6-5.0V. There are only 5 pins. It can provide a current of 150mA, and the application circuit of the output voltage is shown in Figure 2.
Figure 2 Application circuit of TPS76301
The current through resistors R1 and R2 must be about 7μA. Lower resistances can be used, but they waste power. Too high resistances cannot be used because they will increase leakage current at the FB end and cause voltage errors. The recommended resistance value is to choose R2 = 169KΩ, and let the current flowing through R1 and R2 be about 7μA. Calculate R1 by the following formula:
Some typical values of resistors and output voltages are shown in Table 1:
Table 1 Typical values of output voltage and resistance
2.2.2 Amplification and filtering module
The preamplifier I used in the input channel of this low-power system is TI's OPA349. The input channel circuit is shown in Figure 3. In addition to the amplification function, this circuit can also have a filtering function to eliminate irrelevant AC components.
Figure 3 Amplification and filtering circuit diagram
2.2.3 RS-485 communication circuit
The communication module is an important part of this system. The controller uploads historical operation data and related information and receives basic parameters and control commands through the communication module. Designing a successful communication circuit will directly affect the debugging, function and versatility of the controller.
Figure 4 is the RS-485 communication interface circuit. The data transmission between the single-chip microcomputer and the host computer passes through the RS485 transceiver NAX485, and is sent and received by the USARTI of the single-chip microcomputer. The communication mode is half-duplex, and the P3.5 port of the single-chip microcomputer controls the data sending and receiving. In order to improve the anti-interference performance of data transmission, RS-485 is powered by +5V alone, and is completely isolated from other power supplies using high-speed optocouplers, and does not share a common ground. Since the transmission line is long and there may be electromagnetic interference on site, a transient voltage suppressor TVSC is connected in parallel to the transmission line, a fuse is connected in series, and the transmission line uses a shielded cable.
Figure 4 RS-485 serial communication
In addition, there are clock circuit module, A/D conversion module, LCD display interface design, keyboard interface module, and storage expansion module, which will not be introduced in detail.
3 Low-power system software design
The software design of the single-chip microcomputer application system is different from the general program design. It not only involves the design of various calculation programs and control strategy programs, but also requires the design of various input and output programs in combination with specific hardware circuits. The software of this instrument system adopts a modular structure design, and each functional module is designed as an independent programming and debugging program block, which is conducive to the future function expansion, and is easy to debug and connect, and is more conducive to the transplantation and modification of the program.
The software design of this system uses C language suitable for MSP430 series, which is highly compatible with standard C language. The development platform uses the integrated debugging environment Embedded Workbench and C language debugger C-SPY provided by IAR for MSP430 series.
3.1 Introduction to time-triggered hybrid scheduling
The scheduler is like a simple operating system that can call tasks periodically or once. In fact, the scheduler is a timer interrupt service program shared by many different tasks. As long as a timer is initialized, multiple tasks can be scheduled. The characteristics of a task are divided into four parts: the pointer of the task function, the delay time, the task execution cycle and the task executable flag. The scheduler generates a certain time interval through the timer, and judges and schedules the task to be executed according to the task executable flag.
In this universal intelligent terminal, tasks such as AD conversion, switch quantity acquisition, LCD display, and output control are cooperative tasks, which are executed sequentially according to the delay time and cycle; keyboard scanning is decomposed into short task processing; 485 communication is an interrupt task, which executes the host computer command task. In fact, most command tasks are based on command requirements, changing the content of certain variables or registers, and the execution speed is very fast. They can be executed once for each command, which belongs to a single task. Based on the system task and scheduler design principles, the attribute list of the scheduler task is given as shown in Table 2.
Table 2 Task attribute table
3.2 Main program design
This design uses a time-triggered hybrid scheduler system. The scheduler schedules and executes tasks in sequence according to the execution cycle and delay time of the task, ensuring that only one event is processed at a time, reducing the CPU load and the memory usage, thereby enhancing the reliability and scalability of the system and making the system low-power design easy to implement. The system main program mainly includes the system initialization subroutine and the task function scheduling subroutine. The system main program flow is shown in Figure 5
Figure 5 Flowchart of the main program of the intelligent terminal
4 Conclusion
Through the analysis of various factors affecting the system power consumption, it is determined that both hardware selection and software design should be considered at the same time, and the combination of hardware and software should be used to minimize power consumption. The multi-purpose low-power instrument system studied in this paper can be used as a solution for the realization of electronic intelligence in my country's water meters, gas meters, heat meters, electric energy meters, and various detectors and monitors.
The innovation of this paper: This paper takes reducing power consumption as the main goal. The multi-purpose low-power instrument system studied is a more specific and universal implementation scheme for portable and low-power devices. As long as the corresponding sensors are added and the specific software is modified according to actual needs, the system can be easily applied to a variety of detection equipment that requires battery power.
Previous article:Using a single chip microcomputer to control LED dot matrix
Next article:Design of a Multifunctional Temperature Controller Based on Single Chip Microcomputer
Recommended ReadingLatest update time:2024-11-17 00:06
- Popular Resources
- Popular amplifiers
- MSP430 series single chip microcomputer system engineering design and practice
- oled multi-chip calling program
- Microcontroller Principles and Applications Tutorial (2nd Edition) (Zhang Yuanliang)
- Getting Started and Improving MSP430 Microcontrollers - National Undergraduate Electronic Design Competition Training Course
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
- Recruitment: RF Engineer
- NuMaker-IIoT-NUC980 Review EBI
- How to convert K210 image into JPEG data stream after acquisition
- Design and implementation of 3D wireless RF mouse based on single chip microcomputer and touch control module
- RSL10 ADC multi-channel data acquisition
- MicroPython Hands-on (34) - Universal Sensor
- Practical Information 2 - Performance Comparison between CDMA2000 1X and GPRS
- 【FAQ】RISC-V Safe Place|Microchip Security Solutions Series Seminar No. 4
- 【Development and application based on NUCLEO-F746ZG motor】1. Development board introduction
- MSP432 learning notes: import of environment configuration library functions