1 Introduction to MSP430x09x
MSP430x09x is the first 0.9V operating voltage MCU in the MSP430 series. This series is powerful and can be easily applied to micro motor control, infrared transmission, power supply detection and other occasions. In addition, its 0.9V operating characteristics can be widely used in single-battery powered consumer electronics. MSP430x09x contains a variety of functional modules (see Figure 1). This series of solutions not only highly integrates 16-bit timers, watchdog timers, 11 I/Os with interrupt functions and zero-power low-voltage reset function (BOR), but also integrates new analog function pool peripherals that can be configured as ADC, DAC, comparator, system voltage monitor (SVS) and temperature sensor, all with an operating voltage of only 0.9V. The 16-bit RISC architecture CPU and its instruction set are compatible with existing MSP430 MCU devices, with an operating frequency of up to 4MHz and a power consumption of only 45μA/MHz in working mode. The MSP430x09x series supports three 0.9V MCU versions with up to 2kB RAM and 2kB ROM - MSP430L092 (RAM), MSP430C091 (ROM) and MSP430C092 (ROM), providing a variety of options according to needs. This is done because the 0.9V working characteristics cannot erase the FLASH, so its application mode is to use EEPROM and L092 to complete the system design in the research and development stage, and use C09x with ROM after productization, which can operate normally without EEPROM.
2. A-Pool
The analog function pool developed and designed by MSP430x09x is to realize various analog function modules under 0.9V. The specific implementation of a certain function is based on the user's software design. The reference voltage of the entire analog function pool module can be provided by an internal 256mV reference voltage or an external reference voltage. Multiple clock sources can be selected as its clock source. In general, the analog function pool can realize the following functions:
Comparator
●8-bit digital-to-analog converter (DAC)
●System voltage monitor
Internal temperature sensor
●Ultra-low reference voltage source
The analog function pool looks complicated, but its core is actually a comparator and two multiplexers. The multiplexer is used to select the input signal of the positive and negative input terminals of the comparator to achieve different functions. In addition, the operation of the ADC and DAC modules can achieve more flexible and intelligent analog acquisition conversion functions through a variety of triggering methods. The programmable A-Pool enables various analog peripheral configurations to run in an orderly manner without user intervention, thereby improving system flexibility. A-Pool also provides two AD sampling modes-RAMP and SAR mode. When using RAMP mode, it can work in no compensation mode, overload compensation mode, offset compensation mode, full compensation mode and window mode, etc. Of course, the higher the accuracy, the longer the required sampling cycle. Therefore, it is necessary to arrange the working mode reasonably according to the sampling accuracy and sampling time. In addition, when the analog sampling voltage is greater than the reference voltage, the appropriate voltage sampling range can be set by software to complete the AD sampling of higher voltage, thereby eliminating the external voltage divider resistor and greatly facilitating the user. As a powerful analog function module, the analog function pool can realize rich analog functions. In order to make it work better and avoid misoperation, please refer to the instructions in its user manual.
3 System structure diagram and overall design scheme
The block diagram of the electric shaver system in this article is shown below. In this solution, the electric shaver uses MSP430L092 as the MCU. Its ultra-low power consumption feature allows the shaver to be used longer. The operating voltage of all functions on the MSP430x09x chip is 0.9V, so when the system is powered by a single battery, no boost chip is required to make the system work normally. In this way, the same function is achieved, not only saving a battery, but also saving the cost of the boost circuit, and making the entire system structure very simple. The entire system is powered by a single battery to power the MCU and the 0.9V DC motor. The self-locking circuit is used to realize the power-on, speed selection, and shutdown functions with a single button. The DC motor drive is realized by using a 0.9V MOSFET (because the rated current of a single 0.9V MOSFET is small, two MOSFETs are connected in parallel, and the voltage drop on the MOSFET is reduced at the same time), and the PWM wave is used to control the on and off of the MOSFET to achieve motor speed regulation. Since the MSP430x09x series MCU has a powerful analog function pool, it can easily monitor the system power supply voltage. When the voltage is lower than a certain level, the system is prevented from continuing to work, so as to prevent permanent damage to the rechargeable battery due to excessive use. In addition, when charging, the battery voltage can be sampled through AD. When the battery is fully charged, the charging circuit can be controlled by PWM to enter the trickle charging mode to achieve charging management. Users can use the comparator, AD, DA, internal temperature sensor and other functions of the analog function pool in MSP430x09x to develop more advanced and functional products. In view of the use of MSP430L092 in the product development stage, which only has RAM, an external EEPROM is required for user programs. Since the working voltage of EEPROM is 2.5~5.5V, a simple boost circuit is required with independent components to load the running program from EEPROM during the initialization phase of L092. In the final product, C092 or C091 is used, and the external EEPROM part can be omitted.
Figure 2: Electric shaver system block diagram
4 System Hardware Design
4.1 MCU Pin Assignment
Figure 3: MCU pinout
The pinout of this system is shown in the figure above. It can be seen that the pins of the MSP430x09x series are multiplexed, allowing users to reasonably allocate corresponding functions, making the design simple and flexible. This system uses general I/O, SPI, TA0, TA1, A-Pool, BOOST and other functions. [page]
4.2 External storage part
Figure 4: External EEPROM storage module
The above figure shows the EEPROM module and the BOOST boost circuit composed of discrete components. The working principle will not be described here. During the boot phase, the MSP430L092 needs to communicate with the EEPROM through SPI to load the program into the RAM. During this period, the boost circuit is controlled by the P1.2 pin to output a 3V voltage for the EEPROM to work. This part of the code does not need to be written by the user and has been solidified in the IDE.
4.3 Charging Circuit Control Module
Figure 5: Charging control circuit
The above figure shows the system charging control module. When the system is powered on externally, the system enters the charging mode, the MCU is powered and running, CHARGE_IN is at a low level, and the MCU enters the charging mode. The battery voltage is sampled by AD, and after judging whether it is fully charged, the charging circuit is switched to the trickle charging mode to prevent the battery from overcharging. At the same time, the battery voltage is detected, and when the battery is lower than 1.45V, it is switched to the charging mode again. The ADC module of the analog function pool unique to the MSP430x09x series supports two AD sampling modes, RAMP and SAR. In RAMP mode, the AD module can also be set in different error compensation modes to improve sampling accuracy.
4.4 Button self-locking part
Figure 6: System self-locking circuit
The figure above shows the system button self-locking circuit. When the button is pressed, the MCU is powered on and runs, and it judges to enter the working mode. It is self-locking when it is turned on. The system can still operate normally when the button is released; press the button again to switch the working mode; press the button again, the system is unlocked and shuts down. In addition, the MCU regularly detects the battery voltage through A-Pool. When the battery voltage is lower than 1V, the working circuit is cut off to prevent permanent damage to the battery during undervoltage operation and affect the battery life. The MCU also detects the system temperature by configuring A-Pool. If it exceeds the normal working range, the circuit is cut off.
4.5 Circuit driving part
Figure 7: DC motor drive circuit
The DC motor module of the system is shown in Figure 7. As a single-battery system, in order to ensure that the system can work normally under low battery voltage, the system selects a DC motor and MOSFET with an operating voltage of 0.9V, making the entire system more energy-efficient and running longer. Since some low-voltage MOSFETs have a small rated current, a single one cannot meet the performance requirements of the DC motor, so sometimes two MOSFETs need to be connected in parallel to increase the working current while reducing the voltage drop on the MOSFET. In this design, MOSFETs are selected from ROHM's RYU002N05 (2 in parallel) and VISHAY's Si2342DS (single), both of which can make the system work normally.
5 System Software Design
The software part of this system mainly needs to realize the main program main loop, initialization, external storage communication, battery charging control, button processing, LED indication, DC motor drive control, voltage sampling, temperature sampling, sleep wake-up function, etc. The system is powered on and started in two ways: system charging and button startup. After power is on, L092 loads the program from EEPROM, starts normal operation, and determines the working mode. When the system is charging, the system works to regularly detect the battery charging voltage. According to the battery characteristics, after the battery is fully charged, it enters the trickle charging mode to prevent the battery from overcharging and causing damage to the battery. When the battery voltage is lower than 1.45V, it enters the charging mode again. In normal use, the button startup enters the normal working mode, the system is self-locked to ensure normal operation when the button is released, the system outputs PWM to control the motor operation, and changes the working mode by pressing the button. Continue to press the button to release the self-locking and shut down the system. In addition, when the system is working normally, the battery voltage is regularly detected by the ADC module. When it is lower than a certain voltage, the system is prohibited from continuing to work to prevent permanent damage to the rechargeable battery during undervoltage. At the same time, the MCU needs to record the battery voltage values before and after. Because the battery voltage will jump greatly when the motor is blocked, the battery voltage value is recorded and this feature is used to determine whether the motor is blocked. If it is blocked, the system will be shut down immediately. After the ADC samples the battery voltage, the A-Pool is configured to sample the system temperature to determine whether the operating temperature is within the normal range. If it is not normal, the system will be shut down immediately. The entire system sets the system working status value through the input port and each interrupt handler, and opens the corresponding functional module according to different status values in the program loop.
Previous article:A Design Scheme for Wireless Voice Transmission System
Next article:WIFI intelligent thermostat design
Recommended ReadingLatest update time:2024-11-16 15:19
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
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
- Agitek case sharing - Metrology and testing demonstration case of automotive electronic modules
- How to turn off MPLAB XIDE's code optimization function
- IoT Smart Parking Solutions
- EPWM1 A and B pulses are not complementary
- Find the parameters of the low-pass filter
- Bone vibration sensor and high-quality voice calls (including working principles)
- Millimeter wave sensors
- New Year's flavor competition, post photos during the New Year to win gifts~~
- C language function interrupt function
- NUCLEO_G431RB Review - First Experience