Design of an energy management system for intelligent lighting and real-time solar tracking

Publisher:幸福的老农Latest update time:2010-02-09 Source: 单片机与嵌入式系统应用 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

Solar energy is a resource-rich, pollution-free energy alternative. How to improve its utilization rate has gradually become the research focus of various countries. The utilization of solar energy has the following problems: First, although solar energy is rich in resources, its energy is dispersed, and the energy concentrated at a certain point is less. At the same time, the directionality of solar energy determines that it is impossible to obtain a large amount of energy in a fixed direction for a long time; second, solar energy is restricted by environmental conditions. Only when the sunlight is good during the day can stable solar energy be obtained; third, the conversion efficiency of solar panels is not high. At present, the highest conversion efficiency of solar panels in the world is only 30%, while the conversion efficiency used in China is mostly around 20%. This project mainly focuses on the problem of low utilization rate of solar energy. It uses the solar positioning algorithm and the photoresistor sensor feedback method, and coordinates the control of the motor through the Fusion series single-chip microcomputer analog-digital hybrid FPGA to drive the solar panel to track the sun in real time to improve the utilization rate of solar energy. Subsequently, the battery is intelligently charged and the power management is performed through the FPGA's PWM module. Finally, the weather and power status information is displayed in the LCD unit of the development board, and the relevant information is timely fed back to the PC through the serial port.

1 System Design

1.1 Overall system design

This system is mainly composed of four parts: central processing unit, intelligent lighting, power management and host computer software. The system mainly realizes the improvement of solar energy utilization, solar energy conversion and storage, and UPS function. This design also provides detection and management of the system.

As shown in Figure 1, the system includes a control processing unit, a power management unit, a power supply and transmission unit (including solar panels, batteries, mains power, and power output interfaces), an interface unit, an LCD display unit, a button, an indication and alarm unit, a stepper motor drive unit, and a lighting unit. FPGAAFS600 is used as the control processing unit, and data acquisition, processing, motor drive control, and power management unit control are mainly realized through Verilog HDL hardware logic and cote51 soft core. The lighting unit and the stepper motor drive unit mainly realize the functions of collecting light intensity data and controlling mechanical transmission to change the orientation of the solar panel. The power management unit and the power supply and transmission unit realize the battery charging/power supply switching, the mains power supply and battery power supply switching, the solar charging/power supply switching, and the power conversion output.

1.2 Design of intelligent lighting

The system provides two ways to track the sun's position: photoresistor array adaptive control algorithm and positioning tracking algorithm. The photoresistor array adaptive control algorithm is the core, and the positioning tracking algorithm is used as an auxiliary correction. These two methods are organically combined to enhance the robustness and anti-interference of the system, making it better suited to various environments.

1.2.1 Photoresistor array

A photoresistor is a resistive sensor. When the intensity of light it receives changes, its resistance value changes accordingly, and it can convert light signals into electrical signals.

(1) Array layout design

As shown on the right side of Figure 2, P1~P8 are photoresistors, which are arranged in the east, south, west and north directions inside and outside the cylinder respectively. P1~P4 are exposed to the outside, and a pair of east-west symmetrical ones (P1, P3) are used to roughly detect the solar azimuth angle θA; another pair (P2, P4) is used to roughly detect the solar incident angle θZ; P5~P8 are inside the cylinder, and the east-west symmetrical ones (P5, P7) are used to accurately detect the solar azimuth angle θA; another pair (P6, P8) is used to accurately detect the solar incident angle θZ. The lighting board is equipped with a protective cylinder, which can shield the scattered light and other interfering light from the external environment to a large extent, so that the influence of the external interfering light source on the tracking effect is reduced to a minimum, and the tracking accuracy is improved.

(2) Tracking principle

The four photoresistors P1 to P4 arranged outside can reflect the current weather conditions, such as cloudy, sunny or dark, so as to decide whether the solar panel needs to be adjusted; the four photoresistors P5 to P8 arranged inside are used to finely adjust the orientation of the solar panel.

