Close
0%
0%

SunTracker 2 Revision 3

A learning platform for optimizing solar systems energy output through alignment to our suns path across the sky.

Similar projects worth following
This is a photovoltaic (PV) solar tracking controller prototype. Solar trackers adjust the PV panel direction, to keep solar panels perpendicular to the sun, maximizing the power output. The increased power output varies, but can be in range of 15~40%, which would be substantial. For places with limited space where increasing solar panel size is not an option, tracking may give the extra energy.

I designed and built this prototype to validate basic functionality by tracking the suns horizontal movement (Azimuth angle) across our sky. The main feature of this prototype is a large LED display ring self-aligning to north, which is showing the sun's position, and is used to develop the controller's tracking function.

Just visualizing the sun's movement provides insight over things we normally don't experience consciously, it gives a sense of earth rotation, speed, and our path around the sun.

This project builds a solar tracking device to align solar panels towards the sun for increased power output. These systems exist both commercial and in the maker space, but they are not very common. Today it is often cheaper to just increase the solar panel area. Solar tracking comes with a variety of challenges:

  1. Identify the location of the sun in the sky
  2. Determine if it is worth spending alignment energy to turn panels towards the sun
  3. Mechanical design and maintenance

 For 1., identifying the suns location is typically done by either using multi-directional light sensors, picking out the brightest spot in the sky, or by doing location and time specific calculations, determining the sun position from the known path and rotation of our planet. The last method is providing insights about the angle distance required for solar panel alignment, and the reason I choose it as the main method.

For 2., moving and turning solar panels makes only sense if the received energy exceeds the energy that is being spend on tracking. Cloudy days, shallow angles, etc already diminish the energy generation, and solar tracking needs to find the fine balance and trade-off point to make it worthwhile.

Lastly, mechanical design and a robust longterm operation is another concern.

This project, Suntracker 2 Revision 3 focus is on point 1.

Design

Solar position tracking determines the suns location from a fixed locations observer point of view.

Suntracker 2 Revision 3 is a single axis tracker for the suns azimuth angle. Main feature is a dual-color LED circle that will display the sun location (green) in relation to north (red, center). Two more red LED will show the sunrise/sunset azimuth, which limit the range for daytime solar tracking. 

Suntracker 2 revision 3 determines the north heading with a magnetometer sensor, and compensates for the local magnetic north declination to determine true north. Combined with a real-time clock and a pre-generated set of solar positions stored on a MicroSD card, it displays the current sun position, and drives an optional Nema stepper motor to align with the actual sun position during daytime. The system is controlled through a 32bit ARM Cortex M0+ class microprocessor, the Arduino MKRZero.

Board Layout & Components

Final System

For better daily handling, a simple "Sandwhich"-style enclosure has been added. The project log tells the milestones how the vision progressed from prototyping board (R1) through PCB stage (R2), arriving at R3, the fully working prototype shown below. The picture shows the suntracker during north alignment and declination checks.

Visualization

The projected azimuth tracking range for my location is shaping up as shown below. Knowing the suns angle range is crucial for urban areas, where shading, even if its only seasonal, can have a big effect on solar power generation. With the next Suntracker version I am planning to add a suitable TFT display to draw this data in real-time.

201909-tracker-data.zip

Example set of solar position data, generated for the month of September 2019, location Tokyo, Japan. Unzip, and copy all files into the root of a FAT-formatted microSD card. Leave out all directories, I don't use a hierarchy on the SD card. CSV files are not needed by the device, they contain the binary data in readable format for debugging. This data set has been generated with suncalc v1.2, see https://github.com/fm4dd/suncalc.

x-zip-compressed - 1.07 MB - 08/12/2019 at 03:04

Download

  • 1 × controller mainboard v1.8 PCB The controller mainboard v1.8 gerber file for manufactuing the controller's PCB board.
  • 1 × displayboard v2.0 PCB The displayboard v2.0 gerber file for manufacturing the display PCB board, connecting to the controller board.
  • 2 × 2.2KOhm resistor pushbutton bounce supression
  • 2 × 1uF ceramic capacitor pushbutton bounce supression
  • 32 × 220 Ohm resistor displayboard LED current limiter (green LED color)

