You Are Here: Home » AVR ATmega Projects » Sensor - Transducer - Detector Projects » Heliowatcher solar tracker Using Atmega644

Heliowatcher solar tracker Using Atmega644




Documentation

HelioWatcher: Automatic Solar Panel Control

Jason Wright (jpw97) and Jeremy Blum (jeb373)

Introduction

We designed and built a system to automatically orient a solar panel for maximum efficiency, record data, and safely charge batteries. Using a GPS module and magnetometer, the HelioWatcher allows the user to place the system anywhere in the world without any calibration. The HelioWatcher then calculates what the sun’s current location is and orients the panel to the appropriate angle. It also utilizes a quadrature of light-detecting diodes to correct for short-term light obstruction, such as clouds or shade. Data is logged to an SD card to allow the user to visualize the efficiency gains and power consumption.

Heliowatcher solar tracker Using Atmega644

High level design

Project Rationale
Solar panels are frequently used for power generation in off-grid areas, such as for solar charge stations for electric vehicles. In order to maximize efficiency of these charge stations, solar panels must be oriented depending on both the time of day and the current season. Called active solar trackers, most of these systems are expensive, require precise calibration, and are designed only for massive arrays of solar panels. We wanted to implement a system that was small scale, low-cost, easy to use, and that would provide information about efficiency to teach new solar operators about solar panel operation.

Background Math
Many solar trackers implement movement based on either a pre-determined algorithm or by adjusting position according to light detection. We sought to utilize a combination of both, to leverage the guaranteed accuracy of a geospatial algorithm while correcting for local or short-term changes, such as cloud cover or shade.

We first explored an algorithm produced by Ibrahim Reda and Afshin Andreas for the National Renewable Energy Laboratory to determine the current solar position using GPS data. This algorithm calculates azimuth and zenith angles with an accuracy of 0.0003 degrees, and is supposedly valid for centuries. The algorithm is incredibly complex, far too complicated to summarize in brief, but it basically uses the Julian day, the Earth’s heliocentric longitude and latitude, the nutation in longitude and obliquity caused by the moon, and many other factors to produce an extremely accurate result.

We ended up using a slightly simpler algorithm developed by Prof. Richard B. Goldstein of Providence College which uses only trigonometry and best fitting for the current decade to produce a fairly accurate result. This algorithm was easier to implement and work with, and had sample code available that was compatible with AVR.

To monitor light detection, we originally developed a quadrature of LEDs to monitor the difference in ambient light along the compass axes. In practice, we realized that shade from the solar panel would make the results from such a quadrature less useful, so we mounted the LEDs directly onto the sides of the panel itself, and monitored difference in ambient light along the axes of movement of the solar panel itself. This allows us to use voltage differences between two different LEDs to create an “adjustment factor” to consider alongside the pre-calculated optimal angles.

Angle adjustment based on quadrature voltages V1 and V2

Logical Structure
The system operates as a shell interface, allowing the user to send a number of commands to the HelioWatcher over UART with optional arguments. These commands are detailed below, but most are used for operation of individual components of the system, for testing or calibration purposes. The shell also allows the user to switch to an “automatic” mode, which triggers a series of actions intended to track the sun if the HelioWatcher were left in place over a long period of time. There is also a “data logging” mode that is identical to automatic mode but limits traffic over UART to only commands relevant to data logging.

Included in our project is also an automatic data logger that connects to the HelioWatcher through a serial command, puts the system in data logging mode, visualizes the data, and stores it in a CSV file. This data could then be incorporating into further data visualization software or used for statistical purposes to track the efficiency of a solar panel over time.

Movement, in general, is handled by iterating motor commands for small steps and continuously checking the relevant sensor (accelerometer or magnetometer) to update position, as shown in the following flow chart:

Hardware/software tradeoffs

Relationship of your design to available IEEE, ISO, ANSI, DIN, and other standards.
Discuss existing patents, copyrights, and trademarks which are relevant to your project.

Program/hardware design

Hardware Details

