Heliostat Reflects Sunlight Inside

by MartinMemol in Circuits > Robots

6518 Views, 80 Favorites, 0 Comments

Heliostat Reflects Sunlight Inside

I built a heliostat which reflects the sunlight from the outside into a room.
Version1.jpg
Aussen2.jpg

I like sunshine, and can't get enough of it. So I wanted to build my own heliostat to track the sun and reflect the light into a room. I have searched for projects on the Internet, but most of them are just sun trackers for solar panels, have a tiny mirror, are just experimental to demonstrate the idea or for some other use case. So the only solution would be to design my own.

I have a Lamp with a dichromatic film inside and reflective metal mesh around. I bought it after I have seen this Instructable: https://www.instructables.com/Dichroic-Lamp-LEDs-But-No-RGBs/ When the sunlight hits the lamp, it creates colorful reflections in the whole room as shown in the picture above.

My first prototype was build of wood and uses servo motors to move the mirror. The servos are controlled by an Arduino and a realtime clock.

I was really happy with the result, but it was not very accurate and fails after a rainfall since the wood bends and the mechanic sometimes fails until it is dry again. There where other issues as well, so I decided to build a new one with parts from my new 3D printer.

This Instructable skips version 1 and shows how this new heliostat is build and what was done differently to hopefully work better.

Supplies

Mechanical Parts.jpg
OtherParts.jpg

ESP32

Cables

Soldering equipment

stripboard

3D Printer and filament

2x Stepper motors NEMA17

2x Stepper motor drivers A4988

capacitor 1000yF, 50V

step up module 5V->15V

USB micro connector male and female.

Cable connectors

Mirror 30x30 cm (IKEA BLODLÖNN)

Design Considerations

Drawings.jpg

As said in the introduction, I had already a prototype running for a year. Since you can learn a lot from a prototype, here is what I learned:

  • Wood is not good for mechanical parts outside
  • Electronics does not like humid air
  • It is hard for the software to compensate poor mechanics
  • Controls and signal lights on the device don't survive the weather for too long
  • Cheap plastic mirrors may deform which is a problem for a heliostat
  • A 'real time clock' module is not accurate enough.
  • This is really a cool project, I want to build an improved version.


Therefore the requirements for the new version are as follows:

  • A weather proof design which does not deteriorate in a humid environment and has a dry place for the electronics
  • High mechanical precision
  • Automatic calibration
  • Monitoring and control from the inside
  • Use of glass Mirrors
  • Should also work in winter
  • Over the air software updates

I will show in later steps how I improved the design. The main requirement is of course that it should work reliable with minimal maintenance.

3D Printed Parts

3dParts.jpg

All parts except of the electronics, the steppers, the screws and the mirrors are 3D printed.

I am quite new to 3D printing and designing this device was quite a challenge. To be sure that everything works, I have created some prototype parts. I wanted to test the following:

  • Do the parts fit together correctly? Especially since the size of the mirror is much bigger than the printing area of my 3D printer I have to make them connectable after printing.
  • Do the bearings fit together nicely? Do I need a ball-bearing?
  • How do the gears fit together? Does it work when moved via the stepper motors?

The result is working nicely, is light, does not use up too much filament and holds enough space for the electronics.

You can find the STL files in this Git Repository. The parts fit for a mirror with 30x30cm (a little less than 12x12 Inch). Since I have bought my mirrors from IKEA in Europe they are of course metric.

There are no specific print settings, I have increased the infill a bit to make it more sturdy, but it should also work with the default infill. You should use white or another color which does not heat up in the sun, since the heliostat need to stand in direct sunlight and dark parts could melt.

Electronics

WiringDiagram.png

One of the challenges for the electronics is the power supply. While the stepper motors work best with high voltages from 12-30 volts, the microcontroller needs 3.3 or 5Volts. The best way to power the microcontroller is via an USB cable. It is also possible to use a step down module from the stepper motor voltage to the processor voltage. This is how I do it.

The stepper motors can either be supplied via a separate power supply with higher voltage, or a step-up module from USB to at least 12 Volts, better 15-30. Higher voltage increases the torque of the motors and reduces the probability of lost steps. This is not so critical, since no high motor speeds are needed, but even with one missed step the mirror drifts away. The capacitor tries to help with fluctuations in the power supply. It can also be bigger or slightly smaller. Make sure the voltage of your capacitor is enough for the stepper motor voltage.

