Theoretically, using a Raspberry Pi, (at least) one mirror, and two motors, one should be able to build a heliostat, i.e. a device which redirects sunlight to a fixed spot, like a scrub in the shadow of a building.

I am now searching for heliostat (open) source code, ideally in python, hopefully with enough comments. Also: Is my following rough approach correct?

  1. We need to know the exact geographical location of the mirror in terms of longitude, latitude. For simplicity, we assume that the mirror itself always has an obstacle-free view of the sun.
  2. For a given time, we can use celestrial mechanics to calculate the path of the sun on the sky.
  3. Using the reflection law from geometrical optics, we can determine the position of the mirror, since we know the vector from the mirror position to the spot we want to direct light to.

That sound simple enough, at least theoretically. I read that for step 2, many use precalculated tables. Why? Is it numerically so challenging?


  • $\begingroup$ You've been through the US Navy site? usno.navy.mil/astronomy $\endgroup$ Apr 1, 2021 at 14:49
  • $\begingroup$ Part of the reason tables are used for the Sun's position in celestial coordinates is that the right ascension and declination of the Sun vary throughout the year in a complicated way. See the Wikipedia articles on the equation of time and the analemma. $\endgroup$ Apr 8, 2021 at 20:09
  • $\begingroup$ @MichaelSeifert Thanks for the hint about analemma. I also found Position of the sun which is kind of what I need to do in first place. $\endgroup$
    – B--rian
    Apr 8, 2021 at 20:25
  • $\begingroup$ did you build the heliostat? $\endgroup$
    – jumpjack
    Apr 30 at 18:11
  • $\begingroup$ @jumpjack Not yet. $\endgroup$
    – B--rian
    May 2 at 6:50

2 Answers 2


I wrote the source you need some years ago:


The Arduino/Processing version was just a demo program to manually control a TENVIS camera by multiple buttons, it lacks the "astronomical algorithm".

The Javascript version contains astronomical calculations and a demo page which connects to a local TENVIS camera.

I also built a prototype...

prototype https://jumpjack.wixsite.com/progetti/ipsun

...then I found, at MakerFairRome 2016, a maker which sold on Kickstarter a ready-made heliostat, initially named "Lucy", then renamed "Caia"... but 5 years passed and it has not yet been born... so I think I'll have to go back to my project and develop my own heliostat.

But in the meantime I found this page about a "static heliostat", and now I am trying to reverse-engineer it to figure out if it could be easier/cheaper:

Static heliostat

Static heliostat - sun strip


Additional resource with dozens of links to heliostats, coelostats, and whatelse...:


  • $\begingroup$ I have answered your question about the SolarReflector. Now, what would be your ideal design for a cheap and practical reflector? I am also very interested in this work :-) $\endgroup$ Jan 22 at 19:07

Assuming you know Sun Altitude/Elevation and Azimuth at a given location on Earth (you can calculate it using any astronomy library, such as suncalc.js), and the Altitude/Elevation and Azimuth of target w.r.t mirror, the mirror must point toward this direction:

mirrorAz = TargetAz + (SunAz - TargetAz) / 2
mirrorAlt = TargetAlt + (SunAlt - TargetAlt) / 2

Azimuth explanation

Elevation explanation


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .