Design of automatic solar tracker based on PIC16F877A

Publisher:灵感狂舞Latest update time:2009-07-31 Source: 现代电子技术Keywords:PIC16F877A Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Photovoltaic power generation can provide sustainable energy for human beings and protect the environment on which they depend for survival, but its low power generation efficiency and relatively high power generation cost are still important factors that restrict its large-scale application. Before the emergence of efficient photovoltaic cell materials, the development of practical solar concentrators and automatic tracking systems to achieve low costs is one of the main ways to promote the widespread application of solar energy. Generally, dual-axis systems can increase power generation by about 35%, single-axis systems can increase power generation by about 20%, and concentrating tracking systems can increase power generation by even higher.

Foreign countries have conducted research on solar tracking systems since the 1980s. For example, the United States and Germany have developed corresponding commercial automatic solar trackers in single-axis and dual-axis automatic tracking, F1 in Japan in focusing Freon lens tracking, and Spain in 2x focusing reflection tracking. my country also conducted a lot of research on it around the 1990s. In October 2006, 4 sets of single-axis and dual-axis grid-connected solar automatic tracking systems with a total of 13.2 kW in different forms were installed in Yangbajing, Tibet. There has been no stable and reliable commercial product before. The main reasons are:

(1) System reliability cannot meet requirements

Since most photovoltaic power stations are installed in remote areas with very harsh environments and difficult maintenance, the tracking system adds a rotating mechanism and corresponding mechanical mechanisms, which significantly reduces reliability. If the entire system cannot be guaranteed to operate reliably and stably in various environments, it may be a catastrophic blow to the entire photovoltaic power station.

(2) Large tracking error

Especially for reflective

If the tracking error of the light tracking system is large, it will not only fail to improve the power generation efficiency, but will cause the solar panels to receive uneven light and produce hot spots, greatly shortening the service life of the solar panels.

(3) Excessive cost

Purchasing all mature foreign technologies will greatly increase the hardware and maintenance costs of the system.

Based on the PIC16F877 microprocessor as the core, this paper develops a dual-axis automatic solar tracker for photovoltaic power generation systems. It has the advantages of stable and reliable operation, small tracking error and low cost.

1 Basic principles of automatic solar tracker[1-3]

The basic function of the automatic solar tracker is to make the photovoltaic array rotate with the sun. The basic principle block diagram is shown in Figure 1.

Design of automatic solar tracker based on PIC16F877A

The system constantly detects the position of the sun and the photovoltaic array and inputs them into the control unit. The control unit compares the two signals and generates a corresponding output signal to drive the rotating mechanism so that the sunlight is always incident vertically on the surface of the photovoltaic array. Although the position of the sun in space is constantly changing, its movement has strict regularity. In the horizontal coordinate system, the position of the sun can be determined by the altitude angle a and the azimuth angle φ, as shown in the following formula [2-3]:

Design of automatic solar tracker based on PIC16F877A

Where: δ is the solar declination angle; φ is the local latitude angle; ω is the hour angle.

The solar declination and hour angle can be determined by the local time, and for a certain location, the local latitude angle is also determined. Therefore, as long as the local geographical location and time information are entered, the position of the sun at this moment can be determined.

Design of automatic solar tracker based on PIC16F877A

2 Overall design of the system

The PIC16F877A is a high-performance mid-range microcontroller with a RISC structure. It has only 35 single-word instructions, 8 k×14 bytes of FLASH program memory, 368×8 bytes of RAM data memory, 256×8 bytes of E2PROM data memory, 14 interrupt sources, an 8-level deep hardware stack, an internal watchdog timer, a low-power sleep mode, up to 25 mA of sink/source current, and external functional modules such as 3 timer modules, 2 16-bit capture/16-bit comparator/10-bit PWM modules, a 10-bit multi-channel A/D converter, and a universal synchronous asynchronous receiver/transmitter [5].

There are four main control methods for automatic solar trackers: microprocessor control, PLC control, DSP control and analog circuit control. Based on the above principles, this paper selects the cost-effective PIC16F877A microcontroller as the control core. The specific principle block diagram of the system implementation is shown in Figure 2.

Design of automatic solar tracker based on PIC16F877A

The whole controller is mainly composed of two parts: control unit and drive actuator. The control unit consists of five parts: angle calculation and feedback control, start signal generation, motor drive signal generation, protection signal processing and human-computer communication. The system function description is as follows: the single-chip microcomputer detects the position of the photovoltaic array in a loop, and compares it with the calculated altitude angle and azimuth angle of the local sun at this time to determine whether the photovoltaic array tracks the position of the sun. If not and the start signal meets the start condition, the single-chip microcomputer will issue a command to drive the motor to rotate; the protection signal is an operation instruction to ensure that the system is executed in the case of external and other non-human factors to ensure that the system is not damaged, thereby improving the reliability of the entire system. The main function of the drive execution unit is to realize motor drive and rotation, and drive the photovoltaic cell array to rotate through the mechanical transmission mechanism.

