<p>I wrote the source you need some years ago:</p>
<p><a href="https://jumpjack.wixsite.com/progetti/sorgenti-ipsun" rel="nofollow noreferrer">https://jumpjack.wixsite.com/progetti/sorgenti-ipsun</a></p>
<p>The Arduino/Processing version was just a demo program to manually control a TENVIS camera by multiple buttons, it lacks the &quot;astronomical algorithm&quot;.</p>
<p>The Javascript version contains astronomical calculations and a demo page which connects to a local TENVIS camera.</p>
<p>I also built a prototype...</p>
<p><a href="https://i.sstatic.net/tRWug.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/tRWug.png" alt="prototype" /></a>
<a href="https://jumpjack.wixsite.com/progetti/ipsun" rel="nofollow noreferrer">https://jumpjack.wixsite.com/progetti/ipsun</a></p>
<p>...then I found, at MakerFairRome 2016, a maker which sold on Kickstarter a ready-made heliostat, initially named &quot;<a href="https://www.youtube.com/watch?v=TBz1uuAk4jI" rel="nofollow noreferrer">Lucy</a>&quot;, then renamed &quot;<a href="https://solenica.com/" rel="nofollow noreferrer">Caia</a>&quot;... 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.</p>
<p>But in the meantime I found this page about a &quot;static heliostat&quot;, and now I am <a href="https://astronomy.stackexchange.com/questions/42115/how-to-design-a-static-heliostat">trying to reverse-engineer it</a> to figure out if it could be easier/cheaper:</p>
<p><a href="https://i.sstatic.net/R6gqe.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/R6gqe.jpg" alt="Static heliostat" /></a></p>
<p><a href="https://i.sstatic.net/CqB44.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/CqB44.png" alt="Static heliostat - sun strip" /></a></p>
<p><a href="http://cleardomesolar.com/solareflexpanels.html" rel="nofollow noreferrer">http://cleardomesolar.com/solareflexpanels.html</a></p>
<p>Additional resource with dozens of links to heliostats, coelostats, and whatelse...:</p>
<p><a href="http://www.redrok.com/main.htm#gsc.tab=0" rel="nofollow noreferrer">http://www.redrok.com/main.htm#gsc.tab=0</a></p>

CC BY-SA 4.0
2022-01-22T19:07:46.893Z
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 :-)
Xiaodong Qi
CC BY-SA 4.0
2024-03-13T09:28:11.783Z
I added my old code to my github repo about heliostats:  https://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€): https://www.amazon.it/gp/product/B07G8WK3HS
jumpjack
CC BY-SA 4.0
2021-04-06T19:03:40.240Z
2021-04-08T07:01:24.937Z
2021-04-08T07:01:24.937Z
jumpjack
<p>I just discovered that a lot less math is needed to build an heliostat:</p>
<ul>
<li>in '800 somebody &quot;discovered&quot; 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.
<ul>
<li><a href="https://en.wikisource.org/wiki/Page:EB1911_-_Volume_13.djvu/244" rel="nofollow noreferrer">Original description</a>  of working  mechanism</li>
<li><a href="https://en.m.wikisource.org/wiki/1911_Encyclop%C3%A6dia_Britannica/Heliostat" rel="nofollow noreferrer">Modern description</a> of working mechanism</li>
</ul>
</li>
</ul>
<p><a href="https://i.sstatic.net/luu8z.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/luu8z.png" alt="Silbermann heliostat" /></a></p>
<ul>
<li>there is a &quot;werid way&quot; to look at how a parabolic mirror reflects rays;
<ul>
<li>classic way: all rays coming from same direction (a satellite) are reflected to same point:
<a href="https://i.sstatic.net/XgbiZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XgbiZ.png" alt="parabolic mirror 1" /></a></li>
<li>alternate way: wherever a ray comes from, it will be always redirected in same direction (<strong>as long as it passes through focus)</strong>:</li>
</ul>
</li>
</ul>
<p><a href="https://i.sstatic.net/B9oxP.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/B9oxP.png" alt="parabolic mirror 2" /></a></p>
<p>Does this mean that wherever the sun is in the sky, it will be always reflected in same direction along the day?!?</p>
<p>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.</p>
<p>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:</p>
<p><a href="https://i.sstatic.net/0pz95.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/0pz95.png" alt="parabolic mirror 3" /></a></p>
<p>And probably:</p>
<p><a href="https://i.sstatic.net/Gpmqx.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Gpmqx.png" alt="enter image description here" /></a></p>
<p>So you can decide:</p>
<ul>
<li>if you want intense reflection, you need a &quot;perfect&quot; mirror (next test will be to glue mirror mosaic tiles to the parabolic antenna), but it will be as large as the mirror itself.</li>
<li>If light widespread all over the wall is enough, you can use a reflective coating.</li>
</ul>
<p>Further experiments will follow.</p>
<p>In  the meantime , you can play with this 2d optics simulator:</p>
<p><a href="https://phydemo.app/ray-optics/simulator/" rel="nofollow noreferrer">https://phydemo.app/ray-optics/simulator/</a></p>