The circuit plan does not show the power supply possibilities, it just shows which pins need high voltage (15v), and which low(5v). The ground pins can be connected, but you don't need to do this manually, the motor driver takes care of this.

The push buttons are triggered when the endstops of the rotation is reached and are used for the calibration of the device. Be sure you connect them correctly, otherwise the software does not recognize them accordingly and calibration fails.

Moving Parts

SideGear.gif
TurnGear.gif

The mirror is placed on a holder which can tilt the mirror which is sitting on a big cogwheel to turn the mechanism.

Both axes, elevation to tilt the mirror and azimuth to rotate the mirror vertically are driven by stepper motors. Since I wanted to have a high accuracy and more robustness against wind, I printed a 10:1 gear from motor to mirror this increases the theoretical stepper motor limit from 1.8 degrees (200 steps per rotation) by 10 times. Theoretical because the stepper motor drivers have also micro steps to increase this accuracy up to 16 fold. This works only when you power the stepper motors continuously. Since I wanted to power the heliostat with solar power, I need to shut them down in between, otherwise too much power is consumed. This is no problem, but you cannot use micro steps since repowering the motor could lead to inaccuracies. So in fact it is a problem, since also the driver looses its position and you have to start again from a zero position which is not only loosing micro steps but also the coil polarities. So the accuracy is only 1/4 of one step of 1.8 degrees = 7.2 degrees. I have programmed the software accordingly and don't care too much since I still have less than one degree with the 10:1 gear.

Overall the mechanical accuracy of the 3D printed parts is not too high, but still high enough to not influence the result.

Software

Software_1.31.1.jpg

Software design considerations

I thought about writing the software on my own in C++ as I did for the first wooden prototype, but I wanted to try something new and also needed more functionality. Therefore I use ESPHome for the software. This enables me to easily add further capabilities:

  • Monitor and control from the inside (via Website on Wifi)
  • Over the air updates
  • Clearer design of the software (ok, this is not a feature)

This is requires an ESP32 since a standard Arduino does not have WiFi.

ESPHome is a tool which compiles a firmware by using a one or more YAML files. This makes it very easy to create your own firmware. Some C++ programming was still needed for the mirror calculation and some calibration parts, but this can be directly added to the YAML files.

What does the Software do?

When the software is powered up, it connects to the WiFi via the entered credentials in file secrets.yaml. You need to create your own since it is not part of the Git repository:

wifi_ssid: "Ssid"
wifi_password: "password"
mqtt_broker: "127.0.0.0"

Enter your SSID (Wifi name) and password accordingly and enter the IP address of your MQTT broker. When you have no MQTT broker running, you don't need this, the logs can also be seen on the webpage.


The device then provides a webserver at the address heliostat.local which can be opened with a web browser.

The webpage shows the log and has some controls for calibration.

The current time is automatically received from the internet. See the admin.yaml files for details. The timezone is UTC since the sun does not care about local timezones. All you need to do is to set the Latitude and Longitude coordinates in the substitutions section of the heliostat.yaml file. You can use google maps, mark a point, and the coordinates are shown in the bottom of the screen.

Calculation

The calculation is triggered by a timer every 30 seconds. The new mirror position is calculated and updated.

Repository

The Coding is in this Git Repository.

Setup and Calibration

Endstop_1.23.1.jpg

Calibration of the mechanics is automatic. To find the correct position for the device make sure it is placed on a even surface. Then click on the turn into sun switch at the web interface. The mirror should now face directly into the sun. Use the crosshair at the top to check this and move it accordingly when it does not fit. Deactivate the switch again. Now setup the target. There is a slider to set the target angle. Adjust it to reflect the sun on your target. The heliostat will correct the mirror position within a few seconds. The mirror should now always reflect the sun to the target. Although the mechanics supports a wide area, be sure your target is somewhere in the south to get the maximum amount of light. Targets which are lower than the heliostat are not possible except when the suns elevation is really high.

Result and Next Steps

I built a heliostat which reflects the sunlight from the outside into a room.

That's all. This device is fun in summer and in winter. And will hopefully survive longer than my wood version.

Watch the video if you haven't already watched it. It is the same as in the introduction.

Maybe there will be a version 3. I still have some ideas how to improve:

Power saving, shutdown over night

Auto calibration by searching the sun

Pause when light conditions are not good

OTA only on demand via MQTT

Data logging

Most of them could be added to the software, so no new build is needed.

A smaller and even easier to build version would also be an idea. But there are still other projects to finish...


I hope you enjoyed this Instructable. I case of questions, just leave a comment.