Abstract: This paper introduces the design principle of using MSP430F149 chip to develop ultra-low frequency waveform generator and its application in physiological filter debugging.
Keywords: MSP430F149 chip microcontroller waveform generator filter system
Ultra-low frequency waveform generators are commonly used as signal sources for simulations in vibration analyzers of manned transportation systems. It is required to operate stably in the range of 0.1Hz to 100Hz, with small waveform distortion, and to be fine-tuned in steps of 0.1Hz. There are many shortcomings in the design of traditional ultra-low frequency waveform generators: (1) general-purpose circuits are used, there are many components, especially the large capacitors, and the waveform has poor stability, large distortion, and is extremely inconvenient to adjust; (2) Application-specific circuits, such as ICL8038 and MAX038, have significantly improved distortion and stability, but are still not suitable for ultra-low frequency applications. Moreover, there are many circuit adjustment components, which require high power supply and are costly. In view of the fact that currently developed vibration analyzers often use microcontrollers, it is of great promotion value to use its surplus software and hardware resources to establish an ultra-low frequency waveform generator with easy adjustment and high precision.
The SSD-J-2 vibration comfort measuring instrument developed in accordance with the UIC513 international standard "Vibration Comfort Evaluation Criteria for Passengers in Railway Vehicles" is a three-dimensional vibration portable analyzer based on MSP430F149, which contains physiological filters for up and down, left and right, and front and rear vibrations. In order to adjust and calibrate the accuracy of this set of physiological filters, a PWM output end of the microcontroller is coupled with a type II RC filter to form an ultra-low-frequency wave generator that is easy to adjust with the support of software. It has been proven in practice that its performance meets the technical requirements of the UIC513 standard.
1 Internal structure of MSP430F149
MSP430F149 is the latest 16-bit ultra-low-power mixed-signal microcontroller launched by TEXAS INSTRUCMENTS in the United States. It has Flash memory and is highly flexible, making it easy to modify codes and product after-sales upgrades. It uses a reduced instruction set (RISC) with a 125ns instruction cycle, and most instructions are completed within one instruction cycle. The supply voltage is 1.8V ~ 3.6V, and its ultra-low power consumption (supply voltage 2.2V, working frequency 32kHz, working current is 7 μA ; supply voltage 2.2V, working frequency 1MHz, working current is 250 μA. ) makes it ultra-low power consumption . Low-frequency waveform generators can be designed as battery-powered, long-duration systems. MSP430F149 contains a 12-bit high-performance A/D converter with 8 external channels, a 16-byte programmable buffer with auto-scan function, on-chip reference voltage, a temperature sensor and low battery voltage Detection circuit; There are two internal timers: a 16-bit Timer_B with 7 capture/compare registers and a 16-bit Timer_A with 3 capture/compare registers. In the comparison mode, a PWM signal can be generated to control the frequency of the DCO. , they can be used to meet the requirements; the chip has 60KB flash memory, 2KB RAM, and adopts serial online programming to bring flexible space for users to modify programs and control parameters, and the internal security fuse can make the program Not illegally copied. In addition, MSP430F149 has a powerful interrupt function, 48 I/O pins, two serial communication interfaces, 100,000 times of erasing and writing, and super anti-interference ability.
2 Circuit design principles of ultra-low frequency waveform generator
Vibration analyzers used in human-ridden transportation vehicles have strict filtering requirements for signals. The UIC513 standard stipulates that vibration signals in the Z direction (up and down) should be filtered according to the filtering weighting curve in Figure 1. The filtering frequency band is 0.4Hz ~ 16Hz, and it is step-like. What is important is that testing the filtering effect is a prerequisite for evaluating vibration comfort. The filter circuit can only be put into use after strict calibration and calibration, so it is necessary to use a low-distortion, ultra-low-frequency sinusoidal signal source to calibrate the circuit. Using MSP430F149 for design, the circuit is very simple. The accuracy of the generated waveform depends on the accuracy of the pulse width counter, which can be up to 16 bits. The frequency depends on the size of the sine table designed by the software, the system frequency and the length of time to read the sine table. It should be noted that the designed frequency should be slightly higher than the required frequency, so that the order of the filter circuit from the pulse-width high-control signal to the sine wave signal can be reduced. Its circuit structure is shown in Figure 2.
3 Software design to implement PWM function using MSP430F149
In the software design of this ultra-low frequency waveform generator, the following functional modules are mainly used: Timer_B timer, Timer_A timer, CPU register, on-chip digitally controlled crystal oscillator and XT1 low-power oscillator. Its main program flow The diagram is shown in Figure 3.
3.1 Stable DCO frequency module
DCO is essentially an RC oscillator with the characteristics of an RC oscillator. It is not accurate in frequency setting and conversion, but because it is a digitally controlled oscillator, it can be calibrated by a known frequency-stable crystal oscillator, such as a 32768Hz watch crystal, so that the DCO reaches an accurate frequency. Because MSP430F149 does not contain frequency-locked loop digital logic, it is only possible to calibrate the DCO through "soft frequency locking" through software, which is very important.
The procedure is as follows:
Setup_TA mov #TASSEL1+TACLR,&TACTL; set TA clock SMCLK
Setup_CC2 mov #CCIS0+CM0+CAP,&CCTL2;Set CCR2, input signal:; ACLK, capture mode
Bis #MC1,&TACTL;Set Timer_A: connection mode
Test_DCO bit #CCIFG,&CCTL2; detection capture flag bit
jz Test_DCO
bic #CCIFG,&CCTL2; clear flag bit
AdjDCO mov &CCR2,R14
;R14=captured SMCLK value
sub R15,R14;R14=capture the difference of SMCLK
mov &CCR2,R15; last captured SMCLK value
com #Delta,R14;Delta=SMCLK/ACLK
jlo IncDCO
jeq DoneFLL
DecDCO dec.b &DCOCTL ;Adjust DCO
jmp Test_DCO
IncDCO inc.b &DCOCTL
Jmp Test_DCO
DoneFLL clr &CCTL2 ;Stop CCR2
Clr &TACTL ;Stop Timer_A
Changing the frequency of sine requires changing the frequency of pulse width signal output. There are three different methods: (1) You can change the accuracy, further change the size of the sine table, and increase or decrease the period of outputting a sine wave; (2) You can Change the main frequency to extend the execution time of the instruction and thereby extend the cycle; (3) Use the interrupt processing delay method to read the sine table to control the output frequency. All three methods are very simple and only need to change a few parameters. The last method is used here.
The procedure is as follows:
TB_ISR inc R11; R11, R12 are used to change the generated sine
;Wave frequency, delayed reading of sine table
cmpR11,R12
J
Incd R15; Increase pointer R15, pointing to the sine table
;The next sine value of
and #Number,R15;Number=sine table size×2
mov Sine_Tab(R15),&TBCCR1
;Sine_Tab is the sine table pointer, TBCCR1
RT reti ;Move into new value
4 Self-calibration system of physiological filter of vibration analyzer with MSP430F149 as the core
Because MSP430F149 provides powerful functions, it can be used to develop portable vibration analyzers. The ultra-low frequency waveform generator is developed on the basis of MSP430F149. It has a simple structure and can calibrate the physiological filter circuit of the vibration analyzer, completing the self-calibration function of the instrument. The system structure diagram is shown in Figure 4.
Using MSP430F149 to design a sine wave generator takes advantage of the special functions provided by this microcontroller, resulting in a simple circuit, easy adjustment, and controllable accuracy. Through verification, waveforms with different frequencies and small distortion can be generated, which can be used as input sources for analog circuits to calibrate them. In addition, the microcontroller can be further used to generate harmonic signals, DC signals, etc., and can be applied to wider fields.
Previous article:Development of a wide-range and high-precision optical fiber sensing thermometer based on single-chip microcomputer
Next article:Online monitoring of operating temperature of power cable joints
- Popular Resources
- Popular amplifiers
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- 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
- Migrating from MSP430F2xx to FR57xx series
- ARM's strategic layout in the field of Internet of Things
- BearPi-HM Nano Development Board Review 1 Getting Started with Program Development
- 【GD32307E-START】Unboxing + Impressions of the board + Lighting ceremony
- Sequential logic circuit
- I have some doubts about SensorTile.box
- A novice needs help. When drawing PCB manual wiring in AD13.4, why can't I see the trace of the wiring before the wiring is completed?
- What are the important techniques for PCB wiring?
- Naming of Cadence Allegro 17.2 built-in pads
- TI - MCU - MSP430 User Guide 2 -> CPU/CPUX