Energy Storage Dispatch System Prototype

Develop a real-time energy storage dispatch system for residential microgrids to optimally integrate renewable energy with battery storage, reduce grid dependence, and minimize energy costs while maintaining power quality. so i want to make a prototype for this i want you to tell me what equipment will be needed and how do i do it. Also along with the entire list of components required for the project also give me the schematic and circuit diagram for the same.
I created a complete prototype guide with the required equipment, component list, build procedure, control logic, and block-level schematic/circuit diagrams. Full details are in the Residential Microgrid Energy Storage Dispatch Prototype Plan project file.
Add controller components
Create prototype schematic
Search required parts
Create prototype BOM
Use 12V prototype
No schematic yet

Talk to Flux to get started.

Refine this doc
Ask about this doc
Residential Microgrid Energy Storage Dispatch Prototype Plan
1. Goal
Build a safe, low-voltage prototype of a real-time residential microgrid energy storage dispatch system. The prototype should monitor renewable generation, battery state, grid availability, and load demand, then decide when to charge or discharge the battery to reduce grid dependence and energy cost while maintaining stable DC-bus power quality.
Important: For a student prototype, keep the power stage low-voltage DC, for example 12 V or 24 V. Do not directly switch household AC mains unless supervised by a qualified person and using certified protection hardware.

Diagram


"Solar Panel or DC Source" "MPPT or Solar Charge Controller" "12V or node_24V DC Bus" "Battery Pack with BMS" "Bidirectional Battery Converter or Charge Discharge Path" "Grid Adapter or Bench Supply" "Grid Input Switch" "Load Switching and Protection" "DC Loads" "Voltage Current Temperature Sensors" "Controller MCU" "WiFi Dashboard or PC Logger"
3. Equipment Needed
Lab and power equipment

Table


ItemPurposeNotes
Adjustable DC bench power supplySimulates solar panel or grid inputCurrent-limited supply preferred
Small solar panel, 20 W to 100 WRenewable input sourceOptional if bench supply is used first
12 V or 24 V battery packEnergy storageUse a pack with built-in BMS
Electronic DC load or resistor load bankSimulates residential loadUse lamps, power resistors, or DC electronic load
Digital multimeterVoltage and continuity checksMinimum required test equipment
OscilloscopePower quality checksUsed for ripple, switching noise, transients
USB serial adapter or debuggerFirmware upload and loggingDepends on chosen MCU board
Fuses and emergency disconnectSafetyUse on battery and supply inputs
4. Prototype Component List
Control and communication

Table


BlockComponentQuantityPurpose
Main controllerESP32, STM32, Arduino-compatible MCU, or Raspberry Pi Pico W1Runs dispatch algorithm and telemetry
CommunicationBuilt-in WiFi or external UART WiFi/Bluetooth module1Dashboard and data logging
RTC moduleDS3231 or equivalent RTC module1Time-of-use scheduling and timestamping
Display, optionalOLED or LCD module1Local status display
Buttons, optionalMomentary push buttons2-4Manual mode and reset inputs
Status indicatorsLEDs with resistors3-6Solar, battery, grid, load, fault status
Sensing

Table


BlockComponentQuantityPurpose
PV voltage sensingResistor divider plus RC filter1Measures solar/DC source voltage
Battery voltage sensingResistor divider plus RC filter1Measures battery voltage
DC bus voltage sensingResistor divider plus RC filter1Monitors power quality
PV current sensingHall current sensor or shunt current monitor1Measures renewable input power
Battery current sensingBidirectional current sensor1Measures charge/discharge current
Load current sensingCurrent sensor1Measures load demand
Battery temperatureNTC thermistor or digital temperature sensor1Safety and battery derating
Power stage

Table


BlockComponentQuantityPurpose
Solar front endMPPT charge controller module1Converts solar input to battery/DC bus charging
Battery protectionBattery pack with BMS1Overcharge, overdischarge, short protection
Battery switchLogic-level MOSFET switch or DC relay module1Enables/disables battery discharge path
Grid/supply switchDC relay module or MOSFET switch1Enables/disables grid adapter input
Load switchMOSFET switch or relay module1-3Priority load control
DC-DC regulatorBuck converter to 5 V1Powers controller and sensors
3.3 V regulatorLDO or buck regulator1Powers MCU if needed
Bulk capacitorsElectrolytic capacitors2-4DC-bus energy buffering
Decoupling capacitors100 nF and 10 uF capacitorsManyLocal IC power filtering
ProtectionFuses, TVS diode, reverse polarity protectionAs neededSafety and transient protection
ConnectorsScrew terminals or XT connectorsAs neededPV, battery, grid adapter, load connections
Software and data

