Close

the end of day flip

A project log for Low cost solar panel solution (MPPT + sun tracker)

portable flexible panel + MPPT controller + solar tracker system less than 55 USD ????

jp-gleyzesJP Gleyzes 08/29/2022 at 07:440 Comments

At the end of the day the panel should go back to next morning position.

Here is how it works: (timelapse speed increased by 120)

As you can see the panel stops its motion when elevation of the sun reaches a "home" value and goes back to East when sun elevation reaches a "limit" value.

 The computation for the "flip" is quite simple as the panel has simply to go to the symetrical position (compared to the current one). The symetry is of course to the max elevation angle which is at 12:00 solar time.

switch (heliostatStatus) {
    
      case tracking:    // now go to next morning sunrize azimuth
        heliostatStatus = morning ;
        currentAz = 180 - (previousAz - 180.0);
        stepsToMoveAz = ((currentAz - previousAz) * wormGearRatioAz * stepsPerTurnAz) / 360;        //it's an integer
        currentAz = previousAz + (float)stepsToMoveAz * 360. / (wormGearRatioAz * stepsPerTurnAz);  //so needs to recompute real Az value
        Serial.println("going to next morning Az");
        break;

      case morning:    // now go to sleep until tomorrow morning
        heliostatStatus = sleeping ;
        sunRize = 2 * ((hours - 12) * 3600 + minutes * 60) ;        // sunRize duration symetrical around 12h and "now"
        timeToSleep = 86400 - sunRize;
        esp_sleep_enable_timer_wakeup(timeToSleep * uS_TO_S_FACTOR);
        Serial.print("timeToSleep : ");
        Serial.println(timeToSleep);
        stepsToMoveAz = 0;
        break;

      case sleeping:    // don't move
        stepsToMoveAz = 0;
        break;
    }

The automat goes from "tracking" to "morning" and then "sleeping"

When in "morning" status it computes the symetrical azimut to noon and the time to sleep before getting this azimut. Then it goes to deepsleep state.

On the video (08/29/2022) it was 18:45 pm local time. That is 16:45 UTC when the sun got the 22° elevation limit. Then the panel had to flip to 7:15 am UTC (green point with same sun elevation).

These Sun Elevation values are currently constant into the code:

#define EL_HOME 23          //expressed in °
#define EL_LIMIT 22         //expressed in °

It could be nice to have them as parameters to adapt to your local configuration (natural horizon mask of your field).

This will be done into a next release of the codes (firmware + companion App)!

Discussions