This week, I’m working on designing a solar tracker—a device that automatically adjusts the position of a solar panel to follow the sun’s movement throughout the day. The goal is to maximize energy absorption and improve the efficiency of solar panels compared to fixed-position setups.
Solar energy is one of the most sustainable and renewable energy sources, but fixed solar panels do not always capture the maximum sunlight available. By designing a solar tracker, we can help solve this problem by ensuring that panels adjust dynamically to the sun’s position, increasing energy output.
This project also aligns with my interest in automation and renewable energy solutions. It’s a practical way to apply knowledge of electronics, programming, and mechanics to a real-world problem.
Software:
Tinkercad which is a free, web-based application that allows users to create 3D designs, circuit simulations, and code-based projects.
Arduino IDE a software platform used for writing, compiling, and uploading code to Arduino boards. I used it to upload the code to my Arduino Uno.
Electronic components
Breadboard – A platform to connect all components without soldering.
Jumper Wires – Connects the components and ensures proper electrical flow.
Arduino Uno – Acts as the brain of the system, processing LDR sensor data and controlling the servo motor.
Two LDR Sensors – Detects light intensity from different directions, allowing the system to determine the sun’s position.
Servo Motor – Adjusts the angle of the solar panel based on LDR readings to maximize sunlight exposure.
USB Cable
LDR sensor
USB Cable
Breadboard
Arduino Uno
Jumper wires
Servo Motor
Circuit connection on TinkerCAD
Initialising the code & Declaring the variables
Void Loop
Circuit simulation on TinkerCAD
1️⃣ Circuit Overview on TinkerCAD
In TinkerCAD, I designed a motion-sensing system using an Arduino Uno, two PIR sensors, and a servo motor. The system detects the sun -presumably- and responds by activating the servo motor.
PIR Sensors: Detect motion and send signals to the Arduino and in this case they represent the LDR sensors in detecting the sunlight.
Servo Motor: Moves based on the detected motion.
Breadboard & Jumper Wires: Facilitate secure electrical connections.
Arduino Uno: Acts as the main controller, processing sensor data and controlling the servo.
2️⃣ Block-Based Programming Overview
The project integrates block-based coding in TinkerCAD to control a servo motor based on input from PIR sensors. The logic follows these steps:
Initialize variables such as pos, tolerance, and sensor values (val1 & val2).
Read analog inputs from the PIR sensors on pins A4 and A5.
Compare sensor values and determine movement conditions.
If the absolute difference between val1 and val2 is within the tolerance range, set the servo to 0 degrees.
Otherwise, adjust the servo 180 degrees based on the detected motion.
3️⃣ Circuit Assembly & Electrical Components
Before finalizing the design, I tested the circuit on a breadboard to ensure proper functionality. The steps included:
Connecting the LDR sensors to detect light and send signals to the Arduino.
Wiring the servo motor to an appropriate Arduino pin for movement control.
The development process of the solar tracker system involved circuit assembly, coding in TinkerCAD, and functional testing. The goal was to create an interactive system where LDR sensors detect light and trigger a servo motor to rotate accordingly.
Once the circuit and code were completed, several tests were conducted:
✅ Motion Detection – Ensured both LDR sensors accurately detected lights.
✅ Servo Operation – Verified smooth and precise rotation based on input.
✅ Code Functionality – Checked that logic executed correctly with different sensor activations.
Solar tracker circuit in action
Title of Media
I needed to use two LDR sensors so I had to make use of a peer's LDR sensor as our Electronics kit include only one. We got the chance to meet at San3a Tech maker space thanks to Abdelrhman Oraby's cooperation, worked there and it was a very productive time.
In order that the project works, I needed to include number of variables. I first struggled adding them using the blocks, had to research it on Google -usually easier to be created in text codes- and added them with number of times of testing and troubleshooting.
Title of Media
Title of Media
Title of Media