1 Component Selection
The temperature sensor of this system can be a thermistor. In the measurement range of 10 to 30°C, the resistance of this device varies greatly with temperature, the circuit is simple, the power consumption is low, the installation size is small, and the price is also low. However, the accuracy, repeatability, and reliability of the thermistor are relatively poor. Therefore, this sensor is not suitable for detecting temperature signals below 1°C, especially those with higher resolution requirements.
The display part can use a pen segment LCD display. In particular, black and white pen segment LCD displays have extremely low power consumption, moderate appearance, low price, and strong selectivity of driver chips. For this reason, this design uses the universal LCD driver HT1621 with mature technology, low power consumption, stable performance and low price.
As the core component of the whole system, the choice of single-chip microcomputer is very important. After comparing multiple single-chip microcomputer chips, we finally selected TI's MSP430 series controller, which has extremely low power consumption, powerful performance and low cost.
2 Main features of MSP430F microcontroller
The MSP430F series is an ultra-low power FLASH controller produced by TI in the United States. This device is known as the "green" controller (GREEN MCU), and its technical features represent the development direction of single-chip microcomputers. The on-chip memory unit of the MSP430 is a very low-energy unit, consuming only one-fifth of the power of other flash microcontrollers. Compared with other controllers, the MSP430F can reduce the circuit board space and reduce system costs.
The MSP430F series devices integrate ultra-low power flash memory, high-performance analog circuits and a 16-bit reduced instruction set (RISC) CPU, and the instruction cycle is short. Most instructions can be completed within one instruction cycle. The device has extremely low operating current and ultra-low power consumption. The current in the shutdown state is only 0.1μA, the standby current is 0.8μA, and the port leakage current in normal mode (250μA/1MIPS@3V) is less than 50 nA, and zero power loss reset (BOR) is possible. In addition, the chip is a low-power device that only requires a 1.8-3.6V voltage supply, which can effectively reduce system power consumption. Because it has ultra-low power digital controlled oscillator technology, it can achieve frequency adjustment and crystal-free operation. Its fast startup time of 6μs can extend the standby time and make the startup faster, while also reducing battery power consumption. The MSP430 series chips have rich on-chip resources, and the I/O ports are powerful and flexible. All I/O bits can be configured individually, and each port line corresponds to one bit in multiple registers such as input, output, direction, and function selection. Therefore, its temperature simulation control can adopt an isolated low-voltage control method.
3 Ultra-low power electronic thermometer hardware design
Figure 1 shows the hardware block diagram of the ultra-low power electronic thermometer. The design schemes of other unit circuits are given below.
3.1 Temperature acquisition and conversion circuit
Using MSP430 to measure resistance, you can use the slope technology instead of using the A/D conversion circuit, which is simple and easy to handle. For this technology, you can use the comparator and clock on the MSP430 series chip to complete the A/D conversion of the slope.
The specific temperature measurement of this system is to convert the measured resistance value into time by using the capacitor charge and discharge, and then use the capture comparison register inside the MSP430 to accurately capture the time, so as to measure the resistance value of the thermistor and indirectly obtain the temperature value. The temperature detection circuit structure is shown in Figure 2.
In the figure, Rref is the reference resistor used for calibration, and Rsens is the resistor to be measured.
When the system is working, first set the port of MSP430 connected to Rref, then output high level Vcc and charge the capacitor through the standard resistor. After the timing time is up, the port is reset to discharge the capacitor. The discharge process continues until the voltage on the capacitor drops to the upper limit of the "0" level of the charging port. The cut-off time is accurately captured by the capture device inside Timer_a through the capture entry CA0. This discharge time can be marked as Tref. Then, the same operation is applied to P2.1 to obtain the time Tsens for the capacitor to discharge through the measured resistor. Finally, compare Tref and Tsens, and calculate the measured resistor value by the following formula:
Rsens=RrefTmeas/Tref
Where Rsens is the thermistor under test, Tsens is the discharge time of the component under test, Tref is the discharge time of the reference component, and Rref is the reference precision resistor.
As can be seen from the above formula, as long as the voltage and capacitance values remain stable during measurement, the specific values of voltage and capacitance are no longer important, because in the proportional measurement principle, these factors have been eliminated in the calculation process. Therefore, although the voltage of the instrument's power supply battery is discrete and the voltage will gradually decrease over time, since the measured resistance value has nothing to do with the value of the power supply voltage, this measurement method has the characteristic of self-compensation of the power supply voltage. [page]
3.2 LCD liquid crystal drive display circuit
The LCD display circuit can be driven by the HT1621, which is a 128-dot memory-mapped and multifunctional LCD driver. The software configuration feature of the HT1621 makes it suitable for a variety of LCD applications, including LCD modules and display subsystems. There are only 4 or 5 pins used to connect the host controller and the HT1621. In addition, the HT1621 has a power-saving command to reduce system power consumption.
This LCD driver can drive a 4-bit LCD panel with 4 common terminals and 1/3 bias ratio. This driver circuit also has a standby function. When the system enters standby mode, the total power consumption of the driver chip and the LCD panel is less than 1μA (almost zero).
4 Software Design
4.1 Low Power Design of Power Management Software
In order to maximize the efficiency of battery energy and extend the battery life of portable instruments, in addition to selecting low-voltage and low-power devices as the hardware basis, it is also necessary to compile flexible power management software. The specific measures are as follows:
(1) Since the basic modules inside the microprocessor have their own power switches, they are only turned on when in use. Therefore, when performing temperature sampling, the timer Timer_a can be started through software to start capturing; when the sampling is completed, the timer can be turned off through software to prohibit capturing;
(2) Since temperature is a time-varying parameter, the temperature should be collected using a timer interrupt method. That is, the CPU enters low-power mode immediately after initialization and waits for an interrupt. The timer interrupt will wake up the CPU again to collect temperature and process data, and store the temperature value at this time in the FLASH Ram. After processing, the CPU enters low-power mode again;
(3) Intelligent management of CPU status. The MSP430 microcontroller has five low-power modes, LMPO to LMP4 (the higher the LMP number, the lower the power consumption in this mode). When temperature is not collected, the CPU can be put into low-power mode LMP3 (V is 3 V, f is 32768 Hz), in which the operating current is less than 2 μA. The transition time from low-power mode to working mode is less than 6 μs.
(4) In order to reduce current consumption, three I/O lines can be used in the temperature detection circuit and they are usually in a high-impedance state. During the data acquisition process, the CPU switches the corresponding lines to the output state.
4.2 Software Program
The system software consists of a main program, a timer interrupt service program, and a series of subroutines. The main program is used to complete the initialization of the microcontroller and wait for interrupts. The timer interrupt service program includes a timer charging program for measurement, a data processing subroutine, and a discharge time measurement program. The discharge time measurement program flow chart is shown in Figure 3. The measurement accuracy of the measured resistance depends on the number of measurement cycles of the discharge time. For example, when the required resolution is 10 bits, the maximum value of the counter can be set to 1024 measurement cycles.
The working mode of MSP430 can support various requirements of ultra-low power consumption through the combination of intelligent operation management software of the module and the optimized state of CPU. It mainly makes the microcontroller in the system work in active mode, and sets it to low power mode during working intervals to reduce system power consumption.
5 System Testing
5.1 Test Method
According to environmental requirements, the test of this system can be repeatedly carried out in different temperature environments, and the software and hardware can be adjusted according to the data error for calibration. The temperature can be measured by the degree comparison calibration method.
5.2 Error analysis
The instruments used in this test include computer, EZ430 programmer, oscilloscope, precision digital ammeter, digital multimeter, thermometer and stopwatch.
In the realization of ultra-low power consumption, extremely low power consumption components can be used and the leakage current can be controlled. The microprocessor can be operated at a lower frequency and in standby mode, and the software operation can be optimized to minimize the power consumption of the whole machine.
6 Conclusion
The advantages of this circuit are high resolution and low power consumption. The characteristics of the whole circuit are few peripheral components and adjustable components, stable and reliable operation. The design idea of this system has a certain reference value for the research and development of ultra-low power consumption, miniature portable intelligent detection instruments.
Previous article:Software and hardware anti-interference methods in single-chip microcomputers
Next article:Design of FPGA-based electronic design competition circuit board
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- I am a beginner who just learned 51. I would like to ask the experts to see if there is any problem with the program of the water lamp.
- How to convert MAX31865
- What does the diode in this picture mean?
- After uploading the picture, it doesn't show up in the post when I refresh it. What's going on?
- 【GD32307E-START】04-Project establishment and LED lighting
- Design and implementation of ZigBee technology voice and image wireless monitoring system
- TIDA-00961 FAQ for GaN-based High Efficiency 1.6kW CrM Totem Pole PFC Reference Design
- [National Technology N32G457 Review] RT_Thread Studio SPI Filling the Pit
- LSM6DSRX iNEMO inertial module related information
- GD32E231 Keil development environment setup problem [solved! ]