CC BY-SA 4.0
2023-03-20T04:24:37.083Z
"you just need a clock; but a special clock, which rotates at specific speed."  This is how telescopes work, no?
RonJohn
CC BY-SA 4.0
2023-03-20T05:52:54.307Z
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.
jumpjack
CC BY-SA 4.0
2023-03-20T05:54:23.027Z
"connected to startrackers work".  That's what I meant.  Should have clarified it.
RonJohn
CC BY-SA 4.0
2023-03-17T18:38:21.820Z
2023-03-19T17:52:35.387Z
2023-03-19T17:52:35.387Z
jumpjack
<p>Assuming you know Sun Altitude/Elevation and Azimuth at a given location on Earth (you can calculate it using any astronomy library, such as <a href="https://github.com/mourner/suncalc" rel="nofollow noreferrer">suncalc.js</a>), and the Altitude/Elevation and Azimuth of target w.r.t mirror, the mirror must point toward this direction:</p>
<pre><code>mirrorAz = TargetAz + (SunAz - TargetAz) / 2
mirrorAlt = TargetAlt + (SunAlt - TargetAlt) / 2
</code></pre>
<p><a href="https://i.sstatic.net/EfQty.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/EfQty.png" alt="Azimuth explanation" /></a></p>
<p><a href="https://i.sstatic.net/R0Ekv.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/R0Ekv.png" alt="Elevation explanation" /></a></p>

CC BY-SA 4.0
2021-04-08T20:28:50.297Z
Yet another helpful answer of yours. In particular https://github.com/mourner/suncalc/blob/master/suncalc.js seems very helpfu, but I have not yet manage to read it fully.
B--rian
CC BY-SA 4.0
2021-04-08T14:01:51.467Z
2021-04-08T14:01:51.467Z
jumpjack
<p>Theoretically, using a Raspberry Pi, (at least) one mirror, and two motors, one should be able to build a <a href="https://en.wikipedia.org/wiki/Heliostat" rel="noreferrer">heliostat</a>, i.e. a device which redirects sunlight to a fixed spot, like a scrub in the shadow of a building.</p>
<p>I am now searching for <strong>heliostat (open) source code</strong>, ideally in python, hopefully with enough comments. Also: Is my following rough approach correct?</p>
<ol>
<li>We need to know the <em>exact geographical location</em> 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.</li>
<li>For a given <em>time</em>, we can use celestrial mechanics to calculate the path of the sun on the sky.</li>
<li>Using the <a href="https://en.wikipedia.org/wiki/Reflection_(physics)" rel="noreferrer">reflection law</a> 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.</li>
</ol>
<p>That sound simple enough, at least theoretically. I read that for step 2, many use precalculated tables. Why? Is it numerically so challenging?</p>
<h3>References</h3>
<ul>
<li><a href="https://www.sunearthtools.com/dp/tools/pos_sun.php" rel="noreferrer">https://www.sunearthtools.com/dp/tools/pos_sun.php</a></li>
<li>Jon Henley: <em><a href="https://www.theguardian.com/world/2013/nov/06/rjukan-sun-norway-town-mirrors" rel="noreferrer">Rjukan sun: the Norwegian town that does it with mirrors</a></em></li>
<li><a href="https://www.instructables.com/ICARUS-The-Analog-Heliosat/" rel="noreferrer">Renard Bleu: ICARUS: the Analog Heliostat</a></li>
<li><a href="https://www.raspberrypi.org/forums/viewtopic.php?t=61914" rel="noreferrer">Raspberry Forum: 2 axis Heliostat</a></li>
<li><a href="http://arduinobeam.blogspot.com/" rel="noreferrer">Open Source Sun Tracking Skylight</a></li>
<li>Sadly mostly offline, but everybody is linking there: <a href="http://www.cerebralmeltdown.com/" rel="noreferrer">http://www.cerebralmeltdown.com/</a></li>
</ul>