Shown above is the complete HelioWatcher System.  It consists of a rotating platform (with electronics hidden underneath), a hinged panel, 4 light-sensing LEDs, a magnetometer, a GPS module, an Accelerometer, 2 stepper motors for facilitating movement, and an MightyBoard ATMega-based motherboard for embedded control.

Heliowatcher solar tracker Using Atmega644 Diagram

At the heart of the system is the MakerBot MightyBoard, a motherboard that was designed by Jeremy during his time working at MakerBot Industries.  It was designed to control the MakerBot Replicator, a 3D printer which was coincidentally used to print the plastic components used in the construction of the HelioWatcher.  The MightyBoard is well suited for controlling the HelioWatcher for a number of reasons:

  1. Jeremy already owned one which he uses for MakerBot software development
  2. It can easily control stepper motors, and even has the circuitry built in to set stepper current values for adjusting torque
  3. It has lots of breakout pins which make it easy to interface external devices such as the UART GPS and the I2C magnetometer that we used for the HelioWatcher
  4. It implements an ATMega1280, which has lots of memory for potentially storing the large lookup tables that we use for calculating optimal panel positions
  5. It has an onboard serial to USB conversion, using an ATMega 8U2
  6. It is easily expandble in the future, with circuitry for adding thermocouples, additional sensors, etc

Parts List:

QuantityPartSourceTotal Cost
1Solar PanelCourtesy of Bruce Land$0.00
1MakerBot MightyBoardPreviously Designed & Owned by Jeremy$0.00
2NEMA17 Stepper MotorPreviously Owned$0.00
1Car JackPreviously Owned$0.00
112″ Lazy SusanLowes$9.26
22′x2′ Plywood BoardLowes$15.90
13-Axis MagnetometerSparkfun Electronics$15.95
2Door Hinge + ScrewsLowes$5.16
4Quadrature LEDsPreviously Owned$0.00
4330 ohm Resistors (for Quadrature LEDs)Previously Owned$0.00
2Wingnuts for Securing Car JackLowes$1.60
10Wave/Spring Washers for Securing Rotation StepperLowes$0.56
20Wood Screws for Assembling BasePreviously Owned by Jeremy$0.00
23D Printed Top/Bottom Quadrature LED HoldersPrinted on Jeremy’s MakerBot using Free Plastic$0.00
23D Printed Left/Right Quadrature LED HoldersPrinted on Jeremy’s MakerBot using Free Plastic$0.00
13D Printed Elevation Jack BracketPrinted on Jeremy’s MakerBot using Free Plastic$0.00
13D Printed Elevation Jack CollarPrinted on Jeremy’s MakerBot using Free Plastic$0.00
13D Printed Rotation Stepper BracketPrinted on Jeremy’s MakerBot using Free Plastic$0.00
13D Printed Rotation WheelPrinted on Jeremy’s MakerBot using Free Plastic$0.00
33D Printed GPS,Antenna, and Magnetometer CoversPrinted on Jeremy’s MakerBot using Free Plastic$0.00
1Libelium GPS ModuleSent to Jeremy for free to Review$0.00
100 ftAssorted Stranded and Solid Wire + Jumper cablesPreviously Owned$0.00
12×4 LumberLowes$3.27
120k Resistor for Solar Panel Voltage DividerPreviously Owned$0.00
310k Resistors for Solar Panel Voltage DividerPreviously Owned$0.00
10.1uF Capacitor for Solar Panel Voltage Divider FilterPreviously Owned$0.00
112VDC Wall Wart for MightyBoardPreviously Owned$0.00
LotsHeatshrink TubingPreviously Owned$0.00
2BotStep17 Stepper Motor DriversPreviously Owned$0.00
2Locking Nylon NutsLowes$0.34
2Hex Cap Bolts for Securing Panel to HingesLowes$0.40
13D Analog AccelerometerPreviously Owned$0.00
TOTAL$52.44

 

For more detail: Heliowatcher solar tracker Using Atmega644

Leave a Comment

You must be logged in to post a comment.

Read previous post:
Cooking Assistant for Automatic Temperature Control Using Atmega644

In some cooking scenarios, it is desirable to achieve a specific object temperature and keep the object at that temperature....

Close
Scroll to top