View all 23 components

  • Sun Tracker 2 Revision 3 - Adding a case

    Frank08/07/2019 at 12:59 0 comments

    For better daily handling, a simple "sandwhich"-style case has been drawn up. Below is the design study that has been converted to CAD drawings that were used for the final build. The CAD drawings are published in the GitHub repository cad folder. I am using 9mm plywood for the bottom, 4mm clear acrylic sheet for the top, and 15mm M3 spacers on either side of the board.

  • Sun Tracker 2 Revision 3 - Its coming together

    Frank08/07/2019 at 12:06 0 comments

    With Revision 3, the final shape starts to emerge. After becoming familiar with PCB production basics, it was time to turn the design into a device that can fully emulate and display the solar position. 

    Expanding the displayboard to arrange the 32x LED set in a circle, and adding the stepper motor driver to the controller board meant moving the OLED display out to the display board. Adding the second OLED is not just for symmetry: showing the current azimuth angle in addition to the boards north heading adds to the convenience of quick data correlation. Here is the Revision 3 PCB set, consisting of mainboard v1.7 and matching displayboard v2.0. In the photo below, it shows the updated mainboard with  the new stepstick connector fitted in the place of the previous OLED location. PCB design files (gerber), as well as the Arduino code are published in the revision 3 GitHub repository.

    Adding the second OLED display to the I2C bus had an issue that required manually updating the u8g2 display library. I documented the solution  in the GitHub issue tracker.

  • Sun Tracker 2 Revision 2 - Up & Running!

    Frank08/04/2019 at 07:51 0 comments

    After the epic fail of mirrored Arduino footprint pins, I decided to double up and, together with the fixing the controller board, create the first version of the LED display board for the controller. To match the controllers size and use minimal space, a four-layer PCB became necessary.  Because 4-layer boards require much more effort in construction and cost, I didn't go for the full LED ring design yet, but kept the first version with only two LED lines to gain experience. 

    Now I was eager to see the board with the dual-color LED set in action. Dual-Color LED are basically two LED merged into one. Because of the difference in color/wavelength, colors may differ in their forwarding voltage. I run a few breadboard tests with different resistor values to get a approximate uniform brightness.

    While updating the footprint, I also added a 2x DIP switch and two push button switches into the design. It is always handy to be able to control a few settings during the boards operation.

    Revision 2 design and code is saved to the GitHub repository https://github.com/fm4dd/suntracker2-r2

  • Sun Tracker 2 Revision 2 - Setback with the PCB

    Frank08/03/2019 at 18:02 0 comments

    After identifying the need for a bigger controller, I picked the Arduino MKR Zero.  The Zero has a sufficiently small footprint, generous 32K RAM, 256K Flash, and comes with a build-in MicroSD card reader. The 32bit architecture will be helpful for working with bigger data types, and the 48Mhz are much speedier, too. 

    The choice of the Arduino controller determined the new system voltage to 3.3 volts. Time for PCB design, adding all components except for the stepper motor control. The board had no space left, so I decided to leave that for later.

    For creating the controller board PCB design I used KiCAD 5.  After two misguided attempts, the third version looked ready for production. Instead I was in for some disappointment...

    As it happens, I fell for the #1 error in PCB design: having created a mirrored footprint for the Arduino MKR Zero. How embarrassing! After finding the presentation for the top-5 footprint mistakes, it was a bit of consolation to learn that even pro's tend to make this mistake. Nevertheless I partly populated the board, using sockets to preserve modules, and turning the Arduino around to align the pins on an awkward angle. I wanted to see if the board otherwise works, and voila, the board works great, flipped Arduino pins put aside.

  • Sun Tracker 2 Revision 1 - Prototyping Board

    Frank08/03/2019 at 17:14 0 comments

    With the compass functionality tested on a breadboard, the next step is to transfer it to a universal prototyping board, adding a status display and IO expansion ports to drive a LED ring that simulates the horizon. For the board, I am going to use the Takachi TNF 89-136.

    I had an Ardunio Nano at hand to be used as the micro controller, which will later turn out to be vastly inadequate to drive all the peripherals. At this stage, The Nano was holding up OK: driving the LSM303 magnetometer sensor, the 128x32 OLED display, and two  MCP23017 IO expanders from Microchip, all over the I2C bus. In front is the stepdown voltage regulator from Seeed Studio.

    In the left half of the universal prototyping board, I placed the remaining components: the DS3231 RTC clock, the MicroSD card reader, and a bigger 128x64 OLED display. For data exchange, was going to connect the two Nano over the serial line interface. But before that, I run into severe RAM space issues. The MicroSD card driver requires >512 Bytes buffer space, the bigger 128x64 OLED reserves a larger frame buffer, exhausting the 2K RAM space of the Nano without having written any code yet.
    A second challenge was my patience and steady hand. To route and wire 96+ connections required for the LED ring manually, it was going too slow and error-prone. I decided to better get a bigger CPU, and  I'd better create a PCB.

  • Starting to build a sun tracker - or how to find North

    Frank08/03/2019 at 03:23 0 comments

    The first steps on the solar tracking project were taken in April, when I was reading about building a digital compass. There are various project descriptions on the net, and I was interested what sensor is best suited for that task. Based on what I can source locally, I zeroed in on modules with the LSM303 chip, made by ST Microelectronics. Below shows the first breadboarding tests with the MM-TXS505 module from Sunhayato.

    The MMTXS505 modules uses the LSM303D chip released in 2012. It is quite stable, and offers the ability to select one of two possible I2C addresses. I noticed that later chip revisions (e.g. LSM303DLHC) only hardcode one address, which prevents using more than one sensor on a single I2C bus. Now that I can determine North, I can plan for adding the modules that would add the sun position information and provide the tracking output.

