Digital power following technology based on AVR microcontroller

Publisher:幸福之星Latest update time:2011-12-22 Keywords:ATMEGA8 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Introduction

The five major problems on Earth at present, including energy imbalance, dictatorship of oil-producing countries, uncontrolled climate change, energy shortage, and disappearance of biodiversity, are all caused by the extensive use and reliance on traditional energy by humans. Moreover, the five major problems are closely linked and imminent. If no active action is taken, all mankind will fall into an unimaginable catastrophe. Therefore, the development of alternative energy is not only a solution to high oil prices, but also the most critical factor for human beings to survive sustainably on Earth. Coal and oil are the main energy sources used in China. Their huge consumption is not only the main source of air pollution, but also their non-renewable nature makes them gradually replaced by renewable energy. Most parts of China have rich wind and solar energy resources, but they have not been effectively utilized due to the development of science and technology. In recent years, with the continuous progress of electronic technology and silicon material research, the development and utilization of wind and solar energy have been promoted, and the market prospects are quite broad. Under this premise, a new generation of wind and light complementary integrated power supply system with intelligent, modular and integrated features has been developed.

1 Wind-solar complementary power generation system

The wind-solar complementary power system mainly consists of wind turbines, solar panels, battery packs and power integrated control cabinets. Its design concept is to use the solar panels and wind turbine dual power generation system to charge the battery pack (48V), and then invert the DC power into AC 220V/50Hz AC power, which becomes our commonly used AC power supply. The charging method of the battery pack determines the length of its service life, but the suddenness of wind energy and the timeliness of solar energy are destined to prevent the power generation system from outputting reliable and stable DC power. If the battery pack is directly charged without processing, it will not only greatly shorten the life of the battery pack, but also fail to effectively utilize wind energy and solar energy. Therefore, a control system based on ATMEGA8 single-chip microcomputer digital power following technology is introduced during the charging process, which not only greatly improves the stability of the power generation system, but also improves the reliability of the power supply system.

2 Charging system composition

Taking the wind turbine as an example, the main circuit of the charging system adopts the DC conversion module PH600S28048 of a Nissan company, with a DC input voltage of 200-400V and an output voltage of 43-6lV, which can be adjusted by remote control. The fan has a three-phase line voltage of 220V output, and the battery pack has a charging voltage range of 46~57V. The constant current and power following of the charging are completed by ATMEGA8. The system composition schematic diagram is shown in Figure 1.

System schematic diagram 1


3 System Working Principle

ATMEGA8 is an AVR high-end single-chip microcomputer, which integrates an RC oscillator with selectable and calibrated frequency, 8K FIASH program memory, 1K SRAM data memory, and 512 bytes of E2PROM. 8-channel 10-bit A/D conversion, 3 PWM output channels can be used as D/A output, internal programmable watchdog timer, etc. The charging current is converted into a standard signal of 0-5V through the Hall current sensor, converted into a digital signal through A/D and sent to the CPU for processing, and the output voltage of the charger is controlled through the PB1 pin. The PWM output controls the pass of the optocoupler PC817 to control the output voltage of the charger, thereby achieving the purpose of constant current through simple digital PI regulation. However, an important prerequisite for the constant current operation of the charger is that the input energy must have sufficient power. However, the randomness and suddenness of wind energy and solar energy in nature make constant current charging difficult to achieve. Especially for wind energy, if the wind speed is particularly high and the charger still outputs a constant current (the load remains unchanged), it will damage the fan. If the wind speed is low and the power is insufficient, the charger will not work properly, sometimes shutting down and sometimes opening. This phenomenon is caused by the normal working input voltage range of the charging module PH600S is DC 200~400V. In order to overcome this situation, digital power following technology is added, and the load size (output current) is adjusted by digital PI adjustment based on the fan input voltage 300V converted by A/D, so as to achieve normal operation of the charger.

4 Software Design Ideas

