HOME INTRO AI-ANN CONVENTIONAL FIXED API SUITE MATRIX SPECS HUB

SolarCore Hub

Comprehensive ecosystem for initializing, configuring, and deploying Intelligent Solar Control Hubs.

1
Initial Infrastructure

Hardware Initialization

ESP32 Firmware Flash
Upload the core firmware bundle to the ESP32. Ensure the following pins are correctly mapped in your config.h:
  • MPU6050 (I2C): SDA (21), SCL (22)
  • LDR Array: A0, A3, A4, A5 (Analog)
  • Motor Control: PWM Pins 18, 19, 23 (Azimuth/Elevation)
Raspberry Pi Setup
For AI-ANN enabled hubs, install the SolarCore Linux environment:
sudo apt update && sudo apt install python3-pip flask
pip install tensorflow-lite numpy requests
Network Provisioning
Configure LAN/Wi-Fi credentials. The system will attempt connection on boot. Fallback: If connection fails, the hub enters Offline Mode utilizing local LDR/RTC data.
Hardware Infrastructure Registry
Core variables and system logic parameters tracked within the hardware layer:

MPU Current Angle

Bi-directional XYZ vector tracking. Supports both hardware feedback (output) and manual angle injection (input) for remote operation.

LDR 1-4 Intensity

Quadrant light percentage fusion

Current Voltage

Real-time bus power monitoring

Active Session Logs

Real-time green-coded event stream tracking hardware commands & sensor deltas.

Geolocation Lat/Lon Lock

Global coordinate registry

Cloud & Precipitation Sync

Weather hourly logic fetch

Static Gyro Offset Baseline

MPU calibration profile

MPU vectors per hour sweep

Sun Path Analysis

NTP High-Precision Sync

Time & Date sync

Anomaly Detection Reference

Humid & Temp monitoring

Logic engine status check

AI Analysis engine

WiFi SSID

Network connectivity target

Sunrise & Sunset

Daylight boundary timing

Dual Bridge Connectivity
The Hub utilizes a prioritized dual-path communication strategy to maintain hardware links:
  • Method 2 (Registry LAN): The primary bridge. Searches for the device's registered IP in database.db on the local network.
  • Method 1 (Direct AP): The emergency fallback. If the registry IP is unreachable, the system prompts a bridge via the Tracker's Direct WiFi Hotspot (192.168.4.1).
2
Discovery & Registry

Controller Configuration

Local Config Loading
The system reads config.json from SPIFFS (ESP32) or local storage (Pi). Key parameters include Geolocation, Timezone, WiFi SSID/Password, and MPU orientation offsets.
Motion Calibration Table
Define the 9-point reference grid for the specific panel installation:
ID Compass Point X (Azimuth) Y (Elevation)
1Center00
2North045
3North East3232
4East450
5South East32-32
6South0-45
7South West-32-32
8West-450
9North West-3232
IP Registration
The hub retrieves its dynamic IP and registers with the Central Registry. This allows the Dashboard to tunnel into the local control WebSocket.
3
Real-time Logic

Online Mode Operations

Predictive Fetching
The hub pulls data at intervals defined in the local config (e.g., every 60m):
  • Dynamic Intervals: Hub fetches frequency and API endpoint links from config.json.
  • Payloads: Weather Forecast, Sun Azimuth, and Elevation.
Weather Forecast Sun Azimuth Sun Elevation
Telemetry Persistence & Accuracy
X/Y Angles, Voltages, and LDR deltas are logged to local storage. Syncing & Mirroring ensures data safety: since offline trackers delete old logs when storage is full, the Hub proactively mirrors telemetry to guarantee a permanent system audit trail.
Current Angle SPA Process
Utilizes the Unified SPA API for high-precision solar positioning. In Online Mode, the MPU assist calculates currently sent vectors, creating hourly target angles between sunrise and sunset. Unlike Offline Mode which uses "last known" data (yesterday), Online SPA is refreshed every date to ensure peak seasonal alignment.
Manual Angle Override
Allows operators to bypass autonomous tracking and Manual Set the Current Angle (X and Y) at will via the dashboard. This converts the system into a remote-controlled panel for specific orientation tasks or emergency positioning.
MPU Assist (Pattern Engine)
The MPU Assist utilizes the current geolocated coordinates to calculate sunrise and sunset times. It generates a series of hourly MPU target angles derived from the Basic SPA model. In Online Mode, this calculation is performed fresh daily, ensuring the tracker has the latest seasonal vector path without relying on historical "learned" data.
Hub Intelligence & Safety Alerts
Exclusive to the ANN Variant in Online Mode, this autonomous system is integrated with Fail-Safe protocols to monitor mechanical integrity. While the basic Voltage Watchdog is universal to all hardware, only ANN Hubs trigger these smart alerts:
  • Mechanical Stuck: Motor active but no MPU change detected.
  • Target Not Reached: Alignment failure after max adjustment cycles.
  • Emergency Dispatch: Hardware overrides during critical failures.