Table


ItemPurpose
Arduino IDE, PlatformIO, STM32CubeIDE, or MicroPythonFirmware development
Python or Node-RED dashboardMonitoring and logging
MQTT broker or serial loggerTelemetry transport
CSV loggingEnergy and cost analysis
5. Main Electrical Blocks
A. Power inputs
Use three low-voltage inputs:
  1. Renewable input: solar panel or current-limited bench supply.
  2. Battery input: 12 V or 24 V battery with BMS.
  3. Grid input: isolated AC-DC adapter or bench supply representing grid backup.
The grid input in the prototype should be a safe DC adapter, not direct AC mains.
B. DC bus
The DC bus is the central node. PV, battery, and grid adapter all feed this bus through controlled/protected paths. Loads are powered from this bus.
Recommended prototype bus voltage:
  • Beginner-safe: 12 V DC
  • More realistic but still manageable: 24 V DC
C. Sensor interface circuit
For each voltage measurement, use:
  • High-side resistor from measured rail to ADC input
  • Low-side resistor from ADC input to ground
  • Small capacitor from ADC input to ground for noise filtering
  • Optional Schottky or TVS clamp for ADC protection
Example for a 12 V system using a 3.3 V ADC:
  • Rtop: 100 kOhm
  • Rbottom: 27 kOhm
  • ADC voltage at 15 V input: about 3.19 V
  • Filter capacitor: 100 nF from ADC node to GND
For current measurement, use isolated Hall sensors for simplicity and safety, or shunt monitors for better accuracy.
D. Switching circuit
Use MOSFET modules or relay modules at first. If designing a custom PCB later:
  • Use logic-level N-channel MOSFETs for low-side switching of DC loads.
  • Use high-side switches or relays for source selection.
  • Add flyback diodes across relay coils.
  • Add gate resistors and pull-down resistors on MOSFET gates.
  • Fuse the battery path.
E. Controller circuit
The MCU reads:
  • PV voltage and current
  • Battery voltage and current
  • Load voltage and current
  • Battery temperature
  • Grid adapter availability
The MCU controls:
  • Battery charge/discharge enable
  • Grid input enable
  • Load priority switches
  • Status LEDs
  • Communication dashboard
6. Simplified Schematic Connections
This is a block-level circuit diagram suitable for the first prototype. It is not a final production schematic.

Diagram


"J1 PV Input node_12V to node_24V" "F1 PV Fuse" "MPPT Charge Module" "DC Bus" "J2 Battery Pack with BMS" "F2 Battery Fuse" "Battery Current Sensor" "Battery MOSFET or Relay Switch" "J3 Isolated DC Grid Adapter" "F3 Grid Fuse" "Grid MOSFET or Relay Switch" "5V Buck Regulator" "3.3V Regulator" "MCU Controller" "Load Current Sensor" "Load MOSFET or Relay" "J4 DC Load Output" "Bus Voltage Divider" "Battery Voltage Divider" "PV Voltage Divider"
7. Dispatch Control Logic
Use a simple rule-based algorithm first, then upgrade to optimization.
Inputs
  • PV power: P_pv = V_pv * I_pv
  • Load power: P_load = V_bus * I_load
  • Battery power: P_batt = V_batt * I_batt
  • Battery state of charge estimate
  • Time-of-use electricity price
  • Grid availability
  • Battery temperature
Basic rule-based dispatch
  1. If PV power is greater than load demand:
    • Supply load from PV.
    • Charge battery if battery is not full.
    • Disconnect grid input.
  2. If PV power is less than load demand and battery state of charge is healthy:
    • Use battery to support the load.
    • Keep grid disconnected unless bus voltage falls.
  3. If battery state of charge is low:
    • Disable battery discharge.
    • Use grid adapter to supply load.
  4. If electricity price is low:
    • Optionally charge battery from grid.
  5. If electricity price is high:
    • Prefer PV and battery.
  6. If bus voltage is unstable:
    • Shed noncritical loads.
    • Enable grid backup.
Example pseudocode

Text


loop every 1 second:
    read voltages, currents, temperature
    calculate PV power, load power, battery SOC

    if fault detected:
        disconnect battery discharge
        disconnect noncritical loads
        enable safe mode

    else if PV_power > load_power:
        grid_switch = OFF
        load_switch = ON
        battery_charge = ON if SOC < 95 percent

    else if SOC > 30 percent and battery_temperature_ok:
        grid_switch = OFF
        battery_discharge = ON
        load_switch = ON

    else:
        battery_discharge = OFF
        grid_switch = ON
        load_switch = ON

    log data
    update dashboard
