Design of real-time monitoring system for photovoltaic power generation based on LabVIEW and RS485 communication

Publisher:WiseThinkerLatest update time:2015-05-21 Source: dzscKeywords:LabVIEW Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
    A photovoltaic power generation monitoring system based on LabVIEW data acquisition and RS485 communication is designed, which can monitor the operating electrical parameters and environmental parameters of the photovoltaic power generation system in real time and count the power generation information. The system collects various relevant parameters of the photovoltaic power generation system by single-chip microcomputer and sensors. RS485 protocol is used to communicate with the PC. The host computer obtains the data information transmitted by the single-chip microcomputer in real time through the standard I/O application program interface VISA provided by LabVIEW. The data is processed by the host computer monitoring software and displayed graphically through the monitoring interface. The monitoring system has a simple structure, low hardware cost, stable data transmission, stable and reliable operation, and a visual monitoring interface. The tested system can monitor the changes of various parameters in real time, and can maintain the photovoltaic power generation system in a targeted manner to improve the photovoltaic operation efficiency.

    As the energy crisis becomes increasingly severe, various renewable energy sources have made great progress. Among the many renewable energy sources, photovoltaic power generation has a wide range of application prospects in the future, and the photovoltaic industry is one of the most promising new energy sources. When carrying out photovoltaic power generation, it is very necessary to monitor the power generation status of the photovoltaic power station. Because the DC voltage output by a single photovoltaic module is low, generally around tens of volts, multiple photovoltaic modules are usually connected in series. Then the strings are connected in parallel to form a photovoltaic array. During the power generation process, a local fault in the photovoltaic array will cause the output voltage or power of the entire power supply system to drop, which directly affects the system performance and operation efficiency. In order to ensure the normal operation of the system, the photovoltaic array should be monitored so that it can be maintained in a timely and targeted manner. Thereby improving the efficiency of photovoltaic power generation. Based on this, this paper develops a photovoltaic power station monitoring system based on RS485 communication and LabVlEW software platform. The system has a visual monitoring interface that can display the power generation status of the photovoltaic power generation system in real time, and allows users to query historical data for statistical analysis.

    1 System structure and principle

    Figure 1 is a block diagram of the overall system structure. The PC mainly monitors, counts and displays environmental parameters such as temperature and light intensity and power generation information such as output current, output voltage and output power in the photovoltaic power generation system. The single-chip microcomputer, A/D conversion and sensor constitute a data collector. The sensor collects environmental parameters and power generation information, converts analog signals into digital signals through A/D conversion and sends them to the single-chip microcomputer. The single-chip microcomputer processes the data, caches it and sends it. The RS485 to RS232 communication protocol is used for data transmission between the single-chip microcomputer and the PC. The PC processes the received data, saves it and displays it in time, realizing real-time monitoring of various parameters of the photovoltaic power generation system.

    2 Hardware Circuit Design

    The hardware circuit of this system mainly includes two aspects: data acquisition module and communication. The data acquisition part collects and processes the required data and sends it to the host computer through the single-chip microcomputer: the communication part mainly converts the level and processes the interface when communicating with the host computer in hardware.

    The system processor uses the STC89C51 chip, which has 8 K bytes of Flash, 512 bytes of RAM, 32-bit I/O port lines, a watchdog timer, three 16-bit timers/counters, four external interrupts, a 7-vector 4-level interrupt structure, and a full-duplex serial port. It is a low-power, high-performance microcontroller.

    2.1 Data Acquisition Module

    The main function of this module is to collect four types of data: current, voltage, temperature, and illumination. The analog signal collected by the sensor is converted into a digital signal using an analog-to-digital conversion chip, and then the single-chip microcomputer processes the data. The analog-to-digital conversion chip uses ADC0809, which is an 8-bit successive approximation analog-to-digital converter, including an 8-bit approximation ADC part, and provides an 8-channel analog multiplexer and joint addressing logic. It can directly input 8 single-ended analog signals and perform A/D conversion in time. In this system, only 4 channels are needed to convert the 4 analog signals of current, voltage, temperature, and illumination collected by the sensor. Then the 51 single-chip microcomputer performs data storage and data processing to complete the acquisition of analog signals.

    Since there is no clock pulse source inside the ADC0809 chip, the address latch control input signal ALE provided by the single-chip microcomputer 89C51 can be used as the clock input of ADC0809 after being divided by four by the D flip-flop. When the CPU accesses the external memory, the output of ALE is used as the control signal of the low byte of the external latch address: when the external memory is not accessed, the ALE terminal outputs a fixed positive pulse at 1/6 of the clock oscillation frequency. The clock frequency of the single-chip microcomputer can be taken as 12 MHz. Then the frequency output by the ALE terminal is 2 MHz. After being divided by four, it is 500kHz, which meets the clock requirements of ADC0809.

    As shown in Figure 2. ADC0809 has an address latch inside. The channel address is directly connected to A, B, and C of ADC0809 by the lower 3 bits of P2 port. The basic address of the channel is 0000H~0007H. The analog quantity is input by IN0~IN7 of ADC0809. The digital quantity is output by DO~D7 of ADC0809 and connected to P0 port of the microcontroller I/O port. Other pins of ADC0809 such as START, OE, ALE, A, B, C, etc. are directly connected to P2 port of the microcontroller. Finally, the end signal port of ADC0809 is directly connected to P2.7 port of the microcontroller.

    2.2 Communication part

    The serial port of the PC is a standard RS232C interface, and the maximum communication distance is only 15 m, which is not suitable for long-distance monitoring. The RS485 serial interface standard can be used to realize the remote communication management of the management microcomputer to the lower computer. The serial communication adopts the RS485 protocol, and its transmission distance is relatively long. It is suitable for data transmission from photovoltaic power generation equipment to monitoring equipment. RS485 adopts differential signal negative logic, and the logic "1" is represented by the voltage difference between the two lines of + (2 ~ 6) V; the logic "0" is represented by the voltage difference between the two lines of - (2 ~ 6) V. The RS485 interface is a combination of a balanced driver and a differential receiver, and has enhanced common mode interference resistance, that is, good noise interference resistance. The maximum communication distance of RS485 is about 1219 m, and the maximum transmission rate is 10 Mb/s. The transmission rate is inversely proportional to the transmission distance.

    When using RS485 communication, two problems need to be solved. STC89C51 itself has a full-duplex serial port. However, level conversion is required for RS485 communication: PC serial 1:1 is a standard RS232C interface, and the logic level of the RS485 interface needs to be converted into RS232 level during communication. The level conversion chip for RS485 communication has full-duplex and half-duplex. In order to facilitate software development, this design uses the full-duplex chip MAX488.

    As shown in Figure 3, the level conversion circuit uses the MAX488 full-duplex integrated chip. When in use, the serial transceiver end of the microcontroller is connected to the transceiver end of the RS488. In order to maintain the stability of the communication signal, pull-up and pull-down resistors are generally added to the MAX488. The pull-up resistor embeds the uncertain signal at a high level through a resistor, and this resistor also plays a role in current limiting. Similarly, the pull-down resistor embeds the uncertain signal at a low level. In actual engineering applications, due to the influence of various interferences such as reflected signals and the environment, especially when the communication baud rate is relatively high, it is very necessary to add pull-up and pull-down bias resistors on the line. Pull-up and pull-down resistors can improve the bus's anti-electromagnetic interference ability. The pins are easily affected by external electromagnetic interference when they are suspended. At the same time, the mismatch of resistors in long-line transmission is likely to cause reflected wave interference. Adding pull-up and pull-down resistors is resistor matching, which can effectively suppress reflected wave interference. [page]

    The RS485 to RS232 interface circuit mainly includes three parts: power supply, RS232 level conversion, and RS485 circuit. The RS232 level conversion circuit of this circuit uses the MAX232 integrated circuit, and the RS485 circuit uses the MAX488 integrated circuit. For ease of use, the power supply part is designed to be passive, and the power supply of the entire circuit is directly obtained from the DTR (pin 4) and RTS (pin 7) in the RS232 interface of the PC. Each line of the PC serial port can provide a current of about 9 mA, so the current provided by the two lines is sufficient to meet the use requirements of this circuit. When using this circuit, it should be noted that the PC program must make the DTR and RTS of the serial port output high level, and obtain VCC after voltage stabilization by D3. After actual testing, the VCC voltage is about 4.7 V. The circuit diagram is shown in Figure 4.

    3 Software Design

    3.1 MCU Programming

    The lower computer program completes the functions of A/D conversion and communication reception and transmission. The serial port reception adopts interrupt mode. In order to facilitate the host computer to identify data and reduce the error rate, the front and back check codes are added when sending. The four types of data, illumination, temperature, voltage, and current, use different front and back check codes. In the main program, after the A/D conversion is completed, the data is processed and stored, and then the information sent back by the host computer is checked, and the specified type of data is sent to the host computer.

    3.2 Host computer program design

    The host computer mainly completes three tasks: communicate with the lower computer; process and store the data sent back by the lower computer; design a display interface. Display the data changes in the form of charts.

    The program is written using the LabVIEW software platform, which is the most popular graphical programming development software. It can be used to make extensive use of visualization tools such as charts, menus, and graphics, giving the system rich and flexible screen and chart display capabilities.

    LabVIEW communicates with serial interface instruments through VISA. VISA is a standard I/O application programming interface (API) used for instrument programming. It does not have instrument programming capabilities, but provides users with a set of independent standard I/O low-level functions that can be easily called. The VISA functions in hbVIEW can be used to achieve communication between the host computer and the microcontroller. The rich low-level functions in the LabVIEW platform can be used for high-speed and accurate data processing. Its design is divided into a front panel and a back panel. The front panel is a visual user interface, while the back panel is the program that supports the operation of the system. It uses graphical programming, and data transmission is achieved through the connection between each function.

    Five waveform chart controls are set up on the front panel to display the real-time changes of five types of data information: illumination, temperature, current, voltage, and power. Several numerical display controls are used to display the average value of each data and the total power generation.

    The rear panel serial port communication uses the VISA configure serial port function, VISA write function, and VISA read function in LabVIEW to complete the serial port configuration and serial port transmission and reception. The VISA close function is used to close the serial port session handle or event object specified by the VISA resource name. It is a subVI for serial port reception and transmission. The host computer can send commands to the microcontroller and receive data sent back by the microcontroller.

    The main program uses a flat sequential structure. First, it uses the subVI to generate 5 spreadsheet files to save the data of the day. Then, under the loop structure, it calls the serial port transceiver subVI to send and obtain instructions for each type of data, so that the lower computer can send the corresponding data. After receiving the data, the front and back check codes are compared. If there is an error, it is resent. If it is correct, the data code is obtained for data processing. Data processing includes restoring the data, storing it in the corresponding table file, and sending it to the waveform chart control for display.

    In addition, by designing subVIs to obtain the accumulated data stored in each spreadsheet file, the average value of each type of data and the total power generation can be calculated, and the power generation information of the photovoltaic power generation system can be obtained. In LabVIEW, user menus can be set up by users. When the program is running, the user menu can be operated to facilitate users to set string VI parameters and view historical data.

    4 Conclusion

    After the actual operation test of the system, the system can stably monitor the changes of various parameters. The average values ​​of various parameters and the total power generation are obtained through the stored cumulative data and displayed through the control. The entire system can complete the functions of data collection, processing, storage, statistics, and display to achieve the purpose of monitoring the photovoltaic power generation system. Applying the system to the field of photovoltaic power generation can enable power station staff to understand the environmental conditions and power generation information of the power station in real time, and can also perform statistical analysis on historical data. Through the monitoring interface, power station operation failures can be discovered in a timely and effective manner. In order to realize system maintenance and targeted maintenance, the efficiency of photovoltaic operation can be improved.

Keywords:LabVIEW Reference address:Design of real-time monitoring system for photovoltaic power generation based on LabVIEW and RS485 communication

Previous article:C8051F MCU AD sampling program
Next article:51 single chip microcomputer time-sharing control 8-way servo program

Latest Microcontroller Articles
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号