Mastodon Politics, Power, and Science: Solar-Assisted Smart UPS & Thermal Management Hub

Monday, August 10, 2026

Solar-Assisted Smart UPS & Thermal Management Hub

 J. Rogers, SE Ohio

Design Document: Project Author: 

Design Framework: Data-directed topological control system (Open-SCAD modeled)

1. System Objective

To design and build a self-sustaining, microgrid backup power node. The system physically houses a UPS and a 12V solar battery in a custom 3D-printed enclosure. It actively manages thermal loads via continuous PWM control, monitors electrical state-space (voltage, current, temperature), and uses WiFi to execute smart load-shedding protocols to protect the battery from deep discharge, over-current, and thermal runaway.

This will redirect e-waste in the form of perfectly good ups devices that just have bad batteries. 

2. Physical Architecture (The Nodes)

The hardware consists of a unified 12V power rail with a microcontroller acting as the central router.

  • Power Source: 12V Solar Battery.
  • Solar Input: Solar panel routed through an external PWM (or Boost) charge controller to maintain the battery without grid power.
  • Load: UPS unit (housed inside the enclosure) and external WiFi-enabled devices.
  • Cooling: 120mm, 12V low-amp fan.
  • Actuator (The Intercept): 24V-rated digital solid-state relay. Driven by a 5V PWM signal to continuously scale the 12V power to the fan.
  • Controller: ESP32 (or Arduino with WiFi capability). Acts as the central state machine.
  • Sensors (Input Functors):
    • Temperature: DS18B20 waterproof digital sensor (taped to battery/UPS).
    • Electrical: INA219 high-side current/voltage sensors. One on the main battery discharge cable; one on the solar input cable (optional, for net-flow monitoring).

3. Control Logic (The Data-Directed Flow)

The microcontroller evaluates a multi-dimensional state-space (Amps + Temp + Volts) to determine the system's actions.

A. Continuous Thermal Mapping (PWM Fan Control)

The fan does not use binary on/off logic. It uses a continuous mapping function. The controller takes the maximum of two predictive/reactive values to determine PWM duty cycle (0-255):

  • Predictive (Amperage): Maps battery discharge current to fan speed. If amps spike, fan ramps up immediately before heat accumulates.
  • Reactive (Temperature): Maps actual thermal readings to fan speed.
  • Logic: PWM_Speed = max(MapAmps, MapTemp), constrained to minimum/maximum safe fan operating limits.

B. Smart Load-Shedding Protocol (WiFi/MQTT)

If the system detects a decline in battery voltage, it gracefully lowers power draw across the network before hitting critical failure.

  • State 1 (Normal): Voltage > 12.5V. System runs normally.
  • State 2 (Warning): Voltage ≤ 12.0V. Controller publishes a "grid_warning" signal over WiFi. Remote smart-plugs/relays receive this and shut off non-essential loads.
  • State 3 (Critical): Voltage ≤ 11.5V OR Temp > 60°C OR Amps > Max Limit. Hardware kill relay is triggered to sever power entirely and protect the core.

4. Mechanical Design (OpenSCAD Enclosure)

The case will be modeled parametrically in OpenSCAD using a projection ontology (defining the topology via mathematical functions and boolean operations).

  • Material: PETG or ASA (for higher glass-transition temperatures suitable for electronics/battery heat).
  • Airflow Topology: Directed tunnel. 120mm fan mounted on one end as intake (or exhaust). Opposite end features a parametric ventilation grid (for loop of cylinders subtracted from the wall) to ensure no dead-zones for heat pooling.
  • Component Mounting:
    • Base: Custom recess to strap/seat the 12V solar battery.
    • Tier 2: Elevated platform with standoffs for the UPS to sit above the battery, allowing airflow underneath.
    • Side Rails: Slotted rails to slide in the ESP32, INA219 sensors, and the digital relay modules without requiring additional screws.
  • Cable Routing: Dedicated physical channels to separate the high-amp 12V battery lines from the 5V sensor/data lines, minimizing electromagnetic interference.

5. Prioritized Load-Shedding Topology (Staged Shutdown)

Instead of relying on a single binary kill switch or vulnerable WiFi signals to remote plugs, the hub utilizes a hardwired, prioritized relay bank. This transforms system degradation from a sudden cliff drop into a graceful, topological pruning. The microcontroller evaluates the battery’s state-of-charge (voltage) and discharge rate (amps) to systematically sever low-priority circuits, preserving core functionality for as long as possible.