8. Power Quality Measurements
To demonstrate power quality, measure:

Table


MetricHow to check
DC bus voltage regulationMeasure bus voltage under load changes
Ripple voltageUse oscilloscope AC coupling across DC bus
Load transient responseSwitch load on/off and observe voltage dip
Source transition timeSwitch between PV, battery, and grid input
Protection behaviorTest low battery cutoff and overcurrent response
9. Build Procedure
Phase 1: Simulation and bench prototype
  1. Define bus voltage, battery voltage, and load power.
  2. Build the controller on a breadboard or development board.
  3. Use bench supplies instead of real solar and battery initially.
  4. Connect voltage dividers to ADC pins.
  5. Connect current sensors.
  6. Add relay or MOSFET modules for switching.
  7. Write firmware to read sensors and log data.
  8. Implement manual switching mode.
  9. Implement automatic rule-based dispatch.
  10. Test with small DC loads.
Phase 2: Renewable and battery integration
  1. Add solar panel or solar simulator input.
  2. Add MPPT charge controller.
  3. Add battery pack with BMS.
  4. Add fuses and emergency disconnect.
  5. Test charge and discharge separately.
  6. Verify battery never charges/discharges outside safe limits.
Phase 3: Optimization
  1. Add electricity price schedule.
  2. Add forecast input, such as expected PV generation or load demand.
  3. Implement a cost function:
    • Minimize grid energy cost
    • Penalize battery overuse
    • Penalize bus voltage deviation
    • Keep reserve battery SOC
  4. Compare rule-based control vs optimized control.
Phase 4: PCB
  1. Convert the prototype circuit into a schematic.
  2. Select exact MPNs and read datasheets for each IC/module.
  3. Add footprints, protection, and connectors.
  4. Set PCB stackup and design rules.
  5. Place power components close together.
  6. Keep high-current paths short and wide.
  7. Separate noisy switching nodes from ADC sensing traces.
  8. Run ERC/DRC.
  9. Export Gerbers, BOM, and pick-and-place files.
10. Suggested Demonstration Scenarios

Table


ScenarioExpected behavior
Sunny, low loadPV powers load and charges battery
Cloudy, medium loadBattery supports load
Battery lowGrid adapter powers load
High grid priceBattery preferred if SOC is sufficient
Sudden load increaseBus remains stable or grid backup turns on
Fault or overcurrentLoad disconnects safely
11. Notes Before Creating the Actual Flux Schematic
To create an actual production-style schematic in Flux, the next design inputs are needed:
  1. DC bus voltage: 12 V or 24 V.
  2. Maximum load power: for example 20 W, 50 W, or 100 W.
  3. Battery chemistry and voltage: for example 3S Li-ion, 4S LiFePO4, or 12 V lead-acid.
  4. Whether the prototype should use ready-made modules or custom IC-level circuits.
  5. Communication preference: WiFi, Bluetooth, USB serial, or no wireless.
  6. Whether the load output is DC only or you eventually need AC inverter integration.
For a beginner-safe student prototype, recommended starting point:
  • 12 V DC bus
  • 20 W to 50 W load
  • 12 V battery with built-in BMS
  • ESP32 or Arduino-class controller
  • Ready-made MPPT, buck, relay/MOSFET, and current-sensor modules
  • Custom PCB only for the controller, sensing, and signal-level switching first
  • 1. Goal

  • 2. Recommended Prototype Architecture

  • 3. Equipment Needed

  • Lab and power equipment

  • 4. Prototype Component List

  • Control and communication

  • Sensing

  • Power stage

  • Software and data

  • 5. Main Electrical Blocks

  • A. Power inputs

  • B. DC bus

  • C. Sensor interface circuit

  • D. Switching circuit

  • E. Controller circuit

  • 6. Simplified Schematic Connections

  • 7. Dispatch Control Logic

  • Inputs

  • Basic rule-based dispatch

  • Example pseudocode

  • 8. Power Quality Measurements

  • 9. Build Procedure

  • Phase 1: Simulation and bench prototype

  • Phase 2: Renewable and battery integration

  • Phase 3: Optimization

  • Phase 4: PCB

  • 10. Suggested Demonstration Scenarios

  • 11. Notes Before Creating the Actual Flux Schematic

Assets

Assets are files uploaded to this project which can be used in various ways.

555 LED Blinker thumbnail

Properties

Properties describe core aspects of the project.

Pricing & Availability

See prices from popular manufacturers for your project.

Controls