Solar lighting is one of the main uses of solar energy for human development and utilization. However, due to the discontinuity and intermittency of solar radiation, as well as the high investment and cost of pure solar lighting systems and the immaturity of some technologies, solar lighting systems often fail to light up the load due to insufficient battery voltage on consecutive rainy days. Combining solar energy with city electricity to form a dual power supply complementary lighting system can not only effectively solve the problem of unstable solar energy utilization, but also appropriately reduce the capacity of solar cells and batteries, reduce the cost of developing and utilizing solar energy technology, and meet the system reliability and economic requirements at the same time [1-2].
1 Main functions and components of the controller
The controller designed in this paper is used for the complementary lighting system of solar energy and mains electricity in streets and residential areas at night. According to the actual lighting conditions, the controller is designed to have the following functions:
(1) Supports 12 V DC system operating voltage;
(2) Supports charging and discharging currents up to 4 A;
(3) Supports both DC and pulse charging modes;
(4) Has the function of reducing the brightness of semiconductor lighting fixtures by half late at night;
(5) Automatically switches to AC power supply when the battery is low;
(6) Can detect the voltage of the solar cell and automatically switch the working mode;
(7) Can detect the voltage of the battery and control the charging and discharging process of the battery;
(8) Has anti-reverse charging protection, overcharging protection, over-discharging protection and load short-circuit protection functions;
(9) Has electronic clock and timing functions.
Figure 1 shows a schematic diagram of the controller peripheral circuit with PIC16F877A as the core [3]. It is mainly composed of PIC microcontroller (with internal A/D), clock circuit, voltage sampling circuit, switch drive circuit, clock control and digital tube display circuit. The microcontroller PIC16F877A is the core of the controller, and the peripheral circuit includes switch control circuit (C1~C3), digital tube display and drive (A~G/Dig_EN1~Dig_EN6) circuit, working status display, etc.
2 Main circuit design and device selection
2.1 PIC16F877A
The microcontroller is the core of the controller. When the system is working, it needs to collect the voltage of the solar cell and the battery. The output voltage of the solar cell is greatly affected by external factors such as temperature and solar radiation intensity, which requires the system to have high real-time performance, that is, the system response speed is required to be fast. Therefore, the design uses the mid-range PIC microcontroller 16F877A with an internal A/D module and a 14-bit instruction width. It is a mid-level PIC product with high performance while maintaining a low price.
The controller designed in this article mainly uses the following resources of PIC16F877A:
(1) 16 KB of in-system programmable Flash, 1 KB of on-chip SRAM, and 10,000 erase/write cycles. The program storage space is large enough and no additional memory expansion is required; the 10,000-time erase/write cycle facilitates program debugging;
(2) Two 8-bit timers/counters with independent prescaler and comparator functions. Used for key debounce and timing;
(3) One 16-bit timer/counter with prescaler, comparison and capture functions. Used to adjust the duty cycle of the PWM control signal and control the charging switch;
(4) 8-channel 10-bit ADC. Two of the ADC channels are used to sample the solar cell operating voltage and the battery operating voltage respectively;
(5) Two interrupt sources are used, external interrupt and timer interrupt, for timing and key pressing respectively;
(6) Programmable I/O ports. Some I/O ports use their second function, and others are used to expand the controller system function.
2.2 Voltage sampling circuit
The controller needs to collect two voltage signals, namely the solar cell output voltage and the battery terminal voltage. Both signals are changing DC analog signals, and the sampling signal should be able to accurately reflect the detection value. In the design, a simple voltage divider resistor network is formed by using precision resistors with an accuracy of 0.1%, and precision capacitors and inductors with very small leakage current are connected in parallel at the output end of the voltage divider resistor network for filtering to reduce the impact of current leakage on measurement accuracy [4]. The sampling circuit is shown in Figure 2.
2.3 Control switch drive circuit
The main control objects of the controller are three control switches C1~C3. They are the battery charging switch, battery discharging (power supply) switch and mains power supply switch. The state of the switch is controlled by the single chip microcomputer according to the working state of the system: during the day, the solar cell charges the battery, switch C1 is closed, the solar cell converts solar energy into electrical energy and stores it in the battery. When the battery voltage is overcharged, the controller disconnects the charging switch C1; at night, the battery mainly supplies power to the load, switch C2 is closed, when the battery voltage is insufficient (undervoltage), the battery power supply switch C2 is disconnected, and the controller automatically switches to mains power to supply power to the load (C3 is closed). Figures 3, 4 and 5 are the drive circuits of the switches when the battery is charged, discharged and powered by mains, respectively.
In the charging control circuit, a Schottky diode is used to protect the battery from reverse charging, preventing the battery from reverse charging the solar cell at night. At the same time, a protection circuit is designed to prevent the battery from overcharging. In order to control the charging method of the battery, the charging control signal is a PWM signal output by the microcontroller. The control signal of the battery discharge (power supply) switch is directly controlled by the high and low levels output by the microcontroller, realizing the late-night half-power power supply function. A relay is used in the AC power supply switch circuit [5].
3 Controller Performance Test
This paper conducts a preliminary test on the functions of the designed system controller, and some test results are as follows.
(1) Indicator light test system working status
Battery pulse charging test. When TVcc>0.7 V, it is daybreak; at this time 12 V
(2) Oscilloscope test battery charging waveform
Use an oscilloscope to detect the gate voltage of the charging switch Q2 to detect the charging condition of the battery. The output waveform of the battery under pulse charging is a pulse waveform.
In addition, the controller's power supply control function, charging and power supply mode conversion function, and the performance of the entire system when the controller is working were tested and analyzed. The test results show that the system controller can complete various functions well and operate well.
The system controller based on PIC16F877A designed in this paper makes full use of the internal resources of the microcontroller and has the characteristics of simple structure and low power consumption. The debugging experiment proves that the functions of the controller are well completed, with high practical value and good application prospects, which has reference significance for the promotion and application of solar LED lighting systems.
Previous article:Design of Audio Signal Analyzer Based on Microchip 16-bit MCU
Next article:Design of digital controlled current source based on single chip microcomputer PIC16F877A
Recommended ReadingLatest update time:2024-11-16 21:43
- Popular Resources
- Popular amplifiers
- ICCV2023 Paper Summary: Self-, Semi-, Meta-, Unsupervised Learning
- Chip Manufacturing: A Practical Tutorial on Semiconductor Process Technology (Sixth Edition)
- Starting from scratch - PIC microcontroller common modules and typical examples
- Introduction to the classification, application, composition and model of phase-locked loop
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- The auxiliary power transformer of new energy vehicles has a power of 2.4-6.6kw. How small can its volume be?
- Lock-in amplifier circuit principle
- NUCLEO_G431RB Review - First Experience
- How to record and call script files in Allegro software?
- TI Cup 2019 National Undergraduate Electronic Design Competition National Review Results Announcement
- Current reversible chopper circuit
- [TI Live Broadcast] The new generation of C2000 and MSP430 series is released, take a look! Register to watch and win gifts
- Do you remember the ZTE power supply I bought at the ghost market? I DIYed it in my spare time.
- Notes on commonly used modules inside MSP430 microcontroller
- Share: CCS dual-core chip DSP end development