| title | System Integration | ||||
|---|---|---|---|---|---|
| project | Solar-Doctor | ||||
| phase | 13 - System Integration | ||||
| status | INTEGRATING | ||||
| tags |
|
||||
| aliases |
|
||||
| date | 2025-11-22 | ||||
| owner | mr.princetheprogrammerbtw |
Closing the Loop: From Sun to Server.
Integration should be performed incrementally to isolate and identify issues efficiently.
- Setup:
- Power up Node A (Slave) using its dedicated battery or solar supply.
- Power up Node B (Master) and connect it to a laptop via USB.
- Verification:
- Open the Serial Monitor on Node B.
- Simulate a fault by shading Node A's sensor.
- 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.
- Setup:
- Ensure all Docker containers (Node-RED, InfluxDB, Grafana) are running.
- Verify that Node B (Master) is connected to the correct COM Port configured in Node-RED.
- Verification:
- Observe the Node-RED debug window.
- Expected Outcome:
msg.payloadobjects should be arriving at the configured interval (e.g., every 5 seconds).
- Success Condition: The serial-to-server data bridge is working correctly.
- Setup: Open the Grafana dashboard in a web browser.
- Verification:
- Simulate a fault on Node A again.
- 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.
- Setup:
- Connect the MOSFET output to a real load (e.g., a 12V lamp) to visually confirm physical actuation.
- Verification:
- Trigger a fault condition (e.g., shade Node A).
- 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.
- 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).
- Fix:
- 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.
- Fix: Restart the Docker containers (
A rehearsed demonstration script is crucial for a smooth and impactful presentation.
- 0:00: Begin by showcasing the system in a normal operating state (green LEDs, Grafana dashboard displaying stable, healthy data).
- 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).
- 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.
- 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."
- 0:20: Remove the cover: The system should automatically recover, and the dashboard should reflect the return to normal operation.
- 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]]