Charging and discharging controller
By designing a charge and discharge controller based on the Atmega128 microcontroller, and employing Boost circuitry and MPPT algorithm, combined with the perturbation and observation method of fuzzy control, the photovoltaic charging and discharging process was optimized, solving the problems of low cost-effectiveness and insufficient adaptability, and achieving efficient photovoltaic power utilization and system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- BAODING TIANWEI BAOBIAN ELECTRICAL
- Filing Date
- 2024-12-28
- Publication Date
- 2026-04-28
AI Technical Summary
Existing photovoltaic charge and discharge controllers suffer from low cost-effectiveness and insufficient adaptability in public lighting systems, making it difficult to efficiently and rationally control the charging and discharging process of batteries and affecting the utilization rate of photovoltaic power.
Design a charge/discharge controller based on the Atmega128 microcontroller. Employ a Boost circuit and MPPT algorithm, combined with the perturbation observation method of fuzzy control, and achieve real-time control of the switching transistor through a detection circuit and a power transistor drive circuit to optimize the charging and discharging process.
It improves the utilization rate of photovoltaic power, ensures the system operates in a highly efficient and stable state, and enhances the cost-effectiveness and anti-interference capability of the charge and discharge controller.
Smart Images

Figure CN224177963U_ABST
Abstract
Description
Technical Field
[0001] This utility model belongs to the field of power electronics application technology, specifically relating to a charge and discharge controller. Background Technology
[0002] In public lighting systems, photovoltaic arrays charge lead-acid batteries, which then provide power to the lighting system. To ensure this process operates efficiently and effectively, a photovoltaic charge-discharge controller based on an Atmega128 microcontroller was designed. Based on the characteristics of the battery and photovoltaic array, battery capacity detection and MPPT technology were used, and the main control circuit was a Boost circuit. Experimental results verified that this controller can effectively control the battery charging and discharging process, improving the utilization rate of photovoltaic power, and ultimately achieving a highly efficient and stable operating state for the lighting system.
[0003] To more efficiently collect, store, and utilize solar energy, the hardware of public lighting systems employs independent power supplies, Boost main control circuits, and controllers. The main objective of the software design is to utilize the MPPT algorithm to maximize the conversion of solar energy into electrical energy, storing the collected energy in batteries for use by the lighting system. Currently, various control strategies based on the MPPT algorithm exist, each with its own advantages and disadvantages.
[0004] Therefore, a charge / discharge controller is proposed to further improve the cost-effectiveness and adaptability of the charge / discharge controller. Utility Model Content
[0005] The purpose of this utility model is to provide a charging and discharging controller with a simple structure and reasonable design in order to solve the above problems. It proposes a hardware circuit design scheme and analyzes the working principle of the hardware circuit. The hardware circuit of this controller is simple, has good real-time performance, complete functions, and has high reliability and anti-interference ability.
[0006] This utility model achieves the above objectives through the following technical solutions:
[0007] A charge / discharge controller includes a pre-stage detection circuit, a boost circuit, a post-stage detection circuit, a control switch, and a detection circuit disposed on a solar panel. The output terminal of the solar panel is connected to the pre-stage detection circuit. The pre-stage detection circuit is sequentially connected to the boost circuit, the post-stage detection circuit, a lead-acid battery, the control switch, the detection circuit, and an LED street light. The pre-stage detection circuit, the boost circuit, the post-stage detection circuit, the lead-acid battery, the control switch, and the detection circuit are all controlled by the controller.
[0008] As a further optimized solution of the present utility model, the control circuit in the charge and discharge controller includes a detection circuit, a load control circuit, a power transistor drive circuit, and a CPU pin circuit;
[0009] Among them, the load control circuit controls the on and off of the LED street lamp;
[0010] The load control circuit uses a port line to control a triode, and then the triode drives a MOS tube to control the LED street lamp loop;
[0011] There are three power transistors in the system of the load control circuit. The on and off of one of them to control the switch is driven by a triode, and the other two power transistors are connected in the system charging circuit and need to switch on and off a charging current of more than 5A, and are driven by two MAX4220s.
[0012] As a further optimized solution of the present utility model, the detection circuit includes two parts:
[0013] First: The output power of the solar panel is obtained through the detection of the voltage and current of the front stage. The voltage detection is collected by the precision resistor voltage division method;
[0014] Second: The charging current and power provided to the lead-acid battery are obtained through the detection of the voltage and current after DC-DC conversion. The current detection uses a Hall sensor chip to collect the current signal.
[0015] As a further optimized solution of the present utility model, the main circuit of the charge and discharge controller system uses a Boost circuit. The switching transistor selected for the Boost circuit is an N-channel enhancement type MOSFET power transistor. By inputting a PWM control signal to the gate G of the MOSFET power transistor, the on and off of the power transistor is controlled.
[0016] As a further optimized solution of the present utility model, the Boost circuit has a buffer element inductor L, and the inductor L is used for continuous current and voltage boost;
[0017] In the Boost circuit, C1 and C2 are filter capacitors, and at the same time, C2 can store energy for power supply, and D is an anti-reverse charging diode;
[0018] The Boost circuit is distributed in a "day" shape. C1 and C2 are located on both sides of the "day" shape, L and D are located on the upper two sides of the "day" shape, and Q is a switch in the middle of the "day" shape;
[0019] The switching period of the Boost circuit is T, and the duty cycle is D. Q is turned on within the time of 0 to DT, and the input voltage charges the inductor L, and the current in the inductor L gradually increases. Q is turned off within the time of DT to T, and the inductor L starts to discharge. The voltage across the inductor is superimposed on the voltage of the input power supply, so that a voltage higher than the input end is generated at the output end to charge the lead-acid battery.
[0020] The beneficial effects of this invention are as follows: This invention uses a fuzzy control-based perturbation observation method to control the output of the PWM signal for switching transistors, achieving reasonable and effective control over the battery charging process, improving the utilization rate of photovoltaic power. Furthermore, after the system powers on and runs the initial program, the operating program is selected based on the judgment of the photosensitive element. In the MPPT stage, the controller adjusts the duty cycle D of the switching transistor Q to ensure the lead-acid battery can receive the maximum output power P from the photovoltaic cell. When the charging current exceeds the overcharge termination current, the battery is charged at a constant voltage while the charging current continues to be monitored. When the charging current is less than 10% of the rated current, the system switches to the float charging stage, which uses a constant voltage slightly higher than the battery voltage to charge the battery. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the overall module of the charge and discharge controller of this utility model;
[0022] Figure 2 This is the load control circuit diagram of this utility model;
[0023] Figure 3 This is the power switch drive circuit diagram of this utility model;
[0024] Figure 4 This is a circuit diagram for voltage and current detection of this utility model;
[0025] Figure 5 This is the main circuit diagram of the charge / discharge controller system of this utility model;
[0026] Figure 6 This is the main program flowchart of the charge / discharge controller of this utility model. Detailed Implementation
[0027] The present application will now be described in further detail with reference to the accompanying drawings. It should be noted that the following specific embodiments are only used to further illustrate the present application and should not be construed as limiting the scope of protection of the present application. Those skilled in the art can make some non-essential improvements and adjustments to the present application based on the above application content.
[0028] Example 1, a charge / discharge controller, such as Figure 1As shown, the overall hardware circuit of the charge / discharge controller mainly consists of a Boost circuit, a control drive circuit, pre- and post-stage detection circuits, control switches, and detection circuits. Using an Atmega128 microcontroller to detect the high current and voltage of the photovoltaic array and lead-acid battery requires converting these into safe electrical parameters; otherwise, the main chip will be damaged. A precision resistor voltage divider method is used to convert the high voltage value into a voltage range acceptable to the A / D module. To achieve reasonable and effective control of the battery charging process and improve the utilization rate of photovoltaic power, a fuzzy control-based perturbation observation method is used to control the output of the PWM signal for switching the transistor.
[0029] Specifically, the output of the solar panel is connected to the pre-stage detection circuit, which is then connected in sequence to the Boost circuit, the post-stage detection circuit, the lead-acid battery, the control switch and detection circuit, and the LED street light. The pre-stage detection circuit, the Boost circuit, the post-stage detection circuit, the lead-acid battery, the control switch and detection circuit are all controlled by a controller.
[0030] refer to Figures 2 to 5 As shown, the control circuit consists of a minimum system, a detection circuit, a load control circuit, a power transistor driver circuit, and a CPU pin circuit. The load control in this system controls the on / off state of the streetlights, directly controlling the transistors via I / O lines, and then the transistors drive MOSFETs to control the streetlight circuit. The system has three power transistors; one controls the switching on / off state of the switch, driven by the transistor, while the other two power transistors are connected in the system's charging circuit. Since a charging current of over 5A needs to be switched, two MAX4220 chips are used to drive them.
[0031] The detection circuit of this system has two parts: the output power of the solar panel can be obtained through the voltage and current detection of the front stage, and the voltage detection uses a precision resistor voltage divider method for acquisition. The charging current and power supplied to the lead-acid battery can be obtained through the detection of the voltage and current after DC-DC conversion, and the current detection uses a Hall sensor chip to acquire the current signal.
[0032] refer to Figure 5As shown, the main circuit uses a boost circuit because its operating current is continuous, its circuit structure is simple, and more importantly, it has a higher energy conversion efficiency than other circuits. The boost circuit in this system uses an N-channel enhancement-mode MOSFET power transistor, which has low power consumption and is suitable for high-frequency circuits. The switching of the power transistor can be controlled by inputting a PWM control signal to its gate G. The inductor L is a buffer element in the boost circuit, serving as a current carrier and voltage booster. C1 and C2 are filter capacitors, and C2 also stores energy for power supply. D is a reverse-charging protection diode. The switching period of the boost circuit is T, and the duty cycle is D. During the time interval 0 to DT, Q is on, and the input voltage charges the inductor L, causing the current in the inductor L to gradually increase. During the time interval DT to T, Q is off, and the inductor L begins to discharge. The voltage across the inductor is superimposed on the input voltage, resulting in a higher voltage at the output, which charges the lead-acid battery.
[0033] The charging and discharging process is divided into two scenarios: daytime charging and nighttime discharging. After the system powers on and runs the initial program, the operating program is selected based on the judgment of the photosensitive element. In the MPPT stage, the controller adjusts the duty cycle D of the switching transistor Q to ensure that the lead-acid battery can receive the maximum output power P from the photovoltaic cell. When the charging current exceeds the overcharge termination current, the battery is charged at a constant voltage while the charging current continues to be monitored. When the charging current is less than 10% of the rated current, the system switches to the float charging stage, which uses a constant voltage slightly higher than the battery voltage to charge the battery.
[0034] The embodiments described above are merely examples of several implementations of this utility model, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of this utility model patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this utility model, and these modifications and improvements all fall within the protection scope of this utility model.
Claims
1. A charge / discharge controller, comprising a front-end detection circuit, a boost circuit, a rear-end detection circuit, a control switch, and a detection circuit disposed on a solar panel, characterized in that, The output terminal of the solar panel is connected to the pre-stage detection circuit, and the pre-stage detection circuit is sequentially connected to the Boost circuit, the post-stage detection circuit, the lead-acid battery, the control switch and the detection circuit, and the LED street lamp. The pre-stage detection circuit is connected to the Boost circuit, the post-stage detection circuit, the lead-acid battery, the control switch and the detection circuit through the controller.
2. The charge / discharge controller according to claim 1, characterized in that: The control circuit in the charge and discharge controller includes a detection circuit, a load control circuit, a power transistor drive circuit, and a CPU pin circuit; Among them, the load control circuit controls the on and off of the LED street lamp; The load control circuit uses a port line to control a triode, and then the triode drives a MOS transistor to control the LED street lamp circuit; There are three power transistors in the system of the load control circuit. One of them controls the on and off of the switch, which is driven by a triode. The other two power transistors are connected to the system charging circuit and need to switch on and off a charging current of more than 5A, and two MAX4220 are used for driving.
3. A charge / discharge controller according to claim 2, characterized in that: The detection circuit includes two parts: First: The output power of the solar panel is obtained through the voltage and current detection of the pre-stage. The voltage detection is collected by the precision resistor voltage division method; Second: The charging current and power provided to the lead-acid battery are obtained through the detection of the voltage and current after DC-DC conversion. The current detection uses a Hall sensor chip to collect the current signal.
4. A charge / discharge controller according to claim 2, characterized in that: The main circuit of the charge and discharge controller system uses a Boost circuit. The switching transistor selected for the Boost circuit is an N-channel enhancement type MOSFET power transistor. By inputting a PWM control signal to the gate G of the MOSFET power transistor, the on and off of the power transistor is controlled.
5. A charge / discharge controller according to claim 4, characterized in that: There is a buffer element inductor L on the Boost circuit. The inductor L is used for continuous current and voltage boost; C1 and C2 in the Boost circuit are filter capacitors. At the same time, C2 can store energy for power supply, and D is an anti-reverse charging diode; The Boost circuit is distributed in a "day" shape. C1 and C2 are located on both sides of the "day" shape. L and D are located on the upper two sides of the "day" shape. There is a Q in the middle of the "day" shape, and Q is a switch; The switching period of the Boost circuit is T, and the duty cycle is D. Q is turned on within the time of 0~DT, and the input voltage charges the inductor L. The current in the inductor L gradually increases. Q is turned off within the time of DT~T, and the inductor L starts to discharge. The voltage across the inductor is superimposed on the voltage of the input power supply, so that a voltage higher than the input terminal is generated at the output terminal to charge the lead-acid battery.