CC BY-SA 4.0
2021-04-01T14:49:53.287Z
You've been through the US Navy site? https://www.usno.navy.mil/astronomy
Wayfaring Stranger
CC BY-SA 4.0
2021-04-08T20:09:01.640Z
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](https://en.wikipedia.org/wiki/Equation_of_time) and the [analemma](https://en.wikipedia.org/wiki/Analemma).
Michael Seifert
CC BY-SA 4.0
2021-04-08T20:25:25.770Z
@MichaelSeifert Thanks for the hint about *analemma*. I also found [Position of the sun](https://en.wikipedia.org/wiki/Position_of_the_Sun) which is kind of what I need to do in first place.
B--rian
CC BY-SA 4.0
2022-04-30T18:11:39.317Z
did you build the heliostat?
jumpjack
CC BY-SA 4.0
2022-05-02T06:50:44.913Z
@jumpjack Not yet.
B--rian
<the-sun><python><celestial-mechanics><mathematics>
Open source code for the maths behind a heliostat?
B--rian
# Open source code for the maths behind a heliostat?

(Asked by: username_0 on 2021-03-31)

Theoretically, using a Raspberry Pi, (at least) one mirror, and two motors, one should be able to build a [heliostat](https://en.wikipedia.org/wiki/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](https://en.wikipedia.org/wiki/Reflection_(physics)) 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?

### References

* <https://www.sunearthtools.com/dp/tools/pos_sun.php>
* Jon Henley: *[Rjukan sun: the Norwegian town that does it with mirrors](https://www.theguardian.com/world/2013/nov/06/rjukan-sun-norway-town-mirrors)*
* [Renard Bleu: ICARUS: the Analog Heliostat](https://www.instructables.com/ICARUS-The-Analog-Heliosat/)
* [Raspberry Forum: 2 axis Heliostat](https://www.raspberrypi.org/forums/viewtopic.php?t=61914)
* [Open Source Sun Tracking Skylight](http://arduinobeam.blogspot.com/)
* Sadly mostly offline, but everybody is linking there: <http://www.cerebralmeltdown.com/>

**Tags:** the-sun, python, celestial-mechanics, mathematics
> **Comments:**
> **username_1**: You've been through the US Navy site? https://www.usno.navy.mil/astronomy  
> **username_2**: 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](https://en.wikipedia.org/wiki/Equation_of_time) and the [analemma](https://en.wikipedia.org/wiki/Analemma).  
> **username_0**: @MichaelSeifert Thanks for the hint about *analemma*. I also found [Position of the sun](https://en.wikipedia.org/wiki/Position_of_the_Sun) which is kind of what I need to do in first place.  
> **username_3**: did you build the heliostat?  
> **username_0**: @jumpjack Not yet.  

---

## 3 answers

### Answer by username_3 on 2021-04-08. Score: 4 | Accepted answer

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

> **Comments:**
> **username_0**: Yet another helpful answer of yours. In particular https://github.com/mourner/suncalc/blob/master/suncalc.js seems very helpfu, but I have not yet manage to read it fully.  

---

### Answer by username_3 on 2021-04-06. Score: 7

I wrote the source you need some years ago:

<https://jumpjack.wixsite.com/progetti/sorgenti-ipsun>

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://i.sstatic.net/tRWug.png)](https://i.sstatic.net/tRWug.png)
<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](https://www.youtube.com/watch?v=TBz1uuAk4jI)", then renamed "[Caia](https://solenica.com/)"... 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](https://astronomy.stackexchange.com/questions/42115/how-to-design-a-static-heliostat) to figure out if it could be easier/cheaper:

[![Static heliostat](https://i.sstatic.net/R6gqe.jpg)](https://i.sstatic.net/R6gqe.jpg)

[![Static heliostat - sun strip](https://i.sstatic.net/CqB44.png)](https://i.sstatic.net/CqB44.png)

<http://cleardomesolar.com/solareflexpanels.html>

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

<http://www.redrok.com/main.htm#gsc.tab=0>

> **Comments:**
> **username_4**: 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 :-)  
> **username_3**: I added my old code to my github repo about heliostats:  https://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€): https://www.amazon.it/gp/product/B07G8WK3HS  

---

### Answer by username_3 on 2023-03-17. Score: 2

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.
  + [Original description](https://en.wikisource.org/wiki/Page:EB1911_-_Volume_13.djvu/244) of working mechanism
  + [Modern description](https://en.m.wikisource.org/wiki/1911_Encyclop%C3%A6dia_Britannica/Heliostat) of working mechanism

[![Silbermann heliostat](https://i.sstatic.net/luu8z.png)](https://i.sstatic.net/luu8z.png)

* 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](https://i.sstatic.net/XgbiZ.png)](https://i.sstatic.net/XgbiZ.png)
  + 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](https://i.sstatic.net/B9oxP.png)](https://i.sstatic.net/B9oxP.png)

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](https://i.sstatic.net/0pz95.png)](https://i.sstatic.net/0pz95.png)

And probably:

[![enter image description here](https://i.sstatic.net/Gpmqx.png)](https://i.sstatic.net/Gpmqx.png)

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:

<https://phydemo.app/ray-optics/simulator/>

> **Comments:**
> **username_5**: "you just need a clock; but a special clock, which rotates at specific speed."  This is how telescopes work, no?  
> **username_3**: 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.  
> **username_5**: "connected to startrackers work".  That's what I meant.  Should have clarified it.  

---