The program is written in the assembly language dedicated to the AVR microcontroller and modular design. The program flow diagram of the monitoring program and the input control module is shown in Figure 2.

Figure 1: Flow chart of monitoring main program


The entire program code consists of digital acquisition of analog quantity, median filtering, digital comparison, PWM output, etc. The key is that digital comparison constitutes a simple PI regulation and the current loop is nested in the voltage loop.

The program flow is as follows: Take the current loop as an example for introduction: The output current of the hardware charger composed of PH600S series modules is linearly regulated by a 0-5V signal. The current given signal (0-5V) is output by the ATMEGA8 microcontroller PBl port as a 10-bit PWM pulse width modulation waveform, which is then generated by RC filtering. Set the T/C1 control register TCCR1A of the M8 microcontroller to 83H, and the TCCR1B control register to 05H, which defines the PBl port to output a 10-bit fast PWM waveform. The value of the T/C1 count register TCNTI (TCNT1H: TCNT1H) changes from 0000 to 01FFH. The pulse output duty cycle (output voltage) is generated by comparing the set value of the comparison control register OClA with the count value of the TCNTl register; the content of OClA is variable from 0000 to 0lFFH, which determines that the output voltage is linearly adjustable from 0 to 5V. The OClA value is given by the voltage loop after analog PI adjustment operation, so that the mutual nesting of the voltage loop and the current loop constitutes a constant follow of power, thereby improving the efficiency of wind and light complementary power generation.

5 Conclusion

The power following principle of the solar charging circuit and the wind turbine is the same, except that the input voltage of the solar panel is low and changes slowly. The PH30048-48 module has been used as the main circuit. The wind-solar complementary power generation system made of a Nissan company's DC conversion module as the main circuit using the ATMEGA8 microcontroller as control has been in operation for more than two years in a garrison on Shanghai's Huaniao Island. It is very stable and has been well received by military leaders.
Keywords:ATMEGA8 Reference address:Digital power following technology based on AVR microcontroller

Previous article:Implementation of Coding and Decoding of Load Cylinder Multi-channel Remote Control Switch Based on AVR Single Chip Microcomputer
Next article:Single-chip Microcomputer Pulse Generator Based on LabVIEW

Recommended ReadingLatest update time:2024-11-17 03:05

ATmega8 calibrated on-chip RC oscillator
The calibrated on-chip RC oscillator provides a fixed 1.0, 2.0, 4.0, or 8.0 MHz clock. These frequencies are nominal at 5V, 25°C. This clock can also be used as the system clock by programming the CKSEL fuse according to Table 9. No external components are required when this clock is selected (CKOPT cannot be programm
[Microcontroller]
ATmega8 calibrated on-chip RC oscillator
ATMEGA8 microcontroller drives 4-wire stepper C program
#include  avr/io.h   #include  avr/delay.h   #define uchar unsigned char  #define uint unsigned int  uchar np;  //Stepper motor operation data table  const uchar motortb ={0x11,0x99,0x88,0xCC,0x44,0x66,0x22,0x33};  void delay_nms(uint ms)// Each step delay subroutine  {   uint i;  for(i=0;i ms;i++)     _delay_loo
[Microcontroller]
ATmega88 Idle Mode
When SM2..0 is 000, the SLEEP instruction causes the MCU to enter the CPU stop operation, while the SPI, USART, analog comparator, ADC, two-wire serial interface, timer counter, watchdog and interrupt system continue to work. This sleep mode only stops clkCPU and clkFLASH, and other clocks continue to work. Internal
[Microcontroller]
Passive infrared alarm experiment based on Atmega8
 The alarm consists of an infrared transmitter, receiver, buzzer and LED indicator. Under normal circumstances, the green LED flashes constantly, indicating that the monitored area is normal. Once someone breaks into the monitored area, the green LED goes out, the red LED flashes quickly, and the buzzer sounds an alar
[Microcontroller]
Passive infrared alarm experiment based on Atmega8
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号