Baby O controlled 2-axis solar tracker v.2

I have completed verison 2 of my prototype 2-axis solar tracker project.

Hardware list:

12V, 20W Lavie solar panel and 12V-24V, 10A Wellsee charge controller (
Baby O 328B robot controller (
HMC6352 compass module-tells panel azimuth/compass direction-inserted in breadboard (,ProductName)
DE-ACCM2G2 2-axis accelerometer-tells panel altitude/vertical tilt (
Parallax GPS receiver-gets data needed by the sun position algorithm (,ProductName)
2 - 12V, 1RPM gear motors (
gear motor end caps (
I used the clamping hubs below, but had to tap them:
2 - clamping hubs-attach wheel to azimuth motor,lid-hinge to altitude motor (
I think these would work better:
2 - 1/4" bore set-screw hubs-attach wheel to azimuth motor,lid-hinge to altitude motor (
foam wheel-drives panel horizontally (
wheel adaptors attach clamping hubs to wheel (
2 - limit switches-to protect altitude motor from stripping gears (
6in. lid hinge (local hardware store)
Cobra 400W power inverter (
12V, 14AH AGM battery (
breadboard, 5A fuse, 3A diode, 7805 & 7812 regulators, 22GA hookup wire, 4.7K resistors, 4-conductor m/f plugs,
pack of colored electrical tape-to identify wire functions (Radio Shack)
Sheet metal base and panel support is 1/8" scrap aluminum (local recycler)
#8 nuts, bolts, small angle brackets, teflon tape, washers, 6" lid hinge-drives panel up an down vertically,
(#6-32 hardened allen screws for tapped clamping hubs) (local hardware store)
6" lazy-suzan turntable (Home Depot)


For the compass drivers, Jim Remington has a zip file containing Peter Fleury’s ic2master.c and i2cmaster.h which works with Baby O at:
The rest of the required software is available in the attached zip files.
Read the comment sections for explanations of how each function works and examine the pinout diagram for each sensor.
The _myincludes.h should be the only #include needed as it contains all needed pololu .h references.
I stored _myincludes.h in the avr/…/pololu/ subdirectory and call it from the main program with #include <pololu/_myincludes.h>

For AVR Studio 4 users:
Under Project, Configuration Options, Libraries, add libpololu_atmega328p.a, libc.a (to build without errors)
Under Custom Options, [linker options], add -Wl,-gc-sections (builds only library functions used by your program)

For those of you who wish to customize the declination() function in _myincludes.h, I have included the Declination Table Development Kit

screwdriver, sabre saw w/ metal-cutting blade, pliers, drill, drill bits, (#6-32 NC tap), scrap plastic

Finally, I have a blog which describes the parts of the system and includes some videos and photos here:

Inverter, battery and charge controller:

how the wheel is attached to the motor: (7.15 KB) (2.85 KB) (4.07 KB)

Hi, Scott from Scott.

Very cool! How much better is it than just having a solar panel oriented at a fixed angle after counting the energy used by the solar tracking system?

- Ryan

Thanks for the great question, RyanTM

One solar tracker wikipedia wiki states:
Wattsun claims:
So you are looking at roughly 35-40% increase in efficiency with dual-axis tracking.
On a partly cloudy day the output of the tracking panel might be about 1A x 12V x 8 hrs = 96W-HR
The output of the fixed panel would be 35% less than that or 62.4 W-HR
Estimating the power losses to the components to accomplish this gain of 33.6 W-HR:
Baby o robot controller: 1/2 maximum i/o current: 5V x .020a x 8hrs = .8 W-HR
HMC6352 compass: 5V x .001a x 8 hrs = .04 W-HR
DE-ACCM2G2 accelerometer: 5V x .002a x 8hrs = .08 W-HR
Parallax GPS receiver: 5V x .115a x 8 hrs = 4.6 W-HR
2 - motors: 12V x .200a x .13 hrs (1 minute/hr x 8hrs) = .312 W-HR
Total power losses: .8 +.04 + .08 + 4.6 + .312 = 5.83 W-HR
So about 17% of the gain would be lost to the electronics and motors leaving a net gain of 27.7 W-HR
That gain would be enough to power an additional 60W compact fluorescent bulb for 1 hour.