View all 6 project logs

  • 1
    PCB manufacturing

    Suntracker 2 revision 3 consists of two inter-connected PCB: the controller mainboard (1), and the displayboard (2). The GitHub repository has the two zipped gerber files that I used to order from the PCB manufacturer. 

    Notice there are two gerber files for the mainboard: v1.7 and v1.8. I build with mainboard v1.7 gerber files, but noticed a bug with OLED display 1 (left) I2C connection. I fixed by hand-wiring the two I2C pins, and updated the mainboard PCB layout to v1.8. However I haven't manufactured v1.8 yet, please use with care.

    The mainboard gerber is a 2-layber PCB, while the displayboard gerber is a 4-layer PCB. Note that 4-layer production is more costly, takes more manufacturing time, and may need an extra step to select 4-layers at the order screen. I used standard 1.6mm PCB for both boards.

  • 2
    Electronics component assembly

    Next, gather the electronics components and solder in place. The list of components (BOM) is available in the GitHub repository for each PCB: 

    There is also a BOM at Digikey shared: 

    Disclaimer: The Digikey BOM is researched to my best abilities. I build with components from a local store. I selected the smallest through-hole metal film resistors for the display board.

    Next, solder the components in place. Carefully verify the position and polarity, especially on the 32-LED ring. The PCB silkscreen has extensive annotations to add clarity, also use the schematics:

    I am using sockets for the Arduino MKR Zero and most of the modules. This helps me to swap and re-use modules once I move to a higher board revision.

  • 3
    Component tests and Magnetometer calibration

    After electronics assembly, its helpful to test components individually. I am typically using the sample programs from the component libraries to check if the module is seen by the processor. 

    • SD library Demo sketches for the MicroSD card
    • lsm303-arduino Demo sketches for the magnetometer sensor
    • u8g2 Demo sketches for OLED SSD1606 displays
    • uRTCLib Demo sketches for DS3231

    The suntracker Arduino sketch itself has self-test functions that help pinpoint anything that doesn't work. In my assembly I had no trouble at all, and everything worked right at first turn-on (except OLED1, see the node on the mainboard v1.7 gerber). If something doesn't work, a typical cause is cold solder points. The displayboard has 260 solder points.

    The magnetometer sensor needs us to identify its calibration values. I am using the lsm303-arduino calibration sketch "Calibrate.ino", with the sensor placed on a small universal board for doing the necessary axis rotations. Then am noting down the calibration min/max values, and enter them in the "mainboard-rev3.ino" sketch, see lines 325.

