Project Description: ESP32-Based Three-Phase 400V Solar Power Export Limiter and Energy Diversion System
This project is designed to manage power flow in a three-phase 400V mains system connected to solar inverters. The system intelligently limits the amount of power exported to the grid and diverts excess solar energy to local DC loads. It functions as an external solar inverter export limiter, maximizing self-consumption of solar energy by dynamically shunting surplus power to DC loads such as battery banks, heaters, or other appliances.
System Features and Design
1. Main Functionality
Three-Phase Solar Power Management: The system monitors each phase of the 400V three-phase grid and calculates the total power flow between the solar inverters, the grid, and local consumption. When excess power is detected, the system diverts that energy to local DC loads.
Grid Export Limiting: The system ensures that only the desired amount of solar power is exported to the grid, in compliance with local regulations or user-defined limits. Any excess power is automatically rerouted for local consumption, reducing reliance on grid feedback and avoiding potential penalties or inefficiencies.
Energy Diversion: Instead of allowing the solar inverters to throttle or shut down due to overproduction, the system efficiently shunts surplus energy to local DC loads, such as battery banks, water heaters, or other resistive loads, ensuring maximum utilization of the generated solar power.
2. Key Components
ESP32D0WDQ6 Microcontroller: The central control unit, managing real-time data from current sensors and controlling the diversion of power through MOSFET modules. The ESP32 can be either socket-mounted for easy replacement or surface-mounted for a more compact, cost-effective design.
W25Q128FVSIQ Memory Module: External SPI memory is used for logging power data, storing configuration settings, and managing firmware updates.
Three-Phase Current Sensors (ASLC758LCB): The current sensing board will include three sensors, one for each phase of the 400V system, to measure current flow in real time. An additional current sensor will monitor the output from the MOSFET modules to ensure accurate power diversion control.
Off-the-Shelf MOSFET Modules: Industry-standard MOSFET modules with built-in optocouplers handle high-power switching for each phase. The system sends control signals to these modules, which divert the excess power to DC loads while protecting the low-voltage control circuitry from high-voltage risks.
Wi-Fi Antenna and External Connector: The system includes a PCB trace antenna for Wi-Fi connectivity in general use and an external antenna connector for lab testing or scenarios requiring extended Wi-Fi range.
3. Control and Monitoring
PWM Control of MOSFETs: The ESP32 generates PWM signals to control the MOSFET modules, which manage power diversion to local loads. These modules have built-in optocouplers for electrical isolation, ensuring safety when switching high power.
Current Sensing Board: The current sensing board has four current sensors—three to monitor each phase of the three-phase system and one to measure the output current from the MOSFET modules. The board connects to the ESP32 via I²C or SPI for data communication.
LED Indicators:
Power LED to show system operation.
MOSFET operation LEDs to indicate when power is being diverted to local loads.
Programming and communication status LEDs to show when the system is being programmed or communicating via the USB interface.
4. Power Supply and Protection
5V DC Input: The entire system is powered by a 5V input, with a high-efficiency step-down regulator converting the 5V to 3.3V for the ESP32 and other low-voltage components. No AC power is routed through the main board, simplifying the design and reducing risks.
Overvoltage and Polarity Protection: Protection is provided by Schottky diodes for reverse polarity protection and TVS diodes for overvoltage protection, ensuring the system is safe from wiring errors or voltage surges.
Lightning and Surge Protection: The current sensing board includes varistors to protect against lightning strikes or power surges, which can cause damage to the sensors or other components.
5. Communication and Connectivity
USB Programming Interface: A CH340G or better serial-to-USB converter is used for programming and debugging the ESP32. This interface allows for easy firmware updates or system diagnostics.
Unused GPIO Pin Headers: All unused GPIOs from the ESP32 are routed to headers for potential future expansion. This ensures flexibility for adding new features or connecting additional devices or sensors later on.
Level conversion small signal mosfets shall be mounted on atleast 5 external pins and a tab that can be switched between 5v,3.3v and 10v, the latter need a extra voltage converter onboard 12v in, for example is simple.
---
Detailed Component Functions
1. ESP32D0WDQ6 Microcontroller
Mounting: The ESP32 can be mounted either as an SMD component or in a socket for easy replacement in development and testing environments.
Programming and Communication: The USB interface allows easy programming via the CH340G serial converter, and SMD LEDs are integrated for visual feedback during programming and operation.
Memory Expansion: The W25Q128FVSIQ memory module is connected via SPI to provide additional storage for logging and firmware management.
2. Current Sensing Board
Current Sensors: The current sensing board features:
Three-phase current sensors for monitoring each phase in the 400V mains.
Two additional current sensors for measuring the output current from the MOSFET modules.
. output for two mosfet modules is enough.
High-Current Handling: The PCB design for the current sensing board includes thick copper traces or external wiring to handle high currents safely and efficiently.
Lightning Protection: Varistors are placed on the sensing board to protect against high-voltage surges caused by lightning or electrical disturbances.
3. Off-the-Shelf MOSFET Modules with Built-In Optocouplers
Control and Operation: The MOSFET modules are driven by the ESP32 using PWM signals sent over isolated control lines. These signals adjust the amount of power being diverted to local loads, such as battery banks or resistive heaters.
Electrical Isolation: The built-in optocouplers provide electrical isolation between the low-voltage control circuitry and the high-voltage power switching components, ensuring safe and reliable operation.
4. Wi-Fi Antenna and External Connector
PCB Track Antenna: A PCB trace antenna will be used for Wi-Fi connectivity in everyday operations, optimized for regular use scenarios.
External Antenna Connector: For lab testing or extended-range applications, an external antenna connector is included, giving the flexibility to swap out antennas based on the operating environment.
5. Indicators and LEDs
Power and Operation LEDs: SMD LEDs will provide clear visual feedback for:
System power
MOSFET operation
Programming and communication status
These indicators help with system diagnostics and ensure the operator can visually confirm the status of the system at a glance.
---
Power Supply, Safety, and Protection Features
5V Power Supply: A 5V DC input powers the ESP32 and other low-voltage components. A step-down regulator will convert 5V to 3.3V as required by the ESP32.
Protection Circuits:
Schottky diode for reverse polarity protection.
TVS diode for overvoltage protection.
Varistors on the current sensing board to handle lightning surges.
Ground Planes: The design includes ground planes on the main PCB to improve signal integrity and minimize noise, critical for both digital signals and RF performance in the Wi-Fi circuitry.
---
PCB Layout and Construction Considerations
Modular Design: The system is divided into a main control board for the ESP32, memory, and control circuits, and a current sensing board for handling high-current signals. This separation ensures that high-power components and low-power control circuits do not interfere with each other.
SMD Components: All components, including LEDs and passive components, will be surface-mounted to reduce the size and cost of the PCB while improving manufacturability.
External Wiring for High-Current Paths: The current sensing board will use either thick copper tracks or external cables for the high-current signals, ensuring safe operation under heavy load.
---
Conclusion
This three-phase 400V solar power export limiter and energy diversion system efficiently controls how much power is exported to the grid while ensuring that surplus solar energy is redirected to local DC loads. By utilizing off-the-shelf components, including MOSFET modules and current sensors, the system remains cost-effective, scalable, and easy to maintain. The modular design allows for easy upgrades and expansions, making this system versatile for a wide range of solar energy management applications.