![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
september 2010 doc id 15473 rev 2 1/38 AN2946 application note solar-led streetlight controlle r with 25 w led lamp driver and 85 w battery charger based on the stm32f101rx introduction the solar-led streetlight controller described in this application note is designed to achieve an 85 w solar energy battery charger and a 25 w led lamp driver. during the daytime the controller preserves the electricity energy gathered by the solar module (pv module), then stores it in the battery. in the evening the controller uses the battery energy to power the led streetlight. when the battery runs out of power after several rainy days, the controller enables the external offline power supply (not included in this system) instead of the battery to power the led streetlight until the system battery is fully charged again. due to the clean nature of solar energy, and the highly efficient energy conversion of the pv module and very long operating life of the le d lamp, the solar-led streetlight controller, compared to conventional streetlights, can save electricity remarkably, thus abating greenhouse gas (e.g. co 2 ) emission. this application note is based on the solution of solar-led streetlight controller architecture, including a battery charger and led lamp driver. the description of the architecture involves hardware and firmware design with design parameter settings. the solar-led streetlight controller demonstration board is shown in figure 1 . figure 1. solar-led streetlight controller demonstration board www.st.com
contents AN2946 2/38 doc id 15473 rev 2 contents 1 safety instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1 intended use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 electrical connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 board operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 general description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1 controller features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 solar-led streetlight system architecture . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.3 scope of the solar-led streetlight controller . . . . . . . . . . . . . . . . . . . . . . . 7 2.4 main functions of the controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4.1 battery charging management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4.2 led lamp driving management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.4.3 system monitoring circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3 hardware design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1 circuit description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1.1 power supply circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1.2 electricity power collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1.3 led lamp driving circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.1.4 analog signal acquisition circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.2 test results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2.1 battery charger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2.2 led driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4 firmware design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1 main loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.2 battery charging management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.2.1 mppt principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.2.2 battery charging management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.3 led lamp driving management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.4 system monitoring management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 AN2946 contents doc id 15473 rev 2 3/38 5 overview of demonstration board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.1 application schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.2 application board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.3 bill of material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6 references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 7 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 list of figures AN2946 4/38 doc id 15473 rev 2 list of figures figure 1. solar-led streetlight controller demonstration board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 figure 2. solar-led streetlight system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 figure 3. system block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 figure 4. battery charging pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 figure 5. led lamp driving scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 figure 6. 12 v power supply circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 figure 7. 3.3 v power supply circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 figure 8. noise filtering circuit for vdd and vdda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 figure 9. solar module control circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 figure 10. hardware ovp circuit for battery overcharging protection . . . . . . . . . . . . . . . . . . . . . . . . . 12 figure 11. battery charger circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 figure 12. led lamp driver circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 figure 13. temperature sensing circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 figure 14. voltage and current detection circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 figure 15. charging current versus solar module output voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 figure 16. mppt test diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 figure 17. v-i curve and psc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 figure 18. battery voltage versus charging current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 figure 19. charger input current (isc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 figure 20. charger output current (iba) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 figure 21. vds on q2, current on l2, and vak on d4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 figure 22. led lamp current, efficiency vs. battery voltage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 figure 23. led current, efficiency vs. led voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 figure 24. driver input current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 figure 25. driver output current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 figure 26. vgs, ids, and vds on q4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 figure 27. main loop flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 figure 28. 80 w solar module i-v and p-v curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3 figure 29. p and o method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 figure 30. p and o tracing route . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 figure 31. three-stage charging routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 figure 32. mppt flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 figure 33. ambient light sensing flowchart (day and night judgment) . . . . . . . . . . . . . . . . . . . . . . . . . 26 figure 34. led light-off routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 figure 35. led light-on routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 figure 36. system monitoring flowchart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 figure 37. led_fault irq flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 figure 38. system self-recovery flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 figure 39. anti-backflow for battery charging flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 9 figure 40. schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 figure 41. top view of demonstration board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 42. bottom view of demonstration board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 AN2946 safety instructions doc id 15473 rev 2 5/38 1 safety instructions warning: the demonstration board must be used in a suitable laboratory by qualified personnel only who are familiar with the installation, use, and maintenance of electrical systems. 1.1 intended use the demonstration board is a component designed for demonstration purposes only, and shall be used neither for domest ic installation nor for industri al installation. the technical data as well as the information concerning the power supply and operating conditions shall be taken from the documentation included with the demonstration board and strictly observed. 1.2 installation the installation of the demonstration board shall be taken from the present document and strictly observed. the components must be protected against excessive strain. in particular, no components are to be bent, or isolating distances altered during the transportation, handling or usage. the demonstration board contains electrostatically-sensitive components that are prone to damage through improper use. electrical components must not be mechanically damaged or destroyed (to avoid potential risks and health injury). 1.3 electrical connection applicable national accident prevention rules must be followed when working on the mains power supply. the electrical installation shall be completed in accordance with the appropriate requirements (e.g. cross-sectional areas of conductors, soldering, and pe connections). 1.4 board operation a system architecture which supplies power to the demonstration board shall be equipped with additional control and protective devices in accordance with the applicable safety requirements (e.g. compliance with technical equipment and accident prevention rules). general description AN2946 6/38 doc id 15473 rev 2 2 general description 2.1 controller features mppt maximizes solar module efficacy automatic day and night detection automatic mains switch enable function when battery low constant current control for led lamp battery charge control optional led lighting mode led indicators for system status monitoring and debugging status full protection function for ovp, uvp, ocp, and otp. 2.2 solar-led streetlig ht system architecture the solar-led streetlight controller not only controls solar energy storage to the battery, but it also manages the power consumption to the led streetlight. the system architecture of the solar-led streetlight system is illustrated in figure 2 . figure 2. solar-led streetlight system ! - v AN2946 general description doc id 15473 rev 2 7/38 1. the sunlight delivers rays of photons (solar energy) which hit the solar panel (photovoltaic or pv module). the photons (energy) are absorbed by the pv and electrons are released. 2. the electrons flow along the metal contact of the pv and form electricity. 3. energy is stored in the battery during daytime and consumed at night. 4. the led lamp (led streetlight) is driven to operate by the led lamp driver. this controller monitors the system and manages the light-on and light-off in day and night time. 5. when the battery goes low, the controller sends an enable signal to the 'mains switch' which enables the ac offline power supply. 6. the ac offline power supply (not included in this application note) works as a backup source to power the led streetlight. 2.3 scope of the solar-led streetlight controller the block diagram of the solar-led streetlight controller is shown in figure 3 . the controller consists of the following blocks: auxiliary power supply - supplie d from the battery, regulate d to 12vdc for driving every mosfet and then 3.3 vdc for the mcu and its peripherals. battery charger - a dc/dc converter using buck topology. it converts solar energy to electricity and stores the electricity in the battery. led lamp driver - a dc/dc converter using flyback topology in order to drive the led lamp and provide even illumination. driver - generates gate voltage in order to drive every mosfet properly in the battery charger and the led lamp driver including k chg . protection circuits - ovp, uvp, ocp, otp (through the temperature sense block) and reverse-connection protection for the battery and the led lamp. mcu - the microcontroller includes the human machine interfaces (hmi), the dip switch for the selection of the operating time schedule and the indicators of the debugging status. the software routines for ovp, uvp, ocp and otp are implemented in the mcu. figure 3. system block diagram ! - v general description AN2946 8/38 doc id 15473 rev 2 the mcu implements the sophisticated peripherals as listed in ta bl e 1 . 2.4 main functions of the controller 2.4.1 battery charging management during the daytime, the battery is charged by pv electricity according to the typical pattern. an mppt (maximum power point tracing) algorithm is applied to enable the pv module to output as much electricity power as it can. refer to section 4.2 for more information concerning mppt. the pattern for the 12 v battery system is shown in figure 4 . the pattern differentiates the entire charging process into 3 stages. during stage 1 and stage 2, the battery is charged with the solar module maximum power. in stage 3, the battery is charged in constant voltage algorithm. figure 4. battery charging pattern stage 1 (trickle charging): u bat < 11 v. the battery is charged with the maximum power of the pv module. this stage is designed for a battery which is deeply table 1. mcu peripheral allocation peripheral number description adc 11 u sc+ , u sc- , u bat , u led , i sc , i bat , i led , t chg , t bat , t drv , t led gpio 12 inputs dip1~4 (up to 16 modes) jtag status indication charger_en for anti-backflow charge mains_en for switching to mains supply battery led1-2 for indicating battery status debug led1-4 for diagnosis (up to 16 messages) pwm 2 pwm chg , pwm drv (100 khz) ext1 1 led fault ! - v AN2946 general description doc id 15473 rev 2 9/38 discharged. in order to prolong battery operating life, the charging current is constrained at imax = 0.5 a. stage 2 (high-current bulk charging): 11 v u bat < 14.3 v. in this stage, the battery is charged with the maximum power of the pv module. the charging current (imp) may not be constant. stage 3 (floating charging): u bat 14.3 v. in this stage, battery is charged at constant voltage (14.3 v). the voltage values 11 v and 14.3 v define the boundaries of the stages that are based on the characteristics of a typical 12 v lead acid battery. the voltage needed depends on the type of battery. 2.4.2 led lamp driving management during nighttime, normally the ambient light is weak, the led lamp lights for n hours. the determined light-on duration (n hours) can be set by selecting a switch, dip1~4. the controller turns on/off the led lamp to automatically correspond to the ambient light. figure 5 illustrates how the controller turns on the led lamp. the dip switch also provides a test mode to test the led lamp. figure 5. led lamp driving scheme 2.4.3 system monitoring circuit the microcontroller (mcu) provides a real-time system monitoring for the controller, including: error detection/protection for solar module output voltage (u sc ), battery voltage(u bat ), led lamp voltage(u led ), battery charging current (i bat ) and led lamp current(i led ) temperature detection for the operating temperature of the battery, mosfet and led lamp system self-recovery ! - v $ p e l h q w o l j k w v h q v l q j e \ 3 9 y r o w d j h / ( ' o d p s r q i r u 1 k r x u v / ( ' o d p s r i i hardware design AN2946 10/38 doc id 15473 rev 2 3 hardware design 3.1 circuit description 3.1.1 power supply circuit the system auxiliary power supply can be built with a 12 v battery. in order to drive the power mosfet and some analog ics perfectly, a regulated 12 v is required. the 12 v power supply schematic is shown in figure 6 . figure 6. 12 v power supply circuit the mcu requires a 3.3 v source which is obtained from the output of the linear regulator (u11), see figure 7 . figure 7. 3.3 v power supply circuit since the 3.3 v supply is mainly for the mcu, a proper filter, which avoids high-frequency switching noise interference between the digital power supply (vdd) and analog power supply (vdda), is strongly recommended. the filter circuit is shown in figure 8 . AN2946 hardware design doc id 15473 rev 2 11/38 figure 8. noise filtering circuit for vdd and vdda 3.1.2 electricity power collection in figure 9 , c1, and c4//c5//c6 are used to reject the high switching frequency interference from the charger so that only the "clean" current flows through the solar cells (p1). when photons hit the solar cells, p1 releases electrons which flow along the metal contacts and stores electricity to c1 and c4/c5/c6 through r1//r2//r3//r4 and q1. r1~r4 are current sense resistors which are used to sense the solar module current. an operational amplifier u1 (lm258d) is used to amplify and smooth the sense signal, then feedback to the mcu. when solar cells charge the battery with high current, q1 is turned on in order to minimize the power losses. q1 is turned off if solar ce lls voltage falls below the battery voltage. q1 also works as a polarity protection diode, preventing that the solar module is reversely connected. the gate driving signal (pwm_input) of q1 is given by the mcu through u4. in order to properly drive q1, the 3.3 v pwm signal from the mcu must be sent to u4 (comparator ts391). q11 and q13 are configured as the push-pull totem to turn on/off q1 perfectly. figure 9. solar module control circuit a hardware solution to protect the battery from being overcharged is important. when battery voltage exceeds 15 v (example of 12 v battery in system), d3 in figure 10 is triggered and scr (q10) is turned on. the battery provides latch-current to q10 and the fuse (f1 in figure 11 ) is blown. then battery is protected. ! - v - 3 & |