Enrichment Program

Summer School

Contact Us


Mechatronics Learning Studio


Sun Tracker

John-Paul Yaraskavitch, Zoe Ferland, Gavin Armoogum, and Shanjida Khanam, Mechanical Engineering, University of Ottawa




In this project we created a system whereby a solar panel tracks the sun during the day to maximize the light it receives.  Sensors placed on each of the four corners of the solar panel measure and compare the voltage received.  Changes in the position of the solar panel are made based on these four inputs.  The solar panel will position itself in such a way that each sensor is receiving maximum voltage from the sun. 

Electrical Materials

-          Arduino Uno Microcontroller

-          2 Bipolar Stepper Motors

-          4 Photo Resistors

-          4 46 kOhm resistors

-          2 L293D H-Bridge Motor Driver Chip

-          6 Volt Lantern Battery

-          Soldering Iron

-          Solder

-          Wire

Mechanical Materials

-          Acrylic Sheet

-          Brass Angle Brackets

-          Nuts and Bolts

-          Hot Glue Gun

-          Wooden Pulleys

-          Elastic Bands

-          Bike Brake Cable

-          Wire Butt Connector

-          Wooden Base


Each corner of the solar panel has a light sensor. These light sensors are made from a voltage divider circuit utilizing a photo resistor and a normal resistor. The varying voltage of each sensor is fed to the arduino.  The arduino is programmed to compare the left and right inputs; the output is a stepper motor which makes changes in the direction of the solar panel based on the comparative inputs received. This motion is 360° about the vertical axis.  Following the left and right comparison, the sensor in question is measured with the one above or below it (depending on its placement on the solar panel).  The output for this comparison on a stepper motor which moves the solar panel in a 180° arc, the magnitude of the movement depends on the difference between the two inputs.  The code continuously reads the voltages and compares and allows the panel to adjust to any changes. The panel is able to cover a full hemisphere to mimic the path of the sun and to make changes if shade should fall on any part of the panel.


-          The motors initially purchased did not have enough strength to hold/lift the panel while it was in the downward position. To overcome this, weight was reduced on the panel by eliminating brackets and substituting with hot glue. We also reduced the moment arm of the solar panel by shortening the pieces of plastic to which it was mounted. We then developed a pulley system using wooden cut-outs with elastic bands wrapped around each one for friction. The pulleys are connected with a cable crimped together with a wiring butt connector.

-          Initially we were using a 9V battery for each motor. This caused the rotor of the motor to get stuck between two activated coils and stuck working. We switched to a single 6V battery and the motors worked fine after that.

Possible Improvements

-          Potentiometers could be added to determine horizontal and vertical position in order to reset after a day of following the sun. The coding would have to be added to read the potentiometers position each morning and move the motors back to that position in the morning and read the new initial reading of the sun as it changes with the seasons.

-          Stronger motors in the same compact size could be used to allow the use of the initial mounting brackets.

-          The pivot holes for the solar panel should be straightened out allowing for the solar panel to sit square.

-          The coding for the system could be improved to allow all sensors to compare each other instead of just the top ones for left and right and the left ones for up and down.

-          The wiring should be cleaned up as sometimes it catches and doesn’t allow full movement of the panel.