This project aims to create a floating solar panel with light tracking capabilities, utilizing Arduino and servo motors to adjust the panel orientation for optimal light capture. The system is designed for ocean deployment, with built-in sensors to detect environmental changes and protect the setup from marine hazards.
The floating solar panel system is designed to maximize energy generation by adjusting the solar panel orientation based on light intensity detected by sensors. This system includes:
- Dual Servo Motors for independent adjustments to optimize light capture on both the upper and lower panels.
- Light Sensors to detect light intensity at different angles and determine optimal panel positioning.
- Environmental Protection features to detect weather changes and adapt the system accordingly.
- Light Tracking: Automatically adjusts the solar panel's position based on detected light levels for efficient energy capture.
- Marine Protection: With sensors detecting environmental factors, the panel can react to severe conditions like high waves or storms.
- Modular Design: Designed for adaptability, allowing for future enhancements such as Fresnel lenses for concentrated light, marine life-safe garbage collection beneath the panel, and protection against saltwater and tides.
- Arduino Uno: Microcontroller to manage sensor inputs and servo outputs.
- Servo Motors (
upperServoandlowerServo): Used to adjust the panel position based on light sensor readings. - Light Sensors (
A0,A1,A2,A3): Detect light intensity from different angles, feeding data to the Arduino to determine optimal panel orientation. - Additional Sensors: This setup is adaptable to integrate sensors for natural calamity detection, such as ultrasonic sensors for waves and temperature/humidity sensors for weather changes.
The main code controls the servos based on sensor readings:
- Sensor Reading: Reads values from four analog light sensors.
- Comparison Logic: Compares sensor readings to determine the brighter direction.
- Servo Control: Adjusts the servos to point the panel towards the optimal light direction.
#include <Servo.h>
// Servo and position setup
Servo upperServo;
Servo lowerServo;
int errorMargin = 5;
int upperServoPos = 90;
int lowerServoPos = 90;
void setup() {
Serial.begin(9600);
upperServo.attach(9);
lowerServo.attach(11);
upperServo.write(upperServoPos);
lowerServo.write(lowerServoPos);
delay(200);
}
void loop() {
int sensorReading0 = analogRead(A0);
int sensorReading1 = analogRead(A1);
int sensorReading2 = analogRead(A2);
int sensorReading3 = analogRead(A3);
int diff1 = abs(sensorReading0 - sensorReading1);
int diff2 = abs(sensorReading2 - sensorReading3);
// Adjust upper servo
if (diff1 > errorMargin) {
if (sensorReading0 > sensorReading1 && upperServoPos > 0) {
upperServoPos--;
upperServo.write(upperServoPos);
} else if (sensorReading0 < sensorReading1 && upperServoPos < 180) {
upperServoPos++;
upperServo.write(upperServoPos);
}
}
// Adjust lower servo
if (diff2 > errorMargin) {
if (sensorReading2 > sensorReading3 && lowerServoPos < 180) {
lowerServoPos++;
lowerServo.write(lowerServoPos);
} else if (sensorReading2 < sensorReading3 && lowerServoPos > 0) {
lowerServoPos--;
lowerServo.write(lowerServoPos);
}
}
delay(200);
}- Setup: Attach the servos to the Arduino pins (9 and 11). Connect light sensors to analog pins
A0throughA3. - Power On: Power the Arduino and upload the code.
- Monitor and Adjust: Observe the serial output to monitor sensor readings and servo positions. Adjust error margin or servo limits as needed.
- Calamity Detection: Incorporate sensors to detect environmental changes like tides or potential storms.
- Garbage Collection: Attach a system below the solar panel to separate marine life from waste.
- Light Concentration: Add Fresnel lenses or mirrors for enhanced solar intensity.
- Protection Mechanisms: Design saltwater and tidal protection for the long-term durability of the system.
- Servo Not Moving: Ensure the servo positions stay within the 0-180 degree range.
- Erratic Servo Movement: Check the sensor values and make sure they are within a valid range. Adjust
errorMarginif minor fluctuations cause constant adjustments.
This project is open-source and can be modified or distributed as needed.