Online Feature Scaling
A breakdown of how each variant performs when connected to the SkyLink API:
Variant Online Enhancement Operational Logic
FIXED MPU Assist API retrieves coordinates -> Checks Database Pattern lookup -> Generates recalibration angles based on live Sun Rise/Set.
CONVENTIONAL LDR Follow Mode Initially uses MPU Assists -> LDR Follow Mode Engine -> Logs successful vectors to ANN Dataset for future pattern learning.
ANN AI Analysis Engine Predictions based on Weather API + Accuracy logs -> Adjusts MPU vectors even when cloudy to maintain peak hypothetical output.
Hub Intelligence Alerts
Autonomous notification system triggered by Weather AI Analysis and mechanical state checks:
  • Mechanical Stuck: Triggered if the motor is active but a change in MPU angle is not detected.
  • Target Not Reached: Fired if the panel fails to align within the error margin after maximum adjustment cycles.
  • Weather Warnings: Notifications based on Rain/Storm predictions from the online suite.
4
Autonomous Operation

Offline Operation Modes

Current Angle SPA Process
Standard Basic SPA Cycle calculations performed locally using geocoordinates. In this mode, the system relies on Last Known Good data (e.g., yesterday's sun path) if a new daily update cannot be fetched via API.
LDR Follow Mode Engine
This engine operates independently of the API, allowing the controller to track light using local sensors.
Logic Path: Starts from Predicted Sunrise -> Scans for best LDR Delta (Min 90% threshold) -> Continuously tracks until Sunset Edge.
  • Normal Mode: Maintain >90% detected light intensity relative to the predicted SPA vector.
  • Cloudy Fallback: If light falls <90%, orient to the highest detected light specifically near the current drift angle to stay on the Sun's path.
  • Aggressive Mode: A high-sensitivity state where the controller follows the absolute brightest light source detected, regardless of the current predicted solar angle.
ANN Offline Dataset Prediction
For ANN variants, the system performs "Incremental Learning" by eating previous datasets. It utilizes high-accuracy tracking data logged during **Conventional Mode** to generate future weight predictions even while offline.
ANN DATASET FETCHED FROM CONVENTIONAL
Hour LDR Diff MPU X/Y Acc % Az/El
9:002335.2 / 20.197%110 / 34
10:00236.0 / 22.588%120 / 42
11:00137.1 / 23.085%130 / 50
Telemetry & Accuracy Tracking
Focuses on Local Buffering and Accuracy Scoring. Logs stored in circular buffers are processed against internal LDR peak intensities to determine performance metrics.
Self-Calibration & Safety
The core Fail-Safe & Watchdog system. Features RTC Cycling, Safe Tilt Cycles for logical conflicts, and hardware stall protection.
5
Fail-Safe

Connectivity Fallback

Connectivity Watchdog
If the API heartbeat is lost for >10 mins, the hub reverts to Fallback Mode.
Time-of-Day Cycling
Uses internal RTC to estimate sun position based on the seasonal table:
  • Morning: Positive Y (East focus)
  • Midday: Y ≈ 0 (Zenith focus)
  • Evening: Negative Y (West focus)
6
Architecture Delta

Variant Comparison Matrix

Category FIXED FIXED ONLINE CONVENTIONAL CONV. ONLINE ANN ANN ONLINE
Current Angle SPA Process SPA SPA SPA + LDR Follow Mode SPA + LDR Follow Mode + MPU Assist ANN Integrated SPA + LDR Follow Mode ANN Integrated SPA + MPU Assist + LDR Follow Mode
LDR Follow Mode Engine Disabled Disabled Enabled Enabled Enabled Enabled
Manual Override Disabled Enabled Disabled Enabled Enabled Enabled
Telemetry & Accuracy Tracking Local Buffer Logs API Mirroring Accuracy Scoring Logs API Mirroring Dataset Persistence Logs API Mirroring
Fail-Safe & Watchdog Voltage Watchdog Voltage Watchdog Voltage Watchdog Voltage Watchdog Voltage Watchdog Voltage Watchdog + Safety Alerts