Inspiration: I am a recently retired to Puerto Rico and one of the inconveniences of living here is constant power outages. If you live in a apartment or condo, using a gas or propane generator is restricted by law. So the only means to power your residence during these numerous outages is using a power bank like an EcoFlow, and supplement with solar panels. So recently I purchased some portable solar panels, and I found that as the sun moves across the sky to keep adjusting the panels for optimal solar energy collection is a real challenge. After about a couple of hours looking up at the sun to get good alignment, I knew that strategy was not going to work. So I came up with the idea of creating an app that would track the sun's compass direction for my location, and give me the elevation from the horizon. That way I would not have to visibly look up for alignment. Elevation is really important because to get good solar collection, panel tilt is important.

What it does: This a a web based application configured to work on any device or screen size. It tracks in real time, the suns compass direction, elevation, and gives optimal panel tilt. It also displays sunrise time, solar noon, and sunset. Solar noon is an important time because about a half an hour before and a half an hour after is the time period when optimal solar energy is collected. Because at certain times of the day the sun is really bright and the screen is hard to see, the app has a large button at the bottom of the screen that you can click, and all the data on the screen about sun direction and elevation are spoken over the device speaker.

How we built it: I worked in education most of my life so I was familiar with HTML web pages. But to build this app, I had to learn about java-script and CSS. The code is contained in one HTML file. Using Chatgpt/Codex, I started with what I though would be the basic information I needed to get my solar panels positioned. I definitely wanted a "compass" with a pointer that would show me the direction of the sun. I also knew from reading about solar panels that the tilt would be important to optimize solar energy intake. Once the basic framework was established, I started to add other features like sunrise, solar noon, and sunset.

Challenges we ran into: In the design phase of the app, in the beginning, getting the user interface configured so that the information on the screen was presented clearly and in the correct size was important to me. Because I am a senior citizen, having the font large enough for easy reading was my first consideration. Then getting everything in a logical order so the information kind of “flowed.” When you design something, I believe that making it look good adds to the user experience. Then picking a good background color and colors for the text so the information would pop off the screen would add to the readability of the screen.

Accomplishments that we're proud of: I am very satisfied that I was able to create a useful application that came from a need. I was not just sitting around trying to think of an idea for an app, it really has a practical application to how we live in this part of the world.

What we learned: Learned a lot about the coding language JavaScript. There were times when small little tweaks were required, so I would ask Codex where in the code the tweak was located, and I learned how to read and then edit the code myself. I am kind of creative, but until now, being able to code at the level necessary to create an app like this would have been impossible. It is very empowering to have an idea and be able to make a computer do what you want it to do. I was born 30 years to late!

What's next for Sun Tracker for Solar Panels: Most of my neighbors and I have all gone through the same learning curve with using portable solar panels, and we have all helped each other put together good systems. I intend to share my app with everyone in our community. Since it can be accessed using any type of device, everyone will be able to give it try. The community here is a pretty intelligent group, so I know there will be good suggestions to add to app over time, which will only enhance this first run.

Built With

Share this project:

Updates