2.1 Control unit hardware design

Since a single-chip microcomputer is used as the main control unit, most of the work is implemented by the single-chip microcomputer in software, which simplifies the hardware design of the control circuit. The implementation process of the main control part is briefly described.

(1) Angle calculation and feedback control

After the single-chip microcomputer obtains the time signal generated by the clock module and the position signal of the photoelectric rotary encoder through the external three-state latch input port, it is realized by software using the single-chip microcomputer's fast computing and processing capabilities;

(2) Motor drive signal generation

This article uses a stepper motor, whose driving pulse is generated by the 10-bit PWM wave generation module inside the single-chip microcomputer. The motor speed can be changed by simply setting the corresponding parameters in the software.

(3) The host computer monitoring system uses the asynchronous receiver/transmitter and other functional modules built into the microcontroller. The hardware part only needs to add MAX 232 for level conversion to realize data transmission between the PC and the microcontroller.

(4) Considering that photovoltaic power generation can only generate electricity when the sunlight intensity meets a certain level, the start signal mainly uses a photodiode to detect the light intensity to ensure that the system is powered on at night.

Or when the power generation conditions are not met on rainy days, the system stops tracking. The detection circuit is shown in Figure 3. It mainly consists of three parts: amplification, comparison and optocoupler isolation.

(5) The protection functions of the system mainly include strong wind protection, power failure protection, excessive vibration protection, limit switch and proximity switch protection. When the single chip microcomputer detects the generation of the protection signal, it will issue a command to park the system in a safe position to ensure that the entire system is not damaged. Figure 4 is the schematic diagram of the power failure detection circuit, which mainly consists of three parts: step-down, rectification and optocoupler isolation.

3 Control Unit Software Design

Software is the core of the control system. Except for some protection self-locking functions that are implemented by hardware, most functions are implemented by software. The entire software adopts C language modular programming, which is easy to transplant and integrate the system.

The main program and interrupt service subroutine flow is shown in Figure 5.

Design of automatic solar tracker based on PIC16F877A

Design of automatic solar tracker based on PIC16F877A

4 Anti-interference measures of the system

Reliable and stable operation is the prerequisite for the automatic solar tracker to become a mature product. The system enhances anti-interference measures from both software and hardware aspects. The main means are:

(1) The external input signal and the control system signal do not share the same ground;

(2) Some external input signals are strictly isolated by optocoupler circuits before being input into the microcontroller;

(3) Optimize the PCB wiring structure and reduce vias to reduce the impact of parasitic capacitance and stray inductance;

(4) Ensure reliable grounding of the entire system;

(5) External signals are transmitted using shielded cables;

(6) Add software filtering, watchdog timers, and software traps to the software to ensure that the software can recover itself when it crashes, runs away, or experiences other malfunctions.

(7) Important system protections such as limit protection are doubly protected by software and hardware to improve their reliability.

5 Conclusion

The stability and reliability of automatic solar trackers have always been one of the main problems that have prevented them from being widely used.

Based on the PIC16F877A single-chip microcomputer as the control core, this paper designs an automatic solar tracker that automatically tracks the solar altitude angle and azimuth rotation. The field operation results show that the system has accurate tracking, low energy consumption, high reliability, stable system performance, and the power generation efficiency is improved by more than 35%. It has guiding significance for the future construction of large-scale Gobi desert grid-connected power stations.

分页
Keywords:PIC16F877A Reference address:Design of automatic solar tracker based on PIC16F877A

Previous article:Design plan using 8-bit microcontroller to drive PCI bus network card
Next article:Train travel measurement system based on GSM, GPS and CAN bus

Recommended ReadingLatest update time:2024-11-16 19:33

PIC16F877A internal comparator usage demo
The purpose of the internal comparator is to detect the state change of the external sensor, such as the Hall switch, which outputs a high level when metal is approaching and a low level when metal is not approaching. Why not use the IO port to detect directly? I think a very different place between the comparator and
[Microcontroller]
PIC16F877A microcontroller (IIC bus + PCF8563 chip)
1 Basic principles 1.1 IIC bus See the previous content PIC16F877A microcontroller (IIC bus + AT24C02 chip) 1.2 PCF8563 chip It can be seen that the PCF8563 chip has a total of 16 registers. That is, the maximum internal address of the chip is 0x0f. In addition to the ordinary storage function, the above 16 reg
[Microcontroller]
PIC16F877A microcontroller (IIC bus + PCF8563 chip)
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号