BACK TO SELECTED WORK

PROJECT 02 · EMBEDDED SYSTEMS

Dual-AxisSolar Tracker

A two-axis embedded control prototype that uses four light-dependent resistors and two servo motors to orient a panel toward the strongest light source.

Arduino UnoFour LDR SensorsTwo Servo MotorsAcademic Team ProjectJune 2024
ACADEMIC CONTEXT
EEEN 102 Embedded Systems Programming Final Project
INSTITUTION / TEAM
Istanbul Bilgi University · Five students
TWO-AXIS RESPONSETRACKING ASSEMBLY
Dual-axis panel with an integrated four-sensor headDirectional light reaches four sensors mounted on the panel assembly. Their imbalance drives horizontal rotation and vertical tilt until the panel faces the stronger light direction.TLTRBLBRHORIZONTAL SERVO // AZIMUTHVERTICAL SERVO // TILTTR STRONGESTFOUR-QUADRANT LDR HEADSENSECOMPAREROTATEALIGN
The sensor head is part of the moving assembly. Light imbalance selects a direction; two actuators combine azimuth and tilt into one panel orientation.

01 / PROJECT OVERVIEW

A compact sensing, decision, and motion loop.

The project focused on validating directional light tracking at prototype scale. It was not designed as a commercial installation or a long-term energy-yield study.

PROBLEM
A fixed panel cannot respond to changes in incoming light direction.
APPROACH
Compare relative light intensity from four directions and update two servo angles.
INPUTS
Four analog LDR readings.
CONTROLLER
Arduino Uno.
OUTPUTS
Horizontal and vertical servo movement.
STATUS
Functional academic prototype.

02 / SYSTEM ARCHITECTURE

Relative light becomes coordinated panel movement.

Each stage has one job: sense the imbalance, reduce it to two directional errors, decide whether movement is necessary, and command the relevant axis.

01LIGHT FIELD

TLTRBLBR

Top-right illumination creates an unequal field.

SENSE

024 READINGS

TL58
TR92
BL36
BR62

ILLUSTRATIVE VALUES

GROUP

03DIRECTIONAL GROUPING

TOP = avg(TL, TR) 75

BOTTOM = avg(BL, BR) 49

LEFT = avg(TL, BL) 47

RIGHT = avg(TR, BR) 77

4 values2 axes
SUBTRACT

042 ERRORS

VERTICAL

75 - 49 = +26

TOP STRONGER

HORIZONTAL

47 - 77 = -30

RIGHT STRONGER

DECIDE

05TOLERANCE

OUTSIDE

UPDATE AXIS

INSIDE

HOLD

Each error is checked independently.

COMMAND

06ACTUATION

H SERVO

ROTATE RIGHT

V SERVO

TILT UP

MOVE

07PHYSICAL RESULT

Azimuth and tilt combine into one orientation.

Four analog readings are grouped into two signed errors. Each error passes its own tolerance check before commanding the corresponding servo axis.

03 / INTERACTIVE SENSOR LOGIC

Four readings resolve into two errors.

Move the light source to see each quadrant reading flow through directional averages, error checks, servo commands, and panel movement.

topAverage = average(TL, TR)bottomAverage = average(BL, BR)leftAverage = average(TL, BL)rightAverage = average(TR, BR)verticalError = topAverage - bottomAveragehorizontalError = leftAverage - rightAverage

INTERACTIVE SENSOR LAB

Drag or tap the light. Keyboard: arrow keys to move, Home to center.

SIMULATED NORMALIZED VALUES

01 / SENSOR FIELD

STRONGEST · TR
TL65
TR94
BL50
BR65
TL · Top left65
TR · Top rightSTRONGEST94
BL · Bottom left50
BR · Bottom right65

02 / CALCULATION BRIDGE

Four readings become four directional averages, then two signed errors.

TOP79.5
avg(TL, TR)STRONGER
BOTTOM57.5
avg(BL, BR)
LEFT57.5
avg(TL, BL)
RIGHT79.5
avg(TR, BR)STRONGER
SUBTRACT

HORIZONTAL ERROR

LEFT - RIGHT-22
ROTATE RIGHT

VERTICAL ERROR

TOP - BOTTOM+22
TILT UP
±8

MECHANICAL RESPONSE

TWO AXES / ONE ORIENTATION

HORIZONTAL COMMAND

ROTATE RIGHT

VERTICAL COMMAND

TILT UP

HORIZONTAL SERVO

106°

AZIMUTH RIGHT

VERTICAL SERVO

102°

TILT UP

Illustrative angles show the commanded direction. Original calibrated ranges are not documented.

Values, tolerance, and angles are simulated for explanation; they are not historical prototype measurements.

04 / TOLERANCE AND STABILITY

Not every difference should cause movement.

LDR channels can differ slightly because of electrical noise, sensor mismatch, shadows, or small changes in the light field. Reacting to every variation would keep the mechanism in motion.

A tolerance, also called a deadband, creates a stable region around balance. Inside it, the controller holds position. Outside it, only the relevant servo axis is updated.

The practical result is less oscillation, fewer unnecessary corrections, and reduced servo jitter.

ILLUSTRATIVE DEADBAND BEHAVIOR