Hardware Implementation: An array of solid-state digital relays mounted on a custom OpenSCAD-designed rail inside the enclosure. The main 12V battery bus runs across the top, and each relay acts as a localized intercept valve for an individual output circuit.

Staged Logic Matrix:

  • Stage 0 (Normal): Voltage > 12.4V. All relays closed. Full topology intact.
  • Stage 1 (Warning): Voltage ≤ 12.2V OR sustained high amperage. Controller opens Relay 1 (Non-essential loads: e.g., convenience lighting, secondary monitors).
  • Stage 2 (Conservation): Voltage ≤ 12.0V. Controller opens Relay 2 (Secondary networking, non-critical hubs).
  • Stage 3 (Critical): Voltage ≤ 11.8V. Controller opens Relay 3 (Auxiliary DC-DC converters, secondary computing).
  • Stage 4 (Core Protection): Voltage ≤ 11.5V OR Temp > 60°C. Controller opens Relay 4. Total severance. The battery is protected from deep-discharge damage.

System Advantage: This physical architecture guarantees load-shedding even if the WiFi network goes down. The priority weighting is embedded in the physical wiring itself.

6. DC-First House Control Center (Eliminating AC Wall Warts)

Standard backup power systems wastefully invert 12V DC up to 120V/240V AC, just so individual devices can use bulky "wall warts" to step it back down to 5V, 9V, or 12V DC. This double-conversion introduces massive inefficiencies, idle power draw, and points of failure.

The hub operates as a DC-First topology. By running dedicated DC voltage rails directly from the battery, we bypass the AC inversion entirely for modern, native-DC electronics (routers, switches, microcontrollers, USB-C devices).

Voltage Rails & Buck/Boost Topologies:

  • The 12V Rail (Native Direct): Routers, the house's raspberry pi, network switches, LED lighting, and the 120mm cooling fan pull directly from the battery via the staged relay bank. No conversion loss.
  • The 5V/USB Rail (High-Efficiency Buck): A dedicated 12V-to-5V step-down buck converter (e.g., 5A or 10A rated) powers standard USB devices, microcontrollers (ESP32/Arduino), and sensor buses. This eliminates a dozen individual 5V wall warts, replacing them with one highly efficient, centrally cooled converter.
  • The USB-C PD Rail (Smart Negotiation): Modern devices (laptops, tablets, advanced networking gear) use USB-C Power Delivery, which requires up to 20V. By integrating a USB-C PD decoy/trigger board (or a smart buck-boost module), the system negotiates directly with the plugged-in device.
    • Mechanism: The PD module asks the device what voltage it needs (9V, 15V, or 20V), and automatically scales the 12V battery output to match.

Integration with OpenSCAD Enclosure: The 3D printed case is designed with a "DC Distribution Bay."

  • The buck converters and PD modules are mounted on parametric sliding rails directly above the battery.
  • They are positioned within the airflow tunnel of the 120mm fan, ensuring the inductors and MOSFETs in the converters remain perfectly cooled under load.
  • Cable management channels separate the high-amp 12V direct lines from the sensitive 5V data lines, preventing electromagnetic interference.

System Advantage: By eliminating the AC inversion cycle and consolidating DC conversion, the system's idle power draw drops by up to 30%. When the grid fails, the battery isn't wasting energy fighting physics just to keep a router powered; it routes the power topologically, with minimal loss, directly to the load.

5. Next Steps for Implementation

  1. Hardware Procurement: Acquire ESP32, INA219 sensors, DS18B20, solid-state relay, and 12V PWM solar charge controller.
  2. OpenSCAD Drafting: Write the parametric script for the enclosure based on the measured dimensions of the specific UPS and 12V battery.
  3. Firmware Flashing: Write the Arduino IDE code for the ESP32 to handle the I2C sensor polling, PWM output, and WiFi/MQTT publishing.
  4. 3D Printing: Slice the OpenSCAD .stl file in a slicer (e.g., Cura/PrusaSlicer) and print in PETG/ASA.

No comments:

Post a Comment

The Kinematic Pin: Replacing the Ontology of Intrinsic Stuff with an Energy-Velocity Coupling Constraint

  J. Rogers, SE Ohio Abstract The elimination of  v = 0  as a physically attainable state and the recognition of the classical regime as a m...