The primary goal of the project is to build a system that tracks the sun for a solar panel, helping it get the most efficient energy throughout the day. The system uses light sensors to detect where the sunlight is strongest, and motors will then move the panel to follow that direction. The system uses light sensors to detect the direction of the strongest sunlight and automatically moves the solar panel to that position. This automatic mode is the core feature, ensuring the panel is always optimized for the best energy collection with minimal effort from the user.
I've actually done a version of this project before as part of my university coursework, but this time, I'm adding two modes: an automatic mode as the basic feature and a manual mode controlled via an Android app, which is more of a "nice-to-have" addition. The automatic mode ensures the solar panel moves on its own to track the sun, while the manual mode gives users more control, letting them adjust the panel’s position using a simple interface on their phone.
The First Part is a Base
that includes
-Arduino
-an ON/OFF Switch
a DC Jack
-2 bread board
-horizontal servo
I started by making another component inside the main component and I named it ''The Base''
at the beginning I started the 4 sides and connect them with Xslots together
Then I Projected the Top & Ground
I made 1 rectangle in the top face to mount the servo motor
and i made place for each component in its side
The second part is the Panel Holder
Which contains connector , Solar panel holder as shown in figure .
Software: 1- Fusion 360 2- RD Works V8
Machines : El Malky ML149
Materials : ply wood 3mm thickness.
Laser cutting Steps :
Save file as DXF from the shortcut imported in Fusion
2 .Color the design lines in Black based on the desired operation:
Black/cut:
Max. Speed: 40 , Power: 45 , Export the file and Save in a *.RLD format.
Set up the laser cutter machine:
I Placed the plywood sheet on the laser cutter bed and chose my origin point (where the nozzle will start from).
I watched the laser cutter to make sure it had been running correctly.
At the end, I picked up the item once it finished, then turned it off.
Circuit Wiring Diagram and Summary of the components onTinkerCad
The LDRs send data to the Arduino, which processes the input to determine the optimal panel direction.
The Arduino serves as the central processing unit, running the control logic based on the light sensor data.
The LCD display shows real-time feedback of the system, such as the Mode of the system
The servo motors receive signals from the Arduino and adjust the position of the solar panel, making the entire system smart and dynamic in tracking sunlight.
The power supply ensures all components function properly by providing the necessary voltage and current.
Components :
Arduino Uno
(Brain)
Acts as the control unit, processing inputs from sensors and controlling the servos.
LDR sensor Module
(Input)
Serve as input components, detecting sunlight intensity and sending data to the Arduino.
Servo Motors
(Action Component)
Function as action components, moving the solar panel based on signals from the Arduino.
LCD display I2C
(Output)
Display Messages for the user as Powering Up the system and the mode of the system
ON/OFF switch
(Input)
Controls the input power, allowing the user to turn the system on or off manually.
I selected a 5V, 2A power supply based on the power requirements of each component. THE micro servos typically need around 4.8-6V to function effectively. The LCD display also requires 5V for proper operation.
Ensuring that the power supply provides at least 2A of current is crucial, as the servos can draw significant current when moving, and I needed to avoid voltage drops or system instability.
I have selected a 9V adapter with a DC power connector and an on/off switch to control the flow of electricity to the Arduino board. The choice of 9 volts is based on the voltage range that can be safely applied to the Arduino UNO VIN pin, which is typically between 7 to 12V.
Averaging is used to smooth out the light readings from the LDRs. By taking the average of the readings from pairs of LDRs, the system can reduce noise and fluctuations caused by sudden changes in light intensity. This provides a more reliable input for decision-making in servo adjustments. For example:
The average of the top left and top right LDR readings helps determine if the light is more intense on the top side of the setup, prompting the vertical servo to adjust accordingly.
Pseudocode for the Project :
// Step 1: Set up the LCD and Servos
1. Include libraries for LCD and Servos
2. Initialize LCD with address 0x27
3. Initialize horizontal and vertical servos
4. Set the limits for servo movement
5. Turn on the LCD backlight and display "Solar Tracker ON"
6. Set initial positions for servos
Step 2: Continuously check light levels and adjust servos
WHILE the program is running:
// Read current positions of the servos
Get the current position of horizontal servo
Get the current position of vertical servo
// Read light levels from all LDRs
Get light level from top left LDR
Get light level from top right LDR
Get light level from bottom left LDR
Get light level from bottom right LDR
// Step 3: Calculate averages
Calculate average light level for the top LDRs
Calculate average light level for the bottom LDRs
Calculate average light level for the left LDRs
Calculate average light level for the right LDR
// Step 4: Adjust the vertical servo based on light levels
IF bottom light level is much higher than top light level:
Move vertical servo up by 1 degree
Check if the vertical servo is within its upper limit
ELSE IF top light level is much higher than bottom light level:
Move vertical servo down by 1 degree
Check if the vertical servo is within its lower limit
ELSE:
Keep the vertical servo in its current position
// Step 5: Adjust the horizontal servo based on light levels
IF left light level is much higher than right light level:
Move horizontal servo left by 1 degree
Check if the horizontal servo is within its upper limit
ELSE IF right light level is much higher than left light level:
Move horizontal servo right by 1 degree
Check if the horizontal servo is within its lower limit
ELSE:
Keep the horizontal servo in its current position
END
Wooden Enclosure: I mounted the Arduino and other electronics inside a sturdy wooden box to protect them from environmental factors.
Wooden Panel Holder: The solar panel is securely mounted on a wooden frame, allowing smooth movement by the servos.
Wooden connectors : The entire system is mounted on a solid wooden base for stability.
I successfully tested the system, ensuring that all components worked together seamlessly. The solar panel moved accurately in response to sunlight changes, and the feedback was displayed on the LCD. The wooden structure provided a stable and organized way to mount everything, keeping the system protected and functional.
I was stuck at the Upper part of the design . My Instructor Eman helped me with this inspiration from a Camera stabilizer. She recommended at first to print it on the 3D printer but after that because of shortage of time she advised to use laser cutting instead.
Implementing the nice to have Features to control the system manually using and Android GUI . Also investing more time to the design to make it's appearance cooler . I guess using the 3D priniting for the Upper part of the solar tracker and the panel holder will help with project appearance .