Two independent decisions in the same loop

HORIZONTAL ERROR = LEFT - RIGHT

COMMAND · ROTATE RIGHT

NEGATIVERIGHT STRONGER → ROTATE RIGHT
DEADBANDHOLD
POSITIVELEFT STRONGER → ROTATE LEFT
CURRENT -18

VERTICAL ERROR = TOP - BOTTOM

COMMAND · HOLD

NEGATIVEBOTTOM STRONGER → TILT DOWN
DEADBANDHOLD
POSITIVETOP STRONGER → TILT UP
CURRENT +2
Example values are illustrative. The original numeric tolerance is not documented.

05 / HARDWARE CONFIGURATION

Four analog inputs drive two independent actuator outputs.

Each LDR and fixed resistor form a voltage divider. Four divider nodes feed the controller, while separate signal and power relationships support the two servos.

SIMPLIFIED SIGNAL-FLOW SCHEMATIC

TL

SENSOR POWERLDRANALOG OUTFIXED RESISTOR → GROUND

TR

SENSOR POWERLDRANALOG OUTFIXED RESISTOR → GROUND

BL

SENSOR POWERLDRANALOG OUTFIXED RESISTOR → GROUND

BR

SENSOR POWERLDRANALOG OUTFIXED RESISTOR → GROUND
4 × ANALOG SIGNAL

ARDUINO UNO / MICROCONTROLLER

Four generic analog inputs · Two servo signal outputs

SIGNAL H

Horizontal servo

SIGNAL V

Vertical servo

EXTERNAL ACTUATOR POWER

Separate power paths feed both servos; signal paths remain distinct.

SENSOR NETWORK + CONTROLLER + SERVO POWER SHARE GROUND
The diagram emphasizes verified signal relationships. Exact pin assignments, resistor values, and physical placement are omitted where the original implementation details are not documented.

06 / CONTROL LOGIC

A short loop connects sensing to constrained motion.

Simplified logic for one pass through the repeating embedded control cycle.

REPEATING CONTROL CYCLE

READGROUPCOMPARECHECK TOLERANCE

INSIDE

HOLD

OUTSIDE

UPDATE AXIS → CLAMP

REPEATNext sensor read
Both branches return to the next read; only the update branch changes an actuator command.
SIMPLIFIED CONTROL LOGICONE LOOP ITERATION
read TL, TR, BL, BR

top = average(TL, TR)
bottom = average(BL, BR)
left = average(TL, BL)
right = average(TR, BR)

verticalError = top - bottom
horizontalError = left - right

if abs(verticalError) > tolerance:
    update vertical angle

if abs(horizontalError) > tolerance:
    update horizontal angle

clamp angles to mechanical limits
write angles to servos

Angle commands are clamped before the values are written to the servos.

07 / ENGINEERING DECISIONS

The important work happened between the readings and the motion.

The hardware was simple. Stable behavior depended on how those components were interpreted and constrained.

  1. 01

    Four sensors establish direction

    Four quadrants provide left-right and top-bottom comparisons that a single brightness reading cannot.

  2. 02

    Averages reduce four readings to two errors

    Directional pairs collapse four sensor values into one horizontal and one vertical control signal.

  3. 03

    Deadband prevents unstable corrections

    A central hold region stops small analog differences from repeatedly reversing a servo command.

  4. 04

    Mechanical limits constrain valid commands

    Clamping keeps mathematically valid angle updates inside the mechanism's usable movement range.

08 / OUTCOME

The sensing and control concept worked at prototype scale.

The prototype demonstrated that relative light intensity from four analog sensors could be converted into coordinated horizontal and vertical motion.

It behaved as a directional light-tracking prototype, not as a production-ready solar installation. The work validated the sensing-to-motion loop rather than long-term energy performance.

DOCUMENTED BOUNDARY / LIMITATIONS

What the prototype did not establish.

  • No calibrated energy-yield comparison
  • No long-term outdoor testing
  • No weather-resistant enclosure
  • No data logging
  • No independent panel-angle feedback
  • Dependence on ambient light conditions
  • Sensitivity to sensor mismatch
  • Prototype-scale mechanical construction

09 / FUTURE IMPROVEMENTS

Turn a responsive prototype into a measurable system.

These are realistic next steps, not features completed in the June 2024 prototype.

01SIGNAL QUALITY

  • Sensor calibration
  • Moving-average filtering
  • Hysteresis
  • Sensor matching checks

02POWER AND MECHANICS

  • Separate regulated servo power
  • Limit switches
  • Improved structure
  • Weather protection

03VALIDATION AND CONTROL

  • Current and voltage sensing
  • Energy-yield logging
  • Fixed-panel comparison
  • Outdoor validation
  • Proportional or PID movement
  • Hybrid sensor and astronomical tracking

A stronger future version could combine calibrated sensor feedback with a predicted sun position. That hybrid approach would retain local correction while providing a reference when the light field is diffuse.

10 / CONCLUSION

Simple parts can form a responsive physical system when the control boundaries are clear.

The project showed how analog sensors, a microcontroller, and constrained actuator logic can connect sensing, decision-making, and motion. Its main value was demonstrating the complete path from analog sensing to physical motion.

Back to Selected Work