Skip to content

Latest commit

 

History

History
84 lines (72 loc) · 4.85 KB

File metadata and controls

84 lines (72 loc) · 4.85 KB
title System Integration
project Solar-Doctor
phase 13 - System Integration
status INTEGRATING
tags
Integration
FullStack
Testing
Debugging
aliases
Phase 13 Integration
Full System Test
date 2025-11-22
owner mr.princetheprogrammerbtw

PHASE 13: SYSTEM INTEGRATION

Closing the Loop: From Sun to Server.

13.1 The Integration Workflow (Step-by-Step)

Integration should be performed incrementally to isolate and identify issues efficiently.

Step 1: Field Test (Node ↔ Node)

  • Setup:
    1. Power up Node A (Slave) using its dedicated battery or solar supply.
    2. Power up Node B (Master) and connect it to a laptop via USB.
  • Verification:
    1. Open the Serial Monitor on Node B.
    2. Simulate a fault by shading Node A's sensor.
    3. Expected Outcome: Node B should print a JSON message indicating the fault (e.g., {"id":1, "fault":true}).
  • Success Condition: The mesh network is confirmed to be operational.

Step 2: Edge Test (Master ↔ Server)

  • Setup:
    1. Ensure all Docker containers (Node-RED, InfluxDB, Grafana) are running.
    2. Verify that Node B (Master) is connected to the correct COM Port configured in Node-RED.
  • Verification:
    1. Observe the Node-RED debug window.
    2. Expected Outcome: msg.payload objects should be arriving at the configured interval (e.g., every 5 seconds).
  • Success Condition: The serial-to-server data bridge is working correctly.

Step 3: Cloud Test (Server ↔ Dashboard)

  • Setup: Open the Grafana dashboard in a web browser.
  • Verification:
    1. Simulate a fault on Node A again.
    2. Expected Outcome: The "Live Power Output" gauge in Grafana should reflect a drop in power, and the "String Health Status" text for Node A should change to "CRITICAL FAULT".
  • Success Condition: The full data pipeline from the sensor to the dashboard is active and accurate.

Step 4: Actuation Test (Physical Bypass)

  • Setup:
    1. Connect the MOSFET output to a real load (e.g., a 12V lamp) to visually confirm physical actuation.
  • Verification:
    1. Trigger a fault condition (e.g., shade Node A).
    2. Observation:
      • The connected lamp should remain illuminated (or change intensity depending on the bypass wiring).
      • The Red LED on the PCB should light up, indicating bypass activation.
      • The mobile application (if configured) should display a "Bypass Active" alert.
  • Success Condition: The physical hardware is responding correctly to the digital logic and control signals.

13.2 Troubleshooting Common Issues

  • Issue: "Lag" in Data Update: App or dashboard updates with a significant delay.
    • Fix:
      • Review Node-RED's "Serial In" node settings; reducing the buffer size can improve real-time processing.
      • Adjust the ESP-NOW transmission interval in the slave firmware (e.g., change from 5000ms to 1000ms for faster updates during demonstrations).
  • Issue: "Ghost Faults": The system triggers bypass randomly without an apparent fault.
    • Fix: Refine the AI confidence threshold in the firmware (e.g., increase from 0.8 to 0.9) to reduce false positives.
  • Issue: "Data Freeze": Grafana graphs stop updating.
    • Fix: Restart the Docker containers (docker-compose restart). This can occur due to intermittent USB connection issues between the Master ESP32 and the server.

13.3 The "Golden Demo" Script

A rehearsed demonstration script is crucial for a smooth and impactful presentation.

  1. 0:00: Begin by showcasing the system in a normal operating state (green LEDs, Grafana dashboard displaying stable, healthy data).
  2. 0:10: Announce the simulation: "Sir, I will now simulate a bird dropping causing a shading event on Panel A." (Proceed to cover the sensor on Node A).
  3. 0:12: Highlight the physical response: The bypass mechanism should audibly click (if using a relay, otherwise confirm MOSFET activation) and the associated Red LED on the PCB should illuminate.
  4. 0:15: Direct attention to the dashboard: "As you can see on Grafana, the system instantly detected the fault, and the power output for Panel A has dropped, while the status indicates a critical fault."
  5. 0:20: Remove the cover: The system should automatically recover, and the dashboard should reflect the return to normal operation.

Phase 13 Checklist

  • Verified the Mesh Link communication (Slave to Master).
  • Verified the Serial Bridge between the Master ESP32 and Node-RED.
  • Verified successful data storage in InfluxDB.
  • Verified correct data visualization in Grafana.
  • Validated physical switching action (MOSFET/lamp).
  • Rehearsed the full demonstration sequence multiple times.

The entire system is now integrated and performing as designed, ready for demonstration.

[[14_Testing_and_Calibration]]