Arduino 2-axis servo solar tracker

What is a solar tracker?

A solar tracker can increase the efficiency of a solar panel by up to 100%! It does this by always keeping the panel perpendicular to the incoming rays of sunlight.

servo solar tracker

here’s an equation to prove this:

P = AW sin θ

P = power generated by the solar panel

A = Area of the solar panel

W = is the solar constant, which is equal to 1340 watts per square meter

θ = the angle of the incoming light

Since sin(90) = 1  you get the best performance out of the panel when it is totally perpendicular.


1 – Arduino Uno w/ ability to program it
1 – Breadboard
1 – 2 axis tracking mechanism (i used a magnifying mirror that swiveled up and down)
2 – 360 deg continuous rotation servos
1 – ball bearing tilt switch or similar
5 – 10k resistors
1 – 5V breadboard power supply
3 – cadmium sulfide light sensitive resistors
soldering iron
vice (optional)

Step 1: The Y-axis

I marked the approximate center of the base and drilled a hole large enough to screw the setscrew for the servo armature in. I then hot glued the armature to the underside of the base making sure not to get glue in the hole i drilled.

Once the glue was dry, I attached the servo and screwed in the setscrew.

Step 3: The sensors

I used 3 light sensors and 1 tilt sensor. You can substitute LEDs or photo-transistors for the CDS cells, and/or mercury switches for the ball bearing tilt sensor but your code will have to reflect the change(s).

I soldered wires from a scrap ribbon cable to the leads of each light sensor and a 2 pin header on the opposite end to connect easily to the breadboard. Use electrical tape / heat shrink / liquid insulator on the bare parts of the wire so that they don’t short out.

Once that’s done, hot glue the sensors at equal intervals around the circumference of the mirror. I placed the sensors so that the flat collecting side of the sensor was parallel with the plane of the mirror and angled out from the center just slightly.

The tilt sensor that I found was a plastic box with 4 contacts running through it and a ball bearing inside. This sensor prevents the tracker from pointing at the ground and also gives the y-axis an end-stop.

Solder wires onto the 4 pins of the tilt sensor then glue it on the back side of the mirror with the leads running horizontally. With the mirror pointing straight upward, the BB should be resting on the 2 middle leads.

The image I have uploaded is similar but not exactly the same as the tilt sensor I have. The one I used has only 4 leads.

Step 4: Wiring it up

servo solar tracker Schematic

EDIT (04/03/13)*** Changed the images to reflect the proper wiring and cleaned it up a bit.


For more detail: Arduino 2-axis servo solar tracker

This Post / Project can also be found using search terms:

  • Arduino Solar Tracker Tutorial
  • solar tracking arduino
  • solar tracking using arduino
  • servo motor solar tracking using arduno
Clip to Evernote

Leave a Comment

(Spamcheck Enabled)

Read previous post:
Arduino Motor Shield
Arduino Motor Shield Tutorial

The Arduino Motor Shield allows you to easily control motor direction and speed using an Arduino. By allowing you to...

Scroll to top