Build

Build / Project

Automated Solar Panel Angle Control System

A closed-loop system that maps a solar panel's output across angles and holds it at any chosen level, with no prior knowledge of where the light is. Built in ten weeks for Process Control at Case Western Reserve University.

Context
ECHE 367: Process Control, Case Western Reserve University
Period
Fall 2025
Team
Four chemical engineering students
Role
Designed the system, hardware and LabVIEW state machine
Tools
LabVIEW · NI DAQ · Stepper motor + belt drive · TinkerCad · 3D printing
The physical build at CWRU
Fig. 1: The physical build at CWRU. The DAQ module bridges the motor, sensors and LabVIEW.

Project background

This system was built as the semester-long capstone project for ECHE 367: Process Control at Case Western Reserve University (Fall 2025), a required course in the Chemical Engineering curriculum. It covered the full development cycle from hardware build and software architecture to process modeling and closed-loop tuning.

My role

I designed the system and the sweep-then-PID approach, designed and 3D-printed the panel cradle and belt drive, and wrote the LabVIEW state machine that runs it.

Motivation and design objective

Conventional solar installations fix panel orientation at a single angle, accepting sub-optimal output across most of the day. This project asked: can a closed-loop control system learn how a panel’s output varies with angle, and then hold any output level we choose, without prior knowledge of the light source position? The challenge is that the angle–output relationship is unknown at startup and changes with the environment, so a pure PID approach is insufficient on its own: PID needs a setpoint.

The solution splits the problem into two sequential phases. In the sweep phase, the controller rotates the panel from 0° to 150°, sampling voltage at each step to map the output landscape and record the peak-voltage angle. In the PID phase, the controller turns a user-chosen target percentage into a voltage setpoint using the sweep data,

(Vmax − Vmin) × target% + Vmin,

and holds the panel there against disturbances. The target can be any percentage, from a modest output up to near the peak. This two-phase architecture removes the need for any prior model of the light source and adapts to varying ambient conditions.

System architecture

System schematic of the solar panel angle control system Fig. 2: System schematic. A stepper motor drives the panel through a belt; the light source slides on a rail to simulate the sun’s movement. TinkerCad cradle design Fig. 3: TinkerCad cradle design. A custom 3D-printed bracket holds the panel on the drive axis.

Component Role in the system
Stepper motor + belt drive Turns the panel in discrete steps; direction and step count are set through DAQ digital output channels
Solar panel + voltage sensor Measures output (voltage as a proxy for power) at each angle; the feedback signal for both the sweep log and PID control
NI DAQ module Bridges LabVIEW and the hardware: analog input reads the voltage, digital output sends motor drive pulses
LabVIEW state machine Orchestrates all seven control states; shift registers keep Vmax, Vmin and BestAngle across loop iterations without global variables
Light source on adjustable rail Simulates the sun’s movement; moved by hand to test how the controller responds to a changing light angle

Process modeling and PID tuning

First-order plus dead time model. We identified the panel–motor system as a first-order process with dead time (FOPDT): output voltage responds to a step change in motor angle with a lag characterised by process gain K, time constant τ and dead time θ. We applied a step input to the motor and fitted the output voltage curve to read off K, τ and θ.

Ziegler–Nichols reaction-curve tuning. PID gains were calculated from the FOPDT parameters with the Ziegler–Nichols reaction-curve method. The measured τ also revealed a key limitation: the sweep moved faster than the panel’s settling time, so voltage was sampled before the output had stabilised at each angle, and the sweep underestimated peak power.

Seven-state control architecture

  1. Initial
  2. Sweep Init
  3. Sweep Run
  4. Sweep Return
  5. PID Init
  6. PID Control
  7. Stop

Each transition is driven by sensor feedback or a completion condition, not a timer. Sweep Run increments the angle and records voltage until 150° is reached; PID Init takes Vmax and Vmin from the sweep array to compute the setpoint, so the controller adapts to ambient conditions.

LabVIEW overview block diagram Fig. 4: Overview block diagram. The state machine sits at the centre; shift registers carry Vmax, Vmin and BestAngle across iterations.

LabVIEW PID block diagram Fig. 5: PID block diagram. A deadband filter stops the motor from hunting; the setpoint is calculated from the sweep data.

Results

LabVIEW front panel from a live run Fig. 6: LabVIEW front panel from a live run. Left: sweep voltage vs. angle (5.01–6.78 V), peaking at about 75°. Right: the PID loop holding the setpoint, with the target set to 80% in this run (6.42 V). Sweep power 105.6 mW; PID hold power 177.9 mW.

Reflection and future work

Key design decision. A pure PID controller was insufficient because the angle–output relationship is unknown at startup. Splitting the problem, sweep first to explore and PID second to hold, let the controller work without any prior model of the light source.

Identified limitation. The sweep power (105.6 mW) was lower than the PID hold power (177.9 mW) because the sweep rate didn’t account for the system time constant τ: the panel was still settling when voltage was sampled. Future work: add a settling delay at each step proportional to τ, and identify τ automatically with a step-response test at startup.