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:

Quantity Part Source Total Cost
1 Solar Panel Courtesy of Bruce Land $0.00
1 MakerBot MightyBoard Previously Designed & Owned by Jeremy $0.00
2 NEMA17 Stepper Motor Previously Owned $0.00
1 Car Jack Previously Owned $0.00
1 12″ Lazy Susan Lowes $9.26
2 2′x2′ Plywood Board Lowes $15.90
1 3-Axis Magnetometer Sparkfun Electronics $15.95
2 Door Hinge + Screws Lowes $5.16
4 Quadrature LEDs Previously Owned $0.00
4 330 ohm Resistors (for Quadrature LEDs) Previously Owned $0.00
2 Wingnuts for Securing Car Jack Lowes $1.60
10 Wave/Spring Washers for Securing Rotation Stepper Lowes $0.56
20 Wood Screws for Assembling Base Previously Owned by Jeremy $0.00
2 3D Printed Top/Bottom Quadrature LED Holders Printed on Jeremy’s MakerBot using Free Plastic $0.00
2 3D Printed Left/Right Quadrature LED Holders Printed on Jeremy’s MakerBot using Free Plastic $0.00
1 3D Printed Elevation Jack Bracket Printed on Jeremy’s MakerBot using Free Plastic $0.00
1 3D Printed Elevation Jack Collar Printed on Jeremy’s MakerBot using Free Plastic $0.00
1 3D Printed Rotation Stepper Bracket Printed on Jeremy’s MakerBot using Free Plastic $0.00
1 3D Printed Rotation Wheel Printed on Jeremy’s MakerBot using Free Plastic $0.00
3 3D Printed GPS,Antenna, and Magnetometer Covers Printed on Jeremy’s MakerBot using Free Plastic $0.00
1 Libelium GPS Module Sent to Jeremy for free to Review $0.00
100 ft Assorted Stranded and Solid Wire + Jumper cables Previously Owned $0.00
1 2×4 Lumber Lowes $3.27
1 20k Resistor for Solar Panel Voltage Divider Previously Owned $0.00
3 10k Resistors for Solar Panel Voltage Divider Previously Owned $0.00
1 0.1uF Capacitor for Solar Panel Voltage Divider Filter Previously Owned $0.00
1 12VDC Wall Wart for MightyBoard Previously Owned $0.00
Lots Heatshrink Tubing Previously Owned $0.00
2 BotStep17 Stepper Motor Drivers Previously Owned $0.00
2 Locking Nylon Nuts Lowes $0.34
2 Hex Cap Bolts for Securing Panel to Hinges Lowes $0.40
1 3D Analog Accelerometer Previously Owned $0.00
TOTAL $52.44

 
For more detail: Heliowatcher solar tracker Using Atmega644


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top