MSP430F169-based simulation device

Publisher:九九归一74Latest update time:2013-04-13 Source: dzscKeywords:MSP430F169 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  introduction

  At present, energy sources such as coal and oil are becoming exhausted, and environmental pollution is becoming increasingly serious. The use of new energy and renewable energy has become an urgent matter for countries around the world. As a pollution-free renewable energy, solar energy is becoming more and more popular. The rapid development of solar photovoltaic grid-connected power generation industry has great significance for the sustainable development proposed by people. This design uses the phase-locked loop frequency multiplication, comparator zero-crossing trigger and MSP430F169 microcontroller DA to generate a sine wave with the same frequency and phase as the input signal and controllable amplitude as the input reference signal of the DA-AC circuit. The DA-AC circuit adopts the self-excited feedback model in the class D power amplifier, and uses the self-excited oscillation of negative feedback to generate a sine wave pulse width modulation (SPWM) wave. Through the cooperation between hardware, the inverter voltage output and maximum power, the tracking of the same frequency and phase are realized.

  Selection of device scheme

  DC-AC inverter solution: adopts the inverter topology of the self-oscillating model in the Class D power amplifier, and uses the high-frequency self-excitation of negative feedback to generate the required PWM switching signal. This solution is a closed-loop system, the waveform is basically undistorted when the power supply and load change, and the hardware circuit is simple.

  Phase-locked frequency locking scheme: Utilize the phase-locked frequency locking function of the phase-locked loop to multiply the reference signal and generate a clock synchronized with it, and use this clock to adjust the frequency and phase relationship of the input and output. This scheme is completely implemented by hardware circuits and is simple and convenient.

  Maximum power point tracking solution: Using the classic MPPT algorithm, the output voltage and current of the photovoltaic array are continuously sampled to find the point where dP/dU is zero, which is the maximum power point.

  The principle block diagram of the device is shown in Figure 1. In the design, cost-effective devices such as CD4046 phase-locked loop chip and power MOS tube IRF540 are selected, and the classic control algorithm based on MSP430F169 microcontroller is used to control the photovoltaic grid-connected power generation simulation device.

  The phase-locked loop CD4046 can realize the frequency multiplication and synchronization of the input signal. The input frequency is 45Hz~55Hz, and after 256 times the frequency multiplication, it becomes a 11.52kHz~14.08kHz signal, which is sent to the single-chip microcomputer as the clock for system synchronization. The single-chip microcomputer uses the DDS principle to generate a sinusoidal signal with adjustable amplitude. This clock is used as the clock of the D/A output, which can track the phase and frequency of the input signal. The principle block diagram of the phase-locked loop is shown in Figure 2. The internal circuit and peripheral circuit diagram of CD4046 are shown in Figure 3. This sinusoidal signal is sent to the self-closed loop DA-AC inverter in this design as input, and the output voltage can be the same frequency and phase as the reference input UREF. To ensure fast locking, it is necessary to adjust the values ​​of R1, R2, and C1 to stabilize the center frequency of the phase-locked loop at 50Hz.

  Implementation of MPPT Maximum Power Point Tracking

  This design uses the MSP430F169 microcontroller as the main control chip. It is a powerful 16-bit microcontroller with ultra-low power consumption produced by TI and has FLASH memory. The program code space of this microcontroller is 60KB+256B of FLASH, 2KB of RAM, and has powerful interrupt functions, 48 ​​I/O pins, each I/O port corresponds to multiple registers such as input, output, function selection, interrupt, etc., so that the function port and the general I/O port are multiplexed. Before operating the same I/O port, the function to be implemented must be selected, which greatly enhances the function and flexibility of the port. This type of microcontroller has a powerful 16-bit RISC CPU (125ns instruction cycle), 16-bit registers and constant generators, which can maximize the efficiency of the code. The digitally controlled oscillator DCO allows wake-up from low-power mode within 6 microseconds. Moreover, the chip is also equipped with 16-bit timer A and timer B with 3 capture/compare registers, 12-bit fast A/D converter (with internal reference level, sample hold and automatic scanning features), dual 12-bit D/A converters, two universal synchronous/asynchronous serial communication interfaces USART, DMA. In addition, the microcontroller also has the advantage of ultra-low power consumption. When running at 1MHz clock conditions, the operating current is 0.1~280μg depending on the operating mode. [page]

  These features of MSP430F169 are very suitable for development requirements. Selecting MSP430F169 can easily realize continuous voltage and current acquisition. The microcontroller counts the real-time power from this data and automatically adjusts it according to the MPPT algorithm. When dP/dU>0, the input impedance of the system is increased to increase the actual input voltage U to increase the power, otherwise U is reduced, and finally dP/dU>0 is achieved. Maximum power point tracking.

  Ways to improve efficiency

  The main losses in the design of switching power supply circuits include: on-resistance loss and switching loss of field effect tubes; loss of inductors and capacitors in filter circuits; steel loss and iron loss of isolation transformers. Considering cost and performance, this circuit uses IRF540, whose on-resistance is only 77m ohms and whose input capacitance is 1700pF. When the rated current is 1A, the static power consumption of the full bridge is Pon=4×I2×Ron=0.308W. Since the filter inductor and capacitor work at high frequency and play the role of energy storage and release, the inductor should minimize the internal resistance and retain a 1mm magnetic gap to prevent saturation. The capacitor should be selected as a high-frequency low-resistance type with a small equivalent series resistance ESR to reduce the power loss generated on the capacitor. The inductor coil used in this design is a multi-strand enameled wire wound in parallel to reduce the loss caused by the skin effect of the wire at high frequency, and a ferrite core is used to reduce its hysteresis loss. The capacitor uses polypropylene capacitor, which has good high-frequency characteristics, stability and small loss. In order to reduce the loss of the isolation transformer T, the current carrying capacity of the wire is selected as 2.5A/mm2, and cold-rolled steel strip is used instead of silicon steel sheet.

  Setting of filter parameters

  滤波电感使用直径36mm磁罐,加1mm磁隙,用0.4mm漆包线5股并绕20匝,实测电感为200霧左右;为减小通带衰减,取截止频率为5kHz,一百倍于基频,得C=4.7霧。为进一步减小正弦波谐波分量,又用60霩铁粉环电感与0.68霧电容进行了二次滤波,最终效果比较理想。

  Circuit and Program Design

  DC-AC Circuit

  The DC-AC inverter is composed of a Class D power amplifier based on the oscillation principle. It uses the high-frequency self-excitation of negative feedback to generate a low-amplitude high-frequency oscillation superimposed on the power frequency signal. The high-frequency SPWM switching signal is generated by the comparator and drives the MOS tube half bridge through the floating gate driver. The block diagram of the self-oscillating inverter is shown in Figure 4. The schematic diagram of the DA-AC inverter is shown in Figure 5.

  Since negative feedback is stable at the power frequency, the amplification factor of the output signal is determined by the voltage divider ratio of R2 and R4, and the self-oscillation (generated SPWM) frequency can be adjusted by fine-tuning the resistance and capacitance values ​​in the compensation network. In practice, considering the loss and the design of the filter circuit, the selected frequency is about 28kHz to ensure that the output voltage is within the power supply HVDC range, and the proportional amplification factor is selected as 12. This inverter is self-closed loop, and the entire circuit uses only one comparator. It can automatically adjust the SPWM duty cycle according to the change of load, so that the input/output voltage is always proportional. [page]

  During the design, two of the above-mentioned balanced bridge DA-AC converters are used, with LM393 as the inverter comparator, and the IR21094 floating gate driver with its own dead zone drives the IRF540 power MOS tube, achieving higher efficiency and extremely low distortion.

  Overcurrent protection and self-recovery circuit

  The voltage generated by the current I on the sampling resistor is amplified 10 times by LM358 and compared with the reference voltage. If it exceeds the reference voltage, it will output a low level. C7 will discharge quickly through the diode, so that the #SD signal will be pulled low, the floating gate driver output will be turned off, and the microcontroller will be alerted. At the same time, I becomes smaller, the op amp 1 pin (as shown in Figure 6) outputs a high level, and +5V charges C7 through R17. After a period of time, when the high level threshold of the floating gate driver is reached, the field effect tube is turned on again. This can ensure that the output is quickly turned off when overcurrent occurs, and it will be automatically tested after being turned off for a period of time, and it can automatically recover after the fault is eliminated.

  Undervoltage alarm indication, real-time display of current inlet Ud voltage

  When undervoltage occurs, the MPPT algorithm will automatically make the output zero and the power minimum. The single chip microcomputer samples the Ud voltage in real time and displays it on the LCD. When it is less than 25V, an alarm will be sounded.

  Control circuit and control program

  At the power supply inlet, 470k and 20k metal film resistors are used to divide the voltage to a suitable voltage for voltage sampling. The current is sampled by the high end of the 40 milliohm resistor, amplified by the isolated differential amplifier HCPL7800, and then converted into a single-ended voltage by the instrument amplifier AD620 and sent to the A/D for sampling. The HCPL7800 and AD620 have a gain of 48 times, which amplifies the voltage to about 2V to ensure that the sampling current has sufficient accuracy.

  Test methods, data and result analysis

  Test instruments used: digital oscilloscope TDS1002; 4.5-digit digital multimeter VC9807A+; 20M digital signal source RIGOL DG1022; dual-channel traceable DC stable power supply HY1711. The test block diagram is shown in Figure 8.

  Test method:

  ①最大功率点跟踪功能:在60V输入电压情况下,根据测试数据表1改变RS与 RL(30賬36),记录电压表2与电压表1的示数。

  ② Frequency phase tracking function: According to the test data table 2, change the input signal UREF from 45Hz to 55Hz, observe the frequency tracking speed and the frequency of the output voltage, as well as the phase difference between the two from the oscilloscope, and record them in the test data table 2.

  ③ Efficiency: Rated RS = RL = 30V, readings of voltmeter 1, voltmeter 2, ammeter 1, ammeter 2, efficiency = UoIo/UiIi

  ④Distortion: Use an oscilloscope FFT to observe the displayed waveform and record the amplitude of the fundamental wave and each harmonic.

  Test data:

  ① Data record: The data are listed in Table 1 to Table 3.

  Table 1 Maximum power point tracking

  ③ Output over-current protection and self-recovery function: When the output is short-circuited, the circuit enters over-current protection, the indicator light turns on, and the LCD screen displays an alarm. After the short circuit is removed, the alarm disappears and the circuit returns to normal.

  ④ Input undervoltage protection and self-recovery function: Adjust the input voltage, and when the voltage displayed by voltmeter 2 is lower than 25V, the LCD screen will display an alarm. Then increase the power supply voltage, the alarm disappears, and the circuit resumes normal operation.

  Conclusion

  In order to better realize the functions of frequency phase tracking, DA-AC inversion, undervoltage and overcurrent self-recovery protection, this design is based on the MSP430F169 single-chip microcomputer, adopts a simulation scheme with fewer components and lower cost, designs an analog circuit, realizes the design of photovoltaic grid-connected power generation simulation device, and has strong practicality.

Keywords:MSP430F169 Reference address:MSP430F169-based simulation device

Previous article:Transplantation and Development of μCOS-II on ATmega128 MCU
Next article:FRAM-based MCUs improve security for low-power applications

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号