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, 2022 at 18:11
  • $\begingroup$ @jumpjack Not yet. $\endgroup$
    – B--rian
    May 2, 2022 at 6:50

3 Answers 3


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, 2022 at 19:07
  • $\begingroup$ I added my old code to my github repo about heliostats: github.com/jumpjack/heliostat/tree/main/ipSun Now I am going to update it to port the javascript code to ESP32/Arduino, to control this pan/tilt head (27€): amazon.it/gp/product/B07G8WK3HS $\endgroup$
    – jumpjack
    Mar 13 at 9:28

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


I just discovered that a lot less math is needed to build an heliostat:

  • in '800 somebody "discovered" that you don't need any un-existing sun-sensor or un-existing computer to continuously track the sun moving in the sky: you just need a clock; but a special clock, which rotates at specific speed. Rotating at this speed a properly oriented mirror, it will reflect the sun in the same direction for whole day, but in slightly different directions on next days; the device was indeed designed to work only for some hours, during optics lessons. There are several variants of these devices, currently I am focusing on Silbermann heliostat buit by Louis-Jules Duboscq; with this device you don't need to know/do maths: somebody did it for you 250 years ago; I think the right speed is half the sun speed and is constant along the day, but I am still working on this: the box of Silbermann heliostat looks too big to be so simple.

Silbermann heliostat

  • there is a "werid way" to look at how a parabolic mirror reflects rays;
    • classic way: all rays coming from same direction (a satellite) are reflected to same point: parabolic mirror 1
    • alternate way: wherever a ray comes from, it will be always redirected in same direction (as long as it passes through focus):

parabolic mirror 2

Does this mean that wherever the sun is in the sky, it will be always reflected in same direction along the day?!?

So I did a real life test: I took a parabolic antenna, I painted it in reflective coat, I placed it the sun, in front of my north-oriented window. Result: a whole wall of the room which had never seen the sun before was filled by natural sun light!! My experiment lasted only 1h15m because I started it late, while sun was going to set (in that point the sun arrived today only at 16:00, and it set at 17:15 behind buildings). During this time, a flat mirror placed on the illuminated wall reflected light to a constant position on another wall.

The light was not as bright as the sun, because the mirror is just around 0.33 m2 and the wall is 6m2, so I think I observed a collateral effect: if reflective coating is not perfect but a little coarse, you get this effect:

parabolic mirror 3

And probably:

enter image description here

So you can decide:

  • if you want intense reflection, you need a "perfect" mirror (next test will be to glue mirror mosaic tiles to the parabolic antenna), but it will be as large as the mirror itself.
  • If light widespread all over the wall is enough, you can use a reflective coating.

Further experiments will follow.

In the meantime , you can play with this 2d optics simulator:


  • $\begingroup$ "you just need a clock; but a special clock, which rotates at specific speed." This is how telescopes work, no? $\endgroup$
    – RonJohn
    Mar 20, 2023 at 4:24
  • $\begingroup$ No this is how telescopes connected to startrackers work; but anyway they rotate at exactly 360 degrees/day, because they follow sky objects; but an heliostat does not track sun, the mirror shall not look at the sun: it must reflect it to a specific direction. At my specific location I think it can do it by moving at 1/2 speed of the sun, I am still trying to figure out how the speed relates to position and day of the year. $\endgroup$
    – jumpjack
    Mar 20, 2023 at 5:52
  • $\begingroup$ "connected to startrackers work". That's what I meant. Should have clarified it. $\endgroup$
    – RonJohn
    Mar 20, 2023 at 5:54

You must log in to answer this question.

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