Design of low power consumption instrument system based on MSP430

Publisher:SereneSoul55Latest update time:2010-04-10 Source: 微计算机信息 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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:

Hardware block diagram of 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.

Application circuit of TPS76301

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:

formula

Some typical values ​​of resistors and output voltages are shown in Table 1:

Table 1 Typical values ​​of output voltage and resistance

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.

Amplification and filtering circuit diagram

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.

RS-485 serial communication

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

Task Properties 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

Intelligent terminal main program flow chart

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.

Reference address:Design of low power consumption instrument system based on MSP430

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

Design of vehicle detector based on MSP430
A low-power vehicle detection system is composed of a toroidal coil, an MSP430F112 1A single-chip microcomputer and an output interface. It can detect vehicles and output signals according to the sensitivity, working mode and output mode preset by the user. The software dynamic refresh benchmark method is also
[Microcontroller]
Design of vehicle detector based on MSP430
How to quickly switch from 51 to MSP430
           As a beginner who wants to learn MSP430 microcontroller, or you have just switched to electronic hardware embedded development, if you have completed the basic electronics course and want to master MSP430 microcontroller as soon as possible, but are struggling with how to break into the MSP430 lear
[Microcontroller]
MSP430 MCU controls IO port operation - LED flashes
//******************************************************************************* // D13x Demo - Change the system clock based on the previous section and observe the blinking frequency of the LED light // // Description: Change the blinking frequency by changing the system clock; invert P1.5 through P1 XOR; software
[Microcontroller]
Design of broadband DC amplifier based on MSP430F449 single chip microcomputer
  1. Data processing and control core selection      Option 1: Use AT89S52 microcontroller + FPGA to realize signal gain control, data processing and human-machine interface control functions. Since this system does not involve a large amount of data storage and complex processing, the resources of FPGA cannot be full
[Microcontroller]
Design of broadband DC amplifier based on MSP430F449 single chip microcomputer
Multifunctional multi-rate three-phase energy meter based on MSP430 single chip microcomputer
1 Introduction With the development of the national economy, the electricity consumption of enterprises and individuals has increased significantly. Now the electricity consumption time of users is relatively concentrated, so that the load curve of the power system varies greatly. In order to adjust the load curve
[Microcontroller]
Multifunctional multi-rate three-phase energy meter based on MSP430 single chip microcomputer
Problems and solutions for defining large arrays in MSP430
I used MSP430 to make a small system these days, and I needed to define a large global array. There was no problem after compiling, but I encountered a problem when debugging. Let's take a look at the problem first. Problem:         After using CCS software to burn the code into 430, the program has already started
[Microcontroller]
Problems and solutions for defining large arrays in MSP430
MSP430 MCU Writing Info Memory
When the MSP430F5438A microcontroller writes to Info Memory, it is necessary to erase the entire page of data before writing it in. Otherwise, the writing fails. And you have to set it not to erase the Info memory when downloading the program, otherwise the data storage will fail. Because it will be erased when you do
[Microcontroller]
Battery Charging System Based on MSP430
    Lead-acid batteries have the advantages of low price, reliable power supply, and stable voltage. They are widely used in communications, railways, transportation, electricity, petroleum, national defense, and industrial and agricultural production departments. In traditional charging technology, commonly used cons
[Microcontroller]
Battery Charging System Based on MSP430
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号