Solar LED Street Light Solution Using STM32 MCU

Publisher:山宝宝Latest update time:2014-04-20 Source: 21ICKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

As fossil energy is decreasing and the problem of global warming caused by excessive greenhouse gas emissions is becoming more and more important, people are actively developing various types of renewable energy on the one hand, and advocating green environmental protection technologies for energy conservation and emission reduction on the other. As an inexhaustible clean energy, solar energy has become an important representative of many renewable energy sources; and in the field of lighting, LED solid-state lighting with long life, energy saving, safety, green environmental protection, rich colors and miniaturization has also been recognized as an important way to save energy and protect the environment in the world. Solar-LED street lights integrate the advantages of both, using clean energy and high-efficiency LEDs to achieve green lighting.

The solar-LED street light solution introduced in this article can automatically detect ambient light to control the working status of the street light, ensure the maximum solar panel efficiency through maximum power point tracking (MPPT), control the LED with constant current, and has battery status output and user-settable LED working time.

System structure and implementation principle

At present, street lamps generally use a high-pressure sodium lamp structure powered by mains electricity. The electronic drive part of the high-pressure sodium lamp needs to convert the mains electricity from AC to DC, and then invert it to AC to drive, resulting in low system efficiency; and because of the use of mains electricity, it is necessary to lay complex and expensive pipelines. Solar-LED street lights do not have the above problems. Since solar panels output DC power and LEDs are also DC-driven light sources, the combination of the two can improve the efficiency of the entire system; the use of solar energy also eliminates the cost of laying cables and related projects.

 

 

Figure 1 is a schematic diagram of the structure of a solar-LED street light. When the solar panel is exposed to sunlight, its internal PN junction will form new electron-hole pairs, which can generate DC current in a loop; this current flows into the controller and charges the battery in some way. The battery will be charged during the day and provide energy to the LED at night. The operation of the LED is carried out by the controller. While ensuring the constant current operation of the LED, the controller will also monitor the status of the LED and control the working time. In the case of continuous rainy days and insufficient battery power, the controller will send a control signal to start the external mains power supply system (not included in the controller) to ensure the normal operation of the LED. The external mains power supply system is only used as a backup energy source and will only be used when the battery power is insufficient. The battery is charged entirely by solar energy to ensure the maximum use of solar energy.

 

 

Figure 2: Controller block diagram

Figure 2 is a block diagram of the controller. After the solar panel comes in, it will first pass through a switch MOS tube KCHG to connect to the DC/DC converter (battery charging circuit), and the output of this converter is connected to both ends of the battery (in the actual circuit, it will first pass through a fuse and then connect to the battery). Adding KCHG has two functions: one is to prevent the reverse charging current from the battery when the solar cell output is low; the other is to protect the circuit when the polarity of the solar panel is reversed. The DC/DC converter adopts a buck topology. The selection of the topology must not only consider the maximum power point voltage of the solar panel and the maximum voltage of the battery, but also take into account efficiency and cost. The battery and the LED are also connected through a DC/DC converter (LED drive circuit). Constant current control should be adopted for the LED. Considering the fluctuation range of the battery voltage and the operating voltage range of the LED, the flyback topology is used in the design circuit to ensure constant current output. The efficiency of the flyback topology is generally not as high as that of a simple boost or buck circuit. If you want to improve the efficiency of the system, you can use a boost or buck circuit by optimizing the relationship between the battery voltage and the LED voltage to improve efficiency and possibly further reduce costs.

The control of the entire controller is realized by an MCU. The main tasks of the MCU include the following: first, the MPPT algorithm is used to optimize the efficiency of the solar panel; second, the appropriate charging mode is used for different battery states; third, the constant current output of the LED drive circuit is guaranteed; fourth, the day and night are judged and used to switch the battery charging and discharging mode; finally, the functions of monitoring protection, temperature monitoring, status output and user control input detection (DIP1~4) are provided. The selection of MCU is mainly to meet the needs of ADC, GPIO and external interrupts, and there is no need to pursue speed alone. Table 1 lists the use of MCU peripherals in the actual circuit. Considering the need for future expansion, the main control chip uses STM32F101RXT6 (the latest STM32 series MCU of STMicroelectronics, using the Cortex-M3 core).

Table 1: MCU peripheral allocation.

 

 

The controller auxiliary power supply is directly converted from the battery. The battery input obtains 12V through a linear power supply (L78L12) to supply the logic circuit and PWM switch signal amplification; 3.3V comes from the 12V to the switching power supply (L5970D), which mainly powers the MCU and peripheral circuits. The reason for using a switching power supply is to improve the conversion efficiency (reduce battery power consumption) and to provide sufficient load when the system is expanded in the future. Of course, in order to reduce costs, it can be achieved with a linear power supply.

Main functions of the controller

The main functions of the controller include two aspects: battery charging and battery powering the LED.

1. Battery charging

When the system detects that the ambient light is sufficient, the controller will enter the charging mode. There are two important voltage values ​​for battery charging: deep discharge voltage and floating charge voltage. The former represents the state where the battery power is exhausted under normal use, while the latter represents the maximum limit voltage of battery charging. These parameters should be found in the battery product manual. In the designed circuit, for a 12V battery, the deep discharge voltage is set to 11V and the floating charge voltage is set to 13.8V (both are voltage values ​​at room temperature, and the two values ​​in the software have added corresponding temperature compensation). The specific charging mode is shown in Table 2.

 

 

