基于PIC单片机的光伏控制器的设计与制作--科技论文.docx_第1页
基于PIC单片机的光伏控制器的设计与制作--科技论文.docx_第2页
基于PIC单片机的光伏控制器的设计与制作--科技论文.docx_第3页
基于PIC单片机的光伏控制器的设计与制作--科技论文.docx_第4页
基于PIC单片机的光伏控制器的设计与制作--科技论文.docx_第5页
已阅读5页,还剩23页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

科技论文题 目:基于PIC单片机光伏控制器的设计 系 别 电子技术学院 专 业 光伏应用技术 班 级 学生姓名 学 号 Based on PIC MCU of design for PV controllerAbstract: The full name of solar controller is solar charge and discharge controller, which is used in solar power system to control the solar battery (square matrix) to charge the battery, and the battery to the solar inverter load automatic control equipment. PIC microcontroller photovoltaic controller, it is lightweight, highly maneuverable. Design mainly from the controller requirements, the controller hardware circuit design, the controller software circuit design and debugging and summary of four aspects. After a series of experiments, the following conclusions are drawn: The PIC12F675 single-chip microcomputer as a control chip in the photovoltaic controller has the advantages of reliable solution, stable performance, high conversion efficiency, convenient and reliable, good practicability, low cost and safety, and effective implementation The rational use of solar energy resources to meet user needs.Key words: PIC microcontroller; photovoltaic controller; automatic controlForewordWith the development of science and technology, the progress of society and the improvement of human living standards, non-renewable resources on the earth will also be consumed continuously. As a result, people will consider looking for renewable clean energy, so the solar energy is slowly developed. At present, solar power generation is a mainstream in todays world, and there are a variety of photovoltaic products on the market such as solar roofs, solar calculators, solar chargers and the like. These products have a photovoltaic power generation system, then in the photovoltaic power generation system, photovoltaic controller is one of the important components. What kind of PV controller to meet peoples needs? Of course, stable performance, high conversion efficiency, convenient and reliable, practicality, safety and low cost of PIC microcontroller PV controller. This raises the question of how such a PV controller should be designed. Therefore, the following design is provided. 一、 Requirements of Controller1、The controller to achieve the basic functions Battery overcharge and over discharge protectionOvercharge protection: When the charging voltage is higher than the protection voltage, the battery is automatically shut off. After that, when the voltage drops to the maintenance voltage, the battery enters the floating state. When the voltage drops below the recovery voltage, it floats off and enters the fully charged state.Over-discharge protection: When the battery voltage is lower than the protection voltage, the controller automatically shut down the output to protect the battery from damage; when the battery is recharged, but also automatically restore power supply. Automatic recovery discharge functionAuto-recovery discharge function refers to the function of the controller that automatically helps to restore normal discharge after over-discharge of the battery. Prevent the battery and solar battery reverse functionBattery + - polarity reversed, the fuse blown, after replacement can continue to use.2、The controller circuit parameters Maximum charge current (A): 5The maximum charge current is the maximum current the controller is charging. Maximum discharge current (A): 5The maximum discharge current is the maximum current when the controller is in a discharged state. Battery rated voltage (V): 12Battery for a long time the best working voltage, rated voltage is also known as the nominal voltage. When the battery voltage is higher than the rated voltage easily damaged equipment, and below the rated voltage will not be normal power supply. Solar cell rated output voltage (V): 18The best output voltage of the solar cell during normal operation is called the rated output voltage of the solar cell. Solar cell maximum open circuit voltage (V): 25The solar cell is placed in the AM1.5 spectral conditions, 100 mW / cm2 light source irradiation, open both ends, the maximum output voltage of the solar cell. Overcharge voltage (V): 14.8Overcharge voltage is more than the rated voltage of the battery, the charging voltage within a short time. Over discharge voltage (V): 10.8Over-discharge voltage is more than the rated voltage of the battery, a short period of discharge voltage.二、 Design of Photovoltaic Controller Hardware CircuitThe PV controller system uses the rated output voltage of 18V photovoltaic panels, equipped with 12V battery, PV panel power and battery capacity can be determined according to actual needs, taking into account the charging time and the length of time for electricity to be reasonable With, such as the rated output power of 10W photovoltaic panels with 10Ah battery more appropriate.Photovoltaic power generation system controller circuit shown in Figure 2-1. System hardware circuit by the discharge control circuit, microcontroller circuit, charging control circuit and other components.Figure 2-1 Photovoltaic controller circuit principle1、Microcontroller circuitIC1, R9, C3, etc. Make up the minimum system circuit of the one-chip computer, among them R9, C3 are the power up and resetting the circuit, IC uses PIC12F675, although it has only 8 pins, the function is more powerful, the pin is shown as 2-2.Figure 2-2 PIC12F675 microcontroller pinPIC12F675 chip contains 1KB of Flash ROM program memory, 64B of data memory RAM and 128B of EEPROM, operating speed of 0 20MHz, operating voltage of 2 5.5V. There are six I / O pins GP0 and GP5 with alternate functions. PIC12F675 can choose external or internal oscillator, where the use of an internal oscillator, the operating frequency of 4MHz. The chip has an 8-bit timer / counter with an 8-bit programmable pre-scaler and a 16-bit timer / counter with a pre-scaler, Timer1, a watchdog timer, 4-channel 10-bit A / D converter, an analog comparator. VT5, VT6 and other components of the charge control circuit, when the PIC12F675s GP2 pin output low, VT5 deadline, VT6 saturated conduction, solar battery through VD9, VT6 to the battery charge. VT1, VT2 and VT3, VT4, respectively, constitute two battery discharge control circuit, the use of two load can increase the use of flexibility, when the program on the PIC12F675s GP4, GP5 feet take different controls can achieve different functions, such as GP4 For routine control, GP5 increase night light control function, only in dark after external battery power supply. GP4, GPS If you use the same control functions, the two outputs can also be used in parallel. To the first road (load 1), for example, when the GP5 output low, the battery through VD8, VT1 power supply to the load.2、Charge and discharge control circuitThe charge-discharge control circuit measures the voltage of the battery by A / D conversion, that is, the voltage of the battery is firstly converted into data, and then the test data and the stored overcharge voltage and overdischarge voltage are recovered; and the data are compared, According to the comparison results to make the appropriate control. Circuit R11, R12 and R15, R16, respectively, composed of battery and solar cell voltage sampling circuit, solar cell sampling circuit to increase the use of night light control. The GP0, GP1 of PIC12F675 make the analog signal input port of two pass-way A / D converters respectively. A / D converter reference voltage to select the microcontrollers internal VDD, that is 5V as the reference voltage. R10, VD5, C1, C2 microcontroller 5V power supply. VD7, fuse anti-battery reverse circuit, when the battery is reversed VD7 conduction through the fuse short-circuit the battery, blowing off the fuse, so the battery circuit, play a role in protecting the circuit and load. Fuse also play an overload protection. VD9 prevents the solar panels from being reversed.3、work processConnected to the solar panels and batteries, the circuits work is as follows (set the battery voltage U): Charge working conditions: When U14.8V GP2 output low, the solar battery to charge the battery; When U 14.8V GP2 output high, the battery stops charging. Discharge work: 1) When U falls from 12.3V to 10.8V, GP4 and GP5 output low level, and the battery discharges to the load. 2) When U10.8V, GP4, GP5 output high, the battery stops discharging the load. 3) U With the gradual increase in charging, when U 10.8V, the circuit does not immediately restore the battery power supply, otherwise it will be in a very short period of time due to the voltage drop and stop the power supply, the formation of an oscillating power supply state, that is, for a while Pass a break, in order to solve this problem, set a voltage hysteresis, when the battery charge is restored to U 12.3V, GP4, GP5 then output low to restore power supply.4、Hardware assembly processAccording to the schematic in the universal board to install the welding components and connections. Components of the model specifications and the number of see Table 4-1.Table 4-1 Parts Model Specification and Quantity TableNumberComponentsNumberModelNumber1Single Chip computerICpic12f67512ResistorsR10Metal Film 1/4w $number W13ResistorsR7 , R8Metal Film 1/8w 1K W24ResistorsR1 , R4 , R12 , R16Metal Film 1/8w 2K W45ResistorsR11Metal Film 1/8w 6.2K W16ResistorsR15Metal Film 1/8w 6.8K W17ResistorsR2 , R5 , R9 , R13Metal Film 1/8w 10K W48ResistorsR3 , R6 , R14Metal Film 1/8w 20K W39CapacitorC2Porcelain Sheet 0.1 m F110ElectrolyticC1$number m f/16v111ElectrolyticC3Ten m f/16v112DiodeVD1 , VD2 , VD610V Zener Diode313DiodeVD55V Zener Diode114DiodeVD71n5401115DiodeVD8 , VD9SB560 (5A 60V)216Light-emitting DiodeVD3J 3 Green117Light-emitting DiodeVD4J 3 Red118TransistorVT2 , VT4 , VT52sc945319Field Effect TubeVT1 , VT3 , VT6IRF3205320IC SocketsDIP8121FuseFUSE5 A122Circuit boardPCB Board1三、 Design of Photovoltaic Controller SoftwareThe software mainly by the PIC microcontroller program, the program design flow shown in Figure 3-1. The program is compiled in the MPLAB IDE compiler and written in assembly language. Program consists of main program, timer interrupt service subroutine, A / D conversion subroutine, delay subroutine, numerical comparison subroutine, etc. The routine of interrupt service subroutine is shown in Figure 3-2. Figure 3-1 program design flow Figure 3-2 timer interrupt service routine design flowThe main program is mainly used to initialize, set the working mode of the microcontroller, a variety of control voltage is written to the relevant storage unit. The timer interrupt service subroutine uses timer / counter Timer0, Timer0 uses the internal clock source, and pre-scaler divides by 256. Because the PIC12F675 internal oscillator oscillation frequency of 4MHz, an instruction cycle of 4 clock cycles, so an instruction cycle of 1us, divided by 256 Timer0 8-bit counter TMR0 count pulse cycle 256us, so if its The initial value of 61, then count the number of 256 full 256 (256-61) = 49920us, about 50ms, that is, every 50ms to produce an interrupt. The program is set a count variable N, every time a count of 1 count, each count over 20 when measuring the voltage of the battery, that is measured over every 1s battery voltage, the program according to the measurement results issued by the corresponding control instruction. The PIC12F675 has a 4-channel, 10-bit A / D converter that uses two channels AN0 and AN1. The conversion result is 10-bit binary output into the ADRESH and ADRESL registers. The output format is left-justified, ie the first 8 bits are stored in ADRESH, The last two bits are stored in ADRESL, as shown in Figure 3-3.Figure 3-3 A / D Conversion in RegistersA / D converter reference voltage of 5V, the maximum conversion of the analog voltage is 5V, so the sampling circuit to use the divider resistor, when the input analog voltage is 5V, the conversion result is: 1023 = 1111111111B. ADRESH = 11111111B = FFH and ADRESL = 11000000B = C0H. Taking the battery voltage sampling as an example, when the voltage is 14.8V, the analog voltage inputted by the GP0 is 12.8 R12 / (R11 + R12) = 12.8 2 / (2 + 6.2) = 3.61 (V) The result of A / D conversion is 1023 3.61 / 5 = 739, and the program compares the A / D conversion value of each detection battery voltage with the size of 739, and when the value is greater than 739, the charging is ended. The corresponding A / D conversion results of various control voltage values to be used in the program are shown in Table 3-1.Tables 3- 1 voltage value corresponding A /D convert resultNameVoltage ( V )A /D Convert ResultsADRESHADRESLOver charging voltage14.8739B8HC0HOver discharge voltage10.853986HC0HRestore the power supply voltage12.361499H80HPhotovoltaic controller, PIC microcontroller source code as follows:四、 summaryAfter assembling the components, first write the target file with the extension .hex into the PIC12F675 microcontroller, and then insert the microcontroller into the IC socket on the assembled circuit board. Turn on the circuit after the start of debugging, testing the main test voltage control point is accurate, as long as the alignment of a voltage control point, the other several voltage control point is basically accurate, here choose to adjust the overcharge voltage. As the controllers A / D converter reference voltage to select the microcontroller 5V working voltage, so 5V regulator power supply voltage size of the impact of the control voltage accuracy, debugging with a digital multimeter to measure the voltage, the error is greater (more than 02v ) When switching 5V regulator diode. Then measure the voltage of the battery during the charging process, when the charging indicator light-emitting diode from light to extinguish when the voltage is overcharge voltage, when this value is larger than 14.8V, by changing the sampling resistor R11, R12 partial pressure ratio to adjust, when the measured value is greater than 14.8V, reduce R11 or increase the resistance of R12, increase the partial pressure ratio; otherwise increase R11 or reduce the resistance of R12, reduce the partial pressure ratio. When using the controller output is the battery 12V DC power supply, when the use of 220V AC power supply, but also access an input voltage DC12V inverter, inverter rated power according to the battery capacity and use requirements to determine.Figure 4-1 full open and recovery function test methodSwitch controller detection method shown in Figure 4-1, with DC power supply connected to the battery terminals, used to simulate the battery voltage. The controller should be able to disconnect the charging circuit when regulating the regulated power supply voltage to a full voltage. When lowering the DC regulated power voltage to the recovery point voltage, the controller automatically switches on the charging circuit, indicating that the controller is full and open Recovery function without fault.Figure 4-2 Brown-out detection and recovery function test methodUnder-voltage disconnection and recovery function test As shown in Figure 4-2, DC power supply is connected to the input terminal of the battery in the controller to simulate the terminal voltage of the battery. The variable resistor connected to the load to simulate the electrical load. The discharge circuit current transferred to the rated value, and then the DC power supply voltage to the under-voltage disconnect voltage point, the controller should be able to automatically disconnect the load; the voltage callback to the recovery point, the controller should be able to turn on the load again. In the case of a controller with under voltage lockout, the load should be able to be switched on when the DC input voltage reaches the under-voltage recovery point. After the PV controller was charged chip selection, hardware and software design, the latter for the system debugging, debugging results as described in the design requirements, the design requirements, the results show that: the PIC microcontroller as a low-power photovoltaic controller The control chip in the program is reliable, stable performance, high conversion efficiency, convenient and reliable, practicality, low cost and safe, can effectively achieve the rational use of solar energy resources to meet user needs.References1 Liu Quan-hai, Chen Yin, Liu Yu-di. Power Electronics Technology (Second Edition) M. Chongqing: Chongqing University Press .2011.2 Lin Bang-huai, Zhou Wen-ling. A Design of Smart Charger Based on Microcontroller J. Instrumentation Technology, 2007 (2): 27-29.3 HU Yan-yan, YANG Dai-hua. Design of smart charger based on single-chip microcomputer J. Application of Electronic Components, 2007 (5): 52-55.4 Wang Wei-dong. Analog electronic circuit based M. Xian: Xian University of Electronic Science and Technology Press .2003.5 Ryan Mayfield. Design and installation of solar photovoltaic power system J. Beijing:PostsandTelecommunicationsPress.2012。基于PIC单片机光伏控制器的设计摘要:太阳能控制器全称为太阳能充放电控制器,是用于太阳能发电系统中,控制太阳能电池(方阵)对蓄电池充电,以及蓄电池给太阳能逆变器负载供电的自动控制设备。PIC单片机光伏控制器,它轻巧,可操作性很强。设计主要从控制器的要求、控制器的硬件电路设计、控制器的软件电路设计以及调试与总结等四个方面入手。经过这一系列的实验,得出了以下结论:采用PIC12F675单片机作为光伏控制器中的控制芯片的方案可靠,性能稳定、转换效率高、便捷可靠、实用性好、成本低又安全,能有效实现太阳能资源的合理利用,满足用户需求。关键词:PIC单片机;光伏控制器;自动控制

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论