When the sunlight deviates from the vertical direction by a small angle, the external photoresistor will not reflect the change of sunlight due to the influence of ambient scattered light; while the internal photoresistor is shielded by the cylinder from ambient scattered light, and the illumination they receive will be different, that is, the deviation signal. When the sunlight deviates from a large angle (rainy days, after dark clouds, or day and night), the photoresistor inside the cylinder may not receive sunlight, and the photoresistor outside the cylinder can reflect the illumination difference. The control unit controls the adjustment of the angle of the sunlight receiving device by further judging and processing the signal until the solar panel is aimed at the sun. See Section 2.2 for the detailed adaptive tracking process.

(3) Selection of design parameters

Roughly assuming that the sun rotates 360° in 24 hours, the design indicator of this system is to track once every half hour, so the tracking sensitivity is 7.5°, that is, when the sun deflects 7.5° (θ=7.5°), the photoresistor P5 is blocked, while P7 can be illuminated by light. At this time, the lighting board needs to be adjusted to track the direction of the sun.

According to the layout requirements of the object, the diameter of the barrel is set to D = 5 cm, S = 0.5 cm. Therefore, the distance between the internal sensors is L = (5-2 × 0.5) = 4 cm. After the above parameters are selected, according to H = S / tan (θ), that is, H = S / tan (2 7c × 7.5 / 360), S = 0.5 cm is substituted, and finally H = 3.79 cm is obtained. In practice, considering the scattering and interference of light, the height of the barrel is selected as 6 cm.

1.2.2 Positioning and tracking algorithm

Because the earth rotates once in 24 hours, we can roughly assume that the sun moves 15° (360°/24) from east to west every hour. Let the hour angle be ω, the magnetic declination (declination angle) be э, the solar incidence angle (zenith angle) be θZ, the solar azimuth angle be θA, and φ be the local latitude. Calculation yields:

According to formulas (1) and (2), considering that Nanjing's longitude is e118.77, latitude is n32.0, and the altitude is below 50 m, and referring to the large number estimation algorithm and related correction parameters, the solar azimuth and altitude angle are calculated in Matlab. Since this calculation is complex and huge, it will consume a lot of FPGA resources and is not conducive to running under the FPGA's 51 soft core. Considering that this system is only for Nanjing area, the changes in altitude and latitude are ignored in terrain, and the changes in time zone and minute are ignored in time. The program is simplified again in Keil C, and the data obtained by the previous and next algorithms and the actual measurement data are compared to draw curves, as shown in Figure 3.

Figure 3 is drawn based on the Nanjing solar zenith angle θZ and azimuth angle θA every hour from 8:25 to 16:25 on February 19, 2008, and the corresponding values ​​actually measured. The left figure shows the trajectory of the solar azimuth angle (θA) deflecting from east to west over time; the right figure shows the trajectory of the solar altitude angle (90-θZ) over time. By comparison, it is proved that the simplification of Keil C does not bring obvious trajectory deviation, and the trajectory obtained by the positioning algorithm is basically consistent with the actual measurement trajectory. In this way, it is possible for the system to achieve sun tracking by calculating the solar azimuth by itself. The curve in the figure also shows that for the solar azimuth and altitude angle, the calculated values ​​are generally larger than the measured values. This is mainly caused by the refraction of sunlight by the atmosphere and the measurement error. In actual debugging, certain corrections can be made to improve the sun tracking effect.

2 System Process Design and Simulation Test

2.1 System process design

This system uses a front-end and back-end system. The main program is an infinite loop, in which corresponding operations are completed by calling corresponding functions, and key operations that are highly time-dependent are completed through interrupt processing. The main program software flow is shown in Figure 4.

The core51 core of the FPGA is used as the core of the control processing unit, and the AD module with analog function is provided to process and analyze the data of multiple AD samples; the pulse signal of the motor drive is controlled by the core51 core configuration, the gate driver core output, and the mechanical drive of the system lighting is realized, thereby adjusting the position of the solar panel. Since the change of sunlight is relatively slow, the main factors affecting the data acquisition accuracy of this system are the error of AD conversion itself and the instantaneous strong light interference. The system uses the 51 core to smooth and filter the AD input data using software methods.

The FPGA also provides users with a programmable pulse width modulation (PWM) core, which means that the period and duty cycle of the output pulse can be changed by software. The PWM module provides PWM_addr and PWM_data input signals to modify the period and duty cycle of the PWM waveform. Through the configuration of the core51 core, the PWM core outputs a PWM control signal to control the battery charging. Finally, the weather and battery status information are displayed in real time on the LCD and fed back to the PC through the serial port.

2.2 Adaptive lighting positioning process design

For the convenience of implementation, the detailed process of tracking the sun in the east-west direction of this system is shown in Figure 5 (the tracking principle in the north-south direction is the same). The system first collects the voltages of the four external photoresistors and the two internal photoresistors in the east-west direction through AD. The four external channels are compared with the set threshold to determine the current weather conditions. If the sampling value is lower than the threshold of the night for three consecutive times, it is considered to be night and the system will stop working. If it is judged to be cloudy, the system controls the solar panel to keep its position unchanged. If it is sunny, it is judged according to the difference in the voltage of the two internal photoresistors collected. When the difference is greater than the set threshold, it is considered that the position of the panel needs to be adjusted. The adjustment principle is: if the voltage value on the east side is greater than that on the west side, the panel will rotate 1.8° to the east; otherwise, it will rotate 1.8° to the west. After adjustment, return to data acquisition and repeat the above process. The system's calculation of the solar azimuth angle can be used as a backup and supplementary correction solution. That is, when the photoresistor is damaged or the light-collecting circuit fails, the collected data will be abnormal (for example, it will be 0 for a long time or the voltage is too high). The host computer can send commands and use the results of the positioning algorithm to adjust the azimuth of the solar panel.

The shading effect was repeatedly tested and improved in different environments, and the thresholds for the internal resistance sampling voltage to distinguish sunny days, cloudy days and nights were 6.1 V, 5.8 V and 0.1 V respectively (powered by a 6.2 V power supply); when the sunlight deviates from a certain angle, the voltage difference generated by the internal resistance due to the shading tube is about 1 V; during the day, the external resistance sampling voltage fluctuation caused by the sudden strong light is about 0.2 V. By changing the threshold of the internal resistance sampling voltage difference, it is found that if the threshold voltage is too low, the motor will rotate too sensitively and waste electricity; if the threshold voltage is too high, it will not be able to track the sun in real time. Finally, the threshold is set to 0.8 V to achieve the best effect.

2.3 AD simulation

Since AFS600 has 16 channels of 12-bit AD, 5 bits are used to represent the channel number and 12 bits are used to represent the corresponding data. In the design of data exchange between AD data and core51, a 3-byte transmission method is used to divide the 17-bit data into high, middle and low bytes and transmit them to core51 respectively. The test stimulus and simulation results are shown in Figure 6.

av_0 is channel 1, r_clk is the read command port of core51, and 3 bytes of data are read at a time when data is valid (DATAVALID generates a pulse). First, convert the hexadecimal sampled data into decimal, divide it by 4 095 and multiply it by 8, ([D(0x9 c4)/4 095]×8), and the calculated value is 4.88 V, while the actual value is 5 V, with an error of 2.4%. av_1 is channel 4, and the conversion result is 2.91 V in the same way, while the actual value is 3 V, with an error of 3%.

2.4 Host computer software

The host computer software consists of two modules: the display module, which is responsible for refreshing the status and data on the interface; the communication module, which communicates with the MCU, stores the communication results into the host computer memory, and calls the display module to refresh the interface. After the host computer software is connected to the MCU through the serial port, if there is no command to transmit the latitude, longitude and time information, the host computer requests data from the microcontroller once every 3 seconds; if there is a command to transmit the latitude, longitude and time information, the command will be sent first. After any command is sent to the MCU, if there is no response from the MCU within 1 second, it is judged that the connection has been disconnected.

Conclusion

Although the design and debugging of this system is only in the experimental stage, it can basically achieve the intended functions, and the data and debugging results obtained will provide valuable experience for related research. At present, there are still areas that need improvement: first, considering that the system can still work normally in rainy weather, the protection of the light tube needs to be improved; second, the design of the sun tracking mechanism should be improved to improve the accuracy, stability and energy saving of the device; third, this system only realizes the tracking of the sun in the east-west direction, and the tracking in the north-south direction needs further improvement.

This system can significantly improve the conversion and utilization performance of solar energy at a slight cost, and has good scalability; it can also be widely used in automobiles, homes, public places, industrial sites and other power consumption fields based on specific backgrounds.

Reference address:Design of an energy management system for intelligent lighting and real-time solar tracking

Previous article:A new type of comprehensive control equipment for battery charging and discharging
Next article:How to easily convert PC power input voltage

Recommended ReadingLatest update time:2024-11-16 17:40

Design of Bit Error Tester Using FPGA
introduction Passive optical network PON has been applied on a large scale in the network with its unique advantages. Since the GPON system has the highest bandwidth utilization rate, the lowest system cost and the ability to support all services among the existing PON systems, its prospects are generally optimistic a
[Test Measurement]
Design of Bit Error Tester Using FPGA
Successful the first time! Synopsys helps Achronnix's new generation FPGA be launched months ahead of schedule
Successful the first time! Synopsys helps Achronnix's new generation FPGA be launched months ahead of schedule Synopsys recently announced that Achronix Semiconductor has successfully passed the first silicon verification of its next-generation Speedster7t FPGA using Synopsys' design, verification, an
[Semiconductor design/manufacturing]
Design of USM test power supply based on FPGA and DDS technology
Ultrasonic motor (USM) has many advantages, such as being able to directly output low-speed high torque, fast transient response (up to ms level), high positioning accuracy (up to nm level), and no electromagnetic interference. The operation of USM requires two high-frequency AC power supplies with a certain amplitude,
[Test Measurement]
Design of USM test power supply based on FPGA and DDS technology
Design of digital oscilloscope using FPGA chip and processor
introduction In the field of electronic technology, oscilloscopes are widely used. They can be used to easily and intuitively observe the entire signal and measure basic parameters such as the amplitude, frequency, and period of the signal. The persistence time of fluorescent materials used in traditional analog oscil
[Test Measurement]
Design of digital oscilloscope using FPGA chip and processor
Gowin Semiconductor introduces mature Arm® embedded ecosystem to its FPGA products
Guangdong Gowin Semiconductor Technology Co., Ltd. (hereinafter referred to as "Gowin Semiconductor"), the world's fastest growing programmable logic company, announced a collaboration with ARM to bring the mature Arm® embedded ecosystem to its FPGA products. Gowin Semiconductor will join the Arm DesignStart™ FPGA pro
[Embedded]
Gowin Semiconductor introduces mature Arm® embedded ecosystem to its FPGA products
Design of adjustable delay module based on single chip microcomputer and FPGA
  The system structure diagram is shown in Figure 1. Its hardware structure is relatively simple, mainly composed of three parts: single-chip microcomputer P89C51RD, RS-232/TTL interface circuit MAX232 and programmable logic device FPGA. The single-chip microcomputer P89C51RD2 is the link between the upper PC and FPGA
[Microcontroller]
Design of adjustable delay module based on single chip microcomputer and FPGA
Design of circuit module of fingerprint recognition system based on FPGA
  This design uses FPGA with high integration, low power consumption and short development cycle to complete this design, and takes the realization of system ASIC as the research background, which has strong practical significance and broad market space. Xilinx Spartan 3E series FPGA is used as the core control device
[Power Management]
Design of circuit module of fingerprint recognition system based on FPGA
Design of automatic tuning system for shortwave transmitter based on FPGA
1. Introduction Shortwave transmission is mainly used for communication between radio stations and nuclear submarines. The transmitter is mainly composed of electronic control logic device, overload protection device, frequency preset and automatic tuning device. In order to ensure that the transmitter can
[Embedded]
Design of automatic tuning system for shortwave transmitter based on FPGA
Latest Power Management 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号