From Table 2, we can see that the MPPT algorithm is used in the trickle charging mode and the constant current charging mode. There are many ways to implement the MPPT algorithm. There are many papers in the industry that have discussed this. In general, each has its own advantages and disadvantages. The relatively simple perturbation observation method (Perturbance and Observation) is used in the design circuit to implement it. The basic idea of ​​this control method is to increase or decrease the duty cycle of the charging circuit switch signal PWMCHG, and then observe whether the output power increases or decreases, so as to decide whether to increase or decrease the duty cycle in the next step. Since the output of the solar panel changes relatively slowly and is a single pole, this method can still achieve relatively good results.

2. Battery discharge

When the system detects that the ambient light is insufficient, it will enter the battery power supply mode for the LED. The LED current is sampled by the high-current detection chip (TSC101AILT) and sent back to the MCU, which adjusts the duty cycle of the switch signal PWMDRV to obtain a constant output current. In order to achieve the purpose of energy saving, the constant current value of the LED will be adjusted according to the ambient light intensity detected by the system: when the ambient light changes from bright to dark, the output current of the system will also change from small to large accordingly; when the ambient light is completely dark, the output current of the system will also reach the preset maximum value. In addition to controlling the output of the LED by ambient light, the user can also turn on the time control function by setting the state of the switch DIP1~4. The system will control the LED to light up from 5 minutes to 12 hours according to the setting combination of DIP1~4.

In addition, in order to improve the reliability of the system, the design circuit adds a series of software and hardware protection functions for solar panels, batteries, LEDs, etc. Based on this system platform, the system performance can be further optimized by adding intelligent light-emitting diode working mode, adding communication modules and adopting wind-solar complementary system.

Conclusion

Solar-LED street lights can not only use clean and free solar energy and efficient and environmentally friendly LEDs to illuminate the roads, but also reduce greenhouse gas emissions and achieve the goal of green lighting. This street light system has been successfully implemented at the entrance of the STMicroelectronics building. All street light systems have been running for half a year and are working normally. As the price of solar panels continues to drop and the cost-effectiveness of LEDs increases, I believe this system will be more and more widely used.

Keywords:STM32 Reference address:Solar LED Street Light Solution Using STM32 MCU

Previous article:Very power-saving LED night light circuit
Next article:Reducing Standby Power Consumption of LLC Resonant Converters in LED Lighting

Recommended ReadingLatest update time:2024-11-23 03:19

What are AHB bus, APB2 bus and APB1 bus in STM32?
 I still don't understand what the AHB bus, APB2 bus, and APB1 bus are in STM32 ? The so-called address mapping is to establish a one-to-one correspondence between the memory and even I/O resources on the chip and the address. Corresponding to a certain register, we can use the C language pointer to address and mo
[Microcontroller]
Solution to STM32 not being able to simulate after disabling the JTAG function in the program
STM32 cannot perform JTAG simulation after disabling the JTAG function in the program. In the program, the function that usually disables JTAG is as follows:   //Change the mapping of the specified pin GPIO_Remap_SWJ_Disable SWJ completely disabled (JTAG+SW-DP)   GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENAB
[Microcontroller]
STM32 GPIO button experiment
Experimental board: A Stm32 development board with buttons. I use the Open107V experimental board, model 107 Library function: STM32 official 3.5 library Other materials: ST-LINK, some jumpers Experimental principle: The button experiment is similar to the LED experiment. The GPIO lighting outputs high and low levels
[Microcontroller]
STM32 ADC single conversion DMA read
 The DMA reading method is very suitable for high-frequency ADC sampling signals.      The DMA reading method of ADC is actually similar to the interrupt reading method in the previous article, and the initialization code is even more similar. The initialization code is as follows: static void ADC_GPIO_Config(void) {
[Microcontroller]
STM32 Notes 10: Working, PWM output
a)               Purpose: Basic PWM output and interrupt coordination application. The output uses PB1, configured as TIM3_CH4, which is the LED6 control pin of the target board. b)               For simple PWM output applications, there is no need to consider the differences in the advanced functions of TIM1. c)   
[Microcontroller]
STM32 timer writes precise delay function
1. For the configuration of the timer, please refer to the example in the On-time Atom tutorial 2. Here the reload value and prescaler are set to 999 and 7199  3. The interrupt service routine and the precise delay function are 4. Next, you can use the precise delay function 
[Microcontroller]
STM32 timer writes precise delay function
STM32 timer interrupt experiment-TIM3
1. References       "STM32F1 Development Guide - Library Function Version" - Chapter 13 Timer Interrupt Experiment       "STM32 Chinese Reference Manual V10" - Chapter 14 General Timer 2. Clock selection        The counter clock can be provided by the following clock sources:           ①Internal clock (CK_INT)      
[Microcontroller]
STM32 timer interrupt experiment-TIM3
STM32 RTC (Real Time Clock) 32.768kHz Crystal Oscillator Start-up Guide
It is an industry consensus that the STM32 RTC crystal oscillator often fails to oscillate. Many people ask for help on various electronic forums with questions like "Ask an expert for advice! What should I do if the RTC crystal oscillator does not oscillate?", and the answer can basically be summarized as "The expert
[Microcontroller]
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号