View all 5 instructions

Enjoy this project?

Share

Discussions

Martin wrote 08/09/2019 at 13:35 point

I like this project. I was interested in something that could position a mirror so it would catch the light and focus it on one spot during the course of a day. I can think of a few applications. I think the math could be a bit beyond me, but does someone know of a similar project?

  Are you sure? yes | no

Frank wrote 08/12/2019 at 06:45 point

Hi Martin,

How tight do you want to focus? I'd recommend to experiment, and maybe start with online calculators for incidence and reflection such as this: https://rechneronline.de/winkel/angle-of-incidence.php. Before catching sunlight, maybe train with a light beam first? It will help to emulate the positioning. I briefly thought of adding a laser beam to the suntracker for demonstration purpose, but  worried about safety hazards even for small power diodes. Depending on the location, the sun typically covers are wide angle, I think it makes it difficult to project it into a single spot over long periods with just a single mirror.

For power generation purpose, instead of using the more common photovoltaic effect of converting photons to electricity, there is research going on how bundle sunlight into a high-energy beam that generates sufficient heating power to convert into energy. I think the term to google is concentrated solar power (CSP), also a very interesting topic.

  Are you sure? yes | no

RichardCollins wrote 08/09/2019 at 12:37 point

Frank,

I do not want to be the devil's advocate, but it is fairly easy to calculate the exact position of the sun and earth at any moment, and its position relative to the observer/solar array location and orientation.  On rainy days, or cloudy days, it is hard to detect the sun from it visible and infrared signals.  The devices I am working on use gravity for tracking the sun, but the Jet Propulsion Labs solar system ephemeris is readily available, albeit with a bit of vector mathematics.  If you would like to add a calculated position for the sun, I can probably help you find a method that will fit your needs.  You just need a latitude, longitude and height.  

But, for as you know the actual insolation varies over time at every location because of cloud cover, haze, pollution, nearby building and trees, reflections.  So your device, at least in principle, has the ability to report the estimated power levels from solar collectors of various sorts.

As a proof of concept, and as a good practice in building "something" you are way ahead of me.  Your layouts have clean lines and solid construction.  I agree with Tom Nardi.  You have bult a beautiful device.  Now I sort of challenge you to find applications and user communities.

I do not know how strongly you are tied to solar panels.  As you suggest, the cost of moving them in real time is high.  You could have one that tracks by the season or hour, and does not spend a lot of energy keeping up minute by minute.

Have you looked at other types of energy harvesting?  Or were you just getting practice with sensors and monitoring?  I think you can make "projects" that are practice and demonstrations of your skills and interests.  And other "projects" that indicate areas you might like to investigate, but have no particular devices in mind at the moment.

Perhaps HackaDay.IO needs to add "Ideas" or "Topics" to their displayed materials for people.  And make our pages more like personal websites, and topic group nodes, than cheap blogs and stringy listings of things chronologically.

Thank for what you are doing.  It is nice to see well-crafted devices.  Have you tried using a webcam?  I have done a lot with statistical analysis of video frames from cameras.  Whole Sky Camera(s) as a topic has several uses, and can have a solar panel app included. It can track the weather, clouds, air traffic, sun moon and planets and night sky.  I keep an eye of global networks of such things. They are always looking for better devices and low cost methods.  You might not be able to justify it for just a solar panel, but if it had multiple global network uses, it would be justified for many people. Hackaday.IO can help get things like that short and long term manufactured to get started, if you are of an entrepreneurial bent.

Richard Collins, The Internet Foundation

  Are you sure? yes | no

Frank wrote 08/10/2019 at 04:01 point

Hi Richard,

Thank you for sharing your views, experience and suggestions! It gives me a lot of thought and things to look up. I wasn't sure to publish this project up at all, and now I am glad I did. I do have a roadmap in the back of my head, but it is always a matter of choosing the right path. Even if my path of solar tracking leads into a dead-end, I'll be able to clearly understand why, and what technology will be needed to get there. This device has been built exactly for this learning purpose. 

In a surprising turn, my daughter told me it is cool and I should publish, because it explains so much better than her dry school books. With this twist, maybe a derivate version is becoming an engaging demonstration aid for high-school astronomy teachers? Any teachers out here, I'd love to hear from you. Add moon tracking? Satellites? 

The other things you mention, yes, this is very much on the to-do list. Onboard position calculation, elevation axis control, and very crucially, adding a panel setup for real-world data-logging. I want to do a side-by-side comparison, measuring and graphing the power generation difference tracked vs. untracked.

I am not tied to solar technology. Wind power generation is also hugely interesting, among others. I do believe solar has a huge potential. New materials increasing yield, experiments with flexible panels that can unfold and collapse, integration of solar into normal construction blocks: solar is emerging as a leading power generation method - there is so much to explore for makers.
Best wishes,
Frank

  Are you sure? yes | no

RichardCollins wrote 08/10/2019 at 08:03 point

Frank,

Here is a link to the online Jet Propulsion Labs/ NASA Horizon system.  Enter your latitude and longitude and height, select the sun as your target, and ask for range azimuth and elevation back. From the range, and the solar constant you can get the intensity outside the atmosphere.  From the azimuth and elevation you can work out how much the sunlight has to traverse the atmosphere. There should be formulas out there.  Set the date range to a year, and the step size to an hour.  That should give you a talble of the sun.  

https://ssd.jpl.nasa.gov/horizons.cgi


You can also generate orbital elements for the sun from that location week by week for longer periods and calculate the position of the sun or CSV using the orbital elements.  I call it "not hard, just tedious" Steel yourself to keep going and just take one step at a time. The person who is called an explorer, is no different than anyone else, he just doesn't stop until he is done.


Solar Constant notes - https://en.wikipedia.org/wiki/Solar_constant
Good resource at NASA on Solar irradiation - https://www.ngdc.noaa.gov/stp/solar/solarirrad.html

Richard Collins, The InternetFoundation.Org

  Are you sure? yes | no

norm.heath wrote 08/07/2019 at 16:37 point

Very nice project. Thanks for sharing it. Where can I get the magnetometer. Also Iv'e downloaded the Git Hub repository and see all the info for making the board but do not see any Arduino code. Are you sharing the code.

  Are you sure? yes | no

Frank wrote 08/08/2019 at 09:32 point

Hi Norm,

Thanks for the kind words. You can find the Arduino sketch in the github repository under the src folder:
https://github.com/fm4dd/suntracker2-r3/tree/master/src/mainboard-rev3

The MM-TXS05 magnetometer from Sunhayato is available through several Japanese online sites, and is also listed on amazon.co.jp, which may ship international. Another option: the board has extra pins to support the Adafruit LSM303DLHC module: https://www.adafruit.com/product/1120
I haven't fully tested the board using the Adafruit module, please use with care. It should work as a drop-in replacement, and a minor change to the sketch for updating the driver call. You can see the Adafruit pins labeled on the boards silkscreen, they are at a right angle to the MM-TXS05 pins.

  Are you sure? yes | no

Frank wrote 08/04/2019 at 08:20 point

Thanks Tom for the kind words. appreciated! Its definitely taking extra effort. If its engaging and creates interest, than its all worth it. :-)

  Are you sure? yes | no

Tom Nardi wrote 08/03/2019 at 04:24 point

Incredible that you built a device this beautiful just to validate some ideas. Excuse me while I go back to my corner and